/* ==========================================================================
   Forewly
   ========================================================================== */
:root {
  --clerk-color-primary: var(--accent);
  --clerk-color-primary-foreground: var(--accent-ink);
  --clerk-color-foreground: var(--ink);
  --clerk-color-background: var(--surface);
  --clerk-color-border: var(--line);
  --clerk-color-neutral: var(--ink);
  --clerk-font-family: var(--font-body);
  --clerk-border-radius: 12px;
  --bg: #f1f4f4;
  --surface: #fbfcfc;
  --surface-2: #e7edef;
  --ink: #29353a;
  --ink-2: #53636a;
  --line: #d2dcde;
  /* User-provided light palette; shared V10 surfaces and spacing. */
  --accent: #d8621eec;
  --accent-ink: #ffffff;
  --accent-soft: #edf1f2;
  --accent-text: var(--accent);
  --warn: #b85c1b;
  --warn-soft: #fff0df;
  --danger: #c7271f;
  --shadow:
    0 24px 80px
    rgba(30, 20, 5, 0.3);
  --radius-s: 12px;
  --radius-m: 16px;
  --radius-l: 24px;
  --font-display:
    "Instrument Sans",
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  --font-body:
    "Instrument Sans",
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  color-scheme: light;
}
/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
  --bg: #131312;
  --surface: #1b1b19;
  --surface-2: #242321;
  --ink: #f3f1ec;
  --ink-2: #a8a49b;
  --line: #302e2a;
  --accent: #ffaa00;
  --accent-ink: #171717;
  --accent-soft: #302711;
  --accent-text: var(--accent);
  --warn: var(--accent);
  --warn-soft: var(--accent-soft);
  --danger: #ff8f85;
  --shadow:
    0 24px 80px
    rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}
/* ============================================================
   BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 120px;
  scrollbar-gutter: stable;
}
html:has(dialog[open]) { overflow: hidden; }
.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
body {
  overflow-wrap: anywhere;
  margin: 0;
  background:
    var(--bg);
  color:
    var(--ink);
  font-family:
    var(--font-body);
  font-size:
    1rem;
  line-height:
    1.5;
  letter-spacing:
    -0.005em;
  -webkit-font-smoothing:
    antialiased;
}
h1,
h2,
h3 {
  margin:
    0;
  font-family:
    var(--font-display);
  font-weight:
    600;
  line-height:
    1.16;
  letter-spacing:
    -0.025em;
}
p {
  margin:
    0;
}
a {
  color:
    inherit;
}
button,
input,
select {
  font:
    inherit;
  color:
    inherit;
}
button {
  cursor:
    pointer;
}
[hidden] {
  display:
    none !important;
}
:focus-visible {
  outline:
    3px solid
    var(--accent-text);
  outline-offset:
    2px;
}
.container {
  width:
    100%;
  max-width:
    980px;
  margin-inline:
    auto;
  padding-inline:
    clamp(
      18px,
      3vw,
      28px
    );
}
.muted {
  color:
    var(--ink-2);
}
.num {
  font-variant-numeric:
    tabular-nums;
}
.sr-only {
  position:
    absolute;
  width:
    1px;
  height:
    1px;
  overflow:
    hidden;
  clip:
    rect(
      0 0 0 0
    );
  white-space:
    nowrap;
}
/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  display:
    inline-flex;
  align-items:
    center;
  justify-content:
    center;
  gap:
    0.5rem;
  min-height:
    44px;
  padding:
    0.6rem
    1.1rem;
  border:
    1px solid
    transparent;
  border-radius:
    var(--radius-s);
  font-weight:
    600;
  text-decoration:
    none;
  transition:
    background-color 0.15s,
    border-color 0.15s;
}
.btn-primary {
  background:
    var(--accent);
  color:
    var(--accent-ink);
}
.btn-primary:hover {
  filter:
    brightness(1.08);
}
:root:not([data-theme="dark"]) .btn-primary:hover {
  filter: brightness(.96);
}
.btn-quiet {
  background:
    transparent;
  border-color:
    var(--line);
}
.btn-quiet:hover {
  background:
    var(--surface-2);
}
.btn-text {
  background:
    transparent;
  padding-inline:
    0.6rem;
  color:
    var(--ink-2);
}
.btn-text:hover {
  color:
    var(--ink);
}
.btn-danger {
  color:
    var(--danger);
  border-color:
    var(--line);
  background:
    transparent;
}
.btn-danger:hover {
  background:
    var(--surface-2);
}
.btn-block {
  width:
    100%;
}
.btn-sm {
  min-height:
    38px;
  padding:
    0.35rem
    0.95rem;
  font-size:
    0.925rem;
}
/* ============================================================
   ICON BUTTON
   ============================================================ */
.icon-btn {
  display:
    inline-grid;
  place-items:
    center;
  width:
    44px;
  height:
    44px;
  border-radius:
    var(--radius-s);
  border:
    0;
  background:
    transparent;
  color:
    var(--ink-2);
}
.icon-btn:hover {
  background:
    var(--surface-2);
  color:
    var(--ink);
}
.icon {
  width:
    20px;
  height:
    20px;
  fill:
    none;
  stroke:
    currentColor;
  stroke-width:
    2;
  stroke-linecap:
    round;
  stroke-linejoin:
    round;
}
[data-theme="dark"] .i-moon,
:root:not([data-theme="dark"]) .i-sun {
  display:
    none;
}
/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position:
    sticky;
  top:
    0;
  z-index:
    20;
  background:
    var(--bg);
  border-bottom:
    1px solid
    var(--line);
}
.site-header .container {
  flex-wrap: wrap;
  display:
    flex;
  align-items:
    center;
  gap:
    8px;
  min-height:
    64px;
}
.brand {
  min-width: 0;
  max-width: 100%;
  display:
    inline-flex;
  align-items:
    center;
  gap:
    10px;
  margin-right:
    auto;
  font-family:
    var(--font-display);
  font-weight:
    700;
  font-size:
    1.3rem;
  letter-spacing:
    -0.03em;
  text-decoration:
    none;
}
/* F LOGO */
.brand-mark {
  display:
    grid;
  place-items:
    center;
  width:
    28px;
  height:
    28px;
  border-radius:
    8px;
  background:
    var(--accent);
  color:
    var(--accent-ink);
  font-family:
    var(--font-display);
  font-weight:
    700;
  font-size:
    1rem;
  line-height:
    1;
  letter-spacing:
    -0.03em;
  flex:
    none;
}
.brand-mark::after {
  content:
    "F";
  transform:
    translateY(-0.5px);
}
/* ============================================================
   NAVIGATION
   ============================================================ */
.main-nav {
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
  display:
    flex;
  gap:
    4px;
}
.main-nav a {
  min-height: 44px;
  align-items: center;
  min-width: 0;
  overflow-wrap: anywhere;
  padding:
    0.5rem
    0.9rem;
  border-radius:
    var(--radius-s);
  text-decoration:
    none;
  font-weight:
    500;
  color:
    var(--ink-2);
}
.main-nav a:hover {
  background:
    var(--surface-2);
  color:
    var(--ink);
}
.main-nav a[aria-current="page"] {
  color:
    var(--ink);
  background:
    var(--surface-2);
  font-weight:
    600;
}
.header-actions {
  flex-wrap: wrap;
  max-width: 100%;
  display:
    flex;
  align-items:
    center;
  gap:
    6px;
}
/* ============================================================
   FORMS
   ============================================================ */
.field {
  display:
    grid;
  gap:
    6px;
  min-width:
    0;
  border:
    0;
  padding:
    0;
  margin:
    0;
}
.field > label,
.field > legend {
  padding:
    0;
  font-weight:
    600;
  font-size:
    0.9rem;
}
.field-row {
  display:
    grid;
  grid-template-columns:
    1fr
    1fr;
  gap:
    14px;
}
.field-row.subscription-price-row {
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  align-items: start;
}
.subscription-price-row > .choice-panel { grid-column: 1 / -1; margin-top: 0; }
.field.billing-field {
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
}
.billing-field select {
  min-height: 42px;
}
.date-controls {
  min-width: 0;
}
.picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: .65rem .85rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.picker-trigger:hover { border-color: var(--ink-2); }
.picker-trigger[aria-expanded="true"] { border-color: var(--accent); }
.picker-trigger[aria-invalid="true"] { border-color: var(--danger); }
.picker-trigger:disabled { opacity: .55; cursor: default; }
.picker-trigger .icon { flex: none; width: 18px; height: 18px; color: var(--ink-2); }
.date-trigger span { min-width: 0; overflow-wrap: anywhere; }
.picker { min-width: 0; width: 100%; }
.picker-panel { margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.choice-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; overflow-wrap: anywhere; }
.choice-value strong { font-weight: 600; }
.choice-secondary { color: var(--ink-2); font-size: .8rem; }
.is-currency .choice-secondary { display: none; }
.choice-arrow { transition: transform .15s ease; }
.choice-trigger[aria-expanded="true"] .choice-arrow { transform: rotate(180deg); }
.choice-search { margin-bottom: 6px; }
.choice-list { max-height: 264px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.choice-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .88rem;
  line-height: 1.45;
  text-align: left;
}
.choice-option > span:first-child { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.choice-option > span:first-child > span { min-width: 0; }
.choice-code { flex: none; min-width: 34px; font-size: .78rem; font-weight: 600; }
.choice-check { flex: none; width: 12px; color: var(--accent-text); }
.choice-option:hover, .time-option:hover { background: var(--surface-2); }
.choice-option[aria-selected="true"], .time-option[aria-selected="true"] { background: var(--accent-soft); }
.choice-empty { margin: 0; padding: 14px 8px; color: var(--ink-2); font-size: .85rem; }
.picker-footer { display: flex; justify-content: space-between; gap: 10px; padding-top: 8px; }
.picker-footer .btn { min-height: 44px; }
.time-picker { max-width: 360px; }
.time-picker > .picker-trigger { max-width: 168px; }
.time-panel { padding: 14px; }
.time-heading { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.time-preview { font-size: 1.7rem; font-weight: 600; letter-spacing: -.03em; }
.time-zone { color: var(--ink-2); font-size: .75rem; overflow-wrap: anywhere; }
.time-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.time-column-label { display: block; margin-bottom: 6px; color: var(--ink-2); font-size: .8rem; }
.time-list { max-height: 194px; padding: 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border: 1px solid var(--line); border-radius: var(--radius-s); }
.time-option { width: 100%; min-height: 44px; margin: 1px 0; padding: 8px; background: transparent; color: var(--ink); border: 0; border-radius: 8px; font: inherit; font-size: .95rem; }
.time-option[aria-selected="true"] { color: var(--accent-text); font-weight: 600; }
.calendar-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}
.calendar-panel[hidden] { display: none; }
.calendar-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 4px;
}
.calendar-head strong { text-align: center; font-size: .95rem; }
.calendar-head .icon-btn { font-size: 1.5rem; width: 40px; height: 40px; }
.calendar-grid { width: 100%; table-layout: fixed; border-spacing: 2px; }
.calendar-grid th { color: var(--ink-2); font-size: .7rem; font-weight: 500; padding-bottom: 6px; }
.calendar-grid td { padding: 0; height: 38px; }
.calendar-day {
  width: 100%;
  min-height: 38px;
  padding: 0;
  background: transparent;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: .9rem;
  cursor: pointer;
}
.calendar-day:hover { background: var(--surface-2); }
.calendar-day[aria-current="date"] { border-color: var(--accent); }
.calendar-day[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.calendar-day:disabled { opacity: .35; cursor: default; }
.calendar-day:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.calendar-foot { display: flex; justify-content: space-between; gap: 8px; }
.calendar-foot .btn { padding: 8px; font-size: .8rem; }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="time"],
select {
  width:
    100%;
  min-height:
    46px;
  padding:
    0.65rem
    0.85rem;
  background:
    var(--surface);
  border:
    1px solid
    var(--line);
  border-radius:
    var(--radius-s);
}
input:focus,
select:focus {
  outline:
    2px solid
    var(--accent-text);
  outline-offset:
    1px;
  border-color:
    var(--accent);
}
.input-affix {
  display:
    flex;
  align-items:
    center;
  padding-left:
    0.85rem;
  background:
    var(--surface);
  border:
    1px solid
    var(--line);
  border-radius:
    var(--radius-s);
}
.input-affix:focus-within {
  outline:
    2px solid
    var(--accent-text);
  outline-offset:
    1px;
  border-color:
    var(--accent);
}
.input-affix span {
  color:
    var(--ink-2);
  font-weight:
    600;
}
.input-affix input {
  width:
    100%;
  min-height:
    44px;
  padding:
    0.65rem
    0.85rem
    0.65rem
    0.5rem;
  border:
    0;
  background:
    transparent;
  font:
    inherit;
  font-variant-numeric:
    tabular-nums;
}
.input-affix input:focus {
  outline:
    none;
}
.error {
  color:
    var(--danger);
  font-size:
    0.875rem;
}
.hint {
  color:
    var(--ink-2);
  font-size:
    0.875rem;
}
/* ============================================================
   CHIPS
   ============================================================ */
.chips {
  display:
    flex;
  flex-wrap:
    wrap;
  gap:
    8px;
}
.chip {
  position:
    relative;
}
.chip input {
  position:
    absolute;
  opacity:
    0;
  inset:
    0;
  width:
    100%;
  height:
    100%;
  margin:
    0;
  cursor:
    pointer;
}
.chip span {
  display:
    inline-flex;
  align-items:
    center;
  gap:
    8px;
  min-height:
    42px;
  padding:
    0.45rem
    0.9rem;
  border:
    1px solid
    var(--line);
  border-radius:
    999px;
  background:
    var(--surface);
  font-weight:
    500;
}
.chip span::before {
  content:
    "";
  width:
    16px;
  height:
    16px;
  border-radius:
    50%;
  border:
    2px solid
    var(--ink-2);
}
.chip input:checked + span {
  background:
    var(--accent-soft);
  border-color:
    var(--accent);
  font-weight:
    600;
}
.chip input:checked + span::before {
  border-color:
    var(--accent);
  background:
    var(--accent);
  box-shadow:
    inset 0 0 0 3px
    var(--accent-soft);
}
.chip input:focus-visible + span {
  outline:
    3px solid
    var(--accent-text);
  outline-offset:
    2px;
}
/* ============================================================
   SWITCH
   ============================================================ */
.switch {
  position:
    relative;
  flex:
    none;
  width:
    48px;
  height:
    28px;
}
.switch input {
  position:
    absolute;
  inset:
    0;
  width:
    100%;
  height:
    100%;
  margin:
    0;
  opacity:
    0;
  cursor:
    pointer;
}
.switch .track {
  pointer-events: none;
  position:
    absolute;
  inset:
    0;
  border-radius:
    999px;
  background:
    var(--surface-2);
  border:
    1px solid
    var(--line);
  transition:
    background-color 0.15s;
}
.switch .track::after {
  content:
    "";
  position:
    absolute;
  top:
    3px;
  left:
    3px;
  width:
    20px;
  height:
    20px;
  border-radius:
    50%;
  background:
    var(--ink-2);
  transition:
    transform 0.15s,
    background-color 0.15s;
}
.switch input:checked + .track {
  background:
    var(--accent);
  border-color:
    var(--accent);
}
.switch input:checked + .track::after {
  transform:
    translateX(20px);
  background:
    var(--accent-ink);
}
.switch input:focus-visible + .track {
  outline:
    3px solid
    var(--accent-text);
  outline-offset:
    2px;
}
/* ============================================================
   SEGMENTED
   ============================================================ */
.segmented {
  flex-wrap: wrap;
  max-width: 100%;
  display:
    inline-flex;
  padding:
    4px;
  gap:
    4px;
  background:
    var(--surface-2);
  border-radius:
    var(--radius-m);
}
.segmented label {
  position:
    relative;
}
.segmented input {
  position:
    absolute;
  inset:
    0;
  opacity:
    0;
  margin:
    0;
  width:
    100%;
  height:
    100%;
  cursor:
    pointer;
}
.segmented span {
  display:
    block;
  padding:
    0.5rem
    1rem;
  border-radius:
    10px;
  font-weight:
    500;
  color:
    var(--ink-2);
}
.segmented input:checked + span {
  background:
    var(--surface);
  color:
    var(--ink);
  font-weight:
    600;
  box-shadow:
    0 1px 2px
    rgba(0, 0, 0, 0.12);
}
.segmented input:focus-visible + span {
  outline:
    3px solid
    var(--accent-text);
  outline-offset:
    1px;
}
/* ============================================================
   DIALOG
   ============================================================ */
dialog.dialog {
  width:
    min(
      480px,
      calc(100vw - 24px)
    );
  max-height:
    calc(100dvh - 24px);
  padding:
    0;
  overflow:
    auto;
  border:
    1px solid
    var(--line);
  border-radius:
    var(--radius-l);
  background:
    var(--surface);
  color:
    var(--ink);
  box-shadow:
    var(--shadow);
}
dialog.dialog::backdrop {
  background:
    rgba(246, 249, 255, 0.7);
  backdrop-filter:
    blur(4px);
}
[data-theme="dark"] dialog.dialog::backdrop {
  background:
    rgba(0, 0, 0, 0.65);
}
dialog.dialog[open] {
  animation:
    dialog-in 0.18s ease-out;
}
@keyframes dialog-in {
  from {
    opacity:
      0;
    transform:
      translateY(8px);
  }
}
.dialog > form {
  display:
    grid;
  gap:
    18px;
  padding:
    22px
    24px
    24px;
}
.dialog-head {
  display:
    flex;
  align-items:
    center;
  justify-content:
    space-between;
  margin-right:
    -10px;
}
.dialog-head h2 {
  font-size:
    1.35rem;
}
.dialog-foot {
  display:
    flex;
  gap:
    10px;
  justify-content:
    flex-end;
  flex-wrap:
    wrap;
}
.dialog-foot .btn-primary {
  flex:
    1 1 auto;
}
.preview {
  min-height:
    3.2rem;
  padding:
    12px
    14px;
  border-radius:
    var(--radius-m);
  background:
    var(--surface-2);
  color:
    var(--ink-2);
  font-size:
    0.925rem;
}
.dialog-switch {
  text-align:
    center;
  color:
    var(--ink-2);
  font-size:
    0.925rem;
}
.dialog-switch button {
  padding:
    0;
  border:
    0;
  background:
    none;
  color:
    var(--accent-text);
  font-weight:
    600;
  text-decoration:
    underline;
  text-underline-offset:
    3px;
}
/* ============================================================
   TOAST
   ============================================================ */
.toast {
  pointer-events: none;
  position:
    fixed;
  left:
    50%;
  bottom:
    24px;
  z-index:
    60;
  display:
    flex;
  align-items:
    center;
  gap:
    14px;
  max-width:
    calc(100vw - 32px);
  padding:
    12px
    18px;
  border-radius:
    var(--radius-m);
  background:
    var(--ink);
  color:
    var(--bg);
  font-weight:
    500;
  opacity:
    0;
  pointer-events:
    none;
  transform:
    translate(-50%, 20px);
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.toast.show {
  opacity:
    1;
  transform:
    translate(-50%, 0);
  pointer-events:
    auto;
}
.toast button {
  padding:
    4px
    6px;
  border:
    0;
  background:
    none;
  color:
    inherit;
  font-weight:
    700;
  text-decoration:
    underline;
  text-underline-offset:
    3px;
}
/* ============================================================
   SUBSCRIPTION VISUALS
   ============================================================ */
.tile {
  --h:
    200;
  flex:
    none;
  display:
    grid;
  place-items:
    center;
  width:
    44px;
  height:
    44px;
  border-radius:
    12px;
  background:
    hsl(
      var(--h)
      42%
      87%
    );
  color:
    hsl(
      var(--h)
      60%
      26%
    );
  font-family:
    var(--font-display);
  font-weight:
    700;
  font-size:
    1.15rem;
}
[data-theme="dark"] .tile {
  background:
    hsl(
      var(--h)
      28%
      22%
    );
  color:
    hsl(
      var(--h)
      65%
      78%
    );
}
/* Warm subscription initials share the brand accent in both themes. */
.tile.tile-accent {
  background: var(--accent);
  color: var(--accent-ink);
}
.pill {
  display:
    inline-block;
  padding:
    0.15rem
    0.6rem;
  border-radius:
    999px;
  background:
    var(--surface-2);
  color:
    var(--ink-2);
  font-size:
    0.85rem;
  font-weight:
    600;
  white-space:
    nowrap;
}
.pill.soon {
  background:
    var(--warn-soft);
  color:
    var(--warn);
}
/* ============================================================
   APP
   ============================================================ */
.app-main {
  padding-bottom:
    96px;
}
.page-head {
  display:
    flex;
  align-items:
    flex-start;
  justify-content:
    space-between;
  gap:
    14px;
  padding-top:
    clamp(
      26px,
      4vw,
      40px
    );
}
.page-head h1 {
  font-size:
    clamp(
      1.75rem,
      3.6vw,
      2.2rem
    );
}
.page-head p {
  margin-top:
    6px;
}
.page-sub {
  margin-top:
    8px;
  color:
    var(--ink-2);
}
.section-head {
  flex-wrap: wrap;
  display:
    flex;
  align-items:
    baseline;
  justify-content:
    space-between;
  gap:
    16px;
  margin:
    clamp(
      24px,
      4vw,
      36px
    )
    0
    10px;
}
.section-head h2 {
  font-size:
    1.35rem;
}
.section-head a {
  color:
    var(--ink-2);
  font-weight:
    500;
}
/* ============================================================
   DASHBOARD
   ============================================================ */
.overview-head {
  align-items:
    end;
}
.overview-grid {
  display:
    grid;
  grid-template-columns:
    1.35fr
    1fr
    1fr;
  gap:
    14px;
  margin-top:
    20px;
}
.overview-card {
  display:
    flex;
  flex-direction:
    column;
  justify-content:
    space-between;
  gap:
    12px;
  min-width:
    0;
  min-height:
    154px;
  padding:
    20px;
  border:
    1px solid
    var(--line);
  border-radius:
    var(--radius-l);
  background:
    var(--surface);
}
.overview-card-main {
  background:
    var(--accent-soft);
  border-color:
    transparent;
}
.overview-label {
  color:
    var(--ink-2);
  font-size:
    0.9rem;
  font-weight:
    600;
}
.overview-card-main .overview-label,
.overview-card-main .overview-value-main {
  color:
    var(--accent-text);
}
.overview-value {
  font-family:
    var(--font-display);
  font-size:
    clamp(
      2rem,
      4vw,
      2.8rem
    );
  line-height:
    1;
  letter-spacing:
    -0.035em;
}
.overview-value-main {
  font-size:
    clamp(
      2.15rem,
      4vw,
      3.2rem
    );
  overflow-wrap: anywhere;
}
.currency-code {
  display: inline-block;
  padding: 3px 5px;
  color: var(--ink-2);
  background: var(--surface-2);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .03em;
  line-height: 1.4;
  vertical-align: middle;
}
.overview-value-main.is-wide-total { font-size: clamp(1.5rem, 2.7vw, 2.1rem); }
.totals-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px 16px;
  margin-top: 18px;
  color: var(--ink-2);
  font-size: .84rem;
}
.totals-currency { display: grid; max-width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr) 104px; align-items: center; gap: 9px; }
.totals-currency label { white-space: normal; overflow-wrap: anywhere; }
.totals-currency .choice-picker { display: contents; }
.totals-currency .choice-panel { grid-column: 1 / -1; margin-top: 0; }
.totals-currency .choice-value { font-size: .9rem; }
.totals-currency select { width: auto; min-height: 44px; padding: 8px 28px 8px 12px; }
.exchange-details { min-width: 0; justify-self: end; padding-top: 12px; }
.exchange-details summary { cursor: pointer; line-height: 1.5; }
.exchange-details summary:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; border-radius: 4px; }
.exchange-details[open] { grid-column: 1 / -1; justify-self: stretch; padding-top: 0; }
.exchange-content { display: grid; gap: 12px; margin-top: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.exchange-content p { margin: 0; line-height: 1.65; }
.exchange-content .btn { justify-self: start; }
.currency-breakdown { width: 100%; border-collapse: collapse; font-size: .86rem; }
.currency-breakdown caption { padding-bottom: 8px; color: var(--ink); text-align: left; font-weight: 600; }
.currency-breakdown th, .currency-breakdown td { padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; }
.currency-breakdown thead th { color: var(--ink-2); font-weight: 500; }
.currency-breakdown td, .currency-breakdown thead th:last-child { text-align: right; }
.totals-error { grid-column: 1 / -1; color: var(--danger); }
.overview-count { font-size: .8rem; }
.overview-paused-note { padding: 18px; color: var(--ink-2); font-size: .9rem; }
.overview-name {
  overflow:
    hidden;
  font-family:
    var(--font-display);
  font-size:
    clamp(
      1.35rem,
      2.6vw,
      1.8rem
    );
  line-height:
    1.1;
  letter-spacing:
    -0.025em;
  text-overflow:
    ellipsis;
  white-space:
    nowrap;
}
.overview-note {
  color:
    var(--ink-2);
  font-size:
    0.9rem;
}
.overview-section-head {
  align-items:
    end;
}
.overview-section-head > div {
  min-width:
    0;
}
.section-copy {
  margin-top:
    4px;
  color:
    var(--ink-2);
  font-size:
    0.9rem;
}
.overview-list {
  overflow:
    hidden;
  border:
    1px solid
    var(--line);
  border-radius:
    var(--radius-l);
  background:
    var(--surface);
}
.overview-renewal {
  text-decoration: none;
  color: inherit;
  display:
    grid;
  grid-template-columns:
    auto
    minmax(0, 1fr)
    auto
    auto;
  align-items:
    center;
  gap:
    14px;
  padding:
    14px
    18px;
  border-top:
    1px solid
    var(--line);
}
.overview-renewal:hover { background: var(--surface-2); }
.overview-renewal:focus-visible { outline-offset: -3px; }
.overview-renewal:first-child {
  border-top:
    0;
}
.overview-renewal-main,
.overview-renewal-date {
  display:
    grid;
  gap:
    2px;
  min-width:
    0;
}
.overview-renewal-main strong {
  overflow:
    hidden;
  text-overflow:
    ellipsis;
  white-space:
    nowrap;
}
.overview-renewal-main span,
.overview-renewal-date span {
  color:
    var(--ink-2);
  font-size:
    0.9rem;
}
.overview-renewal-date {
  text-align:
    right;
}
.overview-renewal-price {
  min-width:
    6ch;
  text-align:
    right;
}
.overview-manage-mobile {
  display:
    none;
  margin-top:
    14px;
}
.dashboard-empty .btn {
  text-decoration:
    none;
}
/* ============================================================
   SUBSCRIPTIONS
   ============================================================ */
.subscription-summary { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.subscription-summary-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; }
.subscription-summary-value strong { color: var(--ink); font-size: 1.4rem; overflow-wrap: anywhere; }
.subscription-summary .totals-controls { margin-top: 8px; }
.subscription-toolbar {
  display:
    grid;
  grid-template-columns:
    minmax(220px, 1fr)
    minmax(210px, auto)
    auto;
  align-items:
    end;
  gap:
    12px;
  margin-top:
    22px;
}
.subscription-search,
.subscription-sort {
  min-width:
    0;
}
.subscription-add {
  white-space:
    nowrap;
}
.subscription-toolbar > .choice-panel {
  grid-column: 1 / -1;
  margin-top: 0;
}
.cards {
  display:
    grid;
  grid-template-columns:
    repeat(
      auto-fill,
      minmax(
        min(290px, 100%),
        1fr
      )
    );
  gap:
    14px;
  margin-top:
    14px;
}
.sub-card {
  display:
    grid;
  gap:
    14px;
  min-width:
    0;
  padding:
    17px;
  overflow:
    hidden;
  border:
    1px solid
    var(--line);
  border-radius:
    var(--radius-l);
  background:
    var(--surface);
  cursor:
    pointer;
}
.sub-card.is-paused { border-style: dashed; }
.pill.is-paused { color: var(--ink-2); background: var(--surface-2); }
[data-theme="dark"] .sub-card:hover {
  border-color: #4c4943;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.38);
  transform: translateY(-1px);
}
.sub-card .head {
  display:
    flex;
  align-items:
    center;
  gap:
    14px;
  min-width:
    0;
}
.sub-card .head .grow {
  flex:
    1;
  min-width:
    0;
}
.sub-card h2 {
  min-width:
    0;
  overflow:
    hidden;
  font-size:
    1.2rem;
  text-overflow:
    ellipsis;
  white-space:
    nowrap;
}
.sub-card dl {
  display:
    grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1.45fr);
  gap:
    8px
    12px;
  min-width:
    0;
  margin:
    0;
  font-size:
    0.95rem;
}
.sub-card dt {
  min-width:
    0;
  color:
    var(--ink-2);
}
.sub-card dd {
  min-width:
    0;
  margin:
    0;
  font-weight:
    600;
  text-align:
    right;
}
.sub-card dd.num {
  white-space:
    nowrap;
}
.renewal-cell {
  display:
    flex;
  align-items:
    center;
  justify-content:
    flex-end;
  flex-wrap:
    wrap;
  gap:
    4px
    6px;
  width:
    100%;
  max-width:
    100%;
}
.renewal-date {
  min-width:
    0;
  white-space:
    nowrap;
}
.renewal-cell .pill {
  flex:
    none;
}
.sub-card .reminders {
  min-width:
    0;
  overflow:
    hidden;
  padding-top:
    12px;
  border-top:
    1px solid
    var(--line);
  color:
    var(--ink-2);
  font-size:
    0.9rem;
}
.no-results {
  margin-top:
    38px;
  padding:
    26px;
  border:
    1px dashed
    var(--line);
  border-radius:
    var(--radius-l);
  color:
    var(--ink-2);
}
.no-results h2 {
  margin-bottom:
    6px;
  color:
    var(--ink);
  font-size:
    1.3rem;
}
/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty {
  display:
    grid;
  justify-items:
    start;
  gap:
    14px;
  max-width:
    460px;
  margin-top:
    clamp(
      32px,
      8vw,
      72px
    );
}
.empty h1,
.empty h2 {
  font-size:
    clamp(
      2rem,
      5vw,
      2.75rem
    );
}
.empty p {
  color:
    var(--ink-2);
}
/* Storage errors stay beside the active action. */
.storage-recovery {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  margin-block: 20px;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  color: var(--ink);
}
.storage-recovery h1, .storage-recovery h2 { font-size: 1.4rem; }
.recovery-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-group {
  margin-top:
    10px;
  padding:
    4px
    20px;
  border:
    1px solid
    var(--line);
  border-radius:
    var(--radius-l);
  background:
    var(--surface);
}
.setting {
  flex-wrap: wrap;
  min-width: 0;
  display:
    flex;
  align-items:
    center;
  justify-content:
    space-between;
  gap:
    16px;
  padding:
    14px
    0;
  border-top:
    1px solid
    var(--line);
}
.setting:first-child {
  border-top:
    0;
}
.setting.stack {
  grid-template-columns: minmax(0, 1fr);
  display:
    grid;
  justify-content:
    stretch;
  gap:
    10px;
}
.setting .title {
  font-weight:
    600;
}
.setting .desc {
  max-width:
    52ch;
  color:
    var(--ink-2);
  font-size:
    0.9rem;
}
.setting input[type="time"],
.setting select {
  width:
    auto;
  min-width:
    140px;
}
.setting-currency .choice-picker { max-width: 360px; }
.setting-currency .choice-trigger { max-width: 168px; }
.setting-location select { width: 100%; min-width: 0; max-width: 100%; }
.setting input[type="email"] {
  max-width:
    420px;
}
/* ============================================================
   LANDING
   ============================================================ */
.landing-hero {
  display:
    grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap:
    clamp(
      26px,
      4vw,
      44px
    );
  padding:
    clamp(
      30px,
      5vw,
      64px
    )
    0
    clamp(
      36px,
      5vw,
      60px
    );
}
@media (min-width: 920px) {
  .landing-hero {
    grid-template-columns:
      1.08fr
      0.92fr;
    align-items:
      center;
  }
  .landing-hero > div:first-child {
    max-width:
      560px;
  }
  .landing-hero > div:last-child {
    width:
      100%;
    max-width:
      460px;
    justify-self:
      end;
  }
}
.landing-hero h1 {
  max-width:
    12ch;
  font-size:
    clamp(
      2.45rem,
      5.7vw,
      4.2rem
    );
  line-height:
    1.03;
  letter-spacing:
    -0.035em;
}
.landing-hero .lead {
  max-width:
    38ch;
  margin-top:
    16px;
  color:
    var(--ink-2);
  font-size:
    clamp(
      1.05rem,
      1.8vw,
      1.18rem
    );
  line-height:
    1.55;
}
.hero-actions {
  display:
    flex;
  align-items:
    center;
  flex-wrap:
    wrap;
  gap:
    8px
    10px;
  margin-top:
    22px;
}
.hero-note {
  margin-top:
    12px;
  color:
    var(--ink-2);
  font-size:
    0.9rem;
}
/* ============================================================
   LANDING CALCULATOR
   ============================================================ */
.try {
  display:
    grid;
  gap:
    14px;
  padding:
    20px;
  border:
    1px solid
    var(--line);
  border-radius:
    var(--radius-l);
  background:
    var(--surface);
}
.try h2 {
  font-size:
    1.25rem;
}
.try-result {
  display:
    flex;
  align-items:
    baseline;
  flex-wrap:
    wrap;
  gap:
    4px
    10px;
  padding:
    14px
    16px;
  border-radius:
    var(--radius-m);
  background:
    var(--accent-soft);
}
.try-result .amount {
  color:
    var(--accent-text);
  font-family:
    var(--font-display);
  font-size:
    2.4rem;
  font-weight:
    700;
  line-height:
    1;
  letter-spacing:
    -0.03em;
  font-variant-numeric:
    tabular-nums;
}
.try-result .per {
  color:
    var(--ink-2);
  font-weight:
    500;
}
/* ============================================================
   NOTICE
   ============================================================ */
