:root {
  --bg: #0d0d0f;
  --bg-soft: #151518;
  --panel: #1b1b1f;
  --panel-2: #222228;
  --paper: #eee8dc;
  --paper-2: #ddd4c4;
  --ink: #17161a;
  --cream: #f5efe4;
  --muted: #aaa49b;
  --muted-dark: #6b665f;
  --red: #b82a31;
  --red-bright: #d83a42;
  --blue: #778fb2;
  --green: #718d77;
  --line: rgba(255, 255, 255, 0.13);
  --line-dark: rgba(20, 18, 22, 0.16);
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 15px;
  --sidebar: 252px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px) 0 0 / 100% 44px,
    var(--bg);
  color: var(--cream);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  z-index: 100;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
textarea { resize: vertical; }
::selection { background: var(--red); color: white; }

.ambient {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: .13;
  z-index: -1;
}
.ambient-one { top: -240px; right: 8%; background: var(--red); }
.ambient-two { bottom: -300px; left: 20%; background: var(--blue); }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: var(--sidebar);
  padding: 26px 20px 22px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(12, 12, 14, .9);
  backdrop-filter: blur(22px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-symbol {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50% 50% 8px 50%;
  color: var(--red-bright);
  background: rgba(255,255,255,.03);
  font-size: 20px;
  transform: rotate(-9deg);
}
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 17px; letter-spacing: -.03em; }
.brand-copy small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .13em; }

.nav { display: grid; gap: 4px; margin-top: 48px; }
.nav-link {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.nav-link span { font-size: 10px; letter-spacing: .1em; color: #6f6b65; }
.nav-link:hover { color: var(--cream); background: rgba(255,255,255,.04); transform: translateX(2px); }
.nav-link.active { color: var(--cream); background: rgba(184,42,49,.13); }
.nav-link.active span { color: var(--red-bright); }
.sidebar-note {
  margin-top: auto;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
}
.sidebar-note p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.sidebar-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 18px; }
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted-dark);
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.link-button.light { color: var(--muted); }
.link-button:hover { color: var(--red-bright); }

main { margin-left: var(--sidebar); }
.page {
  max-width: 1280px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 72px 64px 112px;
  scroll-margin-top: 16px;
}
.page-overview { padding-top: 28px; }
.topbar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.status-line { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.status-line i { width: 7px; height: 7px; border-radius: 50%; background: #7daf82; box-shadow: 0 0 0 4px rgba(125,175,130,.12); }
.topbar-controls { display: flex; align-items: flex-end; gap: 10px; }
.compact-field { display: grid; gap: 5px; }
.compact-field span, .filter-panel label > span, .market-form label > span { color: var(--muted); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.compact-field input, .compact-field select {
  min-height: 35px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--cream);
  color-scheme: dark;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .7fr);
  gap: 54px;
  align-items: end;
  padding: 72px 0 54px;
}
.eyebrow {
  margin: 0 0 13px;
  color: var(--red-bright);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .18em;
  text-transform: uppercase;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 7.8vw, 116px);
  font-weight: 500;
  line-height: .82;
  letter-spacing: -.075em;
}
h1 em { color: var(--red-bright); font-weight: 500; }
.hero-lead {
  max-width: 700px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 21px);
  line-height: 1.5;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.primary-button, .secondary-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 720;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.primary-button {
  border: 1px solid var(--red-bright);
  background: var(--red);
  color: white;
}
.primary-button.dark { border-color: var(--ink); background: var(--ink); }
.secondary-button { border: 1px solid var(--line); color: var(--cream); background: rgba(255,255,255,.025); }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.22); }

.progress-orbit {
  position: relative;
  min-height: 310px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 46% 46% 22px 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(184,42,49,.19), transparent 50%),
    var(--panel);
  box-shadow: var(--shadow);
}
.progress-orbit::before, .progress-orbit::after {
  content: "✦";
  position: absolute;
  color: var(--paper);
  font-size: 18px;
}
.progress-orbit::before { top: 25px; left: 26px; }
.progress-orbit::after { right: 26px; bottom: 24px; transform: rotate(45deg); }
.progress-ring {
  --progress: 0deg;
  width: 154px;
  height: 154px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--red-bright) var(--progress), rgba(255,255,255,.09) 0);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}
.progress-ring-inner {
  width: 126px;
  height: 126px;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background: var(--bg-soft);
}
.progress-ring-inner strong { font-family: Georgia, serif; font-size: 35px; font-weight: 500; }
.progress-ring-inner span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.progress-orbit-copy { text-align: center; }
.progress-orbit-copy p { margin: 7px 0 4px; }
.progress-orbit-copy small { color: var(--muted); }

.tiny-label { color: var(--muted-dark); font-size: 9px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.tiny-label.light { color: var(--muted); }
.milestone-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.milestone-card {
  position: relative;
  min-height: 138px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.025);
  overflow: hidden;
}
.milestone-card::after {
  content: attr(data-day);
  position: absolute;
  right: 10px;
  bottom: -26px;
  color: rgba(255,255,255,.035);
  font-family: Georgia, serif;
  font-size: 82px;
}
.milestone-card.current { border-color: rgba(216,58,66,.55); background: rgba(184,42,49,.08); }
.milestone-card.done { border-color: rgba(113,141,119,.5); }
.milestone-card h3 { margin: 13px 0 7px; font-size: 17px; }
.milestone-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr .85fr;
  gap: 14px;
  margin-top: 14px;
}
.paper-card, .dark-card, .note-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.paper-card { background: var(--paper); color: var(--ink); border: 1px solid rgba(255,255,255,.28); box-shadow: var(--shadow); }
.dark-card { background: var(--panel); color: var(--cream); border: 1px solid var(--line); }
.current-week-card { grid-row: span 2; min-height: 430px; padding: 28px; }
.current-week-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -80px;
  top: -90px;
  border: 1px solid rgba(184,42,49,.28);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(184,42,49,.06), 0 0 0 40px rgba(184,42,49,.035);
}
.card-topline { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-number { font-family: Georgia, serif; font-size: 20px; color: var(--red); }
.status-badge, .pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  white-space: nowrap;
}
.status-badge { background: rgba(184,42,49,.1); color: var(--red); border: 1px solid rgba(184,42,49,.22); }
.current-week-card h2 { position: relative; z-index: 1; max-width: 650px; margin: 48px 0 15px; font-family: Georgia, serif; font-weight: 500; font-size: clamp(36px, 4vw, 60px); line-height: .95; letter-spacing: -.045em; }
.current-week-card > p { position: relative; z-index: 1; max-width: 640px; margin: 0; color: var(--muted-dark); line-height: 1.55; }
.week-result { position: relative; z-index: 1; margin-top: 38px; padding-top: 20px; border-top: 1px solid var(--line-dark); }
.week-result span { display: block; color: var(--muted-dark); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.week-result strong { display: block; max-width: 670px; margin-top: 7px; font-size: 16px; line-height: 1.45; }
.week-progress-row { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; margin-top: 28px; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(20,18,22,.1); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--red); transition: width .3s ease; }
.week-progress-row strong { font-size: 12px; }
.text-arrow { position: relative; z-index: 1; display: inline-block; margin-top: 25px; color: var(--red); font-size: 12px; font-weight: 760; text-decoration: none; border-bottom: 1px solid currentColor; }

.daily-card { min-height: 270px; padding: 24px; background: radial-gradient(circle at 90% 10%, rgba(184,42,49,.2), transparent 34%), var(--panel); }
