/* Our Goals — interface.
 *
 * Brief: "premium, like an Apple website." That means restraint, not decoration —
 * near-white surfaces, very large tightly-tracked headlines, a lot of air, one
 * accent used sparingly, and depth from soft shadow rather than borders.
 *
 * Chart colours are the one place that stays loud: they're a validated
 * categorical palette and are not up for aesthetic revision.
 */

/* Colour tokens (surfaces, ink, accent) and the typeface live in themes.css,
   which is loaded after this file so a palette can override them. Everything
   below is palette-independent: geometry, shadow, and the data colours. */
:root {
  color-scheme: light;

  --good: #1d8f3f;
  --good-soft: #e7f5ea;
  --warn: #9a6a00;
  --warn-soft: #fdf3e0;
  --danger: #d02b28;
  --danger-soft: #fdeceb;

  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  --neutral-fill: #d2d2d7;

  /* Generous radii — the storybook look lives here as much as in the colour. */
  --r-lg: 30px;
  --r: 24px;
  --r-sm: 16px;
  --r-xs: 10px;

  /* Solid offset shadows rather than soft blur: this is the single biggest
     lever on "illustrated sticker" vs "corporate card". Derived from --ink so
     every palette gets a shadow in its own family. */
  --outline: color-mix(in srgb, var(--ink) 60%, transparent);
  --drop: color-mix(in srgb, var(--ink) 16%, transparent);
  --drop-strong: color-mix(in srgb, var(--ink) 26%, transparent);

  --shadow-xs: 0 1px 0 var(--drop);
  --shadow-sm: 0 3px 0 var(--drop);
  --shadow: 4px 5px 0 var(--drop);
  --shadow-lg: 8px 10px 0 var(--drop-strong);

  /* Overshoots slightly — things land with a little bounce instead of easing
     to a stop. Used on interactions; --ease-calm for anything continuous. */
  --ease: cubic-bezier(.34, 1.4, .64, 1);
  --ease-calm: cubic-bezier(.32, .72, 0, 1);
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--plane);
  color: var(--ink);
  font: 17px/1.47 var(--sans);
  letter-spacing: var(--tracking-body, -0.01em);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
h1, h2, h3, h4 {
  margin: 0; font-weight: 600; line-height: 1.06;
  letter-spacing: var(--tracking-tight, -0.026em);
}
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

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

.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100dvh; }

.rail {
  position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  padding: 22px 14px 18px;
  background: color-mix(in srgb, var(--plane) 80%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--hair);
  display: flex; flex-direction: column; gap: 2px;
}

