:root {
  color-scheme: light;
  --paper: #f1f0ed;
  --paper-2: #e9e8e5;
  --ink: #171817;
  --ink-soft: #4f504e;
  --muted: #858682;
  --line: #d4d3cf;
  --surface: rgba(255, 255, 255, .64);
  --surface-strong: #f8f7f4;
  --graphite: #292b2a;
  --graphite-2: #474947;
  --green: #17614b;
  --green-soft: #dce8e2;
  --radius: 24px;
  font-family: "DM Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); position: relative; overflow: hidden; }
.app-shell::before, .app-shell::after { content: ""; position: fixed; pointer-events: none; z-index: 0; border-radius: 50%; filter: blur(1px); }
.app-shell::before { width: 650px; height: 250px; top: -175px; right: 8%; transform: rotate(-15deg); background: linear-gradient(110deg, rgba(255,255,255,.9), rgba(210,211,210,.2)); }
.app-shell::after { width: 640px; height: 200px; bottom: -160px; left: 34%; transform: rotate(-12deg); background: linear-gradient(105deg, rgba(213,214,213,.2), rgba(255,255,255,.7)); }
.sidebar { border-right: 1px solid rgba(38,39,38,.1); padding: 32px 20px 24px; display: flex; flex-direction: column; position: relative; z-index: 2; background: rgba(246,245,242,.62); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: baseline; font: 800 27px/1 "Manrope", sans-serif; letter-spacing: .18em; margin: 0 0 54px 8px; }
.brand-dot, .title-period { color: var(--green); }
.workspace-label, .eyebrow { color: #777976; font-size: 10px; line-height: 1.4; font-weight: 700; letter-spacing: .16em; }
.workspace-label { margin: 0 0 14px 10px; font-size: 9px; }
.side-nav { display: grid; gap: 8px; }
.nav-link { min-height: 50px; display: flex; align-items: center; gap: 12px; padding: 0 13px; border-radius: 14px; color: #5d5e5c; font-size: 14px; font-weight: 600; transition: .18s ease; }
.nav-link:hover { background: rgba(35,36,35,.055); color: var(--ink); }
.nav-link.selected { color: var(--ink); background: linear-gradient(100deg, rgba(25,26,25,.095), rgba(25,26,25,.035)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.52); }
.nav-icon { width: 22px; display: inline-grid; place-items: center; font-size: 20px; color: #272927; }
.nav-count { margin-left: auto; font-size: 10px; color: #82837f; }
.muted-link { font-weight: 500; }
.disabled-link { opacity: .5; cursor: default; }
.sidebar-bottom { margin-top: auto; }
.sidebar-rule { border-top: 1px solid var(--line); margin: 0 2px 19px; }
.profile-mini { display: flex; gap: 10px; align-items: center; min-width: 0; }
.avatar-initial, .avatar-top { width: 34px; height: 34px; display: inline-grid; flex: 0 0 auto; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #3f4140, #171817); color: #f6f5f1; font-size: 12px; font-weight: 700; }
.profile-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4c4d4b; font-size: 11px; }
.logout-form { margin-top: 13px; }
.logout-button { border: 0; padding: 6px 0; background: transparent; color: #858682; font-size: 11px; }
.logout-button span { margin-left: 5px; }

.main-area { min-width: 0; padding: 0 clamp(26px, 4.2vw, 72px) 20px; position: relative; z-index: 1; }
.topbar { height: 75px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(38,39,38,.1); position: relative; z-index: 1; }
.breadcrumb { display: flex; align-items: center; gap: 12px; font-size: 12px; color: #777976; }
.breadcrumb a { color: #3e403e; }
.breadcrumb > span:last-child { color: #242624; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.system-status { display: flex; align-items: center; gap: 7px; color: #777976; font-size: 10px; }
.system-status i { width: 6px; height: 6px; border-radius: 100%; display: inline-block; background: var(--green); box-shadow: 0 0 0 3px rgba(23,97,75,.09); }
.avatar-top { width: 31px; height: 31px; font-size: 10px; }
.page-heading { min-height: 176px; display: flex; justify-content: space-between; align-items: flex-end; padding: 35px 2px 26px; position: relative; z-index: 1; }
.eyebrow { margin: 0 0 12px; }
.eyebrow-divider { margin: 0 8px; color: #b0b0ac; }
h1, h2, p { margin-top: 0; }
.page-heading h1 { margin: 0; font: 600 clamp(40px, 4.25vw, 62px)/1.04 "Manrope", sans-serif; letter-spacing: -.065em; }
.page-subtitle { margin: 12px 0 0; color: #777976; font-size: 14px; }
.cycle-tag { display: flex; align-items: center; gap: 8px; color: #565754; font-size: 10px; font-weight: 700; letter-spacing: .12em; white-space: nowrap; padding-bottom: 8px; }
.cycle-tag b { color: #a5a6a2; }
.cycle-tag-dot { width: 7px; height: 7px; border-radius: 50%; background: #555754; display: inline-block; box-shadow: 0 0 0 4px rgba(35,37,35,.07); }
.quiet-badge { margin-bottom: 11px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: #666763; font-size: 9px; letter-spacing: .12em; }
.project-head-actions { display: flex; align-items: center; gap: 18px; }
.archive-action { min-height: 36px; padding: 0 13px; border-radius: 999px; font-size: 10px; }
.archived-banner { position: relative; z-index: 1; margin: -9px 0 16px; padding: 13px 16px; border: 1px solid #d5d2ca; border-radius: 14px; background: rgba(229,227,220,.7); color: #62625d; font-size: 12px; }
.archived-banner span { margin-right: 8px; color: #343633; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.project-view-tabs { display: flex; gap: 6px; width: fit-content; margin: -3px 0 21px; padding: 4px; border: 1px solid rgba(42,43,42,.1); border-radius: 999px; background: rgba(255,255,255,.38); }
.project-view-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; color: #777976; font-size: 11px; font-weight: 600; }
.project-view-tabs a.selected { color: var(--ink); background: rgba(255,255,255,.78); box-shadow: 0 2px 9px rgba(25,26,25,.06); }
.project-view-tabs span { color: #999a96; font-size: 9px; }
.project-card-archived { filter: saturate(.72); }
.rewind-panel { position: relative; z-index: 1; margin-top: 14px; padding: 15px 18px; border: 1px solid rgba(42,43,42,.11); border-radius: 16px; background: rgba(255,255,255,.4); }
.rewind-panel summary { color: #565754; cursor: pointer; font-size: 12px; font-weight: 600; }
.rewind-panel > p { margin: 11px 0 0; color: #888984; font-size: 10px; }
.rewind-form { display: grid; grid-template-columns: minmax(170px, .8fr) minmax(200px, 1fr) auto; align-items: end; gap: 10px; margin-top: 15px; }
.rewind-form label { display: grid; gap: 6px; color: #777976; font-size: 10px; }
.rewind-form select, .rewind-form input { min-width: 0; width: 100%; min-height: 39px; padding: 0 11px; border: 1px solid #d6d5d1; border-radius: 11px; background: rgba(255,255,255,.6); color: var(--ink); font-size: 11px; }
.telegram-auth-box { display: flex; align-items: center; gap: 12px; margin: 20px 0; padding: 14px; border: 1px solid rgba(42,43,42,.11); border-radius: 15px; background: rgba(245,245,242,.8); }
.telegram-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; background: #252725; color: #f8f7f4; font-size: 18px; }
.telegram-auth-box strong { display: block; font-size: 12px; }
.telegram-auth-box p { margin: 4px 0 0; color: #81827e; font-size: 10px; line-height: 1.45; }
.telegram-auth-copy { min-width: 0; flex: 1; }
.telegram-login-button { min-height: 35px; padding: 0 12px; border-radius: 10px; font-size: 10px; white-space: nowrap; }

.overview-card { display: grid; grid-template-columns: 220px 1px minmax(245px, 1fr) minmax(285px, .92fr); align-items: center; gap: clamp(22px, 3vw, 46px); padding: 26px 32px; min-height: 270px; border: 1px solid rgba(42,43,42,.13); border-radius: 27px; background: linear-gradient(120deg, rgba(255,255,255,.72), rgba(247,246,243,.56)); box-shadow: 0 18px 55px rgba(27,28,27,.055), inset 0 1px rgba(255,255,255,.8); backdrop-filter: blur(12px); position: relative; z-index: 1; }
.progress-orbit { width: 206px; height: 206px; position: relative; display: grid; place-items: center; margin: auto; }
.progress-orbit svg { width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg); }
.ring-track, .ring-segment { fill: none; stroke-width: 14; }
.ring-track { stroke: #deddd9; }
.ring-segment { stroke-linecap: round; transition: stroke .2s ease; }
.ring-segment.done { stroke: #262927; }
.ring-segment.active { stroke: #5a5c59; }
.ring-segment.upcoming { stroke: transparent; }
.ring-copy { position: absolute; display: grid; justify-items: center; gap: 4px; }
.ring-copy strong { font: 600 43px/1 "Manrope", sans-serif; letter-spacing: -.07em; }
.ring-copy strong span { color: #a1a19d; font-weight: 400; }
.ring-copy small { color: #777976; font-size: 9px; font-weight: 700; letter-spacing: .2em; }
.overview-divider { width: 1px; height: 162px; background: linear-gradient(180deg, transparent, #c9c8c4 18%, #c9c8c4 82%, transparent); }
.current-stage-copy { min-width: 0; }
.now-label { display: flex; align-items: center; gap: 8px; color: #5e605d; font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.now-dot { width: 7px; height: 7px; border-radius: 50%; background: #303230; }
.current-stage-copy h2 { margin: 11px 0 7px; font: 600 clamp(26px, 2.3vw, 34px)/1.1 "Manrope", sans-serif; letter-spacing: -.045em; }
.current-stage-copy p { color: #71726f; font-size: 14px; margin: 0 0 15px; }
.deadline-chip { display: inline-flex; border: 1px solid #d5d4d0; border-radius: 999px; padding: 7px 11px; color: #555653; background: rgba(255,255,255,.45); font-size: 9px; letter-spacing: .08em; }
.overview-action { min-width: 0; display: grid; gap: 9px; align-content: center; }
.overview-action > p { color: #898a86; font-size: 10px; line-height: 1.5; margin: 0 0 0 2px; }
.action-form { display: grid; gap: 9px; }
.note-input, .new-project-form input { min-width: 0; width: 100%; padding: 12px 14px; border: 1px solid #d6d5d1; border-radius: 12px; outline: none; background: rgba(255,255,255,.47); color: var(--ink); font-size: 12px; transition: border-color .18s, box-shadow .18s; }
.note-input:focus, .new-project-form input:focus, .auth-form input:focus { border-color: #81837f; box-shadow: 0 0 0 3px rgba(37,39,37,.06); }
.note-input::placeholder, .new-project-form input::placeholder { color: #a2a39f; }
.button { min-height: 45px; border: 0; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 0 17px; font-size: 12px; font-weight: 700; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-dark { color: #f7f6f3; background: linear-gradient(120deg, #202220, #393b39); box-shadow: 0 8px 18px rgba(18,20,18,.13), inset 0 1px rgba(255,255,255,.13); }
.button-dark:hover { background: linear-gradient(120deg, #111311, #303230); box-shadow: 0 11px 24px rgba(18,20,18,.19), inset 0 1px rgba(255,255,255,.16); }
.button-dark span { color: #b8c7bf; font-size: 16px; font-weight: 400; }
.button-outline { color: #292b29; background: rgba(255,255,255,.34); border: 1px solid #c9c8c4; }
.button-outline:hover { background: rgba(255,255,255,.72); }
.decision-form { display: grid; gap: 9px; }
.decision-actions { display: grid; grid-template-columns: 1.1fr .8fr; gap: 8px; }
.decision-actions .button { padding-inline: 10px; }

.timeline-section { margin-top: 38px; position: relative; z-index: 1; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 0 2px 18px; }
.section-heading .eyebrow { margin-bottom: 7px; }
.section-heading h2 { margin: 0; font: 600 19px/1.2 "Manrope", sans-serif; letter-spacing: -.035em; }
.section-meta { color: #858682; font-size: 9px; font-weight: 700; letter-spacing: .14em; padding-bottom: 2px; }
.timeline-scroll { overflow-x: auto; overflow-y: hidden; padding: 2px 1px 8px; }
.timeline-grid { display: grid; grid-template-columns: repeat(var(--stage-count), minmax(82px, 1fr)); min-width: max(100%, calc(var(--stage-count) * 82px)); position: relative; padding-top: 3px; }
.timeline-grid::before { content: ""; position: absolute; z-index: -1; height: 2px; background: linear-gradient(90deg, #252725 0%, #252725 var(--progress), #d0cfcb var(--progress), #d0cfcb 100%); top: 17px; left: 7%; right: 7%; }
.timeline-step { min-width: 0; text-align: center; display: grid; justify-items: center; align-content: start; }
.timeline-marker { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid #b9b9b5; background: var(--paper); color: #92938f; font-size: 12px; position: relative; z-index: 1; }
.timeline-step.done .timeline-marker { color: #fff; border-color: #155640; background: linear-gradient(145deg, #28725a, #124b39); box-shadow: 0 3px 9px rgba(18,75,57,.18), inset 0 1px rgba(255,255,255,.18); }
.timeline-step.done .timeline-marker span { font-size: 15px; }
.timeline-reopen-form, .timeline-reopen-button { width: 100%; height: 100%; }
.timeline-reopen-button { display: grid; place-items: center; padding: 0; border: 0; border-radius: inherit; background: transparent; color: inherit; }
.timeline-reopen-button:hover { background: rgba(255,255,255,.13); }
.timeline-reopen-button:focus-visible { outline: 2px solid #b9ead5; outline-offset: 2px; }
.timeline-reopen-button span { line-height: 1; }
.timeline-step.active .timeline-marker { width: 34px; height: 34px; margin-top: -2px; border: 2px solid #3e403e; background: var(--paper); box-shadow: 0 0 0 4px rgba(35,37,35,.08); }
.timeline-step.active .timeline-marker i { width: 9px; height: 9px; background: #3e403e; border-radius: 50%; }
.timeline-label { margin: 10px 5px 0; max-width: 130px; min-height: 27px; color: #666763; font-size: 10px; line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
.timeline-step.done .timeline-label { color: #343633; }
.timeline-step.active .timeline-label { color: #171917; font-weight: 700; }
.timeline-state { margin-top: 4px; color: #999a96; font-size: 8px; letter-spacing: .04em; }
.timeline-step.done .timeline-state { color: var(--green); }
.timeline-step.active .timeline-state { color: #555754; font-weight: 700; }
.timeline-due { margin-top: 4px; color: #888985; font-size: 8px; text-align: center; }
.marker-number { font-size: 8px; }

.lower-grid { margin-top: 34px; display: grid; grid-template-columns: 1.08fr .92fr; gap: 18px; position: relative; z-index: 1; }
.surface-card { border: 1px solid rgba(42,43,42,.12); border-radius: 22px; background: linear-gradient(120deg, rgba(255,255,255,.66), rgba(247,246,243,.53)); box-shadow: 0 12px 34px rgba(27,28,27,.045), inset 0 1px rgba(255,255,255,.8); padding: 22px 24px; backdrop-filter: blur(10px); min-width: 0; }
.section-heading.compact { align-items: center; margin-bottom: 13px; }
.section-heading.compact h2 { font-size: 16px; }
.tiny-mark { color: #71736f; font-size: 16px; }
.activity-list { display: grid; }
.activity-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(52,53,52,.1); }
.activity-icon { width: 26px; height: 26px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; background: #e4e4e0; color: #434542; font-size: 13px; }
.activity-body { min-width: 0; }
.activity-title { color: #2b2d2b; font-size: 11px; font-weight: 600; }
.activity-title span { color: #777976; font-weight: 400; }
.activity-note { margin-top: 4px; color: #4f514e; font-size: 11px; overflow-wrap: anywhere; }
.activity-meta { margin-top: 5px; color: #979894; font-size: 9px; }
.activity-meta span { margin: 0 4px; }
.activity-empty { padding: 12px 0 4px; color: #8c8d89; font-size: 11px; line-height: 1.6; }
.rhythm-mark { display: flex; align-items: baseline; font: 600 26px/1 "Manrope", sans-serif; letter-spacing: -.07em; color: #303230; }
.rhythm-mark span { margin-left: 3px; color: #858682; font: 500 10px "DM Sans", sans-serif; }
.rhythm-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 8px 0 19px; }
.rhythm-dates > div { display: grid; gap: 7px; }
.rhythm-dates span { color: #92938f; font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.rhythm-dates strong { color: #333532; font-size: 12px; font-weight: 600; }
.rhythm-track, .mini-progress { overflow: hidden; display: block; background: #d5d4d0; border-radius: 999px; }
.rhythm-track { height: 7px; }
.rhythm-track span, .mini-progress i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #242725, #525552); }
.rhythm-foot { display: flex; justify-content: space-between; margin-top: 8px; color: #858682; font-size: 9px; }
.notice-banner { position: relative; z-index: 2; margin: -8px 0 15px; padding: 11px 14px; border: 1px solid #cad9d1; border-radius: 12px; background: rgba(223,235,228,.65); color: #235543; font-size: 12px; }
.notice-banner > span { margin-right: 6px; font-weight: 700; }
.notice-banner button { float: right; border: 0; background: none; color: #597569; font-size: 18px; line-height: 14px; }
.telegram-error-banner { border-color: #ded1ce; background: rgba(240,228,225,.8); color: #74443d; }
.app-footer { display: flex; justify-content: space-between; gap: 10px; padding: 29px 2px 0; color: #a1a19d; font-size: 8px; font-weight: 600; letter-spacing: .13em; position: relative; z-index: 1; }

.project-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; position: relative; z-index: 1; }
.project-card { min-height: 198px; padding: 22px; border: 1px solid rgba(42,43,42,.13); border-radius: 22px; background: linear-gradient(125deg, rgba(255,255,255,.74), rgba(246,245,242,.54)); box-shadow: 0 12px 34px rgba(27,28,27,.045), inset 0 1px rgba(255,255,255,.8); display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease; }
.project-card:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(27,28,27,.09), inset 0 1px rgba(255,255,255,.9); }
.project-card-top { display: flex; justify-content: space-between; color: #858682; font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.card-arrow { color: #555754; font-size: 16px; }
.project-card h2 { margin: 29px 0 auto; font: 600 25px/1.1 "Manrope", sans-serif; letter-spacing: -.045em; }
.project-card-description { display: -webkit-box; margin: 13px 0 -17px; overflow: hidden; color: #7f807c; font-size: 10px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.project-card-bottom { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 24px; }
.project-card-bottom > div { min-width: 105px; display: grid; gap: 7px; }
.mini-progress { width: 100%; height: 4px; }
.project-progress-label { color: #7c7d79; font-size: 9px; }
.stage-status-pill { color: #315c4c; background: var(--green-soft); border-radius: 999px; padding: 7px 9px; max-width: 50%; font-size: 9px; text-align: center; }
.empty-state { grid-column: 1 / -1; min-height: 210px; display: grid; align-content: center; justify-items: center; border: 1px dashed #c9c8c4; border-radius: 22px; text-align: center; background: rgba(255,255,255,.25); }
.empty-mark { margin-bottom: 11px; color: #333532; font: 800 25px "Manrope", sans-serif; letter-spacing: .1em; }
.empty-state h2 { margin: 0 0 8px; font: 600 22px "Manrope", sans-serif; letter-spacing: -.04em; }
.empty-state p { margin: 0; color: #858682; font-size: 12px; }
.new-project-panel { position: relative; z-index: 1; margin-top: 22px; padding: 24px; border: 1px solid rgba(42,43,42,.12); border-radius: 22px; display: grid; grid-template-columns: 1fr minmax(320px, .9fr); align-items: center; gap: 22px; background: rgba(255,255,255,.42); }
.new-project-panel .eyebrow { margin-bottom: 7px; }
.new-project-panel h2 { margin: 0 0 5px; font: 600 17px "Manrope", sans-serif; }
.new-project-panel p:not(.eyebrow) { margin: 0; color: #858682; font-size: 11px; }
.new-project-form { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.new-project-form input { background: rgba(255,255,255,.55); }
.project-settings { margin-top: 20px; position: relative; z-index: 1; }
.project-settings > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.project-settings > summary::-webkit-details-marker { display: none; }
.project-settings > summary > span:first-child { display: grid; gap: 5px; }
.project-settings > summary .eyebrow { margin: 0; }
.project-settings > summary strong { font: 600 16px "Manrope", sans-serif; letter-spacing: -.025em; }
.settings-toggle { color: #666763; font-size: 10px; }
.settings-toggle b { margin-left: 5px; font-size: 15px; font-weight: 400; }
.project-settings[open] .settings-toggle b { display: inline-block; transform: rotate(45deg); }
.settings-form { margin-top: 22px; }
.settings-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.settings-fields label { display: grid; gap: 6px; color: #686965; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.settings-fields input, .settings-fields textarea, .stage-editor-row > input, .stage-date-field input, .asset-add-form input { min-width: 0; width: 100%; border: 1px solid #d6d5d1; border-radius: 10px; padding: 10px 11px; outline: none; background: rgba(255,255,255,.55); color: var(--ink); font: 500 11px "DM Sans", sans-serif; letter-spacing: 0; }
.settings-fields textarea { resize: vertical; line-height: 1.5; }
.settings-fields input:focus, .settings-fields textarea:focus, .stage-editor-row > input:focus, .stage-date-field input:focus, .asset-add-form input:focus { border-color: #858782; box-shadow: 0 0 0 3px rgba(37,39,37,.055); }
.field-wide { grid-column: 1 / -1; }
.settings-stage-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 24px 0 11px; }
.settings-stage-heading .eyebrow { margin: 0 0 5px; }
.settings-stage-heading strong { font: 600 14px "Manrope", sans-serif; }
.add-stage-button { min-height: 35px; padding: 0 11px; font-size: 10px; }
.stage-editor-list { display: grid; gap: 7px; }
.stage-editor-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 150px 28px; align-items: center; gap: 9px; }
.stage-editor-index { color: #8b8c88; font: 600 10px "Manrope", sans-serif; text-align: center; }
.stage-editor-row > input { min-height: 38px; }
.stage-date-field { display: grid; gap: 4px; color: #858682; font-size: 7px; font-weight: 700; letter-spacing: .12em; }
.stage-date-field input { min-height: 38px; padding: 7px 8px; font-size: 10px; }
.remove-stage { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: #858682; font-size: 19px; cursor: pointer; }
.remove-stage:hover { background: #ebeae7; color: #242624; }
.settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 15px; border-top: 1px solid rgba(42,43,42,.1); }
.settings-actions > span { color: #858682; font-size: 9px; line-height: 1.45; }
.settings-actions .button { flex: none; }
.settings-error { position: relative; z-index: 1; margin: -6px 0 14px; border: 1px solid #e1c7c5; border-radius: 11px; padding: 11px 13px; background: #f7eae8; color: #8a403a; font-size: 11px; }
.continue-form { margin-top: 2px; }
.continue-form .button { width: 100%; min-height: 39px; font-size: 10px; }
.materials-section { margin-top: 32px; position: relative; z-index: 1; }
.asset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.asset-card { min-width: 0; padding: 17px; border: 1px solid rgba(42,43,42,.12); border-radius: 17px; background: linear-gradient(120deg, rgba(255,255,255,.66), rgba(247,246,243,.5)); box-shadow: 0 9px 25px rgba(27,28,27,.035), inset 0 1px rgba(255,255,255,.8); }
.asset-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.asset-kind { color: #848580; font-size: 7px; font-weight: 700; letter-spacing: .13em; }
.asset-open { color: #3c594d; font-size: 9px; font-weight: 600; }
.asset-card h3 { margin: 13px 0; font: 600 14px "Manrope", sans-serif; }
.asset-preview summary { color: #646560; cursor: pointer; font-size: 9px; }
.asset-preview summary span { float: right; }
.asset-preview[open] iframe { display: block; }
.asset-preview iframe { display: none; width: 100%; height: 290px; margin-top: 12px; border: 1px solid #deddd9; border-radius: 10px; background: #fff; }
.asset-remove { margin-top: 12px; border: 0; padding: 0; background: none; color: #92938f; font-size: 8px; cursor: pointer; }
.asset-remove:hover { color: #7d443e; }
.asset-empty { grid-column: 1 / -1; padding: 24px; border: 1px dashed #cbc9c5; border-radius: 16px; color: #858682; font-size: 11px; text-align: center; }
.asset-add-form { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(240px, 1.2fr) auto; gap: 9px; margin-top: 13px; }
.asset-add-form .button { min-height: 39px; }
.asset-hint { margin: 8px 2px 0; color: #91928e; font-size: 9px; }
.history-list { display: grid; gap: 10px; position: relative; z-index: 1; }
.history-card { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 17px; padding: 18px 21px; border: 1px solid rgba(42,43,42,.12); border-radius: 18px; background: linear-gradient(120deg, rgba(255,255,255,.68), rgba(247,246,243,.5)); box-shadow: 0 9px 28px rgba(27,28,27,.035), inset 0 1px rgba(255,255,255,.8); transition: transform .16s ease, box-shadow .16s ease; }
.history-card:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(27,28,27,.075), inset 0 1px rgba(255,255,255,.9); }
.history-index { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: #e3e2df; color: #555754; font: 600 14px "Manrope", sans-serif; }
.history-main { min-width: 0; }
.history-kicker { margin-bottom: 5px; color: #858682; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.history-main h2 { margin: 0; font: 600 16px "Manrope", sans-serif; letter-spacing: -.03em; }
.history-dates { color: #90918d; font-size: 10px; }
.history-result { display: grid; justify-items: end; gap: 8px; }
.history-pill { border-radius: 999px; padding: 7px 10px; font-size: 9px; }
.history-pill.published { color: #225744; background: var(--green-soft); }
.history-pill.in-progress { color: #5d5e5b; background: #e7e6e2; }
.history-open { color: #777976; font-size: 9px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(ellipse at 75% 14%, rgba(255,255,255,.9), transparent 42%), linear-gradient(145deg, #f4f3f0, #e9e8e5); }
.auth-wrap { width: min(100%, 430px); }
.auth-brand { margin: 0 0 28px 4px; }
.auth-card { padding: 35px; border: 1px solid rgba(42,43,42,.14); border-radius: 24px; background: rgba(255,255,255,.57); box-shadow: 0 20px 50px rgba(27,28,27,.075), inset 0 1px rgba(255,255,255,.9); }
.auth-card h1 { margin: 0; font: 600 31px/1.12 "Manrope", sans-serif; letter-spacing: -.05em; }
.auth-copy { margin: 10px 0 25px; color: #777976; font-size: 13px; line-height: 1.55; }
.auth-form { display: grid; gap: 15px; }
.auth-form label { display: grid; gap: 7px; color: #555754; font-size: 11px; font-weight: 600; }
.auth-form input { width: 100%; min-height: 45px; border: 1px solid #d4d3cf; border-radius: 11px; padding: 0 13px; background: rgba(255,255,255,.63); color: var(--ink); outline: none; font-size: 12px; }
.auth-form input::placeholder { color: #a2a39f; }
.button-wide { width: 100%; margin-top: 5px; min-height: 48px; }
.auth-switch { margin: 23px 0 0; text-align: center; color: #777976; font-size: 11px; }
.auth-switch a { color: #1e493a; font-weight: 700; }
.auth-footnote { margin: 17px 0 0; text-align: center; color: #a1a19d; font-size: 8px; font-weight: 600; letter-spacing: .15em; }
.form-error { margin: -10px 0 17px; border: 1px solid #e1c7c5; border-radius: 10px; padding: 10px 12px; background: #f7eae8; color: #8a403a; font-size: 11px; }

@media (max-width: 1180px) {
  .sidebar { padding-inline: 15px; }
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .overview-card { grid-template-columns: 180px 1px minmax(210px, 1fr) minmax(235px, .9fr); padding: 24px; gap: 22px; }
  .progress-orbit { width: 178px; height: 178px; }
}

@media (max-width: 980px) {
  .sidebar { width: 64px; padding: 24px 9px 18px; align-items: center; }
  .app-shell { grid-template-columns: 64px minmax(0, 1fr); }
  .brand { margin: 0 0 44px; font-size: 18px; letter-spacing: .08em; }
  .workspace-label, .nav-link > span:not(.nav-icon), .sidebar-bottom, .nav-count { display: none; }
  .side-nav { width: 100%; }
  .nav-link { justify-content: center; padding: 0; }
  .main-area { padding-inline: 28px; }
  .overview-card { grid-template-columns: 150px 1px 1fr; gap: 20px; }
  .progress-orbit { width: 150px; height: 150px; }
  .overview-action { grid-column: 3; padding-top: 4px; }
  .overview-divider { grid-row: span 2; height: 210px; }
  .current-stage-copy h2 { font-size: 27px; }
  .lower-grid { gap: 12px; }
  .surface-card { padding: 18px; }
}

@media (max-width: 700px) {
  .app-shell { display: block; min-height: 100vh; padding-bottom: 74px; }
  .app-shell::before { width: 360px; height: 160px; right: -160px; top: -82px; }
  .app-shell::after { width: 420px; height: 135px; left: -110px; bottom: 34px; }
  .sidebar { position: fixed; inset: auto 0 0; width: auto; height: 67px; padding: 0 15px; display: block; border-right: 0; border-top: 1px solid rgba(38,39,38,.13); background: rgba(244,243,240,.9); backdrop-filter: blur(20px); }
  .brand, .workspace-label, .sidebar-bottom { display: none; }
  .side-nav { height: 100%; display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; gap: 6px; }
  .nav-link { min-height: 48px; display: grid; justify-items: center; align-content: center; gap: 2px; border-radius: 13px; font-size: 9px; }
  .nav-link > span:not(.nav-icon) { display: inline; }
  .nav-link .nav-icon { font-size: 17px; height: 19px; }
  .nav-count { display: none !important; }
  .main-area { padding: 0 17px 20px; }
  .topbar { height: 57px; }
  .breadcrumb { gap: 8px; font-size: 10px; }
  .topbar-right { gap: 9px; }
  .system-status { display: none; }
  .avatar-top { width: 27px; height: 27px; }
  .page-heading { min-height: 0; display: block; padding: 25px 2px 19px; }
  .page-heading .eyebrow { margin-bottom: 8px; font-size: 8px; }
  .page-heading h1 { font-size: 34px; }
  .page-subtitle { margin-top: 7px; font-size: 11px; line-height: 1.45; }
  .cycle-tag { padding: 0; margin-top: 14px; font-size: 8px; }
  .overview-card { grid-template-columns: 104px minmax(0, 1fr); gap: 9px 15px; padding: 16px 14px; min-height: 0; border-radius: 19px; }
  .progress-orbit { width: 104px; height: 104px; }
  .ring-track, .ring-segment { stroke-width: 15; }
  .ring-copy { gap: 3px; }
  .ring-copy strong { font-size: 26px; }
  .ring-copy small { font-size: 6px; }
  .overview-divider { display: none; }
  .current-stage-copy { padding: 2px 0 0; }
  .now-label { font-size: 8px; gap: 6px; letter-spacing: .1em; }
  .now-dot { width: 6px; height: 6px; }
  .current-stage-copy h2 { margin: 7px 0 5px; font-size: 20px; line-height: 1.08; }
  .current-stage-copy p { margin: 0 0 9px; font-size: 10px; line-height: 1.4; }
  .deadline-chip { padding: 5px 8px; font-size: 7px; }
  .overview-action { grid-column: 1 / -1; padding-top: 5px; gap: 5px; }
  .overview-action > p { font-size: 9px; }
  .note-input { padding: 10px 11px; font-size: 11px; }
  .button { min-height: 42px; border-radius: 11px; font-size: 11px; }
  .decision-actions { grid-template-columns: 1fr 1fr; }
  .timeline-section { margin-top: 26px; }
  .section-heading { margin-bottom: 12px; }
  .section-heading .eyebrow { margin-bottom: 5px; font-size: 8px; }
  .section-heading h2 { font-size: 16px; }
  .section-meta { font-size: 8px; }
  .timeline-grid { display: grid; grid-template-columns: 1fr; gap: 0; padding: 0; }
  .timeline-scroll { overflow: visible; padding: 0; }
  .timeline-grid { min-width: 0; }
  .timeline-grid::before { top: 13px; left: 12px; right: auto; bottom: 13px; width: 2px; height: auto; background: linear-gradient(180deg, #252725 0%, #252725 var(--progress), #d0cfcb var(--progress), #d0cfcb 100%); }
  .timeline-step { min-height: 37px; display: grid; grid-template-columns: 26px 1fr auto; justify-items: start; align-items: center; gap: 10px; text-align: left; }
  .timeline-marker, .timeline-step.active .timeline-marker { width: 25px; height: 25px; margin: 0; border-width: 1.5px; }
  .timeline-step.active .timeline-marker { box-shadow: 0 0 0 3px rgba(35,37,35,.08); }
  .timeline-step.active .timeline-marker i { width: 7px; height: 7px; }
  .timeline-step.done .timeline-marker span { font-size: 12px; }
  .marker-number { font-size: 7px; }
  .timeline-label { margin: 0; max-width: none; font-size: 10px; }
  .timeline-state { margin: 0 2px 0 0; font-size: 7px; }
  .timeline-due { grid-column: 2 / -1; margin: -7px 0 7px; text-align: left; }
  .lower-grid { margin-top: 23px; grid-template-columns: 1fr; gap: 11px; }
  .surface-card { padding: 16px; border-radius: 17px; }
  .section-heading.compact h2 { font-size: 15px; }
  .activity-row { padding: 10px 0; }
  .activity-title { font-size: 10px; line-height: 1.4; }
  .activity-meta { font-size: 8px; }
  .rhythm-dates { padding: 5px 0 13px; }
  .app-footer { display: none; }
  .project-list { grid-template-columns: 1fr; gap: 11px; }
  .project-card { min-height: 160px; padding: 18px; border-radius: 18px; }
  .project-card h2 { font-size: 22px; margin-top: 20px; }
  .new-project-panel { margin-top: 15px; padding: 17px; border-radius: 18px; grid-template-columns: 1fr; gap: 14px; }
  .new-project-form { grid-template-columns: 1fr; }
  .settings-fields { grid-template-columns: 1fr 1fr; gap: 9px; }
  .settings-fields .field-wide { grid-column: 1 / -1; }
  .stage-editor-row { grid-template-columns: 24px minmax(0, 1fr) 26px; gap: 7px; }
  .stage-date-field { grid-column: 2; grid-row: 2; grid-template-columns: 35px minmax(0, 1fr); align-items: center; }
  .stage-date-field input { min-height: 33px; }
  .remove-stage { grid-column: 3; grid-row: 1 / span 2; }
  .stage-editor-index { grid-row: 1 / span 2; }
  .stage-editor-row > input { min-height: 35px; }
  .settings-actions { align-items: stretch; flex-direction: column; }
  .asset-grid { grid-template-columns: 1fr; }
  .asset-add-form { grid-template-columns: 1fr; }
  .asset-preview iframe { height: 240px; }
  .continue-form .button { min-height: 38px; }
  .history-heading .button { margin-top: 14px; }
  .history-card { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .history-index { width: 36px; height: 36px; }
  .history-result { grid-column: 2; justify-items: start; display: flex; align-items: center; justify-content: space-between; width: 100%; }
  .history-main h2 { font-size: 14px; }
  .quiet-badge { display: inline-flex; margin: 14px 0 0; }
  .project-head-actions { align-items: flex-start; justify-content: space-between; gap: 8px; margin-top: 14px; }
  .project-head-actions .cycle-tag { margin: 0; white-space: normal; }
  .archive-action { min-height: 32px; padding-inline: 11px; font-size: 9px; }
  .project-view-tabs { margin: 0 0 15px; }
  .project-view-tabs a { padding: 8px 12px; font-size: 10px; }
  .archived-banner { margin: 0 0 13px; padding: 11px 12px; font-size: 10px; line-height: 1.5; }
  .archived-banner span { display: block; margin: 0 0 3px; }
  .rewind-panel { padding: 13px; }
  .rewind-form { grid-template-columns: 1fr; gap: 9px; }
  .rewind-form .button { width: 100%; }
  .telegram-auth-box { margin: 16px 0; }
  .empty-state { min-height: 190px; padding: 20px; }
  .empty-state h2 { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
