
/* One row per section of the message: a switch, what it is, when it fires,
   and how many items are waiting for it right now. The count is the part
   that makes this a dashboard rather than a form -- a switch with nothing
   behind it is a preference, a switch that says "4 waiting" is a decision. */
.sec-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:14px;
  align-items:center;padding:14px 16px;border-bottom:1px solid hsl(var(--border))}
.sec-row:last-child{border-bottom:0}
/* Pressed, a section row deepens like a list row (`views.CSS`). */
.sec-row:active{background:hsl(var(--muted) / .8)}
/* ⚠️ A SETTING IS A SWITCH, IN ONE CARD (the owner, 2026-11-07, from a
   phone: the rows and the line under them "feel unprofessional"). The rows
   were checkboxes on the page's ground with a rule under each and another
   against the save button. Now they are one rounded card, hairlines inside
   it, each with a switch at its end the way a phone's own settings are;
   `switch` makes it the system's switch where Safari has one, which also
   ticks under a real finger. */
.mail-set .block{background:hsl(var(--card));border:1px solid hsl(var(--border));
  border-radius:16px;overflow:hidden}
.sec-row input[type=checkbox]{order:3;-webkit-appearance:none;appearance:none;
  flex:none;width:46px;height:28px;margin:0;border-radius:999px;cursor:pointer;
  background:hsl(var(--muted-foreground) / .35);position:relative;
  transition:background var(--t-quick,.16s) ease}
.sec-row input[type=checkbox]::before{content:"";position:absolute;top:3px;left:3px;
  width:22px;height:22px;border-radius:50%;background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.25);
  transition:transform .22s var(--spring,cubic-bezier(.2,.9,.3,1.4))}
.sec-row input[type=checkbox]:checked{background:hsl(var(--action,var(--primary)))}
.sec-row input[type=checkbox]:checked::before{transform:translateX(18px)}
.sec-row input[type=checkbox]:focus-visible{outline:2px solid hsl(var(--foreground));
  outline-offset:2px}
/* The fold under the save button opens by its own word; a rule between the
   two drew a line under the button. */
.mail-set .mail-fold{border-top:0;margin-top:32px;padding-top:0}
/* ⚠️ THE PLAIN TEXT WRAPS (the owner, 2026-11-07: opening it "makes it seem
   like it's on desktop"). A `pre` keeps its lines, and the mail's longest
   one laid a 390px phone out 1,337px wide. */
.mail-preview pre{white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0 0}
.sec-row b{display:block;font-size:15px;letter-spacing:-.01em}
.sec-row .what{color:hsl(var(--muted-foreground));font-size:13.5px;
  line-height:1.55;margin-top:2px}
.sec-row .when{display:inline-block;margin-top:6px;font-size:13.5px;
  color:hsl(var(--muted-foreground));background:hsl(var(--muted));
  border-radius:999px;padding:4px 10px}
.sec-row .count{order:2;text-align:right;font-size:13.5px;white-space:nowrap;
  color:hsl(var(--muted-foreground))}
.sec-row .count b{font-size:19px;color:hsl(var(--foreground));
  font-variant-numeric:tabular-nums}
.sec-row.off b,.sec-row.off .count b{color:hsl(var(--muted-foreground))}

/* ⚠️ THE PREVIEW IS OPEN, AND BESIDE THE SETTINGS ON A DESK (the owner,
   2026-11-07: redesign the mail and its preview). It was a fold at the foot
   of the page, so seeing what a setting does meant saving, scrolling down
   and opening it. From 1240px the settings take a column and the preview
   stands beside them, sticky, scrolling inside its own frame; narrower, it
   follows the settings, open, and the frame grows to the whole message so
   a phone never scrolls inside a scroll (`JS`). */
.mail-page{display:grid;gap:40px;align-items:start}
.mail-preview .section-head{display:flex;align-items:center;gap:12px}
.mail-frame{border:1px solid hsl(var(--border));border-radius:14px;
  overflow:hidden;background:hsl(var(--muted));padding:14px;
  display:flex;justify-content:center}
/* The frame keeps the message's own ground in dark mode, deliberately: this
   is a preview of a message, and its look is the reader's mail setting, not
   the app's. */