.mark { display: flex; align-items: center; gap: 11px; padding: 4px 10px 22px; }
.mark .glyph {
  width: 32px; height: 32px; border-radius: 8px; flex: none;
  background: linear-gradient(145deg, #2568be, #163c7a);
  display: grid; place-items: center; color: #fff; font-size: 16px;
}
.mark .who { min-width: 0; }
.mark .who b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.mark .who span { display: block; font-size: 12px; color: var(--ink-3); letter-spacing: 0; }

.rail button.nav {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 11px; border-radius: 9px; min-height: 40px;
  color: var(--ink-2); font-size: 14.5px; font-weight: 450; text-align: left;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.rail button.nav:hover { background: var(--surface-2); color: var(--ink); }
.rail button.nav[aria-current="page"] { background: var(--surface-2); color: var(--ink); font-weight: 550; }
.rail button.nav .ic { width: 20px; text-align: center; font-size: 15px; flex: none; opacity: .9; }
.rail .foot { margin-top: auto; padding-top: 16px; display: grid; gap: 8px; }

main { min-width: 0; position: relative; z-index: 1; }
.side-scenery { position: fixed; inset: 0 0 0 260px; pointer-events: none; overflow: hidden; z-index: 0; }
.side-sticker { position: absolute; display: block; filter: drop-shadow(0 8px 0 color-mix(in srgb, var(--ink) 10%, transparent)); user-select: none; }
.side-sticker.sun { top: 52px; right: 52px; font-size: 72px; transform: rotate(-10deg); }
.side-sticker.cloud { color: color-mix(in srgb, #fff 85%, var(--surface)); font-size: 70px; opacity: .76; }
.side-sticker.cloud.one { top: 180px; left: 28px; }
.side-sticker.cloud.two { top: 280px; right: 18px; font-size: 48px; }
.side-sticker.house { left: 20px; bottom: 54px; font-size: 68px; transform: rotate(-5deg); }
.side-sticker.car { right: 28px; bottom: 42px; font-size: 62px; transform: scaleX(-1) rotate(-4deg); }
.side-sticker.spark { color: var(--accent); font-size: 30px; }
.side-sticker.spark.one { top: 135px; left: 118px; transform: rotate(16deg); }
.side-sticker.spark.two { right: 132px; bottom: 150px; transform: rotate(-18deg); }
.goal-tags { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.goal-price { font-size: 12px; font-weight: 650; color: var(--ink-2); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--hair)); padding: 5px 8px; border-radius: 999px; white-space: nowrap; }
.canvas { max-width: 1080px; margin: 0 auto; padding: 40px 40px 120px; display: grid; gap: 28px; }

.headline { display: grid; gap: 6px; margin-bottom: 4px; }
.headline h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 600; letter-spacing: -0.035em; }
.headline .kicker { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.headline .lede { font-size: 19px; color: var(--ink-2); letter-spacing: -0.015em; max-width: 62ch; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: sticky; top: 0; height: auto; z-index: 40;
    flex-direction: row; align-items: center; gap: 2px;
    padding: max(8px, env(safe-area-inset-top)) 12px 8px;
    border-right: 0; border-bottom: 1px solid var(--hair);
    overflow-x: auto; scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .mark { padding: 0 12px 0 2px; }
  .mark .who span { display: none; }
  .rail button.nav { padding: 8px 12px; white-space: nowrap; }
  .rail .foot { margin-top: 0; margin-left: auto; padding-top: 0; grid-auto-flow: column; }
  .canvas { padding: 24px 20px 120px; gap: 22px; }
  .side-scenery { display: none; }
}

/* ------------------------------------------------------------------ panel */

.panel {
  background: var(--surface);
  border: 2px solid var(--outline);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 26px;
}
.panel.flush { padding: 0; overflow: hidden; }
.panel.tall { padding: 34px; }
.panel-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.panel-head h2 { font-size: 21px; letter-spacing: -0.022em; }
.panel-head .sub { font-size: 14px; color: var(--ink-3); }
.panel-head .end { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.cols { display: grid; gap: 20px; }
.cols.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.cols.three { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* ------------------------------------------------------------------ figures */

.figure { display: grid; gap: 8px; }
.figure .cap { font-size: 15px; color: var(--ink-2); }
.figure .big {
  font-size: clamp(52px, 8vw, 84px);
  font-weight: 600; letter-spacing: -0.045em; line-height: .98;
}
.figure .big.small { font-size: clamp(24px, 3.4vw, 34px); font-weight: 500; letter-spacing: -0.02em; color: var(--ink-3); }
.figure .note { font-size: 15px; color: var(--ink-3); letter-spacing: -0.012em; }

/* Keep the house and car savings separate at the overview level. Each number
   belongs to exactly one goal, so it cannot be mistaken for a combined target. */
.goal-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.goal-figures .figure {
  padding: 20px; border: 2px solid var(--outline); border-radius: var(--r-sm);
  background: var(--surface);
}
.goal-figures .figure .big { font-size: clamp(36px, 5.4vw, 58px); }

@media (max-width: 640px) {
  .goal-figures { grid-template-columns: 1fr; }
}

/* Rules are drawn per-tile rather than as grid gaps over a coloured container:
   a short last row would otherwise leave a block of bare separator colour.
   overflow:hidden clips the outermost edges. */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  background: var(--surface); border-radius: var(--r-sm); overflow: hidden;
  border: 2px solid var(--outline);
}
.stat {
  background: var(--surface); padding: 16px 18px; display: grid; gap: 3px;
  align-content: start; min-height: 84px;
  box-shadow: 1px 0 0 var(--hair), 0 1px 0 var(--hair);
}
.stat .k { font-size: 12.5px; color: var(--ink-3); letter-spacing: 0; }
.stat .v { font-size: 24px; font-weight: 600; letter-spacing: -0.028em; }
.stat .d { font-size: 12.5px; color: var(--ink-2); letter-spacing: 0; }
.stat .d.good { color: var(--good); }
.stat .d.warn { color: var(--warn); }

/* ------------------------------------------------------------------ meter */

.meter { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .7s var(--ease); }
.meter.good > i { background: var(--good); }

/* ------------------------------------------------------------------ goal tile */

.goal { display: grid; gap: 16px; }
.goal .top { display: flex; align-items: center; gap: 12px; }
.goal .top .em { font-size: 26px; line-height: 1; }
.goal .top h3 { font-size: 19px; letter-spacing: -0.022em; }
.goal .top .pc { margin-left: auto; font-size: 15px; color: var(--ink-3); }
.goal .nums { display: flex; justify-content: space-between; font-size: 15px; gap: 12px; }
.goal .nums b { font-weight: 600; }

/* ------------------------------------------------------------------ bar */

.bar { display: flex; gap: 2px; height: 40px; }
.bar > span { display: block; transition: opacity .2s var(--ease); border-radius: 2px; }
.bar > span:first-child { border-radius: 6px 2px 2px 6px; }
.bar > span:last-child { border-radius: 2px 6px 6px 2px; }
.bar.picked > span { opacity: .28; }
.bar.picked > span.on { opacity: 1; }

.keys { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 18px; }
.keys button { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.keys i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.keys .amt { color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ controls */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 19px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink);
  border: 2px solid var(--outline); box-shadow: 0 3px 0 var(--drop);
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em;
  transition: background .18s var(--ease), transform .12s var(--ease),
              box-shadow .12s var(--ease), opacity .18s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); transform: translateY(-1px); box-shadow: 0 4px 0 var(--drop); }
/* Presses down onto its own shadow rather than just scaling — reads physical. */
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--drop); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.plain { background: transparent; color: var(--accent); padding: 0 6px; border-color: transparent; box-shadow: none; }
.btn.plain:hover { transform: none; box-shadow: none; }
.btn.plain:hover { background: transparent; text-decoration: underline; }
.btn.danger { color: var(--danger); }
.btn.sm { min-height: 30px; padding: 0 13px; font-size: 13px; }
.btn.lg { min-height: 46px; padding: 0 26px; font-size: 16px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .4; pointer-events: none; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  min-height: 36px; padding: 0 16px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2);
  border: 2px solid var(--outline); font-weight: 600;
  font-size: 14px; display: inline-flex; align-items: center; gap: 7px;
  transition: all .18s var(--ease);
}
.pill[aria-pressed="true"] { background: var(--ink); color: var(--plane); font-weight: 500; }
.pill.over { outline: 2px dashed var(--accent); outline-offset: 2px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap; letter-spacing: 0;
}
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

.fld { display: grid; gap: 7px; }
.fld > label, .fld > .fld-label { font-size: 13px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.fld .tip { font-size: 12.5px; color: var(--ink-3); letter-spacing: 0; }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=url], select, textarea {
  width: 100%; min-height: 42px; padding: 10px 14px;
  border-radius: var(--r-sm); border: 2px solid var(--outline);
  background: var(--surface); font-size: 16px; letter-spacing: -0.01em;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}
.grid-f { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.row-f { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ------------------------------------------------------------------ table */

.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--ink-3); padding: 0 12px 10px; white-space: nowrap; letter-spacing: 0; }
th.r, td.r { text-align: right; font-variant-numeric: tabular-nums; }
td { padding: 13px 12px; border-top: 1px solid var(--hair); vertical-align: top; }
.sheet-table th, .sheet-table td { border-right: 1px solid var(--outline); }
.sheet-table th:last-child, .sheet-table td:last-child { border-right: 0; }
.sheet-spacer td { height: 18px; padding: 0; border-top: 0; background: var(--canvas); }
tr.grp td { padding-top: 22px; border-top: 0; }
tr.grp .gn { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 10px; letter-spacing: -0.015em; }
tr.grp .gn i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
tr.itm { cursor: pointer; }
tr.itm:hover td { background: var(--surface-2); }
td .nm { font-weight: 450; }
td .nt { color: var(--ink-3); font-size: 13px; margin-top: 3px; max-width: 46ch; letter-spacing: 0; }

/* ------------------------------------------------------------------ gallery */

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 20px; }
.tile-card {
  position: relative;
  background: var(--surface); border-radius: var(--r); overflow: hidden;
  border: 2px solid var(--outline);
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  cursor: pointer; text-align: left;
}
.tile-card:hover { transform: translateY(-5px) rotate(-.6deg); box-shadow: var(--shadow-lg); }
.tile-card .shot { aspect-ratio: 4/3; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.tile-card .shot img { width: 100%; height: 100%; object-fit: cover; }
.tile-card .shot.contain img { object-fit: contain; background: #fff; }
.tile-card .shot .none { font-size: 30px; opacity: .3; }
.tile-card .meta { padding: 15px 17px 18px; display: grid; gap: 5px; flex: 1; align-content: start; }
.tile-card .meta h4 { font-size: 16px; letter-spacing: -0.02em; }
.tile-card .meta .sub { font-size: 13px; color: var(--ink-3); letter-spacing: 0; }
.tile-card .meta .cost { margin-top: auto; padding-top: 8px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Always visible rather than hover-only — this app runs on iPad as much as
   on a Mac, and hover-to-reveal is unreachable with a finger. */
.card-edit {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 30px; height: 30px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-sm);
  display: grid; place-items: center; font-size: 13px; color: var(--ink-2);
  transition: background .15s var(--ease), color .15s var(--ease);
}
.card-edit:hover { background: var(--accent); color: #fff; }

.drop {
  border: 2px dashed var(--hair); border-radius: var(--r);
  padding: 34px 20px; text-align: center; color: var(--ink-3);
  transition: all .2s var(--ease); cursor: pointer;
}
.drop:hover, .drop.over { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ------------------------------------------------------------------ overlay */

.veil { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.veil .back { position: absolute; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.veil img { position: relative; max-width: 100%; max-height: 88dvh; object-fit: contain; border-radius: var(--r-sm); background: #fff; box-shadow: var(--shadow-lg); }
.veil .x { position: absolute; top: 18px; right: 18px; z-index: 2; }
.veil model-viewer { display: block; }

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

.chart-tip {
  position: absolute; transform: translate(-50%, -114%);
  background: var(--surface); box-shadow: var(--shadow);
  border-radius: 10px; padding: 8px 11px; font-size: 12.5px;
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s var(--ease);
  z-index: 5;
}
.chart-tip.on { opacity: 1; }
.chart-tip .tt { font-weight: 600; margin-bottom: 2px; letter-spacing: -0.01em; }
.chart-tip .tr { color: var(--ink-2); }

.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: end center; }
.modal .back { position: absolute; inset: 0; background: rgba(0,0,0,.32); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.card-modal {
  position: relative; width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto;
  background: var(--surface); border: 2px solid var(--outline);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-lg); padding: 26px 26px calc(26px + env(safe-area-inset-bottom));
  display: grid; gap: 18px; align-content: start;
  animation: rise .4s var(--ease);
}
@keyframes rise { from { transform: translateY(24px); opacity: 0 } to { transform: none; opacity: 1 } }
@media (min-width: 640px) {
  .modal { place-items: center; }
  .card-modal { border-radius: var(--r-lg); }
}
.card-modal h2 { font-size: 22px; letter-spacing: -0.024em; }
.acts { display: flex; gap: 10px; align-items: center; }
.acts .end { margin-left: auto; display: flex; gap: 10px; }

/* ------------------------------------------------------------------ status */

.dot-line { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-3); letter-spacing: 0; }
.dot-line .d { width: 7px; height: 7px; border-radius: 99px; background: var(--good); flex: none; }
.dot-line.off .d { background: var(--warn); }
.dot-line.bad .d { background: var(--danger); }
.dot-line.sync .d { background: var(--accent); animation: pulse 1.2s ease infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .3 } }

.notice { border-radius: var(--r-sm); padding: 13px 16px; font-size: 14px; display: flex; gap: 10px; letter-spacing: -0.005em; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.bad { background: var(--danger-soft); color: var(--danger); }
.notice.info { background: var(--accent-soft); color: var(--accent-ink); }

.blank {
  padding: 40px 20px 44px; text-align: center; color: var(--ink-2); font-size: 15.5px;
  display: grid; justify-items: center; gap: 18px;
}
.blank-art { width: min(200px, 60%); }
.blank-art svg { width: 100%; height: auto; }
.blank p { max-width: 40ch; }

/* ------------------------------------------------------------------ artwork */

/* The Overview banner.
 *
 * Deliberately NOT absolutely positioned behind the content: the first attempt
 * did that and the scene sat straight on top of the hero figure, which is the
 * one number on the page that has to be unambiguous. It's a normal flow item
 * that bleeds to the panel edges and hands off to the numbers below it. */
.hero-panel { position: relative; overflow: hidden; padding-top: 0; }
.hero-art {
  margin: -26px -26px 22px;
  padding: 20px 24px 0;
  background: var(--surface-2);
  border-bottom: 2px solid var(--outline);
  pointer-events: none; user-select: none;
}
.panel.tall .hero-art { margin: -34px -34px 24px; }
.hero-art svg { width: 100%; height: auto; display: block; max-height: 190px; }

@media (max-width: 640px) {
  .hero-art svg { max-height: 132px; }
}

/* Per-goal spot art, tucked top-right so it never fights the numbers. */
.goal { position: relative; overflow: hidden; }
.goal-art {
  position: absolute; top: -6px; right: -10px; width: 132px;
  opacity: .95; pointer-events: none; user-select: none;
  transition: transform .5s var(--ease);
}
.goal-art svg { width: 100%; height: auto; display: block; }
.goal:hover .goal-art { transform: translateY(-3px) rotate(-2deg); }
/* Keep the heading clear of the artwork. */
.goal .top { padding-right: 108px; }

@media (max-width: 420px) {
  .goal-art { width: 100px; }
  .goal .top { padding-right: 84px; }
}

#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px);
  z-index: 95; background: rgba(28,28,30,.92); color: #fff;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  padding: 13px 22px; border-radius: 999px; font-size: 14.5px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: .35s var(--ease); max-width: min(92vw, 480px); text-align: center;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ sign in */

.gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.gate form { width: 100%; max-width: 380px; display: grid; gap: 18px; }
.gate .mark { padding: 0 0 8px; }
.gate h1 { font-size: 32px; letter-spacing: -0.03em; }

/* ------------------------------------------------------------------ reveal */

.reveal { opacity: 0; transform: translateY(14px); animation: reveal .6s var(--ease) forwards; }
.reveal:nth-child(2) { animation-delay: .05s }
.reveal:nth-child(3) { animation-delay: .1s }
.reveal:nth-child(4) { animation-delay: .15s }
.reveal:nth-child(5) { animation-delay: .2s }
.reveal:nth-child(6) { animation-delay: .25s }
@keyframes reveal { to { opacity: 1; transform: none } }

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