/* skin-structured.css: Freetime Structured. Freetime's components (app.css) restyled; every rule is scoped to
   :root[data-theme="structured"], so the file is inert until the picker (or ?theme=structured) chooses it. Its tokens are
   at the foot of themes.css. Generated with the design system of the same name; the front page and the login
   are restyled at the end. */
/* Freetime Structured: Freetime's layout (app/web/templates/base.html) in the Structured language:
   a putty canvas, bone cards without edges, black for the one action, a display serif for the figure that matters, flat and hairline everywhere; the rail is the Ink Room. */  :root[data-theme="structured"] { --edge: transparent; --mono: var(--font-num); --r-box: 9px; --r-large: 9px; --r-control: 2px; --r-small: 2px; --r-pill: 28.8px; --r-bar: 2px;
           --shadow-box: none; --shadow-raised: none; --rail-bg: var(--color-ink); }
  :root[data-theme="structured"] * { box-sizing: border-box; }
  :root[data-theme="structured"], :root[data-theme="structured"] body { margin: 0; }
  :root[data-theme="structured"] body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5;
          display: flex; min-height: 100vh; -webkit-font-smoothing: antialiased;  }
  :root[data-theme="structured"] a { color: var(--link); text-underline-offset: 2px; }
  :root[data-theme="structured"] a:hover { text-decoration: underline; }
  :root[data-theme="structured"] ::selection { background: var(--accent-tint); color: var(--ink); }
  :root[data-theme="structured"] :focus-visible { outline: 2px solid var(--focus) !important; outline-offset: 2px; }
  :root[data-theme="structured"] main:focus, :root[data-theme="structured"] main:focus-visible { outline: none !important; }
  :root[data-theme="structured"] .skip-link { position: absolute; left: 8px; top: -60px; z-index: 1000; padding: 10px 14px; border-radius: var(--r-control); background: var(--surface); color: var(--ink); border: 2px solid var(--focus); font-weight: 600; }
  :root[data-theme="structured"] .skip-link:focus { top: 8px; }
  :root[data-theme="structured"] .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  :root[data-theme="structured"] .mono { font-family: var(--font-num); font-variant-numeric: tabular-nums;  }
  :root[data-theme="structured"] .kv .v, :root[data-theme="structured"] .stat-value, :root[data-theme="structured"] .tile .v, :root[data-theme="structured"] .spend-row .v, :root[data-theme="structured"] .bar-row .val, :root[data-theme="structured"] .readout-num, :root[data-theme="structured"] .free-num, :root[data-theme="structured"] td.num, :root[data-theme="structured"] th.num { font-variant-numeric: tabular-nums; }


  /* ---- Rail ---- */  :root[data-theme="structured"] .rail { width: 232px; flex: 0 0 232px; background: var(--rail-bg); border-right: 1px solid var(--rail-border); color: var(--rail-ink);
           display: flex; flex-direction: column; padding: 22px 14px; gap: 26px; position: sticky; top: 0; height: 100vh;
           transition: width .16s ease, flex-basis .16s ease, padding .16s ease; }
  :root[data-theme="structured"] .rail.collapsed { width: 58px; flex-basis: 58px; padding: 16px 8px; }
  :root[data-theme="structured"] .rail-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
  :root[data-theme="structured"] .rail-brand { display: flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; padding-left: 6px; }
  :root[data-theme="structured"] .rail-mark { width: 46px; height: 32px; flex: 0 0 auto; color: var(--rail-mark); display: flex; }
  :root[data-theme="structured"] .logo { display: block; width: 100%; height: 100%; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%222 10 61 43%22%3E%0A  %0A  %3Cdefs%3E%0A    %3CclipPath id=%22shell%22%3E%3Cpath d=%22M8 40 C8 22.5 18 12.5 28 12.5 C38 12.5 48 22.5 48 40 Z%22/%3E%3C/clipPath%3E%0A    %3Cmask id=%22turtle%22 maskUnits=%22userSpaceOnUse%22 x=%220%22 y=%220%22 width=%2264%22 height=%2264%22%3E%0A      %3Crect width=%2264%22 height=%2264%22 fill=%22%23000%22/%3E%0A      %3Cpath d=%22M3 41.5 L10 37.5 L10 44 Z%22 fill=%22%23fff%22/%3E%0A      %3Crect x=%2210%22 y=%2241%22 width=%229%22 height=%2211%22 rx=%224%22 fill=%22%23fff%22/%3E%0A      %3Crect x=%2233%22 y=%2241%22 width=%229%22 height=%2211%22 rx=%224%22 fill=%22%23fff%22/%3E%0A      %3Crect x=%2242%22 y=%2229%22 width=%2212%22 height=%2211%22 rx=%225%22 fill=%22%23fff%22/%3E%0A      %3Ccircle cx=%2254.5%22 cy=%2230.5%22 r=%227.5%22 fill=%22%23fff%22/%3E%0A      %3Crect x=%226.5%22 y=%2237.5%22 width=%2243%22 height=%226.5%22 rx=%223.25%22 fill=%22%23fff%22/%3E%0A      %3Cpath d=%22M8 40 C8 22.5 18 12.5 28 12.5 C38 12.5 48 22.5 48 40 Z%22 fill=%22%23fff%22/%3E%0A      %3Cg clip-path=%22url%28%23shell%29%22 fill=%22%239a9a9a%22%3E%0A        %3Cpath d=%22M28 40.5 L-4 40.5 L-4 15 L9.6 25.6 Z%22/%3E%0A        %3Cpath d=%22M28 40.5 L28 0 L60 0 L60 15 L46.4 25.6 Z%22/%3E%0A      %3C/g%3E%0A      %3Cpath d=%22M28 40.5 L9.6 25.6 M28 40.5 L28 11 M28 40.5 L46.4 25.6%22 stroke=%22%23000%22 stroke-width=%222.4%22 stroke-linecap=%22round%22 fill=%22none%22/%3E%0A      %3Cline x1=%227%22 y1=%2239%22 x2=%2249.5%22 y2=%2239%22 stroke=%22%23000%22 stroke-width=%221.8%22/%3E%0A      %3Ccircle cx=%2256.6%22 cy=%2228.4%22 r=%221.7%22 fill=%22%23000%22/%3E%0A      %3Cpath d=%22M53.6 33.2 Q56.6 35.4 59.6 33.2%22 stroke=%22%23000%22 stroke-width=%221.5%22 stroke-linecap=%22round%22 fill=%22none%22/%3E%0A    %3C/mask%3E%0A  %3C/defs%3E%0A  %3Crect width=%2264%22 height=%2264%22 fill=%22%23000%22 mask=%22url%28%23turtle%29%22/%3E%0A%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%222 10 61 43%22%3E%0A  %0A  %3Cdefs%3E%0A    %3CclipPath id=%22shell%22%3E%3Cpath d=%22M8 40 C8 22.5 18 12.5 28 12.5 C38 12.5 48 22.5 48 40 Z%22/%3E%3C/clipPath%3E%0A    %3Cmask id=%22turtle%22 maskUnits=%22userSpaceOnUse%22 x=%220%22 y=%220%22 width=%2264%22 height=%2264%22%3E%0A      %3Crect width=%2264%22 height=%2264%22 fill=%22%23000%22/%3E%0A      %3Cpath d=%22M3 41.5 L10 37.5 L10 44 Z%22 fill=%22%23fff%22/%3E%0A      %3Crect x=%2210%22 y=%2241%22 width=%229%22 height=%2211%22 rx=%224%22 fill=%22%23fff%22/%3E%0A      %3Crect x=%2233%22 y=%2241%22 width=%229%22 height=%2211%22 rx=%224%22 fill=%22%23fff%22/%3E%0A      %3Crect x=%2242%22 y=%2229%22 width=%2212%22 height=%2211%22 rx=%225%22 fill=%22%23fff%22/%3E%0A      %3Ccircle cx=%2254.5%22 cy=%2230.5%22 r=%227.5%22 fill=%22%23fff%22/%3E%0A      %3Crect x=%226.5%22 y=%2237.5%22 width=%2243%22 height=%226.5%22 rx=%223.25%22 fill=%22%23fff%22/%3E%0A      %3Cpath d=%22M8 40 C8 22.5 18 12.5 28 12.5 C38 12.5 48 22.5 48 40 Z%22 fill=%22%23fff%22/%3E%0A      %3Cg clip-path=%22url%28%23shell%29%22 fill=%22%239a9a9a%22%3E%0A        %3Cpath d=%22M28 40.5 L-4 40.5 L-4 15 L9.6 25.6 Z%22/%3E%0A        %3Cpath d=%22M28 40.5 L28 0 L60 0 L60 15 L46.4 25.6 Z%22/%3E%0A      %3C/g%3E%0A      %3Cpath d=%22M28 40.5 L9.6 25.6 M28 40.5 L28 11 M28 40.5 L46.4 25.6%22 stroke=%22%23000%22 stroke-width=%222.4%22 stroke-linecap=%22round%22 fill=%22none%22/%3E%0A      %3Cline x1=%227%22 y1=%2239%22 x2=%2249.5%22 y2=%2239%22 stroke=%22%23000%22 stroke-width=%221.8%22/%3E%0A      %3Ccircle cx=%2256.6%22 cy=%2228.4%22 r=%221.7%22 fill=%22%23000%22/%3E%0A      %3Cpath d=%22M53.6 33.2 Q56.6 35.4 59.6 33.2%22 stroke=%22%23000%22 stroke-width=%221.5%22 stroke-linecap=%22round%22 fill=%22none%22/%3E%0A    %3C/mask%3E%0A  %3C/defs%3E%0A  %3Crect width=%2264%22 height=%2264%22 fill=%22%23000%22 mask=%22url%28%23turtle%29%22/%3E%0A%3C/svg%3E") center / contain no-repeat; }
  :root[data-theme="structured"] .rail-word { font-family: var(--font-head); font-weight: 500; font-size: 17px; letter-spacing: -0.005em; white-space: nowrap; padding-right: 6px; color: var(--rail-ink); }
  :root[data-theme="structured"] .rail.collapsed .rail-word, :root[data-theme="structured"] .rail.collapsed .rail-foot, :root[data-theme="structured"] .rail.collapsed .rail-brand { display: none; }
  :root[data-theme="structured"] .rail.collapsed .rail-nav .lbl { display: none; }
  :root[data-theme="structured"] .rail.collapsed .rail-top { justify-content: center; }
  :root[data-theme="structured"] .rail-collapse-btn { all: unset; cursor: pointer; width: 22px; height: 22px; flex: 0 0 auto; border-radius: var(--r-small); color: var(--rail-ink-3); display: flex; align-items: center; justify-content: center; font-family: var(--font-num); font-size: 13px; }
  :root[data-theme="structured"] .rail-collapse-btn:hover { background: var(--rail-hover); color: var(--rail-ink); }
  :root[data-theme="structured"] .rail-nav { display: flex; flex-direction: column; gap: 2px; }
  :root[data-theme="structured"] .rail-nav a { text-decoration: none; padding: 9px 14px; border-radius: var(--r-pill); font-size: 15px; color: var(--rail-ink-2); display: flex; align-items: center; gap: 12px;
                 font-family: var(--font-body); white-space: nowrap; overflow: hidden; font-weight: 400;  }
  :root[data-theme="structured"] .rail.collapsed .rail-nav a { justify-content: center; padding: 8px; }
  :root[data-theme="structured"] .rail-nav a:hover { background: var(--rail-hover); color: var(--rail-ink); text-decoration: none; }
  :root[data-theme="structured"] .rail-nav a.active { background: var(--rail-active); color: var(--rail-active-ink); font-weight: 500; }
  :root[data-theme="structured"] .rail-nav .ic { width: 18px; height: 18px; flex: 0 0 18px; color: var(--rail-ink-3); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  :root[data-theme="structured"] .rail-nav a.active .ic { color: var(--rail-active-ink); }
  :root[data-theme="structured"] .rail-foot { margin-top: auto; font-size: 12.5px; color: var(--rail-ink-3); padding: 0 8px; }
  :root[data-theme="structured"] .rail-foot a { color: var(--rail-ink-2); }
  :root[data-theme="structured"] .logout-form { margin: 0; }
  :root[data-theme="structured"] .logout-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 0; margin-top: 2px; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--rail-ink-2); cursor: pointer; }
  :root[data-theme="structured"] .logout-link:hover { background: none; color: var(--rail-ink); text-decoration: underline; }
  :root[data-theme="structured"] .logout-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  :root[data-theme="structured"] .rail .theme-pick { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 12.5px; color: var(--rail-ink-2); }
  :root[data-theme="structured"] .rail .theme-pick select { font: inherit; font-size: 12.5px; padding: 4px 8px; border-radius: var(--r-small); border: 1px solid var(--rail-ink-3); background: var(--rail-hover); color: var(--rail-ink); }
  :root[data-theme="structured"] .rail .theme-pick select option { color: #222; background: #fff; }
  :root[data-theme="structured"] .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  :root[data-theme="structured"] .page { padding: 36px 40px 72px; display: flex; flex-direction: column; gap: 20px; max-width: 1200px; }
  /* the front page and the login keep the whole width and centre their own sections (front.html, _auth.html): this skin's .page is more specific than theirs */
  :root[data-theme="structured"] .page:has(.front), :root[data-theme="structured"] .page:has(.auth) { max-width: none; padding: 0; gap: 0; }
  :root[data-theme="structured"] h1 { font-family: var(--font-head); font-weight: 500; font-size: 34px; margin: 0 0 4px; text-wrap: balance; letter-spacing: -0.009em; line-height: 1.1; }
  :root[data-theme="structured"] h2 { font-family: var(--font-head); font-weight: 500; font-size: 24px; margin: 0; letter-spacing: -0.005em; line-height: 1.3; }
  :root[data-theme="structured"] h3 { font-family: var(--font-head); font-weight: 500; font-size: 16px; margin: 0; }
  :root[data-theme="structured"] .sub { color: var(--ink-2); font-size: 15px; margin: 0; line-height: 1.5; }
  :root[data-theme="structured"] .page-head { padding: 24px; border: 1px solid var(--edge); border-radius: var(--r-box); box-shadow: var(--shadow-box); background: var(--surface); }
  :root[data-theme="structured"] .page-head h1 { font-size: 34px; margin: 0 0 2px; }
  :root[data-theme="structured"] .eyebrow { font-family: var(--font-label); font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 2px; font-weight: 500; }
  :root[data-theme="structured"] .note { font-size: 12px; color: var(--ink-3); }
  :root[data-theme="structured"] .grid { display: grid; gap: 20px; align-items: start; }
  :root[data-theme="structured"] .grid-2 { grid-template-columns: 1.3fr 1fr; }
  :root[data-theme="structured"] .grid-3 { grid-template-columns: repeat(3, 1fr); }
  :root[data-theme="structured"] .grid-4 { grid-template-columns: repeat(4, 1fr); }
  :root[data-theme="structured"] .col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (max-width: 900px) {  :root[data-theme="structured"] .grid-2, :root[data-theme="structured"] .grid-3, :root[data-theme="structured"] .grid-4 { grid-template-columns: 1fr 1fr; }
  }
@media (max-width: 620px) {  :root[data-theme="structured"] .grid-2, :root[data-theme="structured"] .grid-3, :root[data-theme="structured"] .grid-4 { grid-template-columns: 1fr; }
  }


  /* ---- Surfaces ---- */  :root[data-theme="structured"] .panel { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-box); padding: 24px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-box); }
  :root[data-theme="structured"] .panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap;  }
  :root[data-theme="structured"] details.panel.fold { display: block; padding: 0; }
  :root[data-theme="structured"] details.panel.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 24px; border-radius: var(--r-box); }
  :root[data-theme="structured"] details.panel.fold > summary::-webkit-details-marker { display: none; }
  :root[data-theme="structured"] details.panel.fold > summary:hover { background: var(--surface-2); }
  :root[data-theme="structured"] details.panel.fold[open] > summary { border-radius: var(--r-box) var(--r-box) 0 0; border-bottom: 1px solid var(--border); }
  :root[data-theme="structured"] .fold-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
  :root[data-theme="structured"] .fold-text h2, :root[data-theme="structured"] .fold-text .sub { margin: 0; }
  :root[data-theme="structured"] .fold-caret { color: var(--ink-3); font-size: 18px; line-height: 1; transition: transform .15s; }
  :root[data-theme="structured"] details.panel.fold[open] > summary .fold-caret { transform: rotate(180deg); }
  :root[data-theme="structured"] .fold-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
  :root[data-theme="structured"] .tile { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-box); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-box); }
  :root[data-theme="structured"] .tile .l { font-family: var(--font-label); font-size: 12px; color: var(--ink-2); letter-spacing: .06em; font-weight: 500; text-transform: uppercase; }
  :root[data-theme="structured"] .tile .v { font-family: var(--font-num); font-size: 24px; font-weight: 500; letter-spacing: -0.005em; }
  :root[data-theme="structured"] .tile .d { font-size: 12px; color: var(--ink-2); }


  /* ---- Readout ---- */  :root[data-theme="structured"] .readout { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-large); box-shadow: var(--shadow-raised); padding: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; position: relative; overflow: hidden; }
  :root[data-theme="structured"] .readout::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: none; }
  :root[data-theme="structured"] .readout-num { font-family: var(--font-num); font-weight: 500; font-size: clamp(34px, 5vw, 43px); letter-spacing: -0.005em; color: var(--ink); position: relative; line-height: 1; }
  :root[data-theme="structured"] .readout-num .unit { font-size: .4em; color: var(--ink-3); font-weight: 500; margin-left: 6px; font-family: var(--font-body); letter-spacing: 0; }
  :root[data-theme="structured"] .readout-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; position: relative; }
  :root[data-theme="structured"] .readout-side > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px; border-radius: var(--r-box); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
  :root[data-theme="structured"] .stat-label { font-family: var(--font-label); font-size: 12px; color: var(--ink-2); letter-spacing: .06em; font-weight: 500; text-transform: uppercase; }
  :root[data-theme="structured"] .stat-value { font-family: var(--font-num); font-size: 22px; font-weight: 500; letter-spacing: -0.005em; white-space: nowrap; }


  /* ---- The countdown ---- */  :root[data-theme="structured"] details.free-bar { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-large); box-shadow: var(--shadow-raised); position: relative; overflow: hidden; }
  :root[data-theme="structured"] details.free-bar::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: none; }
  :root[data-theme="structured"] details.free-bar > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 20px 24px; position: relative; }
  :root[data-theme="structured"] details.free-bar > summary::-webkit-details-marker { display: none; }
  :root[data-theme="structured"] .free-main { flex: 1; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; row-gap: 4px; min-width: 0; }
  :root[data-theme="structured"] .free-num { font-family: var(--font-display); font-weight: 500; font-size: 52px; line-height: 1; color: var(--emphasis); letter-spacing: -0.009em; font-variant-numeric: normal; }
  :root[data-theme="structured"] .free-unit { font-family: var(--font-body); font-size: 16px; color: var(--ink-2); font-weight: 500; }
  :root[data-theme="structured"] .free-pace { flex-basis: 100%; font-size: 15px; color: var(--ink-2); }
@media (min-width: 1000px) {  :root[data-theme="structured"] .free-pace { flex: 0 1 auto; margin-left: auto; }
  }
  :root[data-theme="structured"] .free-pace .good-text, :root[data-theme="structured"] .free-pace .bad-text { display: inline-block; padding: 2px 10px; border-radius: var(--r-pill); font-size: 12px; margin-left: 4px; white-space: nowrap; background: var(--good-tint);  }
  :root[data-theme="structured"] .free-pace .bad-text { background: var(--critical-tint);  }
  :root[data-theme="structured"] .free-caret { color: var(--ink-3); font-size: 14px; transition: transform .15s ease; }
  :root[data-theme="structured"] details.free-bar:not([open]) .free-caret { transform: rotate(-90deg); }
  :root[data-theme="structured"] .free-body { padding: 4px 24px 24px; display: grid; gap: 14px; position: relative; }
  :root[data-theme="structured"] .free-body > .note, :root[data-theme="structured"] .free-body > .sub { margin: 0; }
  :root[data-theme="structured"] .free-body > .note { max-width: 74ch; font-size: 13.5px; }


  /* ---- Tables, rows, pills ---- */  :root[data-theme="structured"] table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
  :root[data-theme="structured"] th, :root[data-theme="structured"] td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); }
  :root[data-theme="structured"] th { color: var(--ink-3); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-family: var(--font-label); }
  :root[data-theme="structured"] td.num, :root[data-theme="structured"] th.num { text-align: right; font-family: var(--font-num);  }
  :root[data-theme="structured"] tr:last-child td { border-bottom: none; }
  :root[data-theme="structured"] .tbl-wrap { overflow-x: auto; }
  :root[data-theme="structured"] table.fixed { table-layout: fixed; }
  :root[data-theme="structured"] .kv { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; padding: 9px 0; border-bottom: 1px solid var(--border); }
  :root[data-theme="structured"] .kv:last-child { border-bottom: none; }
  :root[data-theme="structured"] .kv .k { color: var(--ink-2); }
  :root[data-theme="structured"] .kv .v { font-family: var(--font-num); font-weight: 500;  }
  :root[data-theme="structured"] .pill { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-label); font-size: 12px; font-weight: 400; padding: 4px 12px; border-radius: var(--r-pill); white-space: nowrap; border: 1px solid transparent; border-color: currentColor; }
  :root[data-theme="structured"] .pill.good { background: var(--good-tint); color: var(--good);  }
  :root[data-theme="structured"] .pill.critical { background: var(--critical-tint); color: var(--critical);  }
  :root[data-theme="structured"] .pill.warn { background: var(--warning-tint); color: var(--warning);  }
  :root[data-theme="structured"] .pill.neutral { background: var(--surface-2); color: var(--ink-2); border-color: var(--border); }
  :root[data-theme="structured"] .good-text { color: var(--good); font-weight: 600; }
  :root[data-theme="structured"] .bad-text { color: var(--critical); }
  :root[data-theme="structured"] .tag { display: inline-block; font-family: var(--font-label); font-size: 12px; letter-spacing: 0; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-2); vertical-align: 1px; white-space: nowrap; background: transparent; border: 1px solid var(--ink-3); }
  :root[data-theme="structured"] .tag.good { background: var(--good-tint); color: var(--good);  }


  /* ---- Bars and charts ---- */  :root[data-theme="structured"] .bar-track { flex: 1; height: 6px; border-radius: var(--r-bar); background: var(--surface-3); overflow: hidden; }
  :root[data-theme="structured"] .bar-fill { height: 100%; border-radius: var(--r-bar); background: var(--action); }
  :root[data-theme="structured"] .bar-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
  :root[data-theme="structured"] .bar-row .lbl { flex: 0 0 152px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  :root[data-theme="structured"] .bar-row .val { flex: 0 0 76px; text-align: right; font-family: var(--font-num);  }
  :root[data-theme="structured"] .progress-track { height: 6px; border-radius: var(--r-bar); background: var(--surface-3); overflow: hidden; }
  :root[data-theme="structured"] .progress-fill { height: 100%; border-radius: var(--r-bar); background: var(--action); }
  :root[data-theme="structured"] .progress-fill.over { background: var(--critical-fill); }
  :root[data-theme="structured"] .progress-fill.good { background: var(--good-fill); }
  :root[data-theme="structured"] .spend-list { display: flex; flex-direction: column; gap: 1px; }
  :root[data-theme="structured"] .spend-row { display: flex; align-items: center; gap: 12px; font-size: 13px; line-height: 1.9; }
  :root[data-theme="structured"] .spend-row .k { flex: 0 0 130px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  :root[data-theme="structured"] .spend-row .t { flex: 1; height: 6px; background: var(--surface-2); border-radius: var(--r-bar); overflow: hidden; }
  :root[data-theme="structured"] .spend-row .t i { display: block; height: 100%; background: var(--ink-3); opacity: .75; }
  :root[data-theme="structured"] .spend-row.over .t i { background: var(--critical-fill); opacity: 1; }
  :root[data-theme="structured"] .spend-row .v { flex: 0 0 62px; text-align: right; font-family: var(--font-num); color: var(--ink-2);  }
  :root[data-theme="structured"] .shop-tbl td { vertical-align: top; }
  :root[data-theme="structured"] .shop-tbl .shop-sec th { color: var(--ink); font-size: 13px; padding-top: 18px; border-bottom: none; text-transform: none; letter-spacing: 0; font-weight: 700; font-family: var(--font-head); }
  :root[data-theme="structured"] .shop-tbl tr:first-child.shop-sec th { padding-top: 4px; }
  :root[data-theme="structured"] .shop-tbl td.num { white-space: nowrap; }
  :root[data-theme="structured"] .shop-tbl .unit { color: var(--ink-3); font-size: 12px; }
  :root[data-theme="structured"] .cf-chart { display: flex; align-items: flex-end; gap: 6px; height: 132px; padding-top: 10px; }
  :root[data-theme="structured"] .cf-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
  :root[data-theme="structured"] .cf-bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 96px; width: 100%; }
  :root[data-theme="structured"] .cf-bar { flex: 0 1 18px; max-width: 18px; border-radius: var(--r-bar) var(--r-bar) 0 0; }
  :root[data-theme="structured"] .cf-label { font-size: 12px; color: var(--ink-3); font-family: var(--font-label); }
  :root[data-theme="structured"] .legend { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
  :root[data-theme="structured"] .legend span { display: inline-flex; align-items: center; gap: 5px; }
  :root[data-theme="structured"] .legend .dot { width: 8px; height: 8px; border-radius: var(--r-bar); display: inline-block; }
  :root[data-theme="structured"] .donut { --pct: 0; width: 86px; height: 86px; border-radius: 50%; flex: 0 0 auto; background: conic-gradient(var(--action) calc(var(--pct) * 1%), var(--surface-3) 0); display: flex; align-items: center; justify-content: center; }
  :root[data-theme="structured"] .donut-inner { width: 62px; height: 62px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; font-family: var(--font-num); font-weight: 600; font-size: 15px; }
  :root[data-theme="structured"] .donut-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
  :root[data-theme="structured"] .debt-progress-list { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 220px; }
  :root[data-theme="structured"] .stack { width: 20px; height: 14px; border-radius: var(--r-bar); overflow: hidden; display: inline-flex; flex-direction: column-reverse; flex: 0 0 auto; border: 1px solid var(--border); vertical-align: middle; }
  :root[data-theme="structured"] .stack > * { display: block; width: 100%; }
  :root[data-theme="structured"] .stack .eq { background: var(--action); }
  :root[data-theme="structured"] .stack .db { background: var(--surface-3); }
  :root[data-theme="structured"] .prop-name { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }


  /* ---- Forms ---- */  :root[data-theme="structured"] label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
  :root[data-theme="structured"] input, :root[data-theme="structured"] select { font: inherit; font-size: 15px; padding: 9px 12px; border-radius: var(--r-control); border: 1px solid var(--border); background: var(--input-bg); color: var(--ink); }
  :root[data-theme="structured"] input::placeholder { color: var(--ink-3); }
  :root[data-theme="structured"] input[type=file] { padding: 5px; }
  :root[data-theme="structured"] form.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; align-items: end; }
  :root[data-theme="structured"] form.form-col { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
  :root[data-theme="structured"] form.form-col input[type=file] { max-width: 340px; }
  :root[data-theme="structured"] .check-row { flex-direction: row; align-items: flex-start; gap: 8px; font-size: 12.5px; max-width: 62ch; line-height: 1.45; }
  :root[data-theme="structured"] .check-row input[type=checkbox] { width: auto; flex: 0 0 auto; margin-top: 2px; accent-color: var(--action); }
  :root[data-theme="structured"] button { font: inherit; font-family: var(--font-body); font-size: 12px; font-weight: 400; padding: 9px 17px; border-radius: var(--r-button); border: 1px solid var(--action); background: var(--action); color: var(--on-action); cursor: pointer; letter-spacing: .02em; }
  :root[data-theme="structured"] button:hover { background: var(--action-hover); border-color: var(--action-hover);  }
  :root[data-theme="structured"] .cancel-btn { background: var(--surface); color: var(--ink-2); border: 1px solid var(--border); box-shadow: none; }
  :root[data-theme="structured"] .cancel-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--border); }


  /* ---- The small pieces ---- */  :root[data-theme="structured"] .lbl-row { display: flex; align-items: center; gap: 5px; }
  :root[data-theme="structured"] .hint { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; background: var(--surface-2); color: var(--ink-3); font-family: var(--font-num); font-size: 11px; font-weight: 600; cursor: help; flex-shrink: 0; background: transparent; border: 1px solid var(--ink-3); }
  :root[data-theme="structured"] .hint-bubble { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 260px; background: var(--ink); color: var(--bg); font-family: var(--font-body); font-size: 13px; font-weight: 400; line-height: 1.45; padding: 8px 10px; border-radius: var(--r-small); text-align: left; opacity: 0; pointer-events: none; transition: opacity .12s ease; z-index: 30; letter-spacing: 0; text-transform: none; }
  :root[data-theme="structured"] .hint:hover .hint-bubble, :root[data-theme="structured"] .hint:focus .hint-bubble { opacity: 1; }
  :root[data-theme="structured"] details.why { margin: 4px 0 0; font-size: 13px; color: var(--ink-3); }
  :root[data-theme="structured"] details.why > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 0; color: var(--ink-3); }
  :root[data-theme="structured"] details.why > summary::-webkit-details-marker { display: none; }
  :root[data-theme="structured"] details.why > summary::after { content: "\25B8"; font-size: 10px; transition: transform .12s ease; }
  :root[data-theme="structured"] details.why[open] > summary::after { transform: rotate(90deg); }
  :root[data-theme="structured"] details.why > summary:hover { color: var(--ink-2); }
  :root[data-theme="structured"] .why-body { margin-top: 6px; line-height: 1.5; max-width: 68ch; display: grid; gap: 6px; color: var(--ink-2); }
  :root[data-theme="structured"] .why-body p { margin: 0; }
  :root[data-theme="structured"] .row-actions { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
  :root[data-theme="structured"] .entry-tbl td { vertical-align: top; }
  :root[data-theme="structured"] .pending-batch { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; text-decoration: none; background: var(--warning-tint); border: 1px solid var(--warning-fill); border-radius: var(--r-box); padding: 12px 18px; color: var(--ink); font-size: 15px; }
  :root[data-theme="structured"] .pending-batch:hover { border-color: var(--ink-2); text-decoration: none; }
  :root[data-theme="structured"] .pending-batch span:nth-child(2) { flex: 1; min-width: 200px; }
  :root[data-theme="structured"] .pending-go { font-family: var(--font-label); font-weight: 600; color: var(--link); white-space: nowrap; }
  :root[data-theme="structured"] .notice { display: flex; align-items: center; gap: 4px; background: var(--good-tint); border: 1px solid var(--good-fill); border-radius: var(--r-box); padding: 8px 8px 8px 18px; font-size: 15px; }
  :root[data-theme="structured"] .notice > a { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex: 1; text-decoration: none; color: var(--ink); padding: 6px 0; }
  :root[data-theme="structured"] .notice > a:hover { text-decoration: none; }
  :root[data-theme="structured"] .notice > a span:nth-child(2) { flex: 1; min-width: 200px; }
  :root[data-theme="structured"] .notice-x { background: none; border: 0; color: var(--ink-2); font-size: 20px; line-height: 1; cursor: pointer; min-width: 40px; min-height: 40px; border-radius: var(--r-small); padding: 0; box-shadow: none; }
  :root[data-theme="structured"] .notice-x:hover { background: var(--surface); color: var(--ink); border: 0; box-shadow: none; }
  :root[data-theme="structured"] .edit-btn, :root[data-theme="structured"] .delete-btn, :root[data-theme="structured"] .cancel-edit { font-family: var(--font-label); font-size: 12px; font-weight: 500; padding: 6px 12px; border-radius: var(--r-button-small); border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); cursor: pointer; box-shadow: none; letter-spacing: .02em; text-transform: none; }
  :root[data-theme="structured"] .edit-btn:hover { background: var(--accent-tint); color: var(--link); border-color: var(--link); }
  :root[data-theme="structured"] .delete-btn:hover { background: var(--critical-tint); color: var(--critical); border-color: var(--critical-fill); }
  :root[data-theme="structured"] .cancel-edit:hover { background: var(--surface-2); color: var(--ink); border-color: var(--border); }
  :root[data-theme="structured"] .suggest-btn { background: var(--accent-tint); border-color: var(--accent-tint); color: var(--link); font-size: 13px; padding: 6px 10px; box-shadow: none; }
  :root[data-theme="structured"] .suggest-btn:hover { background: var(--action); border-color: var(--action); color: var(--on-action); }
  :root[data-theme="structured"] fieldset { border: 1px solid var(--border); border-radius: var(--r-box); padding: 16px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
  :root[data-theme="structured"] legend { font-family: var(--font-head); font-weight: 500; font-size: 16px; padding: 0 6px; }
  :root[data-theme="structured"] .reset-zone { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border: 1px solid var(--critical-fill); border-radius: var(--r-box); padding: 14px 16px; background: var(--critical-tint); }


  /* ---- _dashboard_style.html ---- */  :root[data-theme="structured"] details.drill > summary { list-style: none; cursor: pointer; }
  :root[data-theme="structured"] details.drill > summary::-webkit-details-marker { display: none; }
  :root[data-theme="structured"] details.drill > summary .k::before { content: "\25B8"; display: inline-block; width: 1em; color: var(--ink-3); transition: transform .15s; }
  :root[data-theme="structured"] details.drill[open] > summary .k::before { transform: rotate(90deg); }
  :root[data-theme="structured"] details.drill[open] > summary { background: var(--surface-2); }
  :root[data-theme="structured"] .drill-tbl { width: 100%; font-size: 13px; margin: 4px 0 6px; }
  :root[data-theme="structured"] .drill-tbl td, :root[data-theme="structured"] .drill-tbl th { padding: 4px 6px; }
  :root[data-theme="structured"] .drill-tbl th { font-weight: 500; color: var(--ink-2); text-align: left; }
  :root[data-theme="structured"] .drill-tbl .num { text-align: right; white-space: nowrap; font-family: var(--font-num); }
  :root[data-theme="structured"] .drill-tbl tr.over td:first-child { color: var(--critical); }
  :root[data-theme="structured"] details.drill .note { margin: 2px 6px 8px; display: block; }
  :root[data-theme="structured"] .makeit { margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--warning-fill); border-radius: var(--r-box); background: var(--warning-tint); }
  :root[data-theme="structured"] .makeit h3 { margin: 0; font-size: 13px; }
  :root[data-theme="structured"] .makeit > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
  :root[data-theme="structured"] .makeit > summary::-webkit-details-marker { display: none; }
  :root[data-theme="structured"] .makeit > summary::before { content: "\25B8"; color: var(--warning); transition: transform .15s; }
  :root[data-theme="structured"] .makeit[open] > summary::before { transform: rotate(90deg); }
  :root[data-theme="structured"] .makeit[open] > summary { margin-bottom: 6px; }
  :root[data-theme="structured"] .makeit .sub { margin: 0 0 6px; }
  :root[data-theme="structured"] .gs-steps { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
  :root[data-theme="structured"] .gs-steps a { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-control); color: inherit; text-decoration: none; }
  :root[data-theme="structured"] .gs-steps a:hover { border-color: var(--link); text-decoration: none; }
  :root[data-theme="structured"] .gs-steps li.done a { opacity: .6; }
  :root[data-theme="structured"] .gs-mark { flex: 0 0 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; background: var(--accent-tint); color: var(--link); font-family: var(--font-num); }
  :root[data-theme="structured"] .gs-steps li.done .gs-mark { background: var(--good-tint); color: var(--good); }
  :root[data-theme="structured"] .syncline { margin: 0 0 8px; font-size: 12px; color: var(--ink-2); text-align: right; }


  /* ---- The receipt panel (dashboard.html) ---- */  :root[data-theme="structured"] .receipt-left { flex-basis: 100%; margin: 0; }
  :root[data-theme="structured"] .receipt-panel { flex-direction: row; align-items: center; gap: 16px; flex-wrap: wrap; }
  :root[data-theme="structured"] .receipt-text { flex: 1; min-width: 220px; }
  :root[data-theme="structured"] .receipt-text h2 { margin-bottom: 3px; }
  :root[data-theme="structured"] .receipt-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }
  :root[data-theme="structured"] .receipt-btn { position: relative; display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: var(--r-button); border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-weight: 400; font-size: 12px; cursor: pointer; }
  :root[data-theme="structured"] .receipt-btn.primary { background: var(--action); border-color: var(--action); color: var(--on-action); }
  :root[data-theme="structured"] .receipt-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
  :root[data-theme="structured"] .receipt-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
  :root[data-theme="structured"] .receipt-btn:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }


  /* ---- The login (_auth.html) ---- */  :root[data-theme="structured"] .page:has(.auth) { max-width: none; padding: 0; gap: 0; min-height: 100vh; }
  :root[data-theme="structured"] .auth { min-height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; padding: 0 20px; color: var(--ink); background: var(--bg); }
  :root[data-theme="structured"] .auth-top { width: 100%; max-width: 1120px; display: flex; align-items: center; justify-content: space-between; padding: 18px 4px; }
  :root[data-theme="structured"] .auth-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; font-size: 17px; color: var(--ink); text-decoration: none; font-family: var(--font-head); }
  :root[data-theme="structured"] .auth-mark { width: 48px; height: 34px; color: var(--mark); display: flex; flex: 0 0 auto; }
  :root[data-theme="structured"] .auth-lang { background: none; border: 0; color: var(--ink-2); font: inherit; font-size: 14px; cursor: pointer; padding: 8px 10px; min-height: 40px; border-radius: var(--r-small); box-shadow: none; }
  :root[data-theme="structured"] .auth-lang:hover { background: var(--surface-2); color: var(--ink); border: 0; }
  :root[data-theme="structured"] .auth-card { width: 100%; max-width: 420px; box-sizing: border-box; margin: 6vh 0 auto; padding: 32px 32px 28px; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-large); box-shadow: var(--shadow-raised); }
  :root[data-theme="structured"] .auth-eyebrow { font-family: var(--font-label); font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--link); margin: 0 0 10px; }
  :root[data-theme="structured"] .auth-card h1 { font-size: 34px; line-height: 1.1; margin: 0 0 8px; }
  :root[data-theme="structured"] .auth-sub { font-size: 15px; line-height: 1.55; color: var(--ink-2); margin: 0 0 22px; }
  :root[data-theme="structured"] .auth-sub strong { color: var(--ink); }
  :root[data-theme="structured"] .auth-msg { margin: 0 0 18px; padding: 10px 14px; border-radius: var(--r-control); font-size: 14px; line-height: 1.5; border: 1px solid transparent; }
  :root[data-theme="structured"] .auth-msg.bad { background: var(--critical-tint); color: var(--critical); border-color: var(--critical-fill); }
  :root[data-theme="structured"] .auth-msg.good { background: var(--good-tint); color: var(--good); border-color: var(--good-fill); }
  :root[data-theme="structured"] .auth-form { display: flex; flex-direction: column; gap: 16px; }
  :root[data-theme="structured"] .auth-form label { gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
  :root[data-theme="structured"] .auth-form .lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  :root[data-theme="structured"] .auth-form .lbl a { font-weight: 500; font-size: 13px; color: var(--link); text-decoration: none; }
  :root[data-theme="structured"] .auth-form input:not([type=checkbox]) { width: 100%; box-sizing: border-box; font-size: 16px; padding: 12px 14px; border-radius: var(--r-control); }
  :root[data-theme="structured"] .auth-form .check-row { font-size: 14px; font-weight: 500; max-width: none; align-items: center; min-height: 36px; }
  :root[data-theme="structured"] .auth-form .check-row input[type=checkbox] { width: 20px; height: 20px; margin: 0; }
  :root[data-theme="structured"] .auth-form button { width: 100%; min-height: 48px; font-size: 16px; margin-top: 4px; }
  :root[data-theme="structured"] .auth-links { margin: 18px 0 0; font-size: 14px; color: var(--ink-2); text-align: center; }
  :root[data-theme="structured"] .auth-links a { color: var(--link); font-weight: 600; text-decoration: none; }
  :root[data-theme="structured"] .auth-note { margin: 18px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
  :root[data-theme="structured"] .auth-foot { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; align-items: center; padding: 20px 0 16px; font-size: 13px; color: var(--ink-3); }
  :root[data-theme="structured"] .auth-foot a { color: var(--ink-3); text-decoration: none; padding: 10px 6px; }


  /* ---- Phone (base.html's rules, the look from the tokens) ---- */  :root[data-theme="structured"] .phone-bar, :root[data-theme="structured"] .snap-busy { display: none; }
@media (max-width: 620px) {  :root[data-theme="structured"] body { flex-direction: column; font-size: 16px; }
  :root[data-theme="structured"] .rail, :root[data-theme="structured"] .rail.collapsed { position: static; height: auto; width: 100%; flex: none; flex-direction: row; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; border-right: none; border-bottom: 1px solid var(--rail-border); overflow-x: auto; }
  :root[data-theme="structured"] .rail .rail-collapse-btn, :root[data-theme="structured"] .rail .rail-foot, :root[data-theme="structured"] .rail .rail-nav, :root[data-theme="structured"] .rail.collapsed .rail-nav { display: none !important; }
  :root[data-theme="structured"] .rail .rail-brand, :root[data-theme="structured"] .rail.collapsed .rail-brand { display: flex; }
  :root[data-theme="structured"] .rail .rail-word, :root[data-theme="structured"] .rail.collapsed .rail-word { display: block; }
  :root[data-theme="structured"] body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  :root[data-theme="structured"] .page { padding: 16px 12px 40px; gap: 14px; }
  :root[data-theme="structured"] .grid, :root[data-theme="structured"] .col { gap: 14px; }
  :root[data-theme="structured"] .bar-row .lbl { flex-basis: 96px; }
  :root[data-theme="structured"] .bar-row .val { flex-basis: 46px; }
  :root[data-theme="structured"] .spend-row .k { flex-basis: 96px; }
  :root[data-theme="structured"] .phone-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; align-items: flex-end; justify-content: space-around; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); box-shadow: none; }
  :root[data-theme="structured"] .phone-bar > a, :root[data-theme="structured"] .phone-bar .more > summary { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; text-decoration: none; color: var(--ink-3); font-size: 11.5px; font-weight: 500; font-family: var(--font-body); list-style: none; cursor: pointer; }
  :root[data-theme="structured"] .phone-bar .more > summary::-webkit-details-marker { display: none; }
  :root[data-theme="structured"] .phone-bar a.active { color: var(--link); }
  :root[data-theme="structured"] .phone-bar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  :root[data-theme="structured"] .phone-bar .more { flex: 1; display: flex; }
  :root[data-theme="structured"] .snap-form { flex: 0 0 auto; margin: 0 4px; }
  :root[data-theme="structured"] .snap { width: 60px; height: 60px; margin-top: -26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--action); color: var(--on-action); box-shadow: none; cursor: pointer; border: 4px solid var(--surface); }
  :root[data-theme="structured"] .snap svg { width: 28px; height: 28px; stroke-width: 2; }
  :root[data-theme="structured"] .snap input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
  :root[data-theme="structured"] h1 { font-size: 28px; }
  :root[data-theme="structured"] .page-head { padding: 14px 16px; }
  :root[data-theme="structured"] details.free-bar > summary { padding: 14px 16px; }
  :root[data-theme="structured"] .free-body { padding: 2px 16px 18px; }
  :root[data-theme="structured"] .free-num { font-size: 44px; }
  :root[data-theme="structured"] .readout-side { grid-template-columns: 1fr 1fr; gap: 10px; }
  :root[data-theme="structured"] .readout-side > div { padding: 12px 14px; }
  :root[data-theme="structured"] .stat-value { font-size: 18px; }
  :root[data-theme="structured"] th, :root[data-theme="structured"] td { padding: 8px 6px; }
  :root[data-theme="structured"] .notice { padding: 6px 4px 6px 16px; align-items: flex-start; }
  :root[data-theme="structured"] .notice > a { gap: 6px 10px; padding: 8px 0; }
  :root[data-theme="structured"] .notice > a span:nth-child(2) { flex-basis: 100%; min-width: 0; order: 2; }
  :root[data-theme="structured"] button, :root[data-theme="structured"] .delete-btn, :root[data-theme="structured"] .cancel-edit { font-size: 14px; min-height: 40px; padding-left: 12px; padding-right: 12px; }
  :root[data-theme="structured"] input:not([type=checkbox]):not([type=radio]):not([type=file]), :root[data-theme="structured"] select, :root[data-theme="structured"] textarea { font-size: 16px !important; min-height: 42px; max-width: 100%; }
  :root[data-theme="structured"] input[type=checkbox], :root[data-theme="structured"] input[type=radio] { width: 20px; height: 20px; flex: 0 0 auto; }
  :root[data-theme="structured"] summary { min-height: 40px; }
  :root[data-theme="structured"] .hint { width: 22px; height: 22px; font-size: 12px; }
  :root[data-theme="structured"] .hint-bubble { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(92px + env(safe-area-inset-bottom)); transform: none; width: auto; max-width: none; font-size: 14px; padding: 12px 14px; }
  :root[data-theme="structured"] form.row { grid-template-columns: 1fr; gap: 12px; }
  :root[data-theme="structured"] .kv .v { white-space: nowrap; }
  :root[data-theme="structured"] .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  :root[data-theme="structured"] .panel { padding: 18px 18px; }
  :root[data-theme="structured"] details.panel.fold > summary { padding: 14px; }
  :root[data-theme="structured"] .fold-body { padding: 14px; }
  :root[data-theme="structured"] .receipt-panel.phone-hidden { display: none; }
  }