.mail-frame iframe{width:100%;max-width:640px;height:640px;border:0;
  border-radius:10px;background:#fff;box-shadow:var(--shadow-lg);
  transition:max-width .28s var(--ease-out,ease)}
.mail-frame.phone iframe{max-width:390px}
@media (min-width:1240px){
  .mail-page{grid-template-columns:minmax(0,420px) minmax(0,1fr)}
  .mail-preview{position:sticky;top:96px}
  .mail-frame iframe{height:calc(100vh - 340px);height:calc(100dvh - 340px);
    min-height:420px}
}
.widths{display:inline-flex;gap:4px;padding:4px;border-radius:999px;
  background:hsl(var(--muted));margin-left:auto}
/* ⚠️ LONGHANDS: `inherit` in the family slot of the `font:` shorthand voids
   the whole declaration, taking the size and weight with it. A bare
   `font:inherit` is fine and is a different thing. */
.widths button{border:0;background:transparent;cursor:pointer;
  font-family:inherit;font-weight:600;font-size:13.5px;line-height:1;
  color:hsl(var(--muted-foreground));
  padding:8px 14px;border-radius:999px;
  transition:transform .22s var(--spring,cubic-bezier(.2,.9,.3,1.4))}
/* A segment squeezes like a chip (`views.CSS`, the press for every control). */
.widths button:active{transform:scale(.95);transition-duration:var(--t-tap)}
.widths button[aria-pressed=true]{background:hsl(var(--card));
  color:hsl(var(--foreground));box-shadow:0 1px 3px hsl(var(--foreground)/.12)}
/* Under 900px the frame IS a phone; a desk-or-phone switch says nothing. */
@media (max-width:900px){.widths{display:none}}
/* The settings column is about 420px beside the preview: one field a row
   there, and the address in the first row at the size of text, not of the
   counts the column's other rows carry. */
.sec-row .count.addr b{font-size:13.5px;font-weight:600;
  color:hsl(var(--muted-foreground));letter-spacing:0}
@media (min-width:1240px){.mail-fields{grid-template-columns:minmax(0,1fr)}}
/* The inbox line: subject and preheader, drawn as a mail list draws it.
   The preheader is the one string that is written for people who will not
   open the message, so it is worth showing outside the message. */
.inbox{border:1px solid hsl(var(--border));border-radius:14px;
  padding:14px 16px;background:hsl(var(--card));display:grid;
  grid-template-columns:40px minmax(0,1fr);gap:2px 12px}
.inbox .av{grid-row:1 / span 3;width:40px;height:40px;border-radius:12px;
  background:hsl(var(--foreground));color:hsl(var(--background));
  display:grid;place-items:center;font-weight:700;font-size:15px}
