/* Halee — one stylesheet.
 *
 * Calm, light and airy. Figtree, a single green accent, and colour used only
 * where it means something: a status, never a decoration.
 *
 * The layout is one document that reflows. Under 900px it is the phone app,
 * with a floating tab bar and sheets that rise from the bottom. Above that the
 * navigation moves to a rail on the left, the content spreads into columns and
 * sheets become centred dialogs. There is no second set of components for
 * desktop, so a change to a card is a change everywhere.
 */

:root {
  --accent: #079b61;
  --accent-soft: rgba(7, 155, 97, .12);
  --accent-deep: #0e3a27;
  --amber: #e5a321;
  --amber-ink: #b77900;
  --neutral-ring: #a9b4ad;
  --danger: #d2402f;

  --ink: #17211b;
  --ink-2: rgba(23, 33, 27, .62);
  --ink-3: rgba(23, 33, 27, .45);
  --hair: #e9efeb;
  --bg: #fafcfa;
  --tint: #f6faf7;
  --card: #ffffff;

  --shadow: 0 1px 2px rgba(12, 24, 18, .03), 0 10px 28px -18px rgba(12, 24, 18, .12);
  --shadow-lift: 0 2px 6px rgba(12, 24, 18, .05), 0 22px 48px -24px rgba(12, 24, 18, .22);

  --r-card: 20px;
  --r-tile: 18px;
  --r-btn: 14px;

  --rail: 244px;
  --wrap: 1120px;
  --gap: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: Figtree, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.02em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: var(--accent); }

.ic { flex: none; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(23, 33, 27, .14); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }

/* ------------------------------------------------------------- shell */

#root { min-height: 100vh; min-height: 100dvh; }

.shell { min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 18px calc(12px + env(safe-area-inset-top));
  padding-top: calc(12px + env(safe-area-inset-top));
  background: rgba(250, 252, 250, .86);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--hair); }

.brand { display: flex; align-items: center; gap: 9px; }
.brand img { width: 28px; height: 28px; display: block; border-radius: 8px; }
.brand b { font-size: 19px; letter-spacing: -.03em; color: var(--accent-deep); }

/* The logo mark is dark green with white and lime inside it, so on the dark
   panel it needs its own light ground to read as a mark rather than a blob.
   Flattening it to a silhouette loses the whole mark, which is what a
   brightness/invert filter does to it. */
.brand.on-dark img { background: #fff; padding: 3px; border-radius: 11px; width: 34px; height: 34px; }
.brand.on-dark b { color: #fff; font-size: 22px; }

/* Same reason, anywhere the mark sits on the dark card. */
.markchip {
  display: grid; place-items: center; width: 40px; height: 40px;
  background: #fff; border-radius: 12px; margin-bottom: 12px;
}

.avatar {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: 14px; display: grid; place-items: center;
}
.avatar.on { box-shadow: 0 0 0 2px var(--accent); }

.main { flex: 1; width: 100%; }
.wrap { max-width: 620px; margin: 0 auto; padding: 4px 16px 132px; }

/* ------------------------------------------------------------- nav */

.tabbar {
  position: fixed; left: 14px; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .74);
  backdrop-filter: blur(20px) saturate(180%);
  border-radius: 26px; padding: 6px 4px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12), inset 0 0 0 .5px rgba(255, 255, 255, .7);
}
.tabbar button {
  border: 0; background: none; border-radius: 20px; cursor: pointer;
  display: grid; justify-items: center; gap: 3px;
  padding: 7px 0 6px; min-height: 46px;
  font-size: 10.5px; font-weight: 500; color: var(--ink-2);
}
.tabbar button.on { color: var(--accent); font-weight: 700; background: var(--accent-soft); }

.rail { display: none; }

/* ------------------------------------------------------------- type */

