/* Job app styles. Colors come from theme.css (built from design/tokens.json); this file only uses its variables.
   Look: Morning light by day, Quiet hours at night. Fraunces for display, Figtree for everything else. */
html { -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
img { max-width: 100%; }
:root {
  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.2, .9, .3, 1.2);
  --r: 22px;
  --r-sm: 16px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 18px 40px -18px rgba(70, 40, 20, .28);
  --col: 600px;
}
[data-time="night"] { --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 22px 44px -20px rgba(0, 0, 0, .65); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  transition: background-color .6s var(--ease), color .6s var(--ease);
  min-height: 100vh;
  min-height: 100dvh;
}
::selection { background: var(--soft); }
a { color: var(--accent-ink); }
button { font: inherit; color: inherit; }
.i { width: 20px; height: 20px; flex: none; }
.list > * > .i:last-child { width: 18px; height: 18px; color: var(--faint); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 12px; }

/* The morning sun or the evening candle. */
.glow {
  position: fixed; z-index: 0; pointer-events: none; border-radius: 50%;
  width: 460px; height: 460px; top: -170px; right: -150px;
  background: radial-gradient(circle, var(--glow) 0%, transparent 68%);
  animation: breathe 9s ease-in-out infinite;
}
[data-time="night"] .glow { top: auto; right: auto; bottom: -120px; left: -90px; width: 520px; height: 520px; animation-duration: 7s; }
/* Golden hour, dusk, dawn and sunrise: a glow rising from the horizon, strongest when day turns to night. */
.sky {
  position: fixed; z-index: 0; inset: 0; pointer-events: none;
  background: linear-gradient(to top, var(--sky-low) 0%, var(--sky-mid) 38%, transparent 78%);
  opacity: var(--sky-o, 0);
  transition: opacity 60s linear, --sky-low 2.4s ease, --sky-mid 2.4s ease;
}
/* The few seconds when the palette itself turns over. */
html:not(.ready) .sky { transition: none; }
html.turning, html.turning *:not(.sky) {
  transition: background-color 2.4s ease, color 2.4s ease, border-color 2.4s ease, fill 2.4s ease, stroke 2.4s ease, box-shadow 2.4s ease !important;
}
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.06); opacity: 1; } }

.col { position: relative; z-index: 1; width: 100%; max-width: var(--col); margin: 0 auto; padding: 0 20px; }
.view { padding-top: max(28px, env(safe-area-inset-top)); padding-bottom: 130px; display: flex; flex-direction: column; gap: 20px; }

/* ---------- type ---------- */
.eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.display { margin: 0; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 500; font-size: clamp(32px, 8vw, 40px); line-height: 1.06; letter-spacing: -.02em; text-wrap: balance; }
.display em { font-style: italic; color: var(--accent-ink); }
.h2 { margin: 0; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 24px; line-height: 1.15; letter-spacing: -.01em; }
.lede { margin: 0; font-size: 17px; line-height: 1.5; color: var(--mut); text-wrap: pretty; }
.muted { color: var(--mut); }
.hint { margin: 0; font-size: 14px; line-height: 1.5; color: var(--mut); }
.section-title { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.prose { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink); white-space: pre-line; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- top of a view ---------- */
.topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: 16px; cursor: pointer; flex: none; }
.hello { display: flex; flex-direction: column; gap: 10px; }
.runline { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--mut); flex-wrap: wrap; }
.runline .btn.quiet { margin-left: -16px; }
.runline .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.moon { width: 22px; height: 22px; border-radius: 50%; box-shadow: -6px 4px 0 0 var(--accent-ink); flex: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 16px; text-decoration: none;
  transition: transform .2s var(--ease), background-color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.btn:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { border-color: transparent; background: var(--primary); color: var(--on-primary); box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--primary) 70%, transparent); }