@media (prefers-reduced-motion: reduce) {  :root[data-theme="structured"] * { transition: none !important; animation: none !important; }
  }


  /* Structured's own moments */  :root[data-theme="structured"] { --r-button: var(--r-pill); --r-button-small: var(--r-pill); --font-display: var(--font-head); }
  :root[data-theme="structured"] .free-num { font-style: normal; }
  :root[data-theme="structured"] .free-unit { text-transform: none; }
  :root[data-theme="structured"] .eyebrow { color: var(--ink-3); }
  :root[data-theme="structured"] .page-head { border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; box-shadow: none; padding: 0 0 16px; }
  :root[data-theme="structured"] .readout-side > div { box-shadow: inset 0 0 0 1px var(--border); border-radius: var(--r-box); }
  :root[data-theme="structured"] th { border-bottom: 1px solid var(--ink); }
  :root[data-theme="structured"] .kv .v { font-weight: 500; }
  :root[data-theme="structured"] .donut-inner { font-family: var(--font-head); font-weight: 500; }
  :root[data-theme="structured"] .tile .v, :root[data-theme="structured"] .stat-value { font-family: var(--font-num); }
  :root[data-theme="structured"] button, :root[data-theme="structured"] .receipt-btn, :root[data-theme="structured"] .edit-btn, :root[data-theme="structured"] .delete-btn, :root[data-theme="structured"] .cancel-edit, :root[data-theme="structured"] .suggest-btn { text-transform: none; }
  :root[data-theme="structured"] .gs-mark { border: 1px solid var(--ink); background: transparent; color: var(--ink); }
  :root[data-theme="structured"] .gs-steps li.done .gs-mark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  :root[data-theme="structured"] .notice, :root[data-theme="structured"] .pending-batch { border-radius: var(--r-box); }
  :root[data-theme="structured"] .auth-card { border: 1px solid var(--border); }
  :root[data-theme="structured"] .auth-card, :root[data-theme="structured"] .auth-card { border-color: transparent; }
