/* ONE set of buttons for the whole site and the app (job S3-02, 19 Nov 2026). Every pupil page loads this file last
   in its head, so the look of a button is written here and nowhere else (test u106).

   A button is <button class="sv-btn sv-main"> (or an <a> with the same classes) and is one of three kinds:
     sv-main    the one action of the moment: solid house brown, white words (the front door's "Get started");
     sv-second  another real choice beside it: the card's fill, a line round it, ink words (the front door's "Sign in");
     sv-quiet   a way back or aside (Back, Skip for now, Forgot your password?): no line, never underlined, a soft tint
                behind its words so it reads as a button.
   sv-icon makes any of them a square of one tap (a close cross, a minus, a plus); sv-wide fills its row; sv-big is
   the one big action of a whole screen (the app's front door, the account forms).
   Every button is 44px high or more (48px on a touch screen) with 8px or more to the next; the corners are the site's
   (--sv-radius), never a pill; the words carry no arrows. A page's own stylesheet may say WHERE a button sits (width,
   margin, flex, order) but not how it looks. Dark mode (body.dark-mode) turns the main button to sand with dark words,
   as the dashboard's dark mode already did. */
:root{
  --sv-main:#5b4632; --sv-main-hover:#4b3928; --sv-main-ink:#fff;
  --sv-card:#fffdf8; --sv-ink:#2d2a26; --sv-line:#d5c9b3; --sv-line-hover:#b9a98c;
  --sv-quiet-ink:#5b4632; --sv-tint:rgba(91,70,50,.07); --sv-tint-hover:rgba(91,70,50,.13);
  --sv-radius:8px; --sv-tap:44px;
  --sv-font:'Schibsted Grotesk',system-ui,-apple-system,'Segoe UI',sans-serif;
}
@media (pointer:coarse){ :root{ --sv-tap:48px; } }
body.dark-mode{
  --sv-main:#c9b48f; --sv-main-hover:#d8c6a5; --sv-main-ink:#1c1a18;
  --sv-card:transparent; --sv-ink:#f0ebe4; --sv-line:#5c5650; --sv-line-hover:#857d73;
  --sv-quiet-ink:#e2d3b8; --sv-tint:rgba(255,255,255,.07); --sv-tint-hover:rgba(255,255,255,.13);
}

/* where a button sits is the page's to say: these have no weight, so any page rule for display, margin or padding wins */
:where(.sv-btn){ display:inline-flex; margin:0; padding:.55rem 1.2rem; gap:.5em; }
/* how it looks: :is(...) gives this the weight of an element and a class, so a page's plain link rule (.page a) does not win */
:is(button, a, input, label).sv-btn{
  align-items:center; justify-content:center; box-sizing:border-box;
  min-height:var(--sv-tap); min-width:var(--sv-tap);
  border:1.5px solid transparent; border-radius:var(--sv-radius);
  font-family:var(--sv-font); font-size:1rem; font-weight:650; line-height:1.2; letter-spacing:0;
  text-align:center; text-decoration:none; text-transform:none; white-space:normal; text-wrap:balance;
  cursor:pointer; -webkit-tap-highlight-color:transparent; user-select:none;
  transition:background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.sv-btn[hidden]{ display:none !important; }
.sv-btn:focus-visible{ outline:3px solid color-mix(in srgb,var(--sv-main) 55%,transparent); outline-offset:2px; }
.sv-btn:disabled, .sv-btn[aria-disabled="true"]{ opacity:.45; cursor:default; }

.sv-btn.sv-main{ background:var(--sv-main); border-color:var(--sv-main); color:var(--sv-main-ink);
  box-shadow:inset 0 -2px 0 rgba(0,0,0,.22); }
.sv-btn.sv-main:hover:not(:disabled){ background:var(--sv-main-hover); border-color:var(--sv-main-hover); }
.sv-btn.sv-main:active:not(:disabled){ box-shadow:inset 0 1px 2px rgba(0,0,0,.3); }

.sv-btn.sv-second{ background:var(--sv-card); border-color:var(--sv-line); color:var(--sv-ink);
  box-shadow:inset 0 -2px 0 rgba(0,0,0,.05); }
.sv-btn.sv-second:hover:not(:disabled){ border-color:var(--sv-line-hover); }
.sv-btn.sv-second:active:not(:disabled){ box-shadow:inset 0 1px 2px rgba(0,0,0,.12); }

.sv-btn.sv-quiet{ background:var(--sv-tint); border-color:transparent; color:var(--sv-quiet-ink); font-weight:600; }
.sv-btn.sv-quiet:hover:not(:disabled), .sv-btn.sv-quiet:active:not(:disabled){ background:var(--sv-tint-hover); }

/* no arrows on a button: the arrow a page script adds beside a link's words (js/reader-skin.js) stays off a button */
.sv-btn .nav-arrow{ display:none; }

/* a square of one tap: a close cross, a minus, a plus. Its drawing (an svg or a character) sits in the middle */
.sv-btn.sv-icon{ width:var(--sv-tap); height:var(--sv-tap); padding:0; flex:none; font-size:1.25rem; line-height:1; }
.sv-btn.sv-icon svg{ width:20px; height:20px; }

/* the one big action of a whole screen: the app's front door, and the account forms, whose fields are as tall */
.sv-btn.sv-big{ min-height:56px; font-size:1.1rem; }

/* a button that fills its row (a bar at the foot, a card's one action) */
.sv-btn.sv-wide{ display:flex; width:100%; }

/* in the bar at the foot of a phone screen (css/bar.css, job S3-03) every button is the big size, as practice's were */
@media (max-width:600px){ .sv-bar .sv-btn{ min-height:56px; font-size:1.1rem; } }
/* a small phone (380px and less): the words a little smaller, so two buttons side by side keep their words on one line */
@media (max-width:380px){ .sv-bar .sv-btn{ font-size:1rem; padding-inline:.5rem; } }

/* ==== The night look's colours (job S6-01, 20 Nov 2026) ====
   ONE place for the ground of the night look: a dark walnut taken from the painted shelf, the lamp's shadows and the
   radio. It was a neutral charcoal (#181614, #211f1c, #36332e), which Tom called "very grey". Each page's night tokens
   read these, so the night is one line to change. --sv-night-wall: the tint the front door's painted wall is multiplied
   by at night (it was a blue-grey, rgb(128,133,153)). */
:root{
  --sv-night-page:#1b1510; --sv-night-card:#251d16; --sv-night-line:#3d3127; --sv-night-linel:#30261d;
  --sv-night-ink:#efe7da; --sv-night-sec:#bdb09f; --sv-night-mut:#928472;
  --sv-night-wall:rgb(104,86,72);
}