.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.eyebrow.accent { color: var(--accent); }
.lede { color: var(--ink-2); font-size: 15px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

.pagehead { padding: 14px 4px 18px; }
.pagehead h1 { font-size: 32px; line-height: 1.14; margin: 4px 0 3px; }
.sectionhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 28px 6px 10px; }
.sectionhead h2 { font-size: 19px; }
.sectionhead .sub { color: var(--ink-2); font-size: 12.5px; margin-top: 1px; }

.linkbtn { border: 0; background: none; color: var(--accent); font-size: 14.5px; font-weight: 600; cursor: pointer; padding: 4px; margin: -4px; }
.linkbtn:hover { text-decoration: underline; }

/* ------------------------------------------------------------- cards */

.card { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 18px; }
.card.tight { padding: 14px 16px; }
.card.flat { box-shadow: none; border: 1px solid var(--hair); }

.dark {
  background: linear-gradient(155deg, #123829, #081d12);
  color: #fff; border-radius: var(--r-card); padding: 20px;
}
.dark h2, .dark h3, .dark b { color: #fff; }
.dark .lede { color: rgba(255, 255, 255, .72); }
.dark .accent-text { color: #8fd4ad; }

.row {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  background: var(--card); border: 0; border-radius: var(--r-tile);
  box-shadow: var(--shadow); padding: 13px 16px; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.row:hover { box-shadow: var(--shadow-lift); }
.row:active { transform: scale(.99); }
.row .grow { flex: 1; min-width: 0; }
.row .chev { color: var(--ink-3); flex: none; }
.stack { display: flex; flex-direction: column; gap: 8px; }

/* --------------------------------------------------------- score card */

.score-value { font-size: 62px; line-height: 1; letter-spacing: -.045em; font-weight: 700; margin: 6px 0 10px; }
.delta { text-align: right; }
.delta b { display: block; font-size: 15px; font-weight: 700; color: var(--accent); }
.delta.down b { color: var(--ink-2); }
.delta span { font-size: 12px; color: var(--ink-2); }

.gauge { position: relative; height: 16px; margin: 2px 2px 6px; }
.gauge .bands { position: absolute; top: 4px; left: 0; right: 0; display: flex; gap: 3px; height: 8px; border-radius: 99px; overflow: hidden; }
.gauge .bands i { display: block; }
.gauge .bands i:nth-child(1) { flex: 6; background: #e3e9e5; }
.gauge .bands i:nth-child(2) { flex: 2; background: #f2ddad; }
.gauge .bands i:nth-child(3) { flex: 2; background: #b9e3cd; }
.gauge .knob {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  border: 3.5px solid var(--accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  transition: left .5s cubic-bezier(.32, .72, 0, 1);
}
.gauge-ends { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-3); }

/* ------------------------------------------------------------- chart */

.chart { position: relative; margin-top: 14px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .ylab { position: absolute; left: 0; font-size: 9px; font-weight: 600; color: var(--ink-3); background: var(--card); padding-right: 4px; line-height: 1; }
.chart .badge { position: absolute; right: 0; font-size: 10px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 6px; padding: 2px 6px; line-height: 1.2; }
.chart-x { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-3); margin-top: 8px; }

.segmented { display: flex; background: rgba(23, 33, 27, .07); border-radius: 10px; padding: 2px; margin-top: 16px; }
.segmented button { flex: 1; border: 0; background: none; color: var(--ink-2); padding: 7px 4px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.segmented button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }

/* ------------------------------------------------------------- rings */

.ring { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ring > span { width: 38px; height: 38px; border-radius: 50%; background: var(--card); display: grid; place-items: center; color: var(--ink); }
.ring.good { background: conic-gradient(var(--accent) var(--deg, 0deg), rgba(23, 33, 27, .08) 0); }
.ring.watch { background: conic-gradient(var(--amber) var(--deg, 0deg), rgba(23, 33, 27, .08) 0); }
.ring.low { background: conic-gradient(var(--neutral-ring) var(--deg, 0deg), rgba(23, 33, 27, .08) 0); }
.ring.lg { width: 54px; height: 54px; }
.ring.lg > span { width: 45px; height: 45px; }

.iconchip { width: 38px; height: 38px; border-radius: 12px; background: var(--tint); display: grid; place-items: center; color: var(--ink); flex: none; }

/* --------------------------------------------------------- tiles grid */

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.tile {
  border: 0; background: var(--card); border-radius: var(--r-tile);
  box-shadow: var(--shadow); padding: 13px 4px 12px; cursor: pointer;
  display: grid; justify-items: center; gap: 7px; min-height: 44px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.tile:hover { box-shadow: var(--shadow-lift); }
.tile:active { transform: scale(.97); }
.tile b { font-size: 12px; font-weight: 600; }

/* ------------------------------------------------------------- streaks */

.dots { display: flex; gap: 7px; }
.dots span { display: grid; justify-items: center; gap: 3px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--hair); display: block; }
.dots i.hit { background: var(--accent); }
.dots small { font-size: 9px; font-weight: 600; color: var(--ink-3); line-height: 1; }

.bignum { font-size: 24px; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; }

.grid30 { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.grid30 span { aspect-ratio: 1; border-radius: 5px; background: #edf1ee; }
.grid30 span.hit { background: var(--accent); }
.grid30 span.miss { background: #dfe6e1; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 11px; color: var(--ink-2); font-weight: 500; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 2.5px; display: block; }

.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); }
.statgrid > div { text-align: center; padding: 2px 6px; }
.statgrid > div + div { border-left: 1px solid var(--hair); }
.statgrid small { font-size: 10px; font-weight: 700; letter-spacing: .07em; color: var(--ink-3); text-transform: uppercase; }
.statgrid b { display: block; font-size: 23px; font-weight: 700; letter-spacing: -.04em; margin-top: 3px; }

.pill { display: inline-block; border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.pill.flat { background: rgba(23, 33, 27, .06); color: var(--ink-2); }
.tag { font-size: 11px; font-weight: 600; border-radius: 99px; padding: 3px 9px; background: var(--tint); color: var(--ink-2); }

.status.good { color: var(--accent); }
.status.watch { color: var(--amber-ink); }
.status.low { color: var(--ink-2); }

/* Habit status border: the rule is >80% green, 60–80 amber, below that a
   plain hairline. Colour is a status here, not decoration. */
.bordered.good { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--accent); }
.bordered.watch { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--amber); }
.bordered.low { box-shadow: var(--shadow), inset 0 0 0 1px var(--hair); }

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 50px; padding: 0 20px;
  border: 0; border-radius: var(--r-btn); cursor: pointer;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 600;
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .55; cursor: default; transform: none; filter: none; }
.btn.soft { background: var(--accent-soft); color: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair); }
.btn.ghost:hover { background: var(--tint); filter: none; }
.btn.danger { background: var(--danger); }
.btn.sm { min-height: 40px; font-size: 14.5px; width: auto; padding: 0 16px; }

.choice {
  border: 1px solid var(--hair); background: var(--card); color: var(--ink-2);
  border-radius: 11px; padding: 11px 6px; min-height: 46px;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: transform .1s ease, background .12s ease, border-color .12s ease;
}
.choice:hover { border-color: var(--accent); color: var(--ink); }
.choice:active { transform: scale(.97); }
.choice.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.choice.wide { text-align: left; padding: 13px 15px; font-size: 15px; font-weight: 500; color: var(--ink); border-radius: 12px; }
.choice.wide.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

.opts3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--hair); background: var(--card); color: var(--ink-2);
  border-radius: 99px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: block; }
.chip.on .dot { background: #fff; }

input[type="email"], input[type="text"], textarea {
  width: 100%; border: 1px solid var(--hair); border-radius: 12px;
  padding: 13px 14px; font: inherit; font-size: 16px; background: var(--card);
  color: var(--ink); resize: vertical;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
label.field { display: block; }
label.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }

/* ------------------------------------------------------------- lists */

.settings { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 0 16px; }
.settings button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 52px; border: 0; background: none; cursor: pointer;
  font-size: 15.5px; text-align: left; border-bottom: 1px solid var(--hair);
}
.settings button:last-child { border-bottom: 0; }
.settings button:hover { color: var(--accent); }
.settings button.danger { color: var(--danger); }
.settings .ico { width: 30px; height: 30px; border-radius: 9px; background: rgba(23, 33, 27, .06); display: grid; place-items: center; flex: none; }
.settings .grow { flex: 1; }
.settings .det { color: var(--ink-3); font-size: 13.5px; }

/* ------------------------------------------------------------- sheets */

.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(9, 20, 14, .38); animation: fade .2s ease; backdrop-filter: blur(1px); }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--tint); border-radius: 30px 30px 0 0;
  padding: 8px 18px calc(36px + env(safe-area-inset-bottom));
  animation: rise .32s cubic-bezier(.32, .72, 0, 1);
}
.grabber { width: 36px; height: 5px; border-radius: 99px; background: rgba(23, 33, 27, .2); margin: 4px auto 14px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 6px; }
.sheet-head h2 { font-size: 24px; margin: 3px 0 2px; }
.iconbtn {
  border: 0; background: rgba(23, 33, 27, .07); border-radius: 50%;
  width: 32px; height: 32px; display: grid; place-items: center;
  color: var(--ink-2); cursor: pointer; flex: none;
}
.iconbtn:hover { background: rgba(23, 33, 27, .12); color: var(--ink); }

.sheet .card, .sheet .row { background: #fff; }
.sheet .stack + .btn, .sheet .card + .btn { margin-top: 14px; }

.prose b { display: block; font-size: 15px; font-weight: 700; }
.prose p { color: rgba(23, 33, 27, .74); font-size: 14px; line-height: 1.6; margin-top: 8px; text-wrap: pretty; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: calc(14px + env(safe-area-inset-top)); z-index: 60;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(20px);
  color: var(--ink); padding: 11px 18px; border-radius: 99px;
  font-size: 13.5px; font-weight: 600; max-width: min(90vw, 460px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18), inset 0 0 0 .5px rgba(255, 255, 255, .8);
  animation: fade .25s ease; display: flex; align-items: center; gap: 8px;
}
.toast.warn { color: var(--amber-ink); }

@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Already on screen: a re-render must not replay the entrance. */
.sheet.settled, .scrim.settled, .toast.settled { animation: none; }

/* ------------------------------------------------------------- signin */

.signin { min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
.signin-pitch { display: none; }
.signin-form { display: grid; align-content: center; justify-items: stretch; padding: 40px 22px calc(40px + env(safe-area-inset-bottom)); max-width: 460px; width: 100%; margin: 0 auto; }
.signin-form h1 { font-size: 34px; line-height: 1.1; margin: 18px 0 8px; }
.signin-form .eight { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 22px 0 6px; }
.signin-form .eight div { display: grid; justify-items: center; gap: 5px; padding: 12px 2px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); color: var(--ink-2); }
.signin-form .eight small { font-size: 11px; font-weight: 600; }
.notice { border-radius: 12px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; }
.notice.info { background: var(--accent-soft); color: #0a6141; }
.notice.warn { background: #fdf3e0; color: #8a5a06; }
.notice.err { background: #fdecea; color: #a3271a; }

.legal { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.legal button { border: 0; background: none; color: var(--ink-2); font-size: 12.5px; cursor: pointer; }
.legal button:hover { color: var(--accent); text-decoration: underline; }

.offline-bar {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  background: #fdf3e0; color: #8a5a06; font-size: 12.5px; font-weight: 600;
  padding: 7px 14px;
}

/* ------------------------------------------------------------- skeleton */

.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot .pulse { width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.9); opacity: .6; } 50% { transform: scale(1); opacity: 1; } }

/* =================================================================
   Tablet and up. Nothing new appears, the same components get room.
   ================================================================= */

@media (min-width: 620px) {
  .wrap { max-width: 660px; padding-bottom: 140px; }
  .tiles { gap: 12px; }
  .signin-form .eight { gap: 10px; }
}

@media (min-width: 900px) {
  body { font-size: 16px; }

  .shell { flex-direction: row; }

  /* The tab bar becomes a rail. Same items, same order, same handlers. */
  .tabbar { display: none; }
  .rail {
    display: flex; flex-direction: column; gap: 4px;
    width: var(--rail); flex: none; position: sticky; top: 0;
    height: 100dvh; padding: 22px 14px; border-right: 1px solid var(--hair);
    background: var(--card);
  }
  .rail .brand { padding: 4px 10px 20px; }
  .rail .brand img { width: 32px; height: 32px; }
  .rail .brand b { font-size: 21px; }
  .rail button.nav {
    display: flex; align-items: center; gap: 12px; width: 100%;
    border: 0; background: none; border-radius: 12px; cursor: pointer;
    padding: 11px 12px; font-size: 15px; font-weight: 500; color: var(--ink-2);
    text-align: left;
  }
  .rail button.nav:hover { background: var(--tint); color: var(--ink); }
  .rail button.nav.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
  .rail .spacer { flex: 1; }
  .rail .railfoot { border-top: 1px solid var(--hair); padding-top: 10px; }
  .rail .cta { margin: 14px 0 6px; }

  .topbar { display: none; }
  .main { min-width: 0; }
  .wrap { max-width: var(--wrap); padding: 34px 40px 60px; }

  .pagehead { padding: 0 0 22px; }
  .pagehead h1 { font-size: 38px; }
  .sectionhead { margin: 34px 0 12px; }
  .sectionhead h2 { font-size: 21px; }

  /* Home stops being one long column. The score and the streak lead, the
     check-in and Learn sit beside them where they are reachable without
     scrolling past everything else. */
  .cols { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; align-items: start; }
  .cols > * { min-width: 0; }
  .colstack { display: flex; flex-direction: column; }

  .tiles { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .tile { padding: 18px 8px 16px; }
  .list2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .stack.list2 { display: grid; }

  .score-value { font-size: 68px; }
  .card { padding: 22px; }
  .dark { padding: 24px; }

  /* Sheets become centred dialogs. Same markup, different anchoring. */
  .sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    transform: translate(-50%, -50%);
    width: min(620px, calc(100vw - 64px));
    max-height: min(84dvh, 860px);
    border-radius: 24px; padding: 14px 26px 26px;
    box-shadow: 0 40px 90px -30px rgba(9, 20, 14, .5);
    animation: pop .22s cubic-bezier(.32, .72, 0, 1);
  }
  .grabber { display: none; }
  .toast { top: 22px; }

  /* Eight cards in a 620px dialog is a lot of scrolling; two columns fits the
     whole check-in without any. */
  .checkin-grid { grid-template-columns: 1fr 1fr; }

  @keyframes pop { from { transform: translate(-50%, calc(-50% + 14px)); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }

  /* Sign-in becomes two panels: what Halee is, and the one field that starts it. */
  .signin { grid-template-columns: 1.05fr .95fr; }
  .signin-pitch {
    display: grid; align-content: center; gap: 18px; padding: 60px;
    background: linear-gradient(155deg, #123829, #081d12); color: #fff;
  }
  .signin-pitch h2 { font-size: 40px; line-height: 1.1; letter-spacing: -.03em; }
  .signin-pitch p { color: rgba(255, 255, 255, .74); font-size: 16px; max-width: 46ch; }
  .signin-pitch .eight8 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; max-width: 420px; }
  .signin-pitch .eight8 div {
    display: grid; justify-items: center; gap: 6px; padding: 14px 4px;
    border-radius: 14px; background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .9);
  }
  .signin-pitch .eight8 small { font-size: 11px; font-weight: 600; }
  .signin-form { padding: 60px 48px; max-width: 520px; }
  .signin-form .eight { display: none; }
}

@media (min-width: 1180px) {
  .wrap { padding: 40px 56px 72px; }
  .cols { gap: 28px; }
}

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