:root {
  --canvas: #f4f6f3;
  --surface: #ffffff;
  --surface-soft: #f8faf8;
  --ink: #18211d;
  --muted: #66716b;
  --line: #dfe5e0;
  --moss: #486554;
  --moss-soft: #e9f0eb;
  --sand: #a87948;
  --sand-soft: #f4ede5;
  --clay: #9a5546;
  --clay-soft: #f4e9e6;
  --blue: #536a78;
  --shadow: 0 12px 32px rgba(34, 48, 40, .06);
  --radius: 18px;
  --radius-sm: 11px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--canvas); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; min-width: 0; }
button, a { font: inherit; }
button { color: inherit; }
a { color: var(--moss); text-underline-offset: 3px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; overflow-wrap: anywhere; }
.status-banner { position: sticky; top: 0; z-index: 80; padding: 10px 18px; text-align: center; font-size: 13px; border-bottom: 1px solid var(--line); background: #eef2ee; }
.status-banner--error { background: #f7e9e7; color: #6d3027; border-color: #ead0ca; }
.status-banner--snapshot { background: #f5eee5; color: #6d4d2c; border-color: #e8d7c3; }
.auth-panel { min-height: 100svh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 30% 20%, #fbfdfb 0, var(--canvas) 48%); }
.auth-card { width: min(520px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 42px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 26px 0 10px; font-size: clamp(30px, 6vw, 46px); line-height: 1.02; letter-spacing: -.04em; }
.auth-card p { color: var(--muted); line-height: 1.65; margin: 0 0 28px; }
.brand { font-size: 20px; font-weight: 760; letter-spacing: -.035em; }
.brand span { color: var(--moss); }
.brand--large { font-size: 25px; }
.primary-button { width: 100%; border: 0; border-radius: 12px; padding: 14px 18px; background: var(--ink); color: white; cursor: pointer; font-weight: 680; }
.primary-button:disabled { opacity: .45; cursor: not-allowed; }
.setup-note { display: grid; gap: 5px; margin-top: 16px; padding: 14px 16px; background: var(--sand-soft); border: 1px solid #ead7c3; border-radius: 12px; font-size: 13px; color: #694c31; }
.auth-meta { margin-top: 20px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.auth-error { margin-top: 16px; color: var(--clay); font-size: 13px; min-height: 1.2em; }
.app-shell { min-height: 100svh; }
.app-header { min-height: 72px; position: sticky; top: 0; z-index: 50; background: rgba(244,246,243,.92); backdrop-filter: blur(18px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 0 34px; border-bottom: 1px solid rgba(223,229,224,.9); }
.top-tabs { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.76); }
.top-tabs button { border: 0; background: transparent; border-radius: 9px; padding: 8px 13px; font-size: 13px; color: var(--muted); cursor: pointer; font-weight: 620; }
.top-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(29,42,35,.08); }
.review-button { justify-self: end; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: transparent; color: var(--muted); font-size: 12px; }
.review-button:disabled { opacity: .65; }
.content { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 80px; }
.intro-row { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 48px; }
.intro-row h1 { font-size: clamp(38px, 5vw, 60px); letter-spacing: -.055em; line-height: .98; margin: 0 0 14px; font-weight: 720; }
.intro-row p { max-width: 680px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.sync-meta { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding-bottom: 7px; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: #b5bbb7; }
.sync-dot--ok { background: #66866f; box-shadow: 0 0 0 4px #e5eee8; }
.portfolio-section { margin: 0 0 48px; }
.section-heading { display: flex; align-items: baseline; gap: 9px; margin-bottom: 15px; padding: 0 4px; }
.section-heading h2 { text-transform: uppercase; font-size: 12px; letter-spacing: .14em; margin: 0; color: var(--muted); }
.section-heading span { color: #98a09b; font-size: 12px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid transparent; border-radius: var(--radius); padding: 23px; box-shadow: 0 2px 10px rgba(30,44,36,.025); }
.project-card--requires { border-top-color: var(--clay); }
.project-card--follow { border-top-color: var(--sand); }
.project-card--quiet { border-top-color: #7d9684; }
.project-card--parked { border-top-color: #9da49f; opacity: .85; }
.project-card__header { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.project-card__kicker { font-size: 10px; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); margin-bottom: 5px; }
.project-card h3 { font-size: 26px; letter-spacing: -.04em; margin: 0; }
.icon-button { width: 36px; height: 36px; flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface); border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; }
.icon-button svg { width: 18px; height: 18px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 4px; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 8px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-soft); font-size: 10px; color: var(--muted); font-weight: 650; }
.badge--requires { background: var(--clay-soft); border-color: #ead3ce; color: #7e4336; }
.badge--follow, .badge--warning { background: var(--sand-soft); border-color: #ead8c6; color: #765532; }
.badge--work { background: #eef2ef; color: #465b4e; }
.badge--evidence { background: #edf1f3; color: #536875; }
.badge--soft { background: transparent; }
.attention-gap { margin: 15px 0 0; padding: 11px 13px; border-left: 2px solid var(--clay); background: #fbf6f4; color: #71473e; font-size: 12px; line-height: 1.5; }
.card-section { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 17px; }
.card-section h4, .drawer-section h3, .goal-grid h3 { margin: 0 0 10px; color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.baseline-note, .empty-note { color: var(--muted); font-size: 13px; line-height: 1.55; }
.baseline-note strong { color: var(--ink); }
.loose-list { display: grid; gap: 10px; }
.loose-row { min-width: 0; }
.loose-row__top { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: start; gap: 9px; }
.loose-row__top strong { font-size: 13px; line-height: 1.5; font-weight: 620; overflow-wrap: anywhere; }
.loose-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; background: #9ca69f; }
.loose-dot--requires { background: var(--clay); }
.loose-dot--follow { background: var(--sand); }
.loose-row__detail { margin: 7px 0 0 18px; display: grid; grid-template-columns: 80px minmax(0,1fr); gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.loose-row__detail span { color: #8a938e; }
.text-link { margin: 8px 0 0 18px; display: inline-block; font-size: 12px; }
.next-action { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px; align-items: start; padding: 13px; border-radius: var(--radius-sm); background: var(--moss-soft); color: #334b3c; }
.next-action span { font-size: 11px; color: #6a7b70; padding-top: 2px; }
.next-action strong { font-size: 13px; line-height: 1.5; }
.next-action--conditional { background: var(--sand-soft); color: #674d32; }
.project-card__footer { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-top: 22px; color: #8a938e; font-size: 10px; }
.project-card__footer a { font-size: 11px; font-weight: 640; white-space: nowrap; }
.event-list { display: grid; gap: 10px; }
.event-row { display: grid; grid-template-columns: 8px minmax(0,1fr); gap: 9px; }
.event-row__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--moss); margin-top: 7px; }
.event-row__meta { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: #8b948f; }
.event-row__title { margin-top: 4px; font-size: 12px; line-height: 1.5; }
.timeline-stack, .goal-stack { display: grid; gap: 18px; }
.timeline-lane, .goal-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.timeline-lane > header, .goal-card > header { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.timeline-lane h3 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
.timeline-grid { margin-top: 22px; display: grid; grid-template-columns: minmax(0, 1.25fr) 54px minmax(0, .85fr); min-height: 150px; }
.timeline-history { padding-right: 24px; }
.timeline-plan { padding-left: 24px; }
.timeline-label { margin-bottom: 12px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.timeline-now { position: relative; display: flex; align-items: start; justify-content: center; }
.timeline-now::before { content: ""; position: absolute; top: 28px; bottom: 0; width: 1px; background: #cbd3ce; }
.timeline-now span { z-index: 1; background: var(--surface); padding: 0 6px; color: var(--moss); font-size: 9px; font-weight: 750; letter-spacing: .12em; }
.timeline-event { display: grid; grid-template-columns: 8px minmax(0,1fr); gap: 9px; margin-bottom: 13px; }
.timeline-event > span { width: 6px; height: 6px; border-radius: 50%; background: #76877c; margin-top: 6px; }
.timeline-event small, .plan-node small { display: block; color: #8b948f; font-size: 9px; margin-bottom: 4px; }
.timeline-event strong, .plan-node strong { display: block; font-size: 12px; line-height: 1.45; font-weight: 610; }
.plan-node { padding: 13px; border-left: 2px dotted var(--moss); background: var(--surface-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.goal-card > header span { display: block; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-size: 10px; margin-bottom: 8px; }
.goal-card > header h2 { margin: 0; max-width: 760px; font-size: 23px; line-height: 1.25; letter-spacing: -.03em; }
.goal-grid { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 30px; border-top: 1px solid var(--line); padding-top: 22px; }
.goal-grid section { min-width: 0; }
.goal-grid__wide { grid-column: 1 / -1; }
.goal-grid strong { font-size: 14px; line-height: 1.5; }
.goal-grid p { color: var(--muted); font-size: 12px; }
.criteria-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.app-footer { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 0 0 35px; color: #98a09b; font-size: 10px; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 89; background: rgba(21,29,25,.18); backdrop-filter: blur(2px); }
.drawer { position: fixed; z-index: 90; top: 0; right: 0; width: min(480px, 94vw); height: 100svh; background: var(--surface); border-left: 1px solid var(--line); transform: translateX(102%); transition: transform .24s ease; box-shadow: -20px 0 60px rgba(20,30,24,.1); overflow-y: auto; }
.drawer--open { transform: translateX(0); }
.drawer > header { position: sticky; top: 0; z-index: 2; background: rgba(255,255,255,.96); backdrop-filter: blur(16px); display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer > header span { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: 9px; margin-bottom: 3px; }
.drawer > header h2 { margin: 0; font-size: 24px; letter-spacing: -.035em; }
.drawer-body { padding: 4px 24px 40px; }
.drawer-section { padding: 22px 0; border-bottom: 1px solid var(--line); }
.fact-list { display: grid; gap: 13px; margin: 14px 0 0; }
.fact-list > div { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 12px; }
.fact-list dt { color: var(--muted); font-size: 11px; }
.fact-list dd { margin: 0; font-size: 13px; line-height: 1.5; }
.source-list { display: grid; gap: 8px; }
.source-list a { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eef1ee; text-decoration: none; }
.source-list a span { color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.source-list a small { color: var(--muted); font-size: 10px; }
@media (max-width: 820px) {
  .app-header { grid-template-columns: auto 1fr; min-height: auto; padding: 14px 20px 10px; gap: 12px; }
  .brand { align-self: center; }
  .top-tabs { grid-column: 1 / -1; grid-row: 2; width: 100%; overflow: hidden; }
  .top-tabs button { flex: 1; padding-inline: 8px; white-space: nowrap; }
  .review-button { position: absolute; right: 20px; top: 12px; font-size: 10px; }
  .content { width: min(100% - 28px, 720px); padding-top: 38px; }
  .intro-row { display: block; margin-bottom: 34px; }
  .sync-meta { margin-top: 16px; padding: 0; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { padding: 20px; }
  .project-card h3 { font-size: 24px; }
  .project-card__footer { align-items: start; }
  .timeline-grid { grid-template-columns: 1fr; gap: 14px; }
  .timeline-history, .timeline-plan { padding: 0; }
  .timeline-now { min-height: 28px; align-items: center; justify-content: start; }
  .timeline-now::before { left: 34px; right: 0; top: 50%; bottom: auto; height: 1px; width: auto; }
  .timeline-now span { padding-left: 0; padding-right: 8px; }
  .goal-grid { grid-template-columns: 1fr; }
  .goal-grid__wide { grid-column: auto; }
  .goal-card { padding: 20px; }
  .goal-card > header { display: grid; }
  .drawer { top: auto; bottom: 0; width: 100%; height: min(86svh, 760px); border-left: 0; border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; transform: translateY(102%); }
  .drawer--open { transform: translateY(0); }
  .auth-panel { padding: 16px; }
  .auth-card { padding: 28px 22px; border-radius: 22px; }
}
@media (max-width: 430px) {
  .review-button { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top-tabs button { font-size: 11px; }
  .content { width: calc(100% - 24px); }
  .intro-row h1 { font-size: 42px; }
  .intro-row p { font-size: 15px; }
  .project-card__footer { display: grid; gap: 8px; }
  .loose-row__detail { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer { transition: none; }
}