.notice {
  display:
    flex;
  align-items:
    flex-start;
  gap:
    14px;
  padding:
    16px
    18px;
  margin-top:
    14px;
  border:
    1px solid
    var(--line);
  border-radius:
    var(--radius-l);
  background:
    var(--surface);
}
@media (min-width: 920px) {
  .notice {
    margin-left:
      36px;
  }
}
.notice .bell {
  flex:
    none;
  display:
    grid;
  place-items:
    center;
  width:
    40px;
  height:
    40px;
  border-radius:
    50%;
  background:
    var(--accent-soft);
  color:
    var(--accent-text);
}
.notice .t {
  font-weight:
    600;
}
.notice .b {
  color:
    var(--ink-2);
  font-size:
    0.95rem;
}
.notice .act {
  display:
    inline-block;
  margin-top:
    8px;
  color:
    var(--accent-text);
  font-size:
    0.925rem;
  font-weight:
    600;
}
/* ============================================================
   LANDING SECTIONS
   ============================================================ */
.band {
  padding:
    clamp(
      34px,
      5vw,
      58px
    )
    0;
  border-top:
    1px solid
    var(--line);
}
.band h2 {
  max-width:
    24ch;
  font-size:
    clamp(
      1.6rem,
      3.2vw,
      2.15rem
    );
  line-height:
    1.15;
}
.steps {
  display:
    grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:
    22px;
  margin-top:
    20px;
}
@media (min-width: 760px) {
  .steps {
    grid-template-columns:
      repeat(
        3,
        1fr
      );
    gap:
      28px;
  }
}
.steps h3 {
  margin-bottom:
    5px;
  font-size:
    1.18rem;
}
.steps p {
  max-width:
    32ch;
  color:
    var(--ink-2);
}
.leave-out {
  display:
    grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap:
    0
    48px;
  margin:
    22px
    0
    0;
  padding:
    0;
  list-style:
    none;
}
@media (min-width: 760px) {
  .leave-out {
    grid-template-columns:
      1fr
      1fr;
  }
}
.leave-out li {
  padding:
    12px
    0;
  border-top:
    1px solid
    var(--line);
  font-size:
    1rem;
  font-weight:
    500;
}
.closing {
  display:
    grid;
  justify-items:
    start;
  gap:
    16px;
}
.site-footer {
  padding:
    22px
    0
    32px;
  border-top:
    1px solid
    var(--line);
  color:
    var(--ink-2);
  font-size:
    0.9rem;
}
/* ============================================================
   TABLET
   ============================================================ */
@media (max-width: 820px) {
  .overview-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr);
  }
  .overview-card-main { grid-column: auto; }
  .subscription-toolbar {
    grid-template-columns:
      1fr
      1fr;
  }
  .subscription-add {
    grid-column:
      1 / -1;
    justify-self:
      start;
  }
}
/* ============================================================
   MOBILE — same navigation, modules and actions as desktop
   ============================================================ */
@media (max-width: 700px) {
  .container { padding-inline: clamp(16px, 3.5vw, 24px); }
  .site-header .container { min-height: 60px; flex-wrap: wrap; gap: 0 8px; padding-block: 6px; }
  .brand { min-height: 44px; gap: 8px; font-size: 1.15rem; }
  .brand-mark { width: 28px; height: 28px; border-radius: 8px; font-size: 1rem; }
  .header-actions { gap: 2px; }
  .header-actions .btn-sm { min-height: 44px; padding-inline: 10px; font-size: .875rem; }
  .icon { width: 20px; height: 20px; }
  .main-nav {
    position: static;
    order: 3;
    flex: 0 0 100%;
    gap: 4px;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--line);
  }
  .main-nav a { display: flex; flex: 1; min-width: max-content; min-height: 44px; align-items: center; justify-content: center; padding: 8px 4px; font-size: clamp(.8rem, 3.8vw, .875rem); text-align: center; overflow-wrap: normal; }
  .app-main { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .toast button { min-height: 44px; }
  .hide-mobile { display: none !important; }
  .field-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .field label, .field legend { font-size: .875rem; }
  .name-suggestion { min-height: 44px; }
  input, select, .picker-trigger { font-size: max(16px, 1rem); }
  .picker-trigger { padding-inline: 12px; }
  .choice-value { gap: 2px 6px; }
  dialog.dialog { width: 100%; max-width: 560px; max-height: 94dvh; margin: auto auto 0; border-radius: var(--radius-l) var(--radius-l) 0 0; overscroll-behavior: contain; }
  .dialog form { gap: 16px; padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .dialog-head { margin-right: -6px; }
  .dialog-foot { position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom, 0px)); z-index: 3; margin-bottom: -20px; padding-block: 12px calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--surface); box-shadow: 0 -8px 16px var(--surface); }
  .calendar-panel { padding: 8px; }
  .calendar-head { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .calendar-head .icon-btn { width: 44px; height: 44px; }
  .calendar-day { min-height: 44px; }
  .calendar-foot .btn { min-height: 44px; }
  .page-head { gap: 12px; padding-top: 24px; }
  .page-head h1 { font-size: 1.75rem; }
  .page-head p, .page-sub { font-size: .9rem; line-height: 1.5; }
  .section-head { gap: 12px; margin-top: 28px; }
  .section-head h2 { font-size: 1.2rem; }
  .section-copy { font-size: .875rem; }
  .overview-head .btn, .overview-section-head > a { display: none; }
  .overview-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 16px; }
  .overview-card-main { grid-column: auto; }
  .overview-card { min-height: 144px; padding: 14px; gap: 10px; border-radius: var(--radius-m); }
  .overview-label { font-size: .875rem; line-height: 1.35; }
  .overview-value, .overview-value-main { font-size: clamp(1.8rem, 4.5vw, 2.4rem); line-height: 1.1; }
  .overview-name { font-size: 1.25rem; white-space: normal; overflow-wrap: anywhere; }
  .overview-note { font-size: .85rem; line-height: 1.45; overflow-wrap: anywhere; }
  .overview-count { font-size: .8rem; }
  .totals-controls { grid-template-columns: auto minmax(0, 1fr); gap: 8px; margin-top: 14px; font-size: .82rem; }
  .totals-currency { grid-template-columns: auto 92px; gap: 8px; }
  .totals-currency .choice-value { font-size: .9rem; }
  .exchange-details { padding-top: 0; }
  .exchange-details summary { min-height: 46px; padding-block: 12px; }
  .exchange-details[open] summary { min-height: 44px; padding-bottom: 0; }
  .exchange-content { padding: 14px; font-size: .875rem; }
  .subscription-summary { padding: 16px; }
  .subscription-summary-value { gap: 4px 10px; font-size: .875rem; }
  .subscription-summary-value strong { font-size: 1.4rem; }
  .tile { width: 36px; height: 36px; border-radius: 10px; font-size: 1rem; }
  .overview-renewal { grid-template-columns: 36px minmax(0, 1fr) minmax(98px, .9fr); grid-template-areas: "tile main date" "tile main price"; gap: 3px 10px; padding: 16px 14px; }
  .overview-renewal > .tile { grid-area: tile; }
  .overview-renewal-main { grid-area: main; }
  .overview-renewal-date { grid-area: date; }
  .overview-renewal-price { grid-area: price; }
  .overview-renewal-main strong { font-size: .95rem; white-space: normal; overflow-wrap: anywhere; }
  .overview-renewal-main span { font-size: .82rem; }
  .overview-renewal-date strong { font-size: .875rem; }
  .overview-renewal-date span { font-size: .8rem; line-height: 1.4; }
  .overview-renewal-price { min-width: 0; font-size: 1rem; white-space: normal; overflow-wrap: anywhere; }
  .overview-manage-mobile { display: block; }
  .overview-manage-mobile .btn { width: 100%; min-height: 48px; }
  .subscription-toolbar { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 10px; margin-top: 20px; }
  .subscription-sort .choice-picker { display: contents; }
  .subscription-toolbar .subscription-add { display: inline-flex !important; grid-column: 1 / -1; order: 1; justify-self: stretch; min-height: 48px; font-size: .95rem; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; align-items: start; }
  .sub-card { padding: 16px; gap: 14px; border-radius: var(--radius-m); }
  .sub-card .head { display: flex; gap: 10px; }
  .sub-card h2 { font-size: 1.05rem; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
  .sub-card .head p { margin-top: 3px; font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; }
  .currency-code { padding: 2px 5px; font-size: .7rem; }
  .sub-card dl { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 10px 8px; font-size: .875rem; line-height: 1.45; }
  .sub-card dd.num { white-space: normal; overflow-wrap: anywhere; }
  .renewal-date { white-space: normal; }
  .renewal-cell { gap: 6px; }
  .renewal-cell .pill { max-width: 100%; padding: 3px 7px; font-size: .8rem; white-space: normal; }
  .sub-card .reminders { padding-top: 12px; font-size: .85rem; line-height: 1.5; overflow-wrap: anywhere; }
  .settings-group { padding: 2px 16px; border-radius: var(--radius-m); }
  .setting { align-items: center; gap: 12px; padding-block: 16px; }
  .setting > div:first-child { flex: 1 1 220px; }
  .setting:has(.switch) > div:first-child { flex: 1; }
  .setting.stack { gap: 12px; }
  .setting .title { font-size: .95rem; }
  .setting .desc { font-size: .875rem; line-height: 1.5; }
  .time-picker > .picker-trigger, .setting-currency .choice-trigger { max-width: none; }
  .time-picker, .setting-currency .choice-picker { max-width: none; }
  .switch { height: 44px; flex: none; }
  .switch .track { inset: 8px 0; }
  .chip span { min-height: 44px; padding-inline: 12px; font-size: .875rem; }
  .segmented { width: 100%; }
  .segmented label { flex: 1; }
  .segmented span { min-height: 44px; padding-inline: 8px; font-size: .875rem; text-align: center; }
  .setting .btn-danger { max-width: 100%; }
  .container.landing-hero { padding-inline: clamp(16px, 3.5vw, 24px); }
  .landing-hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: start; gap: 20px; padding-top: 32px; padding-bottom: 36px; }
  .landing-hero > div { min-width: 0; }
  .landing-hero h1 { max-width: none; font-size: clamp(1.8rem, 5.5vw, 2.6rem); line-height: 1.08; }
  .landing-hero .lead { margin-top: 16px; font-size: .95rem; line-height: 1.55; }
  .hero-actions { display: flex; gap: 8px; margin-top: 20px; }
  .hero-actions .btn { min-height: 48px; padding: 10px 14px; font-size: .95rem; }
  .hero-note { margin-top: 12px; font-size: .85rem; line-height: 1.5; }
  .try { min-width: 0; gap: 14px; padding: 18px; border-radius: var(--radius-m); }
  .try h2 { font-size: 1.15rem; line-height: 1.3; overflow-wrap: anywhere; }
  .try .field-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .try .btn { min-height: 48px; padding: 10px; font-size: .95rem; }
  .try-result { gap: 4px 8px; padding: 14px; }
  .try-result .amount { min-width: 0; font-size: 2rem; overflow-wrap: anywhere; }
  .try-result .per { font-size: .85rem; }
  .notice { gap: 12px; margin-top: 12px; padding: 16px; border-radius: var(--radius-m); }
  .notice .bell { width: 32px; height: 32px; }
  .notice .t { font-size: .9rem; }
  .notice .b, .notice .act { font-size: .85rem; }
  .band { padding-block: 32px; }
  .band h2 { font-size: 1.6rem; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
  .steps h3 { font-size: .95rem; line-height: 1.35; overflow-wrap: anywhere; }
  .steps p { font-size: .875rem; line-height: 1.5; }
  .leave-out { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; margin-top: 20px; }
  .leave-out li { font-size: .9rem; }
  .closing { gap: 14px; }
  .site-footer { padding-block: 20px; font-size: .85rem; }
}
/* Narrow phones retain the same modules with enough room to read them. */
@media (max-width: 539px) {
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-card-main { grid-column: 1 / -1; min-height: 154px; }
  .overview-value-main { font-size: 2.3rem; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .subscription-toolbar { grid-template-columns: minmax(0, 1fr); }
  .subscription-search, .subscription-sort { display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 10px; }
  .subscription-search label, .subscription-sort label { font-size: .875rem; }
  .landing-hero { grid-template-columns: minmax(0, 1fr); }
  .landing-hero h1 { max-width: 16ch; font-size: clamp(2.1rem, 8.5vw, 2.8rem); }
  .try .field-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .steps h3 { font-size: 1.05rem; }
  .steps p { max-width: none; font-size: .95rem; }
}
@media (max-width: 359px) {
  .site-header .container { gap: 4px; }
  body[data-page="landing"] .brand { font-size: 1rem; gap: 6px; }
  body[data-page="landing"] .brand-mark { width: 24px; height: 24px; }
  .header-actions .btn-sm { padding-inline: 8px; font-size: .8rem; }
  .sub-card .head { gap: 8px; }
  .dialog form { padding-inline: 16px; }
  .field.billing-field { grid-template-columns: minmax(0, 1fr); }
  .totals-controls { grid-template-columns: minmax(0, 1fr); }
  .totals-currency { justify-self: start; }
  .exchange-details { justify-self: start; }
  .overview-renewal { gap: 3px 8px; padding-inline: 12px; }
  .overview-renewal-price { font-size: .9rem; }
}
/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation:
      none !important;
    transition:
      none !important;
  }
}
/* ============================================================
   SETTINGS — SAVE / DISCARD
   ============================================================ */
.settings-group[hidden],
.setting[hidden],
.settings-save-bar[hidden],
.settings-save-status[hidden] {
  display: none !important;
}
.settings-save-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(680px, calc(100% - 32px));
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
}
.settings-save-copy {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 3px;
}
.settings-save-copy span {
  color: var(--ink-2);
  font-size: 0.88rem;
}
.settings-save-actions {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.settings-save-status {
  color: var(--ink-2);
  font-size: 0.9rem;
}
.settings-save-bar .settings-save-status { width: 100%; }
body[data-page="settings"][data-settings-dirty="true"] .app-main {
  padding-bottom: calc(var(--settings-save-height, 140px) + 50px + env(safe-area-inset-bottom, 0px));
}
body[data-page="settings"][data-example-mode="true"]:not([data-settings-dirty="true"]) .app-main {
  padding-bottom: 48px;
}
@media (max-width: 700px) {
  .settings-save-bar {
    bottom: calc(
      12px + env(safe-area-inset-bottom, 0px)
    );
  }
  body[data-page="settings"][data-settings-dirty="true"] .toast {
    bottom: calc(var(--settings-save-height, 140px) + 42px + env(safe-area-inset-bottom, 0px));
  }
  .settings-save-actions {
    width: 100%;
  }
  .settings-save-actions .btn {
    flex: 1;
  }
  body[data-page="settings"][data-settings-dirty="true"] .app-main {
    padding-bottom: calc(var(--settings-save-height, 140px) + 42px + env(safe-area-inset-bottom, 0px));
  }
  body[data-page="settings"][data-example-mode="true"]:not([data-settings-dirty="true"]) .app-main {
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  }
}
/* ============================================================
   FOREWLY — QUIET NOTICES AND MORE OPTIONS
   ============================================================ */
/* Saved / deleted notifications */
.toast {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
  transition:
    opacity .22s ease,
    transform .22s ease;
}
.toast button {
  color: var(--accent-text);
}
/* More options */
.sub-more {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.sub-more summary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  list-style: none;
  color: var(--ink-2);
  font-size: .9rem;
  font-weight: 500;
}
.sub-more summary::-webkit-details-marker {
  display: none;
}
.sub-more summary:hover {
  color: var(--ink);
}
/* Small animated arrow */
.sub-more summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .22s ease;
}
.sub-more[open] summary::after {
  transform: rotate(225deg);
}
.sub-more-content {
  padding-top: 12px;
  display: grid;
  gap: 10px;
}
/* Smooth opening and closing in supported browsers */
@supports (interpolate-size: allow-keywords) {
  .sub-more {
    interpolate-size: allow-keywords;
  }
  .sub-more::details-content {
    block-size: 0;
    overflow: hidden;
    transition:
      block-size .22s ease,
      content-visibility .22s allow-discrete;
  }
  .sub-more[open]::details-content {
    block-size: auto;
  }
}
/* Fallback for browsers without size interpolation */
@supports not (interpolate-size: allow-keywords) {
  .sub-more[open] .sub-more-content {
    animation: forewly-more-in .22s ease-out;
  }
  @keyframes forewly-more-in {
    from {
      opacity: 0;
      transform: translateY(-5px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .toast,
  .sub-more summary::after,
  .sub-more::details-content {
    transition: none !important;
  }
  .sub-more-content {
    animation: none !important;
  }
}
/* Forewly - subtle success notification */
.toast.toast-success {
  background: var(--surface);
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 13px;
  gap: 9px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}
.toast.toast-success::before {
  content: "✓";
  display: grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
}
/* Save error inside subscription dialog */
.sub-save-error {
  padding: 12px 14px;
  color: var(--danger);
  border-left: 3px solid var(--danger);
}
/* ==========================================
   FOREWLY - REFINED NOTIFICATIONS
   ========================================== */
/* Delete / Undo notification */
.toast:not(.toast-success) {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  gap: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}
.toast:not(.toast-success) span {
  color: var(--ink-2);
}
.toast:not(.toast-success) button {
  background: var(--surface-2);
  color: var(--ink);
  border: 0;
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.18s ease;
}
.toast:not(.toast-success) button:hover {
  background: var(--accent-soft);
}
/* Inline subscription save error */
.sub-save-error {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 11px 13px;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
}
.sub-save-error::before {
  content: "!";
  display: grid;
  place-items: center;
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  border: 1px solid var(--danger);
  border-radius: 50%;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}
/* ==========================================
   FOREWLY — REFINED LIGHT EXPERIENCE
   Shared interaction polish
   ========================================== */
/* Gentle interaction */
.sub-card {
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
/* Selected reminder chips */
:root:not([data-theme="dark"])
.chip input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}
/* Light mode notification shadows */
:root:not([data-theme="dark"]) .toast {
  box-shadow:
    0 4px 12px rgba(29, 46, 53, 0.04),
    0 14px 32px rgba(29, 46, 53, 0.075);
}
/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .sub-card {
    transition: none;
  }
  [data-theme="dark"] .sub-card:hover {
    transform: none;
  }
}
/* ==========================================
   FOREWLY — LIGHT MODE FINISHING DETAILS
   Subscriptions only
   ========================================== */
/* Example banner — spacing and subtle shadow */
:root:not([data-theme="dark"])
body[data-page="subscriptions"]
#exampleBanner > div {
  padding: 10px 14px !important;
  border-radius: 13px !important;
  box-shadow:
    0 1px 3px rgba(29, 46, 53, 0.035);
}
/* Motion accessibility */
@media (prefers-reduced-motion: reduce) {
  :root:not([data-theme="dark"])
  body[data-page="subscriptions"] .sub-card:hover {
    transform: none;
  }
}
/* ==========================================
   FOREWLY - REFINED LIGHT SETTINGS
   Light mode only
   ========================================== */
/* Refined theme selector — layout only */
:root:not([data-theme="dark"])
body[data-page="settings"] .segmented {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 13px;
}
:root:not([data-theme="dark"])
body[data-page="settings"] .segmented span {
  min-width: 78px;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 9px;
}
:root:not([data-theme="dark"])
body[data-page="settings"]
.segmented input:checked + span {
  box-shadow:
    0 1px 3px rgba(29, 46, 53, 0.07);
}
/* Example banner — subtle shadow only */
:root:not([data-theme="dark"])
body[data-page="settings"]
#exampleBanner > div {
  box-shadow:
    0 1px 3px rgba(29, 46, 53, 0.035);
}
/* Keep theme controls comfortable on phones */
@media (max-width: 480px) {
  :root:not([data-theme="dark"])
  body[data-page="settings"] .segmented {
    width: 100%;
  }
  :root:not([data-theme="dark"])
  body[data-page="settings"] .segmented label {
    flex: 1;
  }
  :root:not([data-theme="dark"])
  body[data-page="settings"] .segmented span {
    min-width: 0;
  }
}
/* ==========================================
   FOREWLY — UNIFIED LIGHT MODE
   Shared light surfaces
   ========================================== */
