/* v2 shared pieces, from the locked Claude Design canvas ("v2 soft"), drawn with the site's tokens.
   Every page file (css/v2-*.css) uses these; the page files add only what is their own.
   Canvas name -> site token: --teal = --blue, --rule = --line, --fill = --paper-deep, --ink-2 = --ink-soft,
   --ok = --green, --close = --gold. */
:root { --fill-2: #F1E6D6; --rule-soft: #FBF3E8; --radius-l: 16px; --radius-c: 12px; }
html.night { --fill-2: #171110; --rule-soft: #30251F; }

/* a page's own top bar: back arrow, title, one action on the right */
.v2-topbar { display: flex; align-items: center; gap: 4px; min-height: 52px; margin: -8px -8px 8px -12px; }
.v2-topbar h1, .v2-topbar .v2-title { flex: 1; min-width: 0; margin: 0; font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-iconbtn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink);
}
.v2-iconbtn:hover { background: var(--paper-deep); }
.v2-textbtn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; flex: none;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 600;
}
.v2-textbtn:hover { background: var(--paper-deep); }

/* a grouped list: one white card, rows split by hairlines */
.v2-list { display: flex; flex-direction: column; overflow: hidden; background: var(--card); border-radius: var(--radius-l); }
.v2-li {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px;
  border-top: 1px solid var(--line); color: inherit; text-align: left; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0;
}
.v2-li:first-child { border-top: 0; }
a.v2-li:hover, button.v2-li:hover { background: var(--rule-soft); }
.v2-li.cur { background: var(--blue-soft); }
.v2-li-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.v2-li-title { font-weight: 600; }
.v2-li-meta, .v2-meta { color: var(--ink-soft); font-size: 13px; }
.v2-chev { color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.v2-chev svg { width: 16px; height: 16px; }
.v2-section-label { margin: 20px 4px 8px; color: var(--ink-soft); font-size: 13px; font-weight: 600; }

/* a round number or a check at the start of a row */
.v2-num { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--paper); font-weight: 700; font-size: 15px; }
.v2-num.ok { background: var(--green-soft); color: var(--green); }
.v2-num.cur { background: var(--red); color: #fff; }
.v2-num svg { width: 18px; height: 18px; }

/* segmented switch: a pill track, the chosen one a white pill */
.v2-seg { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--fill-2); }
.v2-seg > button, .v2-seg > a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.v2-seg > [aria-pressed="true"], .v2-seg > [aria-current="page"], .v2-seg > [aria-current="true"] { background: var(--card); color: var(--ink); }

/* small tiles of numbers */
.v2-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--card); border-radius: var(--radius-l); }

/* the bottom action bar of a round (dictation, review): replaces the tab bar on phones */
.v2-actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; align-items: center; gap: 8px;
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--card); box-shadow: 0 -1px 0 var(--line);
}
.v2-actions .btn { min-height: 56px; }
.v2-actions .v2-grow { flex: 1; }
body.has-actions { padding-bottom: 96px; }
@media (min-width: 1100px) { .v2-actions { left: 240px; } }
/* a tool: icon over a short label */
.v2-tool {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 56px; min-height: 56px; flex: none;
  padding: 0; border: 0; border-radius: var(--radius-c); background: transparent; color: var(--ink-soft); font-size: 12px; font-weight: 500;
}
.v2-tool svg { width: 22px; height: 22px; }
.v2-tool:hover { background: var(--paper-deep); }
.v2-tool[aria-pressed="true"] { background: var(--blue-soft); color: var(--blue); }
.v2-tool:disabled { opacity: .4; cursor: default; }

/* a step bar: one segment per step */
.v2-steps { display: flex; gap: 4px; }
.v2-step { flex: 1; height: 6px; border-radius: 3px; background: var(--line); border: 0; padding: 0; }
.v2-step.ok { background: var(--green); }
.v2-step.cur { background: var(--ink); }

/* bottom sheet over a dimmed page */
.v2-scrim { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; justify-content: flex-end; background: rgba(43, 26, 20, .50); }
.v2-sheet {
  display: flex; flex-direction: column; width: 100%; max-width: 560px; max-height: 86vh; margin: 0 auto; overflow: auto;
  background: var(--card); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-l); padding-bottom: env(safe-area-inset-bottom);
  animation: v2-sheet-up .2s ease-out;
}
.v2-sheet .v2-grab { width: 40px; height: 4px; margin: 8px auto; border-radius: 2px; background: var(--line-strong); flex: none; }
.v2-sheet-head { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 16px; }
.v2-sheet-head h2 { flex: 1; margin: 0; font-size: 20px; }
.v2-sheet-body { display: flex; flex-direction: column; gap: 12px; padding: 8px 16px 12px; }
.v2-sheet-foot { padding: 10px 16px 16px; }
@keyframes v2-sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 760px) { .v2-scrim { justify-content: center; } .v2-sheet { border-radius: 24px; } }

/* a choice in a list: a radio ring, red when chosen */
.v2-radio { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--line-strong); }
.v2-radio.on, [aria-checked="true"] > .v2-radio, [aria-pressed="true"] > .v2-radio { border: 7px solid var(--red); }
/* on/off switch */
.v2-switch { position: relative; width: 50px; height: 30px; flex: none; padding: 0; border: 0; border-radius: 15px; background: var(--fill-h); }
.v2-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s ease-out; }
.v2-switch[aria-checked="true"] { background: var(--green); }
.v2-switch[aria-checked="true"]::after { left: 23px; }
/* a square tick box */
.v2-check { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; border: 2px solid var(--line-strong); border-radius: 7px; color: var(--on-ink); }
.v2-check svg { width: 14px; height: 14px; stroke-width: 3; visibility: hidden; }
.v2-check.on, [aria-checked="true"] > .v2-check { background: var(--ink); border-color: var(--ink); }
.v2-check.on svg, [aria-checked="true"] > .v2-check svg { visibility: visible; }

/* the six boxes of a sign-in code */
.v2-box6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.v2-box6 span { display: flex; align-items: center; justify-content: center; height: 56px; border-radius: var(--radius-c); background: var(--card); font-size: 24px; font-weight: 700; }
.v2-box6 span.cur { box-shadow: inset 0 0 0 2px var(--blue); }

/* a word that is a word card, in a line */
.v2-hl { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

@media (prefers-reduced-motion: reduce) { .v2-sheet { animation: none; } .v2-switch::after { transition: none; } }