@media (max-width: 620px) {  :root[data-theme="structured"] .rail, :root[data-theme="structured"] .rail.collapsed { border-bottom: 0; }
  }


  /* ---- the front page (front.html) in the gallery ---- */  :root[data-theme="structured"] .front { background: none; }
  :root[data-theme="structured"] .front h1, :root[data-theme="structured"] .front h2, :root[data-theme="structured"] .front h3 { font-family: var(--font-head); font-weight: 500; }
  :root[data-theme="structured"] .front .f-hero h1 { font-size: clamp(44px, 7vw, 94px); line-height: .95; letter-spacing: -.009em; font-weight: 500; }
  :root[data-theme="structured"] .f-hero h1 em { font-style: italic; color: var(--ink); }
  :root[data-theme="structured"] .front .f-section h2, :root[data-theme="structured"] .front .f-join h2 { font-size: clamp(32px, 4.5vw, 52px); letter-spacing: -.009em; line-height: 1.05; font-weight: 500; }
  :root[data-theme="structured"] .f-steps h3, :root[data-theme="structured"] .f-card h3, :root[data-theme="structured"] .f-moment h3, :root[data-theme="structured"] .f-sud h3, :root[data-theme="structured"] .f-out h3, :root[data-theme="structured"] .front .f-plan h3 { font-family: var(--font-head); font-weight: 500; font-size: 22px; letter-spacing: -.005em; }
  :root[data-theme="structured"] .f-eyebrow, :root[data-theme="structured"] .f-when, :root[data-theme="structured"] .f-sud-step { font-family: var(--font-body); font-weight: 500; font-size: 12px; letter-spacing: .06em; color: var(--ink-3); }
  :root[data-theme="structured"] .f-lead, :root[data-theme="structured"] .f-join-text p { color: var(--ink-2); }
  :root[data-theme="structured"] .f-links a, :root[data-theme="structured"] .f-lang, :root[data-theme="structured"] .f-foot-links a { color: var(--ink); }
  :root[data-theme="structured"] .f-btn { border-radius: var(--r-pill); background: var(--action); color: var(--on-action); border-color: var(--action); font-weight: 400; font-size: 13px; padding: 9px 17px; letter-spacing: .02em; }
  :root[data-theme="structured"] .f-btn:hover { background: var(--action-hover); border-color: var(--action-hover); text-decoration: none; }
  :root[data-theme="structured"] .f-btn-big { padding: 12px 22px; font-size: 15px; border-radius: var(--r-pill); box-shadow: none; }
  :root[data-theme="structured"] .f-btn-ghost, :root[data-theme="structured"] .f-btn-ghost:hover { background: transparent; color: var(--ink); border-color: var(--ink); box-shadow: none; }
  :root[data-theme="structured"] .f-promise { background: transparent; border: 1px solid var(--ink-3); border-radius: var(--r-pill); }
  :root[data-theme="structured"] .f-promise strong { color: var(--ink); }
  :root[data-theme="structured"] .f-phone { box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
  :root[data-theme="structured"] .f-shot img { border-radius: var(--r-box); box-shadow: none; border: 0; }
  :root[data-theme="structured"] .f-trust { border-radius: var(--r-box); border: 0; }
  :root[data-theme="structured"] .f-steps li, :root[data-theme="structured"] .f-card, :root[data-theme="structured"] .f-out, :root[data-theme="structured"] .f-plan, :root[data-theme="structured"] .f-checks, :root[data-theme="structured"] .f-faq details, :root[data-theme="structured"] .f-form, :root[data-theme="structured"] .f-joined, :root[data-theme="structured"] .f-sud { border-radius: var(--r-box); border: 0; box-shadow: none; background: var(--surface); }
  :root[data-theme="structured"] .f-out-wide, :root[data-theme="structured"] .f-plan-main { background: var(--surface); }
  :root[data-theme="structured"] .f-plan-main { border: 1px solid var(--ink); }
  :root[data-theme="structured"] .f-sud > div + div { border-left: 1px solid var(--border); }
  :root[data-theme="structured"] .f-sud > div + div::before { background: var(--ink); color: var(--bg); }
  :root[data-theme="structured"] .f-num { background: transparent; border: 1px solid var(--ink); color: var(--ink); font-family: var(--font-body); font-weight: 500; }
  :root[data-theme="structured"] .f-moment { border-top: 1px solid var(--ink); }
  :root[data-theme="structured"] .f-out-fig, :root[data-theme="structured"] .f-plan-price { font-family: var(--font-head); font-weight: 500; color: var(--ink); letter-spacing: -.009em; }
  :root[data-theme="structured"] .f-out-fig span, :root[data-theme="structured"] .f-plan-price span { color: var(--ink-3); font-family: var(--font-body); }
  :root[data-theme="structured"] .f-plan-tag { background: var(--ink); color: var(--bg); border-radius: var(--r-pill); font-weight: 400; letter-spacing: .02em; }
  :root[data-theme="structured"] .f-checks li::before, :root[data-theme="structured"] .f-plan li::before { background: transparent; border: 1px solid var(--ink); color: var(--ink); }
  :root[data-theme="structured"] .f-faq summary { font-weight: 500; }
  :root[data-theme="structured"] .f-join { background: var(--ink); color: var(--bg); border-radius: var(--r-box); }
  :root[data-theme="structured"] .f-join h2, :root[data-theme="structured"] .f-join-text p, :root[data-theme="structured"] .f-join .f-small, :root[data-theme="structured"] .f-joined > p:first-child, :root[data-theme="structured"] .f-joined { color: var(--bg); }
  :root[data-theme="structured"] .f-join .f-small a { color: var(--bg); }
  :root[data-theme="structured"] .f-form { background: transparent; border: 1px solid var(--color-ash); box-shadow: none; }
  :root[data-theme="structured"] .f-form label { color: var(--bg); }
  /* the fields are of the panel they stand on, a shade off it, not white on black (5 Oct 2026: "a bit too bright"):
     the button is the one bright thing. By the tokens, so the night's inverted panel gets the same in its own colours. */
  :root[data-theme="structured"] .f-form input { background: color-mix(in srgb, var(--bg) 9%, var(--ink)); color: var(--bg); caret-color: var(--bg);
    border: 1px solid color-mix(in srgb, var(--bg) 52%, var(--ink)); border-radius: var(--r-control); }
  :root[data-theme="structured"] .f-form input:-webkit-autofill { -webkit-text-fill-color: var(--bg); box-shadow: 0 0 0 1000px color-mix(in srgb, var(--bg) 9%, var(--ink)) inset; }
  :root[data-theme="structured"] .f-form input:focus { outline: 2px solid var(--bg); }
  :root[data-theme="structured"] .f-form .f-btn { background: var(--bg); color: var(--ink); border-color: var(--bg); }
  :root[data-theme="structured"] .f-joined { background: transparent; border: 1px solid var(--color-ash); }
  :root[data-theme="structured"] .f-join .note, :root[data-theme="structured"] .f-join .f-small, :root[data-theme="structured"] .f-join .f-small a { color: var(--surface-2); }
  :root[data-theme="structured"] .f-error { color: var(--critical); }
  :root[data-theme="structured"] .f-foot { border-top: 1px solid var(--ink); }
  :root[data-theme="structured"] .f-mark { color: var(--mark); }
  :root[data-theme="structured"] .f-lang, :root[data-theme="structured"] .f-lang:hover { background: none; border: 0; color: var(--ink-2); box-shadow: none; padding: 8px; font-size: 14px; font-weight: 400; letter-spacing: 0; border-radius: var(--r-control); }
  :root[data-theme="structured"] .f-lang:hover { background: var(--surface-2); color: var(--ink); }

  @media (prefers-color-scheme: dark) {
  :root[data-theme="structured"] { --edge: var(--border); --shadow-box: none; --shadow-raised: none; --rail-bg: var(--color-ink); }
  :root[data-theme="structured"] .page-head { border-color: var(--border); }
  :root[data-theme="structured"] .auth-card { border-color: var(--border); }
  }