/* Shared surfaces */
:root:not([data-theme="dark"]) body[data-page] .site-header,
:root:not([data-theme="dark"]) body[data-page] .settings-save-bar {
  background: var(--surface);
  border-color: var(--line);
}
:root:not([data-theme="dark"]) body[data-page]
:is(.overview-card, .overview-list, .sub-card, .settings-group, .try, .notice) {
  background: var(--surface);
  border-color: var(--line);
  box-shadow:
    0 1px 3px rgba(29, 46, 53, 0.025),
    0 8px 24px rgba(29, 46, 53, 0.055);
}
:root:not([data-theme="dark"]) body[data-page] .overview-card-main {
  background: var(--accent-soft);
  border-color: var(--line);
}
/* Text and dividers */
:root:not([data-theme="dark"]) body[data-page] .sub-card dt,
:root:not([data-theme="dark"]) body[data-page] .sub-card .reminders,
:root:not([data-theme="dark"]) body[data-page] .setting .desc {
  color: var(--ink-2);
}
:root:not([data-theme="dark"]) body[data-page] .sub-card .reminders,
:root:not([data-theme="dark"]) body[data-page] .setting {
  border-color: var(--line);
}
/* Form fields */
:root:not([data-theme="dark"]) body[data-page] .settings-group input,
:root:not([data-theme="dark"]) body[data-page] .settings-group select,
:root:not([data-theme="dark"]) body[data-page] .subscription-toolbar input,
:root:not([data-theme="dark"]) body[data-page] .subscription-toolbar select {
  background-color: var(--surface);
  border-color: var(--line);
}
/* Theme selector */
:root:not([data-theme="dark"]) body[data-page="settings"] .segmented {
  background: var(--surface-2);
  border-color: var(--line);
}
:root:not([data-theme="dark"]) body[data-page="settings"] .segmented span {
  color: var(--ink-2);
}
:root:not([data-theme="dark"]) body[data-page="settings"]
.segmented input:checked + span {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
/* Active switches */
:root:not([data-theme="dark"]) body[data-page="settings"]
.switch input:checked + .track {
  background: var(--surface-2);
  border-color: var(--accent);
}
:root:not([data-theme="dark"]) body[data-page="settings"]
.switch input:checked + .track::after {
  background: var(--accent);
}
/* Reminder choices */
:root:not([data-theme="dark"]) body[data-page="settings"]
.chip input:checked + span {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--ink);
}
:root:not([data-theme="dark"]) body[data-page="settings"]
.chip input:checked + span::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 3px var(--surface);
}
:root:not([data-theme="dark"]) body[data-page="settings"]
.chip input:not(:checked) + span {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink-2);
}
/* Subscription card hover */
:root:not([data-theme="dark"]) body[data-page="subscriptions"] .sub-card:hover {
  border-color: #b8c8cd;
  box-shadow:
    0 2px 5px rgba(29, 46, 53, 0.04),
    0 10px 24px rgba(29, 46, 53, 0.075);
  transform: translateY(-1px);
}
/* Example information banner */
:root:not([data-theme="dark"]) body[data-page] #exampleBanner > div {
  background: var(--surface) !important;
  border-color: var(--line) !important;
  color: var(--ink-2) !important;
}
/* Notifications */
:root:not([data-theme="dark"]) body[data-page] .toast {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
:root:not([data-theme="dark"]) body[data-page]
.toast:not(.toast-success) span {
  color: var(--ink-2);
}
:root:not([data-theme="dark"]) body[data-page]
.toast:not(.toast-success) button {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}
:root:not([data-theme="dark"]) body[data-page] .sub-save-error {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}
/* Responsive fixes: preserve the existing type, spacing, and color palette. */
.landing-hero {
  padding-inline: clamp(18px, 3vw, 28px);
}
.field,
.setting > div:first-child {
  min-width: 0;
}
.field-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
input,
select {
  min-width: 0;
}
.setting .desc {
  overflow-wrap: anywhere;
}
.auth-label-short {
  display: none;
}
@media (min-width: 920px) {
  .landing-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }
}
@media (max-width: 420px) {
  body[data-page="landing"] .site-header .container {
    gap: 6px;
  }
  .header-actions .btn-sm {
    padding-inline: 0.65rem;
    font-size: 0.85rem;
  }
  .header-actions .auth-label-full {
    display: none;
  }
  .header-actions .auth-label-short {
    display: inline;
  }
  .setting select,
  .setting input[type="time"] {
    min-width: 104px;
    max-width: 42%;
  }
  .setting-location select { max-width: 100%; min-width: 0; }
}

/* Account, trial and delivery controls. Keep the existing Forewly shell. */
[hidden] { display: none !important; }
.brand-tile, [data-theme="dark"] .brand-tile { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.service-logo svg { width: 24px; height: 24px; fill: currentColor; }
:root:not([data-theme="dark"]) .pill.soon { color: var(--warn); }
.personal-tile { font-size: .9rem; letter-spacing: -.03em; }
.type-choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.type-choice legend { font-weight: 600; margin-bottom: 8px; }
.auth-content { padding: 24px; display: grid; gap: 18px; }
#clerk-auth { min-height: 140px; }
#clerk-auth .cl-rootBox, #clerk-auth .cl-cardBox { width: 100%; max-width: 100%; }
#clerk-auth .cl-card { box-shadow: none; border: 0; background: var(--surface); }
#exampleBanner { margin-top: 14px; }
#exampleBanner > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: .92rem; }
#exampleBanner strong { color: var(--ink); }
.forewly-savebar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; padding: 12px 0; background: var(--surface); border-top: 1px solid var(--line); box-shadow: var(--shadow); }
.forewly-savebar .container { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.forewly-savebar span { margin-right: auto; }
.settings-group { scroll-margin-bottom: 90px; }
body[data-page="settings"] .app-main { padding-bottom: 110px; }
.device-actions, .dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.reminder-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
.reminder-fields legend { font-weight: 600; margin-bottom: 8px; }
.reminder-fields .hint { margin-bottom: 10px; }
.form-preview { padding: 14px; border-radius: var(--radius-s); background: var(--surface-2); font-size: .9rem; }
.form-preview p { margin-top: 8px; }
.start-date-helper, .more-options { padding-block: 8px; }
.start-date-helper summary, .more-options summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
[data-paid-fields], [data-trial-fields] { display: grid; gap: 16px; }
.sub-card .grow { min-width: 0; }
.sub-card h2 { overflow-wrap: anywhere; }
.deadline-note { color: var(--ink-2); font-size: .8rem; line-height: 1.5; }
.legal-main .container { max-width: 800px; }
.legal-main h2 { font-size: 1.3rem; margin-block: 30px 12px; }
.legal-main p { line-height: 1.65; margin-block: 12px; }
.legal-draft { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); }
.site-footer .container, .site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; }
.recovery-panel { padding-block: 30px; }
.recovery-panel p { margin-block: 16px; }
@media (max-width: 600px) {
  #exampleBanner > div { flex-wrap: wrap; }
  .forewly-savebar .container { flex-wrap: wrap; }
  .forewly-savebar span { flex-basis: 100%; }
  .dialog-actions .btn, .device-actions .btn { flex: 1 1 150px; }
  .auth-content { padding: 18px; }
  .site-footer .container { flex-direction: column; }
}

/* The V10 form hierarchy also applies to the new payment/trial fields. */
.schedule-details { border-top: 1px solid var(--line); padding-top: 10px; }
.schedule-details > summary { color: var(--ink-2); font-size: .9rem; cursor: pointer; }
.schedule-content { display: grid; gap: 16px; padding-top: 14px; }
.sub-more .dialog-actions { display: grid; gap: 10px; }
.sub-more .dialog-actions .btn { width: 100%; }
.sub-more .hint { margin: 0; }
.form-preview { padding: 0; border: 0; background: transparent; color: var(--ink-2); font-size: .875rem; }
.form-preview strong { color: var(--ink); font-weight: 500; }
.form-preview p { margin-top: 6px; }
body[data-page="settings"] .setting-time .time-picker { width: 360px; max-width: 100%; }
@media (max-width: 700px) {
  .calendar-day { min-height: 40px; }
  .subscription-price-row .choice-panel { grid-column: 1 / -1; }
  .time-picker { max-width: 100%; }
}

/* Text-only notices must not cover preference actions. */
#app-toast, #app-toast.show { pointer-events: none; }
#app-toast a { pointer-events: auto; text-decoration: underline; text-underline-offset: 3px; }
body[data-page="settings"][data-settings-dirty="true"] #app-toast { bottom: calc(var(--settings-save-height, 140px) + 42px); }

/* A small, optional product film. The existing hero keeps its hierarchy. */
.walkthrough-trigger { display: grid; grid-template-columns: 132px minmax(0,1fr); align-items: center; gap: 15px; width: min(100%,374px); margin-top: 25px; padding: 7px 15px 7px 7px; color: var(--ink); text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; cursor: pointer; transition: border-color .18s, transform .18s; }
.walkthrough-trigger:hover { border-color: var(--ink-2); transform: translateY(-2px); }
.walkthrough-thumbnail { position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 2; border-radius: 12px; background: var(--surface-2); }
.walkthrough-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.walkthrough-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 34px; height: 34px; transform: translate(-50%,-50%); color: #fff; background: #29353a; border: 1px solid #ffffff80; border-radius: 50%; box-shadow: 0 2px 10px #0002; }
.walkthrough-play svg { width: 18px; height: 18px; fill: currentColor; margin-left: -2px; }
.walkthrough-copy { display: grid; gap: 4px; }
.walkthrough-copy strong { font-size: .95rem; font-weight: 600; }
.walkthrough-copy > span { color: var(--ink-2); font-size: .8rem; line-height: 1.4; }
.walkthrough-copy .walkthrough-duration { margin-top: 3px; color: var(--ink); font-size: .75rem; font-weight: 600; }
.walkthrough-duration > span { margin-left: 7px; color: var(--accent-text); }
dialog.dialog.walkthrough-dialog { width: min(940px,calc(100% - 32px)); max-width: 940px; margin: auto; padding: 0; }
.walkthrough-content { padding: 22px; }
.walkthrough-content .dialog-head { padding: 0 0 18px; align-items: flex-start; }
.walkthrough-eyebrow { margin-bottom: 5px; color: var(--ink-2); font-size: .75rem; }
.walkthrough-content h2 { font-size: 1.5rem; letter-spacing: -.025em; }
#walkthrough-video { display: block; width: 100%; aspect-ratio: 16 / 10; max-height: 65dvh; background: #eef2f2; object-fit: contain; border-radius: 12px; }
.walkthrough-status { margin-top: 12px; color: var(--ink-2); font-size: .8rem; line-height: 1.5; }
.walkthrough-transcript { margin-top: 14px; font-size: .85rem; color: var(--ink-2); line-height: 1.5; }
.walkthrough-transcript summary { color: var(--ink); cursor: pointer; }
.walkthrough-transcript ol { padding-left: 20px; margin-top: 10px; }
.walkthrough-transcript li + li { margin-top: 8px; }

/* One readable sequence replaces the old count-only form preview. */
.preview-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding-top: 3px; }
.preview-heading strong { color: var(--ink); font-size: .9rem; font-weight: 600; }
.preview-heading > span { color: var(--ink-2); font-size: .75rem; }
.reminder-timeline { list-style: none; margin: 12px 0 0; padding: 0 0 0 17px; }
.reminder-timeline li { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 14px; min-height: 32px; padding-bottom: 10px; font-size: .8rem; }
.reminder-timeline li::before { content: ""; position: absolute; left: -15px; top: 6px; width: 6px; height: 6px; background: var(--ink-2); border-radius: 50%; z-index: 1; }
.reminder-timeline li:not(:last-child)::after { content: ""; position: absolute; left: -12.5px; top: 12px; bottom: -4px; width: 1px; background: var(--line); }
.reminder-timeline .timeline-deadline { color: var(--ink); font-weight: 600; padding-top: 2px; padding-bottom: 0; }
.reminder-timeline .timeline-deadline::before { background: var(--accent-text); }
.reminder-timeline time { flex-shrink: 0; text-align: right; font-variant-numeric: tabular-nums; }
.form-preview .preview-zone { margin-top: 8px; font-size: .73rem; line-height: 1.5; }
.form-preview .preview-channels { font-size: .76rem; color: var(--ink); }
.form-preview .preview-warning { margin-top: 8px; color: var(--warn); font-size: .78rem; line-height: 1.5; }
@media (max-width: 600px) {
  .walkthrough-trigger { width: min(100%,350px); grid-template-columns: 110px minmax(0,1fr); gap: 12px; margin-top: 20px; }
  .walkthrough-content { padding: 16px; }
  dialog.dialog.walkthrough-dialog { width: calc(100% - 20px); }
  .service-logo svg { width: 22px; height: 22px; }
  .reminder-timeline li { flex-wrap: wrap; gap: 2px 10px; }
}
@media (prefers-reduced-motion: reduce) { .walkthrough-trigger { transition: none; } .walkthrough-trigger:hover { transform: none; } }

/* Language switch (i18n.js) */
.lang-toggle { font-size: 13px; font-weight: 600; letter-spacing: .04em; min-width: 40px; }
.site-header .container > .lang-toggle { margin-left: 8px; }

/* Design pass 2026-11: smaller hero headline, calmer dark main card, labelled week count */
.landing-hero h1 { font-size: clamp(2.1rem, 4.7vw, 3.45rem); max-width: 14ch; }
html[lang="lt"] .landing-hero h1 { max-width: 17ch; }
@media (max-width: 700px) {
  .landing-hero h1 { max-width: none; font-size: clamp(1.6rem, 5vw, 2.2rem); }
}
@media (max-width: 539px) {
  .landing-hero h1 { max-width: none; font-size: clamp(1.8rem, 7.4vw, 2.35rem); }
}
[data-theme="dark"] body[data-page] .overview-card-main,
[data-theme="dark"] .overview-card-main {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: none;
}
:root:not([data-theme="dark"]) body[data-page] .overview-card-main {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
[data-theme="dark"] .overview-card-main .overview-label { color: var(--ink-2); }
.overview-unit {
  font-family: var(--font-body, inherit);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-2);
}