.btn.primary:hover { transform: translateY(-1px); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--accent-ink); padding: 0 10px; }
.btn.danger { color: #B3261E; border-color: color-mix(in srgb, #B3261E 35%, var(--line)); }
[data-time="night"] .btn.danger { color: #FF9A8C; }
.btn.block { width: 100%; }
.btn.sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.iconbtn {
  width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--mut);
  transition: transform .2s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.iconbtn:active { transform: scale(.94); }
.iconbtn svg { width: 22px; height: 22px; }
.iconbtn.on { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.backpill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px 0 10px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; }
.spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: 18px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Today's plan */
.plan { padding: 18px 18px 6px; display: flex; flex-direction: column; gap: 10px; }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.plan-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.plan-head h2 span { font-weight: 500; color: var(--mut); }
.bar { height: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width 1.1s var(--ease); }
.steps { margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }
.tick { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.tick.next { border-color: var(--accent); }
.tick.done { border-color: transparent; background: var(--good); color: var(--surface); animation: pop .4s var(--spring); }
[data-time="night"] .tick.done { background: var(--accent); color: var(--on-accent); }
.tick svg { width: 15px; height: 15px; }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.step-t { display: flex; flex-direction: column; gap: 2px; font-size: 15.5px; font-weight: 600; }
.step-t small { font-size: 13.5px; font-weight: 600; color: var(--good); }
[data-time="night"] .step-t small { color: var(--mut); }
.steps li.done .step-t { color: var(--mut); text-decoration: line-through; font-weight: 500; }
.step-go { margin-left: auto; }

/* Role rows */
.roles { display: flex; flex-direction: column; gap: 10px; }
.role { overflow: hidden; animation: rise .7s var(--ease) both; }
.role-main { display: flex; gap: 14px; align-items: flex-start; width: 100%; padding: 16px 16px 12px; border: 0; background: none; text-align: left; cursor: pointer; }
.role-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.role-title { margin: 0; font-size: 16.5px; font-weight: 650; line-height: 1.3; }
.role-sub { margin: 0; font-size: 14.5px; color: var(--mut); }
.role-why { margin: 2px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.role-pay { font-weight: 700; color: var(--ink); }
.role-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.role-acts button { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: none; cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--mut); }
.role-acts button + button { border-left: 1px solid var(--line); }
.role-acts button svg { width: 18px; height: 18px; }
.role-acts button.on { color: var(--accent-ink); }
.role-acts button.on.want svg { fill: currentColor; }
.reasons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px 16px; border-top: 1px solid var(--line); background: var(--soft); }
.reasons span { font-size: 14px; color: var(--ink); font-weight: 600; margin-right: 4px; }
.reason { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 600; }
.reason[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: transparent; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Score ring */
.ring { position: relative; flex: none; width: 52px; height: 52px; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: var(--soft); stroke-width: 5; }
.ring .val { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; animation: ringfill 1.3s .2s var(--ease) both; }
.ring b { position: relative; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ring.big { width: 78px; height: 78px; }
.ring.big .track, .ring.big .val { stroke-width: 7; }
.ring.big b { font-size: 22px; }
@keyframes ringfill { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: var(--off); } }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.chip.new { background: var(--accent); color: var(--on-accent); }
.chip.good { background: var(--good-soft); color: var(--good-ink); }
.chip.warn { background: var(--warn-soft); color: var(--warn-ink); }
.chip.closed { text-decoration: line-through; color: var(--mut); }
.chip.age1 { background: var(--age-a1bg); color: var(--age-a1); }
.chip.age2 { background: var(--age-a2bg); color: var(--age-a2); }
.chip.age3 { background: var(--age-a3bg); color: var(--age-a3); font-weight: 800; }
.chip.unclear { background: var(--age-unclear-bg); color: var(--age-unclear); }
.chip svg { width: 13px; height: 13px; }
.flame { animation: flicker 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes flicker { 50% { transform: scale(1.14) rotate(-4deg); } }

/* Segmented control */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 999px; background: var(--soft); }
.seg button { min-height: 44px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-size: 14.5px; font-weight: 650; color: var(--mut); display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background-color .3s var(--ease), color .3s var(--ease); }
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .4); }
.seg .n { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* Empty and quiet states */
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 28px 12px; }
.empty .h2 { font-size: 26px; }
.empty p { margin: 0; max-width: 38ch; color: var(--mut); line-height: 1.55; }
.cloud { animation: drift 6s ease-in-out infinite; }
@keyframes drift { 50% { transform: translateY(-8px); } }
.tips a, .tips button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; color: inherit; text-decoration: none; }
.tips > :first-child { border-top: 0; }
.tip-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--accent-ink); }
.tip-ico svg { width: 20px; height: 20px; }
.tip-t { display: flex; flex-direction: column; gap: 2px; font-size: 15.5px; font-weight: 600; }
.tip-t small { font-size: 13.5px; font-weight: 500; color: var(--mut); }
.more { align-self: center; }

