/* Seer design system, shared by every client prototype (Mac, iPhone, Chrome).
   Built from the Oura + Ultrahuman references in /references:
   - Oura: atmospheric backdrops, condensed serif headlines, light oversized numerals,
     score bubbles, arc gauge, tinted gradient cards, cream pill buttons, floating pill nav.
   - Ultrahuman: true-black canvas, hairline-bordered cards, tracked uppercase chips,
     big number + small unit, status badges, white bar charts, teal glow headers. */
@import url('./fonts/fonts.css');

:root {
  --bg: #0a0a0b;
  --bg-2: #141518;
  --ink: #f4f1ee;
  --ink-2: rgba(244, 241, 238, .68);
  --ink-3: rgba(244, 241, 238, .44);
  --ink-4: rgba(244, 241, 238, .22);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --card: rgba(255, 255, 255, .055);
  --card-solid: #17181b;
  --glass: rgba(38, 38, 40, .62);
  --cream: #f3ebe6;
  --cream-ink: #1b1918;

  /* status words (Oura) and badges (Ultrahuman) */
  --optimal: #5fd3a8;
  --good: #79c7d8;
  --fair: #e7c56f;
  --attention: #ee9a6c;
  --alert: #ef6f8e;
  --info: #6fa8ff;

  /* signal hues: one per kind of data */
  --h-focus: #7aa7ff;
  --h-screen: #a48cff;
  --h-input: #f0b86b;
  --h-calls: #5fd3c0;
  --h-music: #f78bd0;
  --h-sleep: #5fd3a8;
  /* iPhone signals (added with the iPhone prototype) */
  --h-move: #ff9f6e;
  --h-food: #c5dd6f;
  --h-money: #f2d675;

  --serif: 'Instrument Serif', 'New York', Georgia, serif;
  --sans: 'Inter', -apple-system, 'SF Pro Text', system-ui, sans-serif;
  --r-card: 22px;
  --r-pill: 999px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; letter-spacing: .005em; }
button { font: inherit; color: inherit; }

/* ── Type */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.display { font-family: var(--serif); font-size: 48px; line-height: 1.02; letter-spacing: -.015em; }
.h1 { font-family: var(--serif); font-size: 34px; line-height: 1.08; }
.h2 { font-size: 22px; font-weight: 400; letter-spacing: -.005em; }
.h3 { font-size: 16px; font-weight: 500; }
.body { color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.small { font-size: 12px; color: var(--ink-3); }
.num { font-weight: 300; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.num-xl { font-size: 92px; line-height: .95; }
.num-l { font-size: 56px; line-height: 1; }
.num-m { font-size: 34px; line-height: 1; }
.unit { font-size: .42em; letter-spacing: 0; color: var(--ink-2); margin-left: 2px; font-weight: 400; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.status { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.st-optimal { color: var(--optimal); } .st-good { color: var(--good); } .st-fair { color: var(--fair); }
.st-attention { color: var(--attention); } .st-alert { color: var(--alert); } .st-info { color: var(--info); }

/* ── Badges (Ultrahuman "Good" / "Optimal") and chips ("STRESS RHYTHM") */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 5px; font-size: 12px; font-weight: 500; }
.b-optimal { background: rgba(95, 211, 168, .13); color: #6fe0b5; }
.b-good { background: rgba(231, 197, 111, .13); color: #ecd28a; }
.b-attention { background: rgba(238, 154, 108, .14); color: #f3a87c; }
.b-alert { background: rgba(239, 111, 142, .14); color: #f58aa4; }
.b-info { background: rgba(111, 168, 255, .14); color: #8db9ff; }
.b-mute { background: rgba(255, 255, 255, .07); color: var(--ink-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .08); font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .07); border: 1px solid var(--line); font-size: 12.5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.live { background: var(--optimal); box-shadow: 0 0 0 3px rgba(95, 211, 168, .18); }

/* ── Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 26px; border-radius: var(--r-pill); border: 0; font-weight: 600; font-size: 14px; cursor: pointer; }
.btn-cream { background: var(--cream); color: var(--cream-ink); }
.btn-cream[disabled] { background: rgba(243, 235, 230, .38); color: rgba(27, 25, 24, .5); }
.btn-ghost { background: transparent; border: 1px solid rgba(243, 235, 230, .55); color: var(--ink); }
.btn-glass { background: rgba(255, 255, 255, .1); color: var(--ink); backdrop-filter: blur(14px); }
.btn-text { background: none; color: var(--ink); height: auto; padding: 8px; }
.btn-sm { height: 34px; padding: 0 16px; font-size: 13px; }
.btn-block { width: 100%; }

/* ── Cards */
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px 22px; overflow: hidden; }
.card.solid { background: var(--card-solid); }
.card.tint { border-color: transparent; }
.card .card-head { display: flex; align-items: center; gap: 12px; }
.card .card-head .ic-bubble { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .08); display: grid; place-items: center; flex: none; }
.card .card-head .t { font-size: 15.5px; }
.card .card-head .chev { margin-left: auto; color: var(--ink-2); }
.tint-focus { background: linear-gradient(160deg, #23324d 0%, #1a2233 55%, #15181f 100%); }
.tint-screen { background: linear-gradient(160deg, #2e2546 0%, #211c31 55%, #17161d 100%); }
.tint-input { background: linear-gradient(160deg, #3a2e1f 0%, #261f18 55%, #18161a 100%); }
.tint-calls { background: linear-gradient(160deg, #183630 0%, #16252a 55%, #15181c 100%); }
.tint-alert { background: linear-gradient(160deg, #40202c 0%, #2a1a22 55%, #18151a 100%); }
.tint-music { background: linear-gradient(160deg, #3d2036 0%, #281a27 55%, #18151a 100%); }
.tint-mute { background: linear-gradient(160deg, #26282c 0%, #1b1c1f 100%); }
.tint-sleep { background: linear-gradient(160deg, #123a38 0%, #142628 55%, #14181b 100%); }
.tint-move { background: linear-gradient(160deg, #3d2419 0%, #281c18 55%, #18151a 100%); }
.tint-food { background: linear-gradient(160deg, #2c3319 0%, #1f2418 55%, #16181a 100%); }
.tint-money { background: linear-gradient(160deg, #3a3319 0%, #262218 55%, #18171a 100%); }

/* Ultrahuman-style metric tile: big number + small unit, tracked label, badge */
.tile { background: rgba(255, 255, 255, .045); border-radius: 16px; padding: 14px 16px; position: relative; }
.tile .v { font-size: 26px; font-weight: 400; letter-spacing: -.02em; }
.tile .v small { font-size: 14px; color: var(--ink-2); margin: 0 2px; }
.tile .l { margin: 4px 0 8px; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; color: var(--ink-3); text-transform: uppercase; }

/* Contributor row (Oura "Contributors" / Ultrahuman list with bar) */
.contrib { padding: 12px 0 14px; }
.contrib .row { display: flex; align-items: center; gap: 10px; font-size: 15px; white-space: nowrap; }
.contrib .row .val { margin-left: auto; white-space: nowrap; color: var(--ink-2); display: flex; align-items: center; gap: 8px; font-size: 14px; }
.contrib .bar { margin-top: 10px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.contrib .bar i { display: block; height: 100%; border-radius: 4px; background: var(--ink); }

/* Progress slider (Oura "Cal progress") */
.slider { position: relative; height: 3px; background: rgba(255, 255, 255, .22); border-radius: 3px; margin: 22px 0 10px; }
.slider i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); border-radius: 3px; }
.slider b { position: absolute; top: 50%; width: 15px; height: 15px; border-radius: 50%; background: var(--ink); transform: translate(-50%, -50%); box-shadow: 0 0 0 4px rgba(255, 255, 255, .15); }
.slider.info b { background: #9cc8ff; }

/* Score bubbles (Oura top row) */
.bubbles { display: flex; gap: 14px; justify-content: center; }
.bubble { width: 92px; text-align: center; }
.bubble .c { width: 74px; height: 74px; margin: 0 auto; border-radius: 50%; background: rgba(20, 20, 22, .34); backdrop-filter: blur(10px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid rgba(255, 255, 255, .06); }
.bubble .c svg { opacity: .9; }
.bubble .c .n { font-size: 21px; font-weight: 400; letter-spacing: -.02em; }
.bubble .lbl { margin-top: 8px; font-size: 13px; color: var(--ink); opacity: .9; }
.bubble.on .c { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7); }

/* Floating pill nav (Oura tab bar) */
.pillnav { display: flex; gap: 4px; padding: 6px; border-radius: var(--r-pill); background: rgba(40, 40, 42, .72); backdrop-filter: blur(24px) saturate(1.4); border: 1px solid rgba(255, 255, 255, .07); box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.pillnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 14px; border-radius: var(--r-pill); color: var(--ink-2); font-size: 10.5px; text-decoration: none; }
.pillnav a.on { color: var(--ink); background: rgba(255, 255, 255, .1); }
.pillnav.vertical { flex-direction: column; }
.fab { width: 56px; height: 56px; border-radius: 50%; background: rgba(46, 46, 48, .82); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, .08); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.fab.light { background: #e9e6e3; color: #111; }

/* Inputs (Oura sign-in field) */
.field { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 12px; background: rgba(255, 255, 255, .03); color: var(--ink); font-size: 14px; }
.field.filled { border-color: rgba(255, 255, 255, .5); }
.field .ph { color: var(--ink-3); }
.field-label { font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--ink-2); text-transform: uppercase; margin: 0 0 8px 2px; }

/* iOS-style switch, Oura blue */
.switch { width: 46px; height: 28px; border-radius: 14px; background: rgba(255, 255, 255, .16); position: relative; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #e9e6e3; transition: left .2s; }
.switch.on { background: #3b8cf0; }
.switch.on::after { left: 21px; background: #fff; }

/* Segmented "Yesterday / Today" header (Oura detail) */
.dayseg { display: flex; justify-content: center; gap: 46px; font-size: 16px; color: var(--ink-3); }
.dayseg .on { color: var(--ink); padding-bottom: 8px; border-bottom: 1.5px solid var(--ink); position: relative; }
.dayseg .on::after { content: ''; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%) rotate(45deg); width: 8px; height: 8px; background: var(--ink); }

/* Legend + misc */
.legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--ink-2); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.hair { height: 1px; background: var(--line); border: 0; margin: 0; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .55); animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ic { width: 18px; height: 18px; flex: none; }
.ic-s { width: 15px; height: 15px; }
.ic-l { width: 22px; height: 22px; }

/* ── App shell pieces shared by the clients (wordmark, layout, app tiles, timeline, onboarding, settings) */
.wordmark { font-weight: 300; letter-spacing: .42em; font-size: 19px; padding-left: .42em; }
.wordmark b { font-weight: 300; position: relative; }
.wordmark b::before { content: ''; position: absolute; left: 1px; right: 1px; top: -3px; height: 1.3px; background: currentColor; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.span2 { grid-column: span 2; }
.sec-title { font-size: 22px; font-weight: 400; margin: 38px 0 16px; display: flex; align-items: center; gap: 10px; }
.sec-title .more { margin-left: auto; font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 4px; }
.appic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.appic.l { width: 52px; height: 52px; border-radius: 13px; font-size: 19px; }
.tl { position: relative; }
.tl::before { content: ''; position: absolute; left: 17px; top: 10px; bottom: 10px; width: 1px; background: rgba(255,255,255,.12); }
.tl-item { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 16px; margin-bottom: 18px; }
.tl-item .ib { width: 36px; height: 36px; border-radius: 50%; background: #1d1e21; border: 1px solid var(--line); display: grid; place-items: center; position: relative; z-index: 1; }
.tl-item .time { font-size: 12.5px; color: var(--ink-2); margin: 9px 0 8px; }
.tl-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; }
.tl-card .meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 5px; }
.tl-card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.optcard { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; background: rgba(255,255,255,.06); margin-bottom: 10px; }
.optcard .tx { flex: 1; }
.optcard .tx b { font-weight: 500; font-size: 14.5px; display: block; margin-bottom: 3px; }
.optcard .tx span { color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.steps { display: flex; gap: 6px; margin-bottom: 30px; }
.steps i { height: 2px; flex: 1; background: rgba(255,255,255,.2); border-radius: 2px; }
.steps i.on { background: #fff; }
.set-list { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); }
.set-row:first-child { border-top: 0; }
.set-row .tx { flex: 1; }
.set-row .tx b { font-weight: 400; font-size: 14.5px; display: block; }
.set-row .tx span { font-size: 12.5px; color: var(--ink-3); }
.set-row .v { color: var(--ink-2); font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.set-side a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.set-side a.on { background: rgba(255,255,255,.08); color: var(--ink); }

/* ── Analysis panels (web portal): 12-column bento grid, hue-glow panels, ranked bars, ranges */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.bento > * { grid-column: span 4; min-width: 0; }
.bento .c3 { grid-column: span 3; } .bento .c4 { grid-column: span 4; } .bento .c5 { grid-column: span 5; } .bento .c6 { grid-column: span 6; }
.bento .c7 { grid-column: span 7; } .bento .c8 { grid-column: span 8; } .bento .c9 { grid-column: span 9; } .bento .c12 { grid-column: span 12; }
.pn { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px 22px; overflow: hidden; isolation: isolate; }
.pn::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--hue, #fff) 16%, transparent), transparent 55%); }
.pn.deep { background: linear-gradient(165deg, color-mix(in srgb, var(--hue, #fff) 18%, #141518) 0%, #141518 62%); border-color: color-mix(in srgb, var(--hue, #fff) 16%, transparent); }
.pn .ph { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pn .ph .eb { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.pn .ph .dot { background: var(--hue, #fff); }
.pn .ph .r { margin-left: auto; font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.pn .big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pn .big .num { font-size: 40px; line-height: 1; }
.pn .foot { margin-top: 12px; font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.pn .split { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: center; }
.pn .split > :last-child { flex: 1; min-width: 170px; }
.kpi { position: relative; padding: 16px 18px 12px; border-radius: 18px; background: rgba(255,255,255,.045); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; gap: 4px; }
.kpi .l { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; color: var(--ink-3); text-transform: uppercase; display: flex; align-items: center; gap: 7px; }
.kpi .v { font-size: 28px; font-weight: 300; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 13px; color: var(--ink-2); margin-left: 3px; letter-spacing: 0; }
.kpi .d { font-size: 12px; color: var(--ink-3); }
.kpi .d .up { color: var(--optimal); } .kpi .d .down { color: var(--attention); }
.kpi .sp { margin: 6px -18px -12px; }
.hbars { display: flex; flex-direction: column; gap: 11px; }
.hb-t { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.hb-t b { margin-left: auto; font-weight: 400; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hb-b { margin-top: 6px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.06); }
.hb-b i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 35%, transparent), var(--c)); }
.ranges { display: flex; flex-direction: column; gap: 7px; }
.rg { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 10px; }
.rg-l { font-size: 11.5px; color: var(--ink-3); }
.rg-t { position: relative; height: 12px; border-radius: 6px; background: rgba(255,255,255,.03); }
.rg-t i { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, transparent), var(--c)); }
.rg-t em { position: absolute; left: 8px; top: -1px; font-size: 10px; font-style: normal; color: var(--ink-4); }
.rg-ax .rg-t { background: none; height: 14px; }
.rg-ax .rg-t span { position: absolute; transform: translateX(-50%); font-size: 10.5px; color: var(--ink-3); }
.lgd { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); }
.lgd span { display: inline-flex; align-items: center; gap: 6px; }
.lgd i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.lst { display: flex; flex-direction: column; }
.lst > div { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.lst > div:first-child { border-top: 0; }
.lst .x { margin-left: auto; color: var(--ink-2); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .bento > *, .bento .c3, .bento .c4, .bento .c5, .bento .c6, .bento .c7, .bento .c8, .bento .c9, .bento .c12 { grid-column: auto; }
}
