/* PrepBuddy shared: System module (system): what the app shows by itself, over any screen, when the server or the version says so. 00 Update (the gate and
   its soft banner), 01 Maintenance (the break screen and the notice), 02 Agree again (the cover and its document cards). Tokens only; classes prefixed sy-.
   The cover is Settings' lock-screen recipe (.se-lock in settings.css, which each system page loads next to this file): the whole window in bg, a centred column,
   one quiet text button in the bottom safe area. This file adds only what the gates need on top of it: the wider column and the larger mark from 600 dp, the facts
   card, the live note line, and the agree screen's document cards and pinned actions. The banners are Notifications' permission banner (.nt-banner) with another
   tile and text. Flutter: SystemGate (a cover above the navigator, not a route), UpdateGate, BreakScreen, AgreeAgainScreen, SystemBanner. */

/* ---------- the gate: the lock cover with a wider column and a larger mark from 600 dp ---------- */
.sy-gate .se-lock-col { gap: 8px; }
.sy-gate h1, .sy-gate .se-lock-col p { max-width: 100%; overflow-wrap: anywhere; }   /* a long word (a Tamil title at 1.43 text on a 320 dp phone) breaks instead of being clipped by the scrolling column */
.sy-gate .se-gate-go { align-self: center; }
.sy-gate .se-lock-out { align-self: center; }
@media (min-width: 600px) {
  .sy-gate .se-lock-col { max-width: 480px; gap: 12px; }
  .sy-gate .pb-logo { width: 96px; height: 96px; margin-bottom: 16px; }
  .sy-gate h1 { font-size: calc(28px * var(--font-scale)); }
  .sy-gate .se-lock-col p { font-size: calc(16px * var(--font-scale)); }
}

/* the facts card (This version, Newest): key-value rows (.py-kv, shared) on the surface */
.sy-facts { align-self: stretch; margin-top: 16px; padding: 4px 16px; text-align: start; }

/* the note line under the text: what is happening or what went wrong; a live region, calm (info) or an error; empty it takes no room */
.sy-note { margin: 8px 0 0; display: flex; align-items: flex-start; justify-content: center; gap: 8px; text-align: start; font-size: calc(13px * var(--font-scale)); font-weight: 600; line-height: 1.5; color: var(--text-secondary); }
.sy-note:empty { display: none; }
.sy-note .mi { flex-shrink: 0; font-size: 18px; margin-top: 1px; }
.sy-note.err { color: var(--error-text); }
.sy-note.warn { color: var(--warning-text); }
.sy-note .spinner { flex-shrink: 0; margin-top: 2px; }

/* ---------- 02 Agree again: the document cards in a column that starts at the top, and the actions pinned to the bottom ---------- */
.sy-agree { justify-content: flex-start; padding-bottom: 0; overflow: hidden; }   /* the cover does not scroll: the column does, so the actions never cover a card */
.sy-agree .se-lock-col { flex: 1 1 auto; min-height: 0; overflow: auto; justify-content: flex-start; max-width: 560px; padding-bottom: 8px; }   /* a phone: the documents at the top, the actions at the bottom in reach of the thumb */
.sy-agree .pb-logo { width: 56px; height: 56px; margin-bottom: 4px; }
.sy-docs { align-self: stretch; display: flex; flex-direction: column; gap: 12px; margin-top: 16px; text-align: start; }
.sy-doc { display: flex; flex-direction: column; gap: 12px; }
.sy-dh { display: flex; flex-direction: column; gap: 4px; }
.sy-dh span { font-size: calc(12px * var(--font-scale)); color: var(--text-secondary); }
.sy-sum { margin: 0; padding: 12px 16px; border-radius: 12px; border-inline-start: 3px solid var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); font-size: calc(14px * var(--font-scale)); line-height: 1.5; color: var(--text-primary); overflow-wrap: anywhere; }
.sy-lang { margin: 0; display: flex; align-items: flex-start; gap: 8px; font-size: calc(12px * var(--font-scale)); line-height: 1.5; color: var(--text-secondary); }
.sy-lang .mi { flex-shrink: 0; font-size: 16px; margin-top: 1px; color: var(--info-text); }
.sy-doc .link { align-self: flex-start; margin-inline-end: 0; padding: 0; }
.sy-act { align-self: stretch; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 560px; width: 100%; margin: 0 auto; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--bg); box-sizing: border-box; }
.sy-act .btn { width: 100%; }
.sy-act .link { margin-inline-end: 0; }
/* from 600 dp the column and its actions sit together in the middle of the window (auto margins, so a long document still scrolls from its top) */
@media (min-width: 600px) { .sy-agree .se-lock-col { flex: 0 1 auto; margin-top: auto; } .sy-agree .pb-logo { width: 64px; height: 64px; } .sy-act { margin-bottom: auto; } .sy-act .btn { width: auto; min-width: 240px; } }

/* ---------- the banners on Today: a notice from the server (Notifications' permission banner with another tile) ---------- */
.sy-banner { margin-bottom: 12px; }
.sy-banner .tbtn { flex-shrink: 0; }

/* ---------- the pages that draw a banner or a screen under a gate show a stand-in for the rest of Today (a sample, never a screen of its own) ---------- */
.sy-stub { display: flex; flex-direction: column; gap: 12px; }
.sy-stub .card:nth-child(1) { min-height: 132px; } .sy-stub .card:nth-child(n+2) { min-height: 96px; }
@media (prefers-reduced-motion: reduce) { .sy-gate { transition: none; } }