/* Notes and nudges */
.note { border-radius: var(--r-sm); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.advice { gap: 12px; }
.advice .adv { display: flex; flex-direction: column; gap: 8px; }
.advice > .btn.quiet { align-self: flex-start; margin-left: -16px; }
.note.row-note { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.note h3 { margin: 0; font-size: 15px; font-weight: 700; }
.note p, .note li { margin: 0; font-size: 15px; line-height: 1.5; }
.note ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.note li { display: flex; gap: 10px; }
.note li svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.note.good { background: var(--good-soft); color: var(--good-ink); }
.note.warm { background: var(--warn-soft); color: var(--warn-ink); }
.nudge { border-radius: var(--r-sm); padding: 16px 18px; background: var(--age-a3bg); color: var(--age-a3); display: flex; flex-direction: column; gap: 12px; }
.nudge p { margin: 0; font-size: 15px; line-height: 1.5; }

/* ---------- bottom navigation ---------- */
.nav {
  position: fixed; z-index: 5; left: 50%; transform: translateX(-50%);
  bottom: max(16px, env(safe-area-inset-bottom)); width: min(calc(100% - 28px), 560px); height: 66px;
  border-radius: 24px; background: var(--nav); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .5);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center;
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
}
.nav button { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; cursor: pointer; color: var(--nav-ink); font-size: 12px; font-weight: 650; }
.nav button svg { width: 23px; height: 23px; transition: transform .3s var(--spring); }
.nav button[aria-current="page"] { color: var(--nav-on); }
.nav button[aria-current="page"] svg { transform: translateY(-1px) scale(1.08); }
.nav .badge { position: absolute; top: 9px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; display: grid; place-items: center; }

/* ---------- full-screen sheets ---------- */
.sheet { position: fixed; inset: 0; z-index: 10; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet .panel { min-height: 100%; animation: slidein .45s var(--ease); }
.sheet .panel.still { animation: none; }
@keyframes slidein { from { opacity: .4; transform: translateX(28px); } to { opacity: 1; transform: none; } }
.panel-body { padding-top: max(20px, env(safe-area-inset-top)); padding-bottom: 140px; display: flex; flex-direction: column; gap: 18px; }
.panel-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-top .where { font-size: 13.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-foot { position: fixed; z-index: 11; left: 0; right: 0; bottom: 0; padding: 14px 0 max(20px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 32%); }
.panel-foot .col { display: flex; gap: 10px; align-items: center; }
.panel-foot .grow { flex: 1; }
.why-pick { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); animation: rise .45s var(--ease) both; }
.why-pick p { flex-basis: 100%; margin: 0 0 4px; font-weight: 600; color: var(--ink); }
.why-pick .row { flex-basis: 100%; display: flex; gap: 8px; margin-top: 4px; }

/* Role details */
.d-hero { display: flex; gap: 14px; align-items: flex-start; }
.d-hero > div:first-child { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.d-title { margin: 0; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: clamp(26px, 7vw, 32px); line-height: 1.1; letter-spacing: -.015em; text-wrap: balance; }
.d-co { margin: 0; font-size: 16px; color: var(--mut); }
.paybox { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.paybig { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 28px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.paybig small { font-family: var(--font); font-size: 15px; font-weight: 500; color: var(--mut); }
.paybig.unknown { font-size: 22px; color: var(--mut); }
.payline { margin: 0; display: flex; gap: 6px; align-items: center; font-size: 14.5px; font-weight: 600; }
.payline.good { color: var(--good); }
.payline.warn { color: var(--warn-ink); }
.payline svg { width: 16px; height: 16px; flex: none; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fact { padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fact.wide { grid-column: 1 / -1; }
.fact .k { font-size: 12.5px; color: var(--mut); }
.fact .v { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.block { display: flex; flex-direction: column; gap: 10px; }
.bullets { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.5; }
.reqs { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.req { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.45; }
.req .tag { flex: none; min-width: 64px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; text-align: center; }
.req.match .tag { background: var(--good-soft); color: var(--good-ink); }
.req.partial .tag { background: var(--warn-soft); color: var(--warn-ink); }
.req.gap .tag { background: var(--soft); color: var(--ink); }
.req .t small { display: block; color: var(--mut); font-size: 13.5px; }
.parts { display: flex; flex-direction: column; gap: 8px; }
.part { display: grid; grid-template-columns: 96px minmax(0, 1fr) 46px; gap: 10px; align-items: center; font-size: 14px; }
.part .meter { height: 7px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.part .meter i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.part .pts { text-align: right; color: var(--mut); font-variant-numeric: tabular-nums; }
details.fold summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 44px; font-weight: 650; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after { content: "+"; font-size: 22px; color: var(--mut); }
details.fold[open] summary::after { content: "–"; }
.kit { display: flex; flex-direction: column; gap: 12px; }
.kit-out { border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.kit-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 650; }
.kit-out pre { margin: 0; padding: 14px; white-space: pre-wrap; font: 15px/1.6 var(--font); color: var(--ink); }
.source { display: flex; align-items: center; gap: 8px; min-height: 48px; color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.source span { color: var(--faint); font-weight: 500; }
.source svg { width: 16px; height: 16px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 15px; font-weight: 650; }
.field .help { margin: 0; font-size: 13.5px; color: var(--mut); line-height: 1.45; }
input[type="text"], input[type="email"], input[type="url"], input[type="number"], textarea, select {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font: 16px/1.45 var(--font);
  transition: border-color .2s var(--ease);
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.inline { display: flex; gap: 8px; }
.upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.upload .hint { margin: 0; flex: 1 1 220px; }
.inline > input { flex: 1; min-width: 0; }
.days { display: flex; flex-wrap: wrap; gap: 8px; }
.days label { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 52px; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 650; font-size: 14.5px; cursor: pointer; }
.days input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.days label:has(input:checked) { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.days label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; }
.err { margin: 0; color: var(--warn-ink); background: var(--warn-soft); padding: 10px 14px; border-radius: 12px; font-size: 14.5px; }
.chipin { display: flex; flex-wrap: wrap; gap: 8px; }
.chipin .pick { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 16px; border-radius: 999px; border: 0; background: var(--primary); color: var(--on-primary); font-weight: 650; font-size: 15px; cursor: pointer; animation: pop .35s var(--spring); }
.chipin .pick svg { width: 14px; height: 14px; opacity: .8; }
.linkbox { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--r-sm); background: var(--soft); }
.linkbox code { font-size: 13.5px; overflow-wrap: anywhere; color: var(--ink); }

/* Lists of settings rows */
.list { display: flex; flex-direction: column; }
.list > * { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 12px 18px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; color: inherit; cursor: pointer; text-decoration: none; font-size: 16px; font-weight: 600; }
.list > :first-child { border-top: 0; }
.list .li-ico { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--accent-ink); }
.list .li-ico svg { width: 20px; height: 20px; }
.list .li-t { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.list .li-t small { font-size: 13.5px; font-weight: 500; color: var(--mut); }
.rows { display: flex; flex-direction: column; gap: 8px; }
.rowi { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.rowi .main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 220px; font-size: 14.5px; }
.rowi .main b { font-size: 15.5px; }
.rowi .main span { color: var(--mut); overflow-wrap: anywhere; }
.rowi .acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.money-in { display: inline-flex; align-items: center; gap: 4px; }
.money-in input { width: 96px; min-height: 44px; }

/* Look and feel pickers */
.themes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.theme-opt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.theme-opt[aria-checked="true"] { border-color: var(--ink); }
.swatch { width: 34px; height: 34px; border-radius: 50%; }

/* Welcome */
.welcome { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; flex: 1; }
.progress i { height: 6px; border-radius: 999px; background: var(--line); transition: background-color .5s var(--ease); }
.progress i.on { background: var(--accent); }
.welcome-foot { margin-top: auto; padding: 18px 0 max(28px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }

/* Sign-in screens */
.center { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 1; }
.box { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; margin: 0; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 24px; letter-spacing: -.02em; line-height: 1; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand .sun { fill: var(--accent); }
.brand .horizon { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.brand.big { font-size: 34px; gap: 12px; cursor: default; }
.brand.big svg { width: 42px; height: 42px; }

/* Toast */
.toast { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 80px); width: max-content; max-width: calc(100% - 32px); display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 18px; border-radius: 16px; background: var(--primary); color: var(--on-primary); font-size: 15px; font-weight: 600; box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .55); animation: toastin .35s var(--spring); }
.toast button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: color-mix(in srgb, var(--on-primary) 18%, transparent); color: var(--on-primary); font-weight: 700; cursor: pointer; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

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

@media (min-width: 720px) {
  .view, .panel-body { padding-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .glow, .cloud, .flame, .runline .dot { animation: none !important; }
}
