:root {
  /* Dark blend: Claude (warm dark, serif, calm) · LinkedIn (blue links, feed cards) · Google Health (rounded tiles, rings) */
  --bg: #151517;
  --bg-deep: #0b0b0d;
  --surface: #1c1c20;
  --card: #212127;
  --card-2: #26262d;
  --line: #2e2e36;
  --line-2: #3a3a44;
  --text: #f0ede6;
  --text-2: #b6b2a9;
  --text-3: #85817a;
  --text-4: #5c5952;
  --blue: #79b8ff;
  --blue-deep: #4a90e2;
  --blue-dim: rgba(121,184,255,0.12);
  --blue-line: rgba(121,184,255,0.35);
  --blue-ink: #0e1017;
  --coral: #d97757;
  --coral-dim: rgba(217,119,87,0.13);
  --good: #86d3a2;
  --good-dim: rgba(134,211,162,0.12);
  --warn: #e4bd6a;
  --danger: #e2716a;
  --serif: Georgia, 'Times New Roman', ui-serif, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 20px;
  --r-sm: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-deep); color: var(--text); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; font-size: 15px; line-height: 1.5;
  min-height: 100vh; display: grid; place-items: center;
}
button { font-family: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; text-align: left; }
input, textarea { font-family: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }

/* ---------- Phone frame ---------- */
.frame {
  width: 393px; max-width: 100vw; height: 852px; max-height: calc(100vh - 40px);
  background: var(--bg); border-radius: 44px; border: 1px solid #26262c;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.03);
  overflow: hidden; position: relative; display: flex; flex-direction: column;
}
@media (max-width: 500px) {
  body { display: block; }
  .frame { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; border: none; box-shadow: none; }
}
.screen { flex: 1; min-width: 0; min-height: 0; width: 100%; overflow-y: auto; overflow-x: hidden; padding: 22px 18px 110px; scroll-behavior: smooth; }
.screen::-webkit-scrollbar { display: none; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 30;
  height: 78px; padding: 8px 10px 20px;
  background: rgba(21,21,23,0.92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-around;
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-3); font-size: 10.5px; width: 64px; }
.tab svg { width: 23px; height: 23px; }
.tab.on { color: var(--blue); }
.tab-plus {
  width: 52px; height: 52px; border-radius: 50%; background: var(--blue); color: var(--blue-ink);
  display: flex; align-items: center; justify-content: center; margin-top: -22px;
  box-shadow: 0 6px 18px rgba(121,184,255,0.3);
}
.tab-plus svg { width: 24px; height: 24px; }

/* ---------- Typography ---------- */
.hero-t { font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.16; letter-spacing: -0.01em; margin: 0; }
.sec-t { font-family: var(--serif); font-weight: 500; font-size: 19px; margin: 0; }
.eyebrow { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.sub { color: var(--text-2); font-size: 14px; line-height: 1.55; }
.tiny { font-size: 12px; color: var(--text-3); }
.mono { font-family: var(--mono); }
.blue { color: var(--blue); }
.good { color: var(--good); }

/* ---------- Tiles & cards ---------- */
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.tile-2 { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.sec { margin-top: 26px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }

/* ---------- Buttons ---------- */
.btnP {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: var(--blue); color: var(--blue-ink); font-weight: 650; font-size: 15px;
  padding: 15px 18px; border-radius: 999px; transition: transform 80ms, opacity 120ms;
}
.btnP:active { transform: scale(0.985); }
.btnP.done { background: var(--good-dim); color: var(--good); border: 1px solid rgba(134,211,162,0.3); }
.btnG {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-2); color: var(--text-2); border-radius: 999px;
  padding: 9px 15px; font-size: 13.5px; font-weight: 550;
}
.btnL { color: var(--blue); font-weight: 600; font-size: 13.5px; }
.chiprow { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  padding: 9px 14px; border-radius: 999px; font-size: 13.5px; transition: border-color 100ms;
}
.chip.on { background: var(--blue-dim); border-color: var(--blue-line); color: var(--blue); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--text-2); background: var(--surface);
}
.pill.b { color: var(--blue); border-color: var(--blue-line); background: var(--blue-dim); }
.pill.g { color: var(--good); border-color: rgba(134,211,162,0.3); background: var(--good-dim); }
.pill.m { color: var(--text-3); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Landing ---------- */
.brand { display: flex; align-items: center; gap: 8px; margin-bottom: 26px; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--blue-dim); border: 1px solid var(--blue-line);
  color: var(--blue); font-family: var(--mono); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.brand .name { font-weight: 650; font-size: 15px; letter-spacing: -0.01em; }
.ex-card {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px;
}
.ex-card:active { border-color: var(--blue-line); }
.ex-card .q { font-size: 14.5px; line-height: 1.4; font-weight: 550; }
.ex-card .m { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.ex-card svg { flex: none; width: 18px; height: 18px; color: var(--text-4); }
.mini-strip { display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 6px; width: calc(100% + 36px); min-width: 0; }
.mini-strip::-webkit-scrollbar { display: none; }
.mini-card { flex: none; width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.mini-card .q { font-size: 12.5px; font-weight: 550; line-height: 1.35; height: 2.7em; overflow: hidden; }
.mini-card .e { font-size: 12px; margin-top: 8px; font-weight: 650; }

/* ---------- Chat (designer) ---------- */
.chat { display: flex; flex-direction: column; gap: 14px; padding-bottom: 70px; }
.msg-ai { display: flex; gap: 10px; max-width: 94%; animation: rise 240ms ease both; }
.msg-ai .av {
  flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--coral-dim); border: 1px solid rgba(217,119,87,0.35);
  color: var(--coral); display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.msg-ai .av svg { width: 15px; height: 15px; }
.bub-ai { background: var(--surface); border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; padding: 12px 15px; font-size: 14.5px; line-height: 1.55; }
.bub-ai .note { margin-top: 8px; font-size: 12.5px; color: var(--text-3); }
.msg-me { margin-left: auto; max-width: 85%; animation: rise 240ms ease both; }
.bub-me { background: #263a52; border-radius: 18px 18px 6px 18px; padding: 11px 15px; font-size: 14.5px; line-height: 1.5; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.typing { display: flex; gap: 4px; padding: 6px 2px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-4); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%,60%,100% { opacity: 0.3; } 30% { opacity: 1; } }
.proto-fab { position: absolute; top: 14px; right: 14px; z-index: 20; }

/* Designer composer */
.composer {
  position: absolute; left: 0; right: 0; bottom: 78px; z-index: 25;
  padding: 10px 14px 12px;
  background: linear-gradient(to top, var(--bg) 65%, transparent);
}
.composer-inner {
  display: flex; gap: 8px; align-items: center;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 6px 6px 6px 16px;
}
.composer-inner input {
  flex: 1; background: transparent; border: none; outline: none; font-size: 14px; min-width: 0;
}
.composer-inner input::placeholder { color: var(--text-4); }
.composer-inner button {
  flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: var(--blue-ink);
  display: flex; align-items: center; justify-content: center;
}
.composer-inner button:disabled { background: var(--line-2); color: var(--text-4); }

.sheet-scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.55); z-index: 40; animation: fade 160ms ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 41;
  background: var(--card-2); border-radius: 24px 24px 0 0; border-top: 1px solid var(--line-2);
  padding: 14px 20px 30px; max-height: 72%; overflow-y: auto; animation: up 220ms ease both;
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet .grab { width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 14px; }
.p-row { padding: 10px 0; border-top: 1px dashed var(--line); font-size: 13.5px; display: flex; gap: 12px; }
.p-row:first-of-type { border-top: none; }
.p-row .k { flex: none; width: 96px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-4); padding-top: 2px; font-weight: 600; }
.p-row .v { color: var(--text); }
.p-row .v.off { color: var(--text-4); font-style: italic; }

/* ---------- Slider ---------- */
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: var(--line-2); border-radius: 4px; outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 5px var(--blue-dim); cursor: grab; }
.slider::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--blue); border: none; box-shadow: 0 0 0 5px var(--blue-dim); }

/* ---------- Today / rings / metrics ---------- */
.today { display: flex; gap: 16px; align-items: center; }
.ring-wrap { position: relative; width: 84px; height: 84px; flex: none; }
.ring-wrap .c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-wrap .c .n { font-family: var(--mono); font-size: 19px; font-weight: 600; line-height: 1; }
.ring-wrap .c .d { font-size: 9.5px; color: var(--text-3); margin-top: 2px; letter-spacing: 0.04em; text-transform: uppercase; }
.metric { display: flex; align-items: baseline; gap: 6px; }
.metric .n { font-family: var(--mono); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.metric .u { font-size: 12px; color: var(--text-3); }

/* ---------- Calendar strip ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal .c {
  aspect-ratio: 1; border-radius: 8px; background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; position: relative;
  font-family: var(--mono); font-size: 10.5px; color: var(--text-4);
}
.cal .c.A.logged { background: #2b2b31; border-color: var(--line-2); color: var(--text-2); }
.cal .c.B.logged { background: var(--blue-dim); border-color: var(--blue-line); color: var(--blue); }
.cal .c.wash { border-style: dashed; }
.cal .c.today { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--blue); color: var(--text); }
.cal .c .ph { position: absolute; top: 2px; right: 4px; font-size: 7.5px; color: var(--text-4); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--text-3); margin-top: 10px; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; border: 1px solid var(--line-2); }

/* ---------- Accordion ---------- */
.acc { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.acc-h { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 15px 16px; font-weight: 600; font-size: 14.5px; }
.acc-h svg { width: 17px; height: 17px; color: var(--text-3); transition: transform 160ms; }
.acc.open .acc-h svg { transform: rotate(180deg); }
.acc-b { padding: 0 16px 14px; }

/* ---------- Results ---------- */
.callout { border: 1px solid var(--blue-line); background: var(--blue-dim); border-radius: var(--r); padding: 18px; }
.callout .big { font-family: var(--mono); font-size: 40px; font-weight: 650; color: var(--blue); line-height: 1; letter-spacing: -0.02em; }
.callout .big .u { font-size: 17px; opacity: 0.75; }
.callout.muted { border-color: var(--line-2); background: var(--surface); }
.callout.muted .big { color: var(--text-2); font-size: 26px; }
.insight { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 14px 16px; }
.insight .lab { display: flex; align-items: center; gap: 7px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--coral); font-weight: 650; margin-bottom: 7px; }
.insight .lab svg { width: 13px; height: 13px; }
.insight .tx { font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.insight .tx b { color: var(--text); font-weight: 600; }

/* Past trials */
.past-card {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px;
}
.past-card:active { border-color: var(--blue-line); }
.past-card .t { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.past-card .m { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.past-card .e { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.back-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.back-row button { display: flex; align-items: center; gap: 5px; color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.back-row svg { width: 16px; height: 16px; }

/* ---------- Segments / inputs / toggles ---------- */
.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { flex: 1; text-align: center; padding: 9px 6px; font-size: 13px; border-radius: 9px; color: var(--text-2); font-weight: 550; }
.seg button.on { background: var(--blue-dim); color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue-line); }
.field { margin-bottom: 20px; }
.field .lab { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 600; margin-bottom: 9px; }
.field .lab .h { font-size: 11.5px; color: var(--text-4); font-weight: 400; }
.inp {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; outline: none;
}
.inp:focus { border-color: var(--blue-line); }
.rate { display: flex; gap: 5px; }
.rate button {
  flex: 1; aspect-ratio: 1; max-width: 34px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); font-family: var(--mono); font-size: 12.5px; color: var(--text-3); text-align: center;
}
.rate button.on { background: var(--blue-dim); border-color: var(--blue-line); color: var(--blue); }
.tgl { position: relative; width: 42px; height: 25px; border-radius: 999px; background: var(--line-2); transition: background 140ms; flex: none; }
.tgl.on { background: var(--blue-deep); }
.tgl i { position: absolute; top: 2.5px; left: 2.5px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 140ms; }
.tgl.on i { transform: translateX(17px); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- Feed (Explore) ---------- */
.search-bar {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 15px; margin-top: 14px;
}
.search-bar svg { width: 16px; height: 16px; color: var(--text-4); flex: none; }
.search-bar input { flex: 1; background: transparent; border: none; outline: none; font-size: 14px; min-width: 0; }
.search-bar input::placeholder { color: var(--text-4); }
.sort { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin: 14px 0 16px; }
.sort button { padding: 0 2px 10px; font-size: 13.5px; font-weight: 600; color: var(--text-3); border-bottom: 2px solid transparent; }
.sort button.on { color: var(--blue); border-bottom-color: var(--blue); }
.feed-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 15px 16px; margin-bottom: 12px; }
.feed-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avvy { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.feed-head .who { font-size: 13px; font-weight: 600; }
.feed-head .meta { font-size: 11.5px; color: var(--text-3); }
.feed-q { font-size: 15px; font-weight: 600; line-height: 1.35; margin-bottom: 9px; }
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tagrow .t { font-size: 11px; padding: 3px 9px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); color: var(--text-3); font-weight: 550; }
.feed-mid { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.eff { font-size: 14px; font-weight: 700; }
.eff .runs { display: block; font-size: 11.5px; color: var(--text-3); font-weight: 400; margin-top: 2px; }
.feed-actions { display: flex; gap: 22px; border-top: 1px solid var(--line); margin-top: 13px; padding-top: 11px; }
.feed-actions button { color: var(--text-2); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.feed-actions button svg { width: 15px; height: 15px; }
.feed-actions button.hot { color: var(--blue); }
.no-results { text-align: center; color: var(--text-3); font-size: 13.5px; padding: 30px 10px; }

/* ---------- Profile ---------- */
.prof-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.prof-head .avvy { width: 56px; height: 56px; font-size: 19px; }
.list { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.list .it { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.list .it:first-child { border-top: none; }
.list .it .l .t { font-size: 14px; font-weight: 550; }
.list .it .l .d { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ---------- Screens menu ---------- */
.menu-fab {
  position: absolute; top: 14px; right: 14px; z-index: 50;
  background: rgba(28,28,32,0.85); backdrop-filter: blur(10px); border: 1px solid var(--line-2);
  color: var(--text-2); border-radius: 999px; padding: 6px 12px; font-size: 11.5px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.menu-panel {
  position: absolute; top: 50px; right: 14px; z-index: 51; width: 220px;
  background: var(--card-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 8px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.55); animation: fade 140ms ease both;
}
.menu-panel .mi { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 9px 11px; border-radius: 10px; font-size: 13px; color: var(--text-2); }
.menu-panel .mi:hover { background: var(--surface); color: var(--text); }
.menu-panel .mi.on { color: var(--blue); }
.menu-panel .divider { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-panel .cap { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-4); padding: 6px 11px 3px; font-weight: 650; }

/* ---------- Toast ---------- */
.toast {
  position: absolute; bottom: 96px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--text);
  border-radius: 999px; padding: 10px 18px; font-size: 13px; font-weight: 550; white-space: nowrap;
  max-width: 90%; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5); animation: rise 200ms ease both;
}

/* ---------- Charts ---------- */
.chart-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.spark { display: block; }