.inbox .from{font-size:13.5px;font-weight:600}
.inbox .subj{font-weight:700;font-size:15px;letter-spacing:-.01em;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inbox .pre{font-size:13.5px;color:hsl(var(--muted-foreground));
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.mail-log{display:grid;grid-template-columns:auto 1fr auto;gap:12px;
  align-items:baseline;padding:12px 16px;border-bottom:1px solid hsl(var(--border))}
.mail-log:last-child{border-bottom:0}
.mail-log .when{font-size:13.5px;color:hsl(var(--muted-foreground));
  white-space:nowrap;font-variant-numeric:tabular-nums}
.mail-log .subj{font-size:15px}
.mail-log .subj span{display:block;font-size:13.5px;
  color:hsl(var(--muted-foreground))}

.send-test{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end}
/* An extra class rather than a descendant selector on the shared form
   wrapper. The consistency test treats any mention of that primitive in
   a page sheet as a redeclaration, and it is right to: a descendant
   override is how a shared control stops being shared. */
.send-test .grow{margin:0;flex:1 1 260px}
/* ⚠️ TEXT, NOT AN INPUT, AND THAT IS THE FIX. This was an editable address
   field, so any signed-in account could have the server send a message
   carrying our branding, domain, SPF and DKIM to anywhere on the internet.
   The recipient is the account's own address now and is never read from the
   request; see `routes_app.email_test`. */
.test-to{margin:0;font-size:15px;line-height:1.5;
  color:hsl(var(--muted-foreground))}
.test-to b{color:hsl(var(--foreground));font-weight:600}

@media (max-width:640px){
  .sec-row{gap:10px}
  .sec-row .count{display:flex;gap:6px;align-items:baseline}
  .sec-row .count.addr{grid-column:1;grid-row:2}
  .mail-frame{padding:8px}
}

/* ---------- the guided tour: the demo AND the application ---------- */
/* ⚠️ THE SAME BOX AS `.theme-toggle`, on purpose and not by coincidence.
   These two sit next to each other and are the bar's utility controls: 34px,
   9px radius, hairline, card ground, muted ink. Giving the tour its own
   geometry would put three different button shapes in a four-control bar.
   The one thing it does NOT copy is `.cop-open`'s fill -- see `launcher()`.
   Not re-declaring `.theme-toggle` itself: this sheet is injected after BASE
   and would silently win the cascade, which is the defect
   `tests/test_consistency.py` exists to catch. */
.tour-dock{position:fixed;right:16px;bottom:16px;z-index:80;display:flex;gap:8px;
  align-items:center}
.tour-card{position:fixed;right:16px;bottom:16px;z-index:81;
  width:min(370px,calc(100vw - 32px));
  background:hsl(var(--card));border:1px solid hsl(var(--border));border-radius:12px;
  box-shadow:var(--shadow-lg);padding:16px 20px}
.tour-card h3{font-size:17px;margin:0 0 6px}
.tour-card p{margin:0 0 8px;font-size:15px;line-height:1.55;
  color:hsl(var(--muted-foreground))}
.tour-card p b{color:hsl(var(--foreground))}
.tour-card .tour-of{font-size:11px;letter-spacing:.06em;text-transform:uppercase;
  color:hsl(var(--muted-foreground));font-weight:600;margin-bottom:4px;display:block}
.tour-card .tour-btns{display:flex;gap:8px;align-items:center;margin-top:12px}
/* ⚠️ `font-family:inherit`, BECAUSE A BUTTON DOES NOT INHERIT ONE. Chrome's
   UA stylesheet sets `font: 400 13.333px Arial` on `<button>`, and only
   controls carrying `.btn` are saved by its own inherit. Measured across 18
   rendered screens: this was Arial on 16 of them, nine instances each -- the
   only non-Inter text in the signed-in product. */
.tour-card .tour-btns .tour-skip{margin-left:auto;font-family:inherit;
  font-size:13.5px;
  color:hsl(var(--muted-foreground));background:none;border:0;cursor:pointer;
  text-decoration:none}
/* ⚠️ THE WAY OUT WAS 16px TALL, AND ON A PHONE IT IS THE ONLY ONE.
   `Nazaj` and `Naprej` carry `.btn`, which `theme.BASE` gives a 44px floor
   on a coarse pointer; this is a bare button and is excluded from that on
   purpose (`button.link` is a word in a sentence). Measured at 390px:
   73x16 against its two neighbours' 44. Escape closes the tour and a phone
   has no Escape, so a reader who wanted out had a 16px target or nothing. */
@media (pointer:coarse){
  .tour-card .tour-btns .tour-skip{min-height:44px;
    display:inline-flex;align-items:center}
}
/* The spotlight is an outline, never a full-page scrim: a scrim hides the
   screen the step is about, which is the one thing the visitor came to see.

   ⚠️ AND FOR A WHILE THAT COMMENT DESCRIBED SOMETHING THIS RULE DID NOT DO.
   It carried `box-shadow:0 0 0 9999px hsl(var(--foreground)/.10)`, and a
   9999px spread IS a full-page scrim -- the sentence above and the
   declaration under it disagreed, which `CLAUDE.md` names as its own defect
   shape. Reported by the user as the guided tour "switching to dark mode".
   Measured in light theme at 1024x740: the page ground went (247,247,248) to
   (223,224,225) and the white rail to (231,232,232), a 24-level wash over
   everything. The theme never changed -- `data-theme` stayed `light` -- but
   a near-black veil across the whole screen is indistinguishable from one.

   ⚠️ It also inverted with the theme, which is the deeper fault: the tint is
   `--foreground`, so in DARK mode the same rule paints a WHITE veil and
   lightens the page. A highlight must not be made of the ink colour.

   What replaces it is emphasis on the target instead of suppression of
   everything else: a bounded halo in `--primary`, which reads the same in
   both themes and touches nothing outside the element. */
.tour-lit{position:relative;z-index:2;outline:2px solid hsl(var(--primary));
  outline-offset:5px;border-radius:10px;
  box-shadow:0 0 0 6px hsl(var(--primary)/.14);
  /* ⚠️ THE ANCHOR IS USUALLY A WHOLE REGION, NOT A CONTROL, and on a phone
     that is the difference between a tour and a shrug. `feed` is the entire
     `.trow-list` and measured **4685px** tall on `/ujemanja`; `izjava` is the
     ten-question declaration at 1845px. Both are the right things to point
     at -- the step describes the region -- and both are far taller than an
     844px screen.
     `scrollIntoView` asked to centre, which centres the MIDDLE of that, so
     tour landed 1928px INTO the feed: rows with no heading, no first row and
     no context. The script asks for `start` now, and this is the room the
     sticky topbar needs (72px desktop, 64px phone) plus air, so the top of
     the described thing lands under the chrome rather than behind it. Same
     number as `.content [id]` in `views.CSS`, for the same reason. */
  scroll-margin-top:96px}
@media (max-width:900px){
  /* ⚠️ NOTHING FLOATS OVER THE CONTENT ON A PHONE. CLAUDE.md already made
     back-to-top `display:none` under 900px for this reason, and the tour
     dock walked straight into it: a pill sitting on the last band of the
     overview, on a 390px screen where every pixel is content. The bar at the
     top of every demo screen is already there, so the way in goes there. */
  .tour-dock{display:none}
  /* ⚠️ ABOVE THE TAB BAR, not on it. The card was written when the phone
     had no bottom navigation; adding one put 45px of card over it, so the
     tour covered the way out of the tour.
     ⚠️ AND THE NUMBER DRIFTED. This said "53px of bar plus a gap" and set
     72px, which was 53 + 19. The tabs went to 62px on 2026-08-31 (`CLAUDE.md`
     records the argument: 44 is the floor for a control you aim at ONCE, and
     these are tapped all evening), so the gap silently became 9px against a
     63px bar and the card read as resting on the navigation. 63 + 19. */
  .tour-card{right:8px;left:8px;width:auto;
    bottom:calc(82px + env(safe-area-inset-bottom))}
}

.demo-bar{background:hsl(var(--primary));color:hsl(var(--primary-foreground));
  padding:8px 0;font-size:13.5px}
.demo-bar .container{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.demo-bar b{font-weight:600}
.demo-bar span{opacity:.85}
.demo-bar a,.demo-bar button{color:inherit;font-weight:600;background:none;
  border:0;cursor:pointer;font-size:inherit;font-family:inherit}
.demo-bar a{margin-left:auto}
@media (max-width:900px){
  /* The bar is chrome on a screen that has 390px of it. Two lines, no
     third sentence, and the tour entry sits at the end of it. */
  .demo-bar{padding:8px 0;font-size:13.5px}
  .demo-bar .container{gap:4px 10px}
  .demo-bar .demo-long{display:none}
  /* ⚠️ THE FIRM'S NAME GOES, AND ONLY ON A PHONE. Measured at 390px: this
     strip wrapped to four lines and took ~105px off the top of EVERY
     signed-in screen -- on the one screen whose whole recent work was
     getting something actionable above the fold.
     What may not go is the claim: "izmišljeno podjetje" is the sentence that
     stops a visitor concluding the product invented a real profile, and it
     stays in full. The NAME is what goes, because it is redundant here --
     the greeting two lines below states it, and every screen carries it in
     the account chip. */
  .demo-bar .demo-firm{display:none}
  .demo-bar a{margin-left:0}
}
.demo-bar .demo-tour-link{font-weight:600;text-decoration:none}
@media (min-width:901px){.demo-bar .demo-tour-link{display:none}}
