/* =========================================================
   Seat Grab — "Midnight Purple"

   Structure
     1.  Typeface
     2.  Tokens          type / space / radius / colour / layout
     3.  Reset + base
     4.  Utilities
     5.  Ambient background + surfaces
     6.  Navigation
     7.  Buttons + form controls
     8.  Home: hero, phone mockup
     9.  Schedule grid (home preview + builder)
     10. Home: timeline
     11. Footer
     12. Auth
     13. Pricing / FAQ / legal
     14. Dashboard
     15. Builder page
     16. Banners, modals, popups
     17. Dawson + enable-alerts
     18. Mobile
     19. Reduced motion

   Everything below draws from the scales in §2. Sizes, spacing and
   radii are token references, not one-off values — that is the whole
   point of the file.
   ========================================================= */

/* =========================================================
   1. Typeface
   ========================================================= */

/* Inter v4, variable, self-hosted and subset to Latin. One file carries
   weights 100-900 and the optical-size axis, so headings get the tighter
   display cut automatically via font-optical-sizing. */
@font-face {
    font-family: 'InterVar';
    src: url('fonts/InterVariable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    font-named-instance: 'Regular';
}

/* =========================================================
   2. Tokens
   ========================================================= */

:root {
    /* Tells the UA to paint scrollbars, form controls, date/time pickers
       and autofill in dark. Without it Chrome/Safari draw a white
       scrollbar track down the side of every page. */
    color-scheme: dark;

    /* --- Type ------------------------------------------------
       Nine steps. Nothing below --fs-xs (12px) is legible at arm's
       length on a phone, so nothing below it exists. */
    --font-sans: 'InterVar', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

    --fs-xs:    0.75rem;    /* 12 — meta, labels, legal fine print */
    --fs-sm:    0.8125rem;  /* 13 — secondary UI text */
    --fs-base:  0.875rem;   /* 14 — dense UI, list rows */
    --fs-md:    0.9375rem;  /* 15 — body copy in app surfaces */
    --fs-lg:    1.0625rem;  /* 17 — lead paragraphs, card titles */
    --fs-xl:    1.25rem;    /* 20 — section subheads */
    --fs-2xl:   1.5rem;     /* 24 — card headings */
    --fs-3xl:   2rem;       /* 32 — page titles */
    --fs-4xl:   2.5rem;     /* 40 — section titles */

    /* Fluid display sizes for the two places that need to be loud. */
    --fs-hero:    clamp(2.25rem, 1.1rem + 4.6vw, 4.25rem);
    --fs-section: clamp(1.75rem, 1.1rem + 2.4vw, 2.75rem);

    --lh-tight:  1.1;
    --lh-snug:   1.3;
    --lh-normal: 1.55;
    --lh-relaxed: 1.7;

    /* Optical tracking. Large type needs negative tracking to stop
       looking loose; small caps-y labels need positive. */
    --tr-display: -0.032em;
    --tr-tight:   -0.018em;
    --tr-normal:  -0.006em;
    --tr-label:    0.08em;

    /* --- Space ------------------------------------------------
       A 4px grid. Every margin, padding and gap in this file is one
       of these. */
    --s-1: 0.25rem;   /* 4  */
    --s-2: 0.5rem;    /* 8  */
    --s-3: 0.75rem;   /* 12 */
    --s-4: 1rem;      /* 16 */
    --s-5: 1.25rem;   /* 20 */
    --s-6: 1.5rem;    /* 24 */
    --s-8: 2rem;      /* 32 */
    --s-10: 2.5rem;   /* 40 */
    --s-12: 3rem;     /* 48 */
    --s-16: 4rem;     /* 64 */
    --s-20: 5rem;     /* 80 */

    /* --- Radius ----------------------------------------------- */
    --r-xs:   6px;
    --r-sm:   8px;
    --r-md:  12px;
    --r-lg:  16px;
    --r-xl:  24px;
    --r-full: 999px;

    /* --- Layout -----------------------------------------------
       Two rails, not ten. Marketing pages and the footer sit on
       --w-wide; app and reading pages sit on --w-app; single cards
       sit on --w-narrow. */
    --w-wide:   1120px;
    --w-app:     880px;
    --w-narrow:  460px;
    --w-builder: 1440px;

    --gutter: var(--s-6);          /* page side padding, desktop */
    --gutter-sm: var(--s-5);       /* page side padding, mobile   */
    --nav-h: 68px;                 /* fixed top bar height        */
    --tabbar-h: 64px;              /* fixed mobile bottom bar     */

    /* --- Colour ------------------------------------------------ */
    --bg-dark:  #07030A;
    --bg-raised: #0E0715;

    --text-main:  #FFFFFF;
    --text-muted: #A9B1BD;      /* AA on --bg-dark */
    --text-faint: #7C8593;      /* smallest print, still >= 4.5:1 */

    /* Layered surfaces — depth comes from stacking these, not from
       giving every element its own outlined box. */
    --surface-1: rgba(255, 255, 255, 0.028);
    --surface-2: rgba(255, 255, 255, 0.055);
    --surface-3: rgba(255, 255, 255, 0.085);
    --surface-sunken: rgba(0, 0, 0, 0.32);
    --surface-dark: rgba(25, 10, 35, 0.4);
    --hairline: rgba(255, 255, 255, 0.07);
    --hairline-strong: rgba(255, 255, 255, 0.13);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Brand. Two hues, one gradient — everything accent-coloured in
       the product comes from these. */
    --purple-light: #C084FC;
    --purple-main:  #9333EA;
    --purple-deep:  #581C87;
    --accent-magenta: #D946EF;
    --brand-gradient: linear-gradient(135deg, var(--purple-main), var(--accent-magenta));
    --brand-tint:      rgba(147, 51, 234, 0.16);
    --brand-tint-strong: rgba(147, 51, 234, 0.30);
    --brand-ring:      rgba(192, 132, 252, 0.55);

    /* State. These three are reserved for state and appear nowhere
       decorative — that is what keeps them readable as state. */
    --green: #4ade80;
    --red:   #f87171;
    --amber: #fbbf24;

    /* Schedule block category tints. Multi-hue on purpose — they
       identify courses — but all at one saturation and alpha so the
       grid reads as one object. */
    --cat-purple: #C084FC;
    --cat-cyan:   #22D3EE;
    --cat-green:  #4ade80;
    --cat-amber:  #facc15;
    --cat-magenta:#D946EF;
    --cat-blue:   #60a5fa;
    --cat-red:    #f87171;
    --cyan: var(--cat-cyan);   /* legacy alias */

    /* --- Elevation --------------------------------------------- */
    --shadow-sm:   0 1px 2px rgba(0, 0, 0, 0.45);
    --shadow-md:   0 2px 4px rgba(0, 0, 0, 0.35), 0 8px 24px -10px rgba(0, 0, 0, 0.65);
    --shadow-lift: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.7);
    --shadow-pop:  0 24px 60px -12px rgba(0, 0, 0, 0.8);

    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --dur-fast: 0.15s;
    --dur: 0.22s;

    /* Schedule grid geometry — one row = 30 minutes */
    --row-h: 32px;
    --col-gap: 6px;
    --time-col-w: 56px;
}

/* =========================================================
   3. Reset + base
   ========================================================= */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--nav-h) + var(--s-4));
}

body {
    font-family: var(--font-sans);
    font-optical-sizing: auto;
    font-synthesis-weight: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-size: var(--fs-md);
    line-height: var(--lh-normal);
    letter-spacing: var(--tr-normal);
    overflow-x: hidden;
    position: relative;
    /* Sticky footer: pages shorter than the viewport put the footer at
       the bottom instead of leaving a field of empty black above it. */
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

body > main { flex: 1 0 auto; }
body > footer, body > .site-footer { flex-shrink: 0; }

/* Headings inherit the display cut of Inter and tighten as they grow. */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: var(--lh-tight);
    letter-spacing: var(--tr-tight);
    text-wrap: balance;
}
h1 { font-size: var(--fs-3xl); letter-spacing: var(--tr-display); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }

p { text-wrap: pretty; }

a { color: inherit; }

img, svg { max-width: 100%; }

input, button, textarea, select { font: inherit; letter-spacing: inherit; }

/* =========================================================
   4. Utilities
   ========================================================= */

.hidden { display: none !important; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Numbers that change in place shouldn't reflow the text around them. */
.tabular { font-variant-numeric: tabular-nums; }

/* One eyebrow treatment, used by every uppercase micro-label. */
.section-subtitle,
.group-head,
.section-label,
.stat-strip dt,
.tracker-setup h2 {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: var(--tr-label);
    text-transform: uppercase;
}

/* --- Focus visibility --- */
:focus-visible {
    outline: 2px solid var(--brand-ring);
    outline-offset: 2px;
    border-radius: var(--r-xs);
}
.primary-btn:focus-visible,
.nav-btn:focus-visible { outline-color: #fff; }
.search-box input:focus-visible,
.input-group input:focus-visible,
.time-form select:focus-visible,
.time-form input[type="time"]:focus-visible { outline-offset: -1px; }

.skip-link {
    position: absolute; left: var(--s-4); top: -100px; z-index: 100000;
    background: var(--purple-main); color: #fff; padding: var(--s-3) var(--s-5);
    border-radius: 0 0 var(--r-md) var(--r-md); text-decoration: none; font-weight: 700;
    transition: top var(--dur) ease;
}
.skip-link:focus { top: 0; }

/* --- Scrollbars ------------------------------------------
   Firefox gets the two-value shorthand; WebKit/Blink get the
   pseudo-elements. Both are needed — neither covers the other. */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(192, 132, 252, 0.35) transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(192, 132, 252, 0.22);
    border-radius: var(--r-full);
    border: 3px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(192, 132, 252, 0.45); background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* =========================================================
   5. Ambient background + surfaces
   ========================================================= */

/* The orbs are fixed and cover the viewport, so no page can produce a
   hard horizontal seam where a section's own gradient stops. */
.ambient-bg {
    position: fixed;
    inset: 0;
    width: 100%;              /* 100vw overflowed by the scrollbar width */
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background-color: var(--bg-dark);
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.3;
    animation: float 24s infinite alternate ease-in-out;
    will-change: transform;
}

.orb-1 { width: 640px; height: 640px; background: radial-gradient(circle, var(--purple-main) 0%, transparent 68%); top: -14%; left: -10%; }
.orb-2 { width: 540px; height: 540px; background: radial-gradient(circle, var(--purple-deep) 0%, transparent 68%); bottom: -18%; right: -12%; animation-delay: -6s; }
.orb-3 { width: 420px; height: 420px; background: radial-gradient(circle, var(--accent-magenta) 0%, transparent 70%); top: 34%; left: 42%; transform: translateX(-50%); animation-delay: -12s; opacity: 0.12; }

@keyframes float { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(30px, 50px) scale(1.1); } }

/* --- Glass surfaces --- */
.glass-panel, .glass-nav {
    background: var(--surface-dark);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
}

/* --- Shared page rails -----------------------------------
   Every page-level container resolves to one of three widths. */
.page-wrapper,
.app-wrapper,
.auth-page-wrapper {
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--gutter);
    padding-block: calc(var(--nav-h) + var(--s-12)) var(--s-16);
}
.page-wrapper { max-width: var(--w-app); display: flex; flex-direction: column; }
.app-wrapper  { max-width: var(--w-app); display: flex; flex-direction: column; gap: var(--s-8); }
.auth-page-wrapper { max-width: var(--w-narrow); display: flex; flex-direction: column; justify-content: center; }

.pricing-container,
.faq-container,
.legal-container { width: 100%; margin-inline: auto; }
.pricing-container { max-width: var(--w-narrow); }
.faq-container { max-width: 680px; }
.legal-container { max-width: 720px; }

/* =========================================================
   6. Navigation
   ========================================================= */

.glass-nav {
    position: fixed; top: 0; width: 100%; z-index: 100;
    border-top: none; border-left: none; border-right: none;
    box-shadow: none;
}

/* Three explicit columns, so the links are centred on the page rather
   than wherever space-between happens to leave them. */
.nav-container {
    max-width: var(--w-wide); margin: 0 auto;
    padding: var(--s-3) var(--gutter);
    min-height: var(--nav-h);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--s-4);
}
.nav-container > .logo { justify-self: start; }
.nav-container > .nav-links { justify-self: center; }
.nav-container > .nav-account { justify-self: end; }

.logo {
    font-size: var(--fs-xl); font-weight: 800; text-decoration: none;
    letter-spacing: -0.035em; color: var(--text-main);
    display: inline-flex; align-items: center; white-space: nowrap;
}
.logo-accent {
    background: linear-gradient(90deg, var(--purple-light), var(--accent-magenta));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; margin-left: 1px;
}

.nav-links { display: flex; gap: var(--s-2); align-items: center; }
.nav-links a {
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-muted); text-decoration: none;
    font-weight: 550; font-size: var(--fs-base);
    padding: var(--s-2) var(--s-3); border-radius: var(--r-sm);
    transition: color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.nav-links a:hover { color: var(--text-main); background: var(--surface-2); }
.nav-links a.active { color: var(--text-main); }
/* A quiet underline marks the current page — no filled pill competing
   with the one real call to action. */
.nav-links a.active:not(.nav-btn) { position: relative; }
.nav-links a.active:not(.nav-btn)::after {
    content: ''; position: absolute; left: var(--s-3); right: var(--s-3); bottom: 2px;
    height: 2px; border-radius: var(--r-full); background: var(--purple-light);
}

.nav-btn {
    background: var(--brand-gradient);
    padding: var(--s-2) var(--s-4); border-radius: var(--r-sm); color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.14); font-weight: 650;
    box-shadow: var(--shadow-sm);
}
.nav-btn:hover { background: var(--brand-gradient); }

/* First-paint nav hints. localStorage is only a cosmetic hint; the server
   re-checks auth and payment on every request. */
html[data-auth="out"] .nav-account { display: none !important; }
html[data-auth="in"] .nav-account { display: flex !important; }
html[data-auth="out"] .nav-links [data-nav-dashboard] { display: none !important; }
/* This rule outranks `.nav-links a`, so its display value is the one that
   applies. It was `inline`, which stopped the mobile tab bar from centring
   that one link — which is why "My Alerts" sat off the row's baseline.
   It has to match the display the links actually use. */
html[data-auth="in"] .nav-links [data-nav-dashboard] { display: inline-flex; }
html[data-auth="in"] .nav-links [data-cta] { display: none !important; }
html[data-auth="in"][data-paid="yes"] .nav-links [data-nav-pricing] { display: none !important; }

/* --- Account pill + menu --- */
.nav-account { position: relative; display: flex; align-items: center; }
.user-profile {
    display: flex; align-items: center; gap: var(--s-2);
    background: var(--surface-2); padding: 4px var(--s-3) 4px 4px;
    border-radius: var(--r-full); border: 1px solid var(--glass-border);
    transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease;
    cursor: pointer; font: inherit; color: inherit;
}
.user-profile:hover { background: var(--surface-3); border-color: var(--hairline-strong); }
.avatar {
    width: 30px; height: 30px; background: var(--brand-gradient); border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-weight: 650; font-size: var(--fs-base); color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.user-name { font-size: var(--fs-sm); font-weight: 600; color: var(--text-main); }
.status-indicator-text { font-size: var(--fs-xs); color: var(--text-faint); display: flex; align-items: center; gap: var(--s-1); font-weight: 500; }
.online-dot { width: 6px; height: 6px; background-color: var(--green); border-radius: 50%; box-shadow: 0 0 8px rgba(74, 222, 128, 0.6); flex-shrink: 0; }

.school-badge {
    margin-left: var(--s-2); padding: 2px var(--s-2); border-radius: var(--r-full);
    border: 1px solid var(--hairline-strong); background: var(--surface-2);
    color: var(--text-muted); font-size: var(--fs-xs); font-weight: 650;
    text-transform: uppercase; letter-spacing: var(--tr-label);
}

.profile-menu {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 200;
    min-width: 220px; padding: var(--s-1); border-radius: var(--r-md);
    background: rgba(18, 8, 26, 0.98);
    border: 1px solid var(--hairline-strong);
    box-shadow: var(--shadow-pop);
    display: flex; flex-direction: column;
}
.profile-menu-email {
    font-size: var(--fs-xs); color: var(--text-faint); padding: var(--s-2) var(--s-3) var(--s-3);
    border-bottom: 1px solid var(--hairline); margin-bottom: var(--s-1);
    overflow-wrap: anywhere;
}
.profile-menu a, .profile-menu button {
    display: block; width: 100%; text-align: left; padding: var(--s-2) var(--s-3);
    border-radius: var(--r-sm); font-size: var(--fs-base); font-weight: 550;
    color: var(--text-muted); text-decoration: none; background: transparent;
    border: none; cursor: pointer;
}
.profile-menu a:hover, .profile-menu button:hover { background: var(--surface-2); color: var(--text-main); }
.profile-menu-signout { color: var(--red) !important; }
.profile-menu-signout:hover { background: rgba(248, 113, 113, 0.12) !important; }

/* =========================================================
   7. Buttons + form controls
   ========================================================= */

.primary-btn, .secondary-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 var(--s-6); min-height: 46px;
    border-radius: var(--r-md);
    text-decoration: none; font-size: var(--fs-md); font-weight: 650;
    letter-spacing: var(--tr-normal); white-space: nowrap;
    cursor: pointer; transition: background var(--dur) ease, box-shadow var(--dur) ease, transform var(--dur) ease, border-color var(--dur) ease;
}
.primary-btn {
    background: var(--brand-gradient); color: #fff; border: none;
    box-shadow: var(--shadow-sm);
}
.primary-btn:hover { box-shadow: 0 6px 20px -6px rgba(147, 51, 234, 0.6); transform: translateY(-1px); }
.primary-btn:active { transform: translateY(0); }
.secondary-btn {
    background: var(--surface-1); color: var(--text-main);
    border: 1px solid var(--hairline-strong);
}
.secondary-btn:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, 0.2); }

/* .glow-effect is on most CTAs in the markup; the hover lift now lives
   on .primary-btn itself, so this only adds the halo. */
.glow-effect:hover { box-shadow: 0 0 28px rgba(147, 51, 234, 0.35), 0 6px 20px -6px rgba(147, 51, 234, 0.6); }

.full-width-btn { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 var(--s-4); font-size: var(--fs-base); }

.close-btn {
    background: transparent; border: 1px solid var(--glass-border); color: var(--text-muted);
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.close-btn svg { width: 12px; height: 12px; }
.close-btn:hover { color: var(--text-main); background: var(--surface-2); }

.text-btn {
    background: transparent; border: 0; color: var(--text-muted);
    padding: var(--s-2); font-size: var(--fs-base); cursor: pointer;
}
.text-btn:hover { color: var(--text-main); }

/* --- Text fields — one treatment everywhere --- */
.input-group { text-align: left; min-width: 0; }
.input-group label,
.input-group .input-label,
.school-choice .input-label {
    display: block; font-size: var(--fs-xs); font-weight: 650;
    letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--text-faint); margin-bottom: var(--s-2);
}
.input-group input,
.time-form select,
.time-form input[type="time"] {
    width: 100%; min-height: 46px; padding: 0 var(--s-3);
    background: var(--surface-sunken); border: 1px solid var(--hairline-strong);
    color: var(--text-main); border-radius: var(--r-md); font-size: var(--fs-md);
    outline: none;
    transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, background var(--dur-fast) ease;
}
.input-group input::placeholder { color: var(--text-faint); }
.input-group input:hover,
.time-form select:hover { border-color: rgba(255, 255, 255, 0.2); }
.input-group input:focus,
.time-form select:focus,
.time-form input[type="time"]:focus {
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.16);
    background: rgba(0, 0, 0, 0.45);
}
.field-hint { font-size: var(--fs-xs); color: var(--text-faint); margin-top: var(--s-2); }

/* --- Search box ------------------------------------------
   One bordered shell. The input inside is naked — it used to carry
   its own border, which drew a second box inside the first. */
.search-box {
    background: var(--surface-sunken); border: 1px solid var(--hairline-strong);
    border-radius: var(--r-md);
    padding: 0 var(--s-3); display: flex; align-items: center; gap: var(--s-2);
    min-height: 46px; width: 100%;
    transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.search-box:focus-within {
    border-color: var(--purple-light); background: rgba(0, 0, 0, 0.45);
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.16);
}
.search-box .search-icon {
    width: 16px; height: 16px; flex-shrink: 0; color: var(--text-faint);
    display: inline-flex; align-items: center; justify-content: center;
}
.search-box .search-icon svg { width: 100%; height: 100%; display: block; }
.search-box input {
    background: transparent; border: none; box-shadow: none; outline: none;
    color: var(--text-main); width: 100%; min-width: 0;
    font-size: var(--fs-md); min-height: 24px; padding: 0;
}
.search-box input:focus { background: transparent; box-shadow: none; border: none; }
.search-box input::placeholder { color: var(--text-faint); }
/* WebKit's own clear button is a light-blue blob that ignores the theme. */
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; cursor: pointer; opacity: 0.45;
    background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 4l8 8M12 4l-8 8' stroke='black' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 4l8 8M12 4l-8 8' stroke='black' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") center/contain no-repeat; }
.search-box input::-webkit-search-cancel-button:hover { opacity: 1; }

/* Inline status messages (replaces alert()) */
.form-status {
    font-size: var(--fs-base); padding: var(--s-3) var(--s-4);
    border-radius: var(--r-md); text-align: left;
}
.form-status.success { background: rgba(74, 222, 128, 0.12); border: 1px solid rgba(74, 222, 128, 0.35); color: var(--green); }
.form-status.info { background: var(--brand-tint); border: 1px solid rgba(192, 132, 252, 0.35); color: var(--purple-light); }
.form-status.warn { background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.35); color: var(--red); }

/* --- Segmented controls — one look for all three --- */
.tracker-tabs,
.auth-mode,
.preview-school-toggle,
.rev-tabs {
    display: inline-flex; gap: var(--s-1); padding: var(--s-1);
    background: var(--surface-sunken); border: 1px solid var(--hairline);
    border-radius: var(--r-full);
}
.tracker-tab,
.auth-mode-btn,
.preview-school-toggle button,
.rev-tab {
    padding: var(--s-2) var(--s-4); font-size: var(--fs-base); font-weight: 600;
    border-radius: var(--r-full); border: 1px solid transparent; background: transparent;
    color: var(--text-faint); cursor: pointer; white-space: nowrap; min-height: 34px;
    transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.tracker-tab:hover,
.auth-mode-btn:hover,
.preview-school-toggle button:hover,
.rev-tab:hover { color: var(--text-main); }
.tracker-tab[aria-selected="true"], .tracker-tab.is-active,
.auth-mode-btn.is-active,
.preview-school-toggle button.is-active,
.preview-school-toggle button[aria-pressed="true"],
.rev-tab.is-active {
    background: var(--brand-tint-strong);
    border-color: rgba(192, 132, 252, 0.4);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

/* A checkmark that uses the brand colour instead of importing a green
   that appears nowhere else in the product. */
.features-list li::before,
.status-check.is-done::before {
    content: ''; width: 1.05em; height: 1.05em; flex-shrink: 0;
    background-color: var(--purple-light);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* =========================================================
   8. Home: hero + phone mockup
   ========================================================= */

.hero {
    max-width: var(--w-wide); margin: 0 auto;
    padding: calc(var(--nav-h) + var(--s-16)) var(--gutter) var(--s-16);
}
.hero-container { display: flex; align-items: center; justify-content: space-between; gap: var(--s-16); }
.hero-content { flex: 1 1 54%; text-align: left; min-width: 0; }
.hero-visual { flex: 0 1 46%; display: flex; justify-content: center; align-items: center; perspective: 1000px; }

.badge {
    display: inline-flex; align-items: center; gap: var(--s-2);
    padding: var(--s-2) var(--s-4); border-radius: var(--r-full);
    font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted);
    margin-bottom: var(--s-6); box-shadow: none;
}
.live-dot { width: 7px; height: 7px; background-color: var(--purple-light); border-radius: 50%; box-shadow: 0 0 10px var(--purple-light); flex-shrink: 0; }

.hero h1 {
    font-size: var(--fs-hero); font-weight: 780; line-height: 1.03;
    letter-spacing: var(--tr-display); margin-bottom: var(--s-5);
    /* Keeps "up." from being orphaned on its own line. */
    text-wrap: balance;
}
.highlight {
    background: linear-gradient(90deg, var(--purple-light), var(--accent-magenta));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    /* The gradient clip crops descenders on some builds without this. */
    padding-bottom: 0.06em;
}
.hero p {
    font-size: var(--fs-lg); color: var(--text-muted); line-height: var(--lh-normal);
    max-width: 46ch; margin-bottom: var(--s-8);
}
.hero-actions { display: flex; gap: var(--s-3); justify-content: flex-start; flex-wrap: wrap; }
.hero-actions .primary-btn,
.hero-actions .secondary-btn { padding: 0 var(--s-8); min-height: 52px; font-size: var(--fs-lg); }

/* Reassurance chips */
.hero-chips {
    list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2);
    margin-top: var(--s-8); padding: 0;
}
.hero-chips li {
    display: inline-flex; align-items: center; gap: var(--s-2);
    font-size: var(--fs-sm); font-weight: 550; color: var(--text-muted);
    background: var(--surface-1);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-full); padding: var(--s-2) var(--s-3);
}
.hero-chips li::before {
    content: ''; width: 5px; height: 5px; border-radius: 50%;
    background: var(--purple-light); box-shadow: 0 0 8px var(--purple-light);
    flex-shrink: 0;
}

/* --- iPhone Mockup --- */
.iphone-mockup {
    width: 290px; height: 590px; border-radius: 48px; background: #1C1C1E;
    border: 4px solid #3A3A3C;
    box-shadow: inset 0 0 4px rgba(255,255,255,0.2), 0 40px 80px rgba(88, 28, 135, 0.35);
    position: relative; transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.6s var(--ease);
    flex-shrink: 0;
}
.iphone-mockup:hover { transform: rotateY(0deg) rotateX(0deg) translateY(-10px); }

.hw-btn { position: absolute; background: #444; border: 1px solid #222; }
.action-btn-hw { left: -6px; top: 110px; width: 6px; height: 20px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; border-right: none;}
.vol-up-btn { left: -6px; top: 145px; width: 6px; height: 45px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; border-right: none;}
.vol-down-btn { left: -6px; top: 205px; width: 6px; height: 45px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; border-right: none;}
.power-btn { right: -6px; top: 160px; width: 6px; height: 70px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-left: none;}

.iphone-frame { width: 100%; height: 100%; background: black; border-radius: 44px; border: 6px solid #000; position: relative; overflow: hidden; }
.dynamic-island { width: 90px; height: 28px; background: #000; border-radius: 20px; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 20; }

.iphone-screen {
    width: 100%; height: 100%; position: relative; display: flex; flex-direction: column;
    background: linear-gradient(to bottom, rgba(10,10,10,0.2) 0%, rgba(10,10,10,0.7) 100%), #150a1f url('wallpaper.jpeg') center/cover no-repeat;
}

.ios-status-bar { display: flex; justify-content: space-between; align-items: center; padding: 13px 14px 0 14px; z-index: 10; }
.status-left { display: flex; align-items: center; gap: 3px; }
.carrier-text { color: white; font-size: 9px; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.silent-icon { width: 9px; height: 9px; color: rgba(255, 255, 255, 0.8); }
.status-right { display: flex; align-items: center; gap: 4px; }
.signal-bars { display: flex; align-items: flex-end; gap: 2px; height: 8px; }
.signal-bars .bar { width: 2.5px; background: rgba(255, 255, 255, 0.35); border-radius: 1px; }
.signal-bars .bar:nth-child(1) { height: 3px; } .signal-bars .bar:nth-child(2) { height: 4.5px; } .signal-bars .bar:nth-child(3) { height: 6px; } .signal-bars .bar:nth-child(4) { height: 8px; }
.signal-bars .bar.active { background: white; }
.network-text { color: white; font-size: 9px; font-weight: 700; }
.battery-container { display: flex; align-items: center; }
.battery-body { width: 18px; height: 9px; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 3px; padding: 1px; display: flex; }
.battery-fill { width: 88%; background: white; border-radius: 1px; }
.battery-tip { width: 1.5px; height: 3px; background: rgba(255, 255, 255, 0.5); border-radius: 0 2px 2px 0; margin-left: 1px; }

.ios-clock-section { margin-top: 35px; text-align: center; z-index: 10; }
.ios-date { font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, 0.95); letter-spacing: 0.2px; }
.ios-time { font-size: 76px; font-weight: 700; color: rgba(255, 255, 255, 0.88); line-height: 0.95; letter-spacing: -3px; }

.ios-bottom-area { position: absolute; bottom: 0; left: 0; width: 100%; padding: 0 12px 25px 12px; z-index: 10; }
.ios-notification {
    background: rgba(30, 30, 30, 0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 18px; padding: 12px 14px; margin-bottom: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); animation: slideUp 0.8s var(--ease) forwards; opacity: 0; transform: translateY(20px);
}
@keyframes slideUp { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }

.notif-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.notif-app-info { display: flex; align-items: center; gap: 6px; }
.app-icon-bg {
    background: var(--brand-gradient); width: 18px; height: 18px; border-radius: 5px;
    display: flex; justify-content: center; align-items: center; flex-shrink: 0;
    color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.app-icon-bg svg { width: 62%; height: 62%; display: block; }
.app-name { font-size: 11px; color: rgba(255, 255, 255, 0.75); font-weight: 500; letter-spacing: 0.5px; }
.notif-time { font-size: 11px; color: rgba(255, 255, 255, 0.6); }
.notif-body { text-align: left; }
.notif-body strong { display: block; font-size: 13px; font-weight: 600; color: white; margin-bottom: 2px; }
.notif-body p { font-size: 13px; color: rgba(255, 255, 255, 0.85); line-height: 1.25; margin: 0; }

.quick-actions { display: flex; justify-content: space-between; padding: 0 20px; margin-bottom: 15px; }
.action-btn { width: 44px; height: 44px; background: rgba(40, 40, 40, 0.6); backdrop-filter: blur(15px); border-radius: 50%; display: flex; justify-content: center; align-items: center; }
.action-btn svg { width: 20px; height: 20px; opacity: 0.9; }
.home-indicator { width: 115px; height: 4px; background: white; border-radius: 10px; margin: 0 auto; }

/* =========================================================
   9. Schedule grid (home preview + builder)
   ========================================================= */

.schedule-preview { max-width: var(--w-wide); margin: 0 auto; padding: var(--s-12) var(--gutter) var(--s-16); }
.schedule-ui {
    display: flex; flex-direction: column; border-radius: var(--r-xl);
    border: 1px solid var(--hairline); background: rgba(14, 7, 22, 0.72);
    overflow: hidden; box-shadow: var(--shadow-lift); min-height: 0;
}
@media (min-width: 901px) { .schedule-ui { flex-direction: row; align-items: stretch; } }

/* Preview on the home page: a definite height, so the sidebar list
   scrolls inside its own box instead of stretching the panel. */
.schedule-preview .schedule-ui { height: 720px; }

/* --- Builder sidebar --- */
.schedule-sidebar {
    width: 100%; background: rgba(0, 0, 0, 0.24); border-bottom: 1px solid var(--hairline);
    display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 0;
}
@media (min-width: 901px) { .schedule-sidebar { width: 340px; flex: 0 0 340px; border-bottom: none; border-right: 1px solid var(--hairline); } }

.sidebar-search { padding: var(--s-4) var(--s-4) var(--s-3); border-bottom: 1px solid var(--hairline); }
.sidebar-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; padding: var(--s-1) 0 var(--s-5); }
.sidebar-foot { padding: var(--s-3) var(--s-4) calc(var(--s-4) + env(safe-area-inset-bottom)); border-top: 1px solid var(--hairline); }
.sidebar-foot .field-hint { margin: 0; }

.sidebar-group { padding: var(--s-3) var(--s-4) var(--s-1); }
.sidebar-group + .sidebar-group { border-top: 1px solid var(--hairline); margin-top: var(--s-3); padding-top: var(--s-4); }
.group-head {
    display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3);
    color: var(--text-faint);
}
.group-count {
    font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums;
    min-width: 1.5rem; padding: 1px var(--s-2); border-radius: var(--r-full); text-align: center;
    background: var(--surface-2); color: var(--text-muted); text-transform: none;
}
.group-hint, .course-empty {
    font-size: var(--fs-base); color: var(--text-faint); line-height: var(--lh-normal);
    padding: var(--s-1) 0 var(--s-2); text-align: left;
}
.schedule-picks-heading { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: var(--tr-label); color: var(--text-faint); margin: var(--s-5) 0 var(--s-3); }

/* --- Course rows ---
   Rows, not cards. A left rail carries seat status so the row itself
   needs no border, and the name gets the full width. */
.course-list { display: flex; flex-direction: column; gap: 2px; }
.course-item {
    position: relative; background: transparent; border: 0; border-radius: var(--r-sm);
    padding: var(--s-2) var(--s-3) var(--s-2) var(--s-3);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
    gap: var(--s-1) var(--s-3); text-align: left; width: 100%; font: inherit; color: inherit;
}
.course-item::before {
    content: ''; position: absolute; left: 0; top: var(--s-2); bottom: var(--s-2);
    width: 2px; border-radius: var(--r-full); background: var(--hairline-strong);
}
.course-item.available::before { background: var(--green); }
.course-item.full::before { background: var(--red); }
button.course-item { cursor: pointer; transition: background var(--dur-fast) ease; }
button.course-item:hover { background: var(--surface-2); }
button.course-item:active { background: var(--surface-3); }

.course-info { min-width: 0; }
.course-info strong {
    display: block; font-size: var(--fs-base); font-weight: 600; letter-spacing: var(--tr-normal); line-height: var(--lh-snug);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.course-info span { display: block; font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-faint); margin-top: 1px; }

.seat-badge {
    font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums;
    padding: 2px var(--s-2); border-radius: var(--r-xs); white-space: nowrap; flex-shrink: 0; align-self: center;
}
.seat-badge.green { background: rgba(74, 222, 128, 0.13); color: var(--green); border: 1px solid rgba(74, 222, 128, 0.22); }
.seat-badge.red { background: rgba(248, 113, 113, 0.13); color: var(--red); border: 1px solid rgba(248, 113, 113, 0.22); }

/* --- The grid itself --- */
.schedule-grid {
    flex: 1 1 auto; display: flex; flex-direction: column;
    padding: var(--s-5) var(--s-5) var(--s-6); min-width: 0; min-height: 0; overflow: hidden;
    position: relative;
}
.days-header {
    display: grid; grid-template-columns: var(--time-col-w) repeat(5, 1fr); gap: var(--col-gap);
    padding-bottom: var(--s-3); margin-bottom: var(--s-1); border-bottom: 1px solid var(--hairline-strong);
    text-align: center; font-weight: 700; color: var(--text-muted);
    font-size: var(--fs-xs); letter-spacing: var(--tr-label); text-transform: uppercase;
}

[data-schedule].has-weekend .days-header,
[data-schedule].has-weekend .grid-body { grid-template-columns: var(--time-col-w) repeat(7, 1fr); }

.grid-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: grid;
    grid-template-columns: var(--time-col-w) repeat(5, 1fr);
    grid-template-rows: repeat(20, minmax(28px, 1fr));
    gap: 0 var(--col-gap);
    padding-top: var(--s-2);
    padding-bottom: var(--s-5);
    position: relative;
}
/* Solid-ish line on the hour, whisper on the half hour, plus faint
   column separators so an empty week still reads as a calendar. */
.grid-lines {
    /* A grid item spanning all 20 rows — not absolutely positioned — so
       the painted rules always match the row boundaries. One row is 5%,
       one hour 10%. */
    grid-column: 2 / -1;
    grid-row: 1 / -1;
    background-image:
        repeating-linear-gradient(to right, rgba(255,255,255,0.05) 0 1px, transparent 1px 20%),
        repeating-linear-gradient(to bottom, rgba(255,255,255,0.085) 0 1px, transparent 1px 10%),
        repeating-linear-gradient(to bottom, rgba(255,255,255,0.028) 0 1px, transparent 1px 5%);
    background-position: calc(var(--col-gap) / -2) 0, 0 0, 0 0;
    /* The repeating gradient draws a rule at the START of each column, so
       the last column had an open right edge. This closes it. */
    box-shadow: inset -1px 0 0 0 rgba(255, 255, 255, 0.05);
    pointer-events: none; z-index: 0;
}
.time-label {
    grid-column: 1; color: var(--text-faint); font-size: var(--fs-xs); font-weight: 600;
    font-variant-numeric: tabular-nums; text-align: right;
    padding-right: var(--s-3); align-self: start; line-height: 1; transform: translateY(-50%);
}
.time-label.is-last { align-self: end; transform: translateY(50%); }

.grid-block {
    position: relative;
    background: var(--brand-tint);
    border-radius: var(--r-sm); padding: var(--s-1) var(--s-2); display: flex; flex-direction: column;
    z-index: 1; transition: box-shadow var(--dur-fast) ease, background var(--dur-fast) ease;
    overflow: hidden; margin: 1px 0; text-align: left; font: inherit; color: inherit; border: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
/* The accent lives in a pseudo-element so it can't be clobbered by the
   `border: none` in the shorthand above. */
.grid-block::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--purple-light); border-radius: var(--r-sm) 0 0 var(--r-sm);
}
.grid-block:hover { background: var(--brand-tint-strong); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12), var(--shadow-md); z-index: 2; }
.grid-block strong {
    font-size: var(--fs-xs); font-weight: 650; letter-spacing: var(--tr-normal); line-height: 1.25; margin-bottom: 1px;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.grid-block > span { font-family: var(--mono); font-size: var(--fs-xs); color: rgba(255,255,255,0.62); letter-spacing: 0.01em; }

.remove-block {
    position: absolute; top: 3px; right: 3px;
    width: 22px; height: 22px;
    background: rgba(0, 0, 0, 0.45); border: 0; border-radius: var(--r-xs);
    color: rgba(255, 255, 255, 0.75); font-size: var(--fs-md); line-height: 1;
    cursor: pointer; opacity: 0;
    display: flex; align-items: center; justify-content: center;
    transition: opacity var(--dur-fast) ease, background var(--dur-fast) ease, color var(--dur-fast) ease;
    z-index: 3;
}
.grid-block:hover .remove-block,
.grid-block:focus-within .remove-block { opacity: 1; }
.remove-block:focus-visible { opacity: 1; }
.remove-block:hover { background: rgba(248, 113, 113, 0.75); color: #fff; }

.class-english    { background: rgba(192, 132, 252, 0.16); }
.class-english::before    { background: var(--cat-purple); }
.class-selfie     { background: rgba(34, 211, 238, 0.16); }
.class-selfie::before     { background: var(--cat-cyan); }
.class-academics  { background: rgba(74, 222, 128, 0.16); }
.class-academics::before  { background: var(--cat-green); }
.class-history    { background: rgba(250, 204, 21, 0.16); }
.class-history::before    { background: var(--cat-amber); }
.class-psychology { background: rgba(217, 70, 239, 0.16); }
.class-psychology::before { background: var(--cat-magenta); }
.class-fitness    { background: rgba(96, 165, 250, 0.16); }
.class-fitness::before    { background: var(--cat-blue); }
.class-remedial   { background: rgba(248, 113, 113, 0.16); }
.class-remedial::before   { background: var(--cat-red); }
.class-default::before    { background: var(--cat-purple); }
/* Hover keeps each block's own tint instead of reverting to purple. */
.grid-block[class*="class-"]:hover { background-color: rgba(255, 255, 255, 0.06); background-blend-mode: screen; }

.block-full {
    background-image: repeating-linear-gradient(
        135deg, rgba(0, 0, 0, 0.3) 0 5px, transparent 5px 11px
    );
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.32);
}
.block-full strong { opacity: 0.92; }
.grid-block.is-tracked { box-shadow: inset 0 0 0 2px var(--purple-light); }

.live-status {
    font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums;
    margin-top: auto; padding-top: var(--s-1);
    display: inline-flex; align-items: center; gap: var(--s-1); align-self: flex-start; white-space: nowrap;
    background: none; border: 0; border-radius: 0;
}
.live-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.live-status.safe { color: #86efac; }
.live-status.full { color: #fca5a5; }
.live-status.tracked { color: var(--purple-light); }

.is-self-set { border-color: rgba(120, 200, 255, 0.4); }
.grid-block.is-self-set .live-status.self-set { color: #7ac8ff; }
.grid-block.is-self-set::before { background: #7ac8ff; }

/* Honest labelling for the demo data */
.sample-flag {
    display: inline-flex; align-items: center; gap: var(--s-2);
    font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--tr-label); text-transform: uppercase;
    color: var(--text-muted); background: var(--surface-2);
    border: 1px solid var(--glass-border); border-radius: var(--r-full); padding: var(--s-1) var(--s-3);
}

/* --- Builder sidebar: picks + unscheduled --- */
.schedule-picks,
.unscheduled-list { display: flex; flex-direction: column; gap: 2px; }

.schedule-picks .course-item,
.unscheduled-list .course-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-3);
  background: var(--surface-1);
  border-radius: var(--r-sm);
}
.schedule-picks .course-item::before,
.unscheduled-list .course-item::before { background: var(--purple-light); opacity: 0.55; }
.unscheduled-list .course-item::before { background: var(--amber); opacity: 0.7; }
.schedule-picks .course-item.is-self-set::before { background: #7ac8ff; }

.meeting-details {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; gap: var(--s-1); margin-top: var(--s-2);
}
.meeting-details span {
  font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: -0.01em;
  color: var(--text-muted); background: var(--surface-sunken);
  border: 1px solid var(--hairline); padding: 2px var(--s-2);
  border-radius: var(--r-xs); white-space: nowrap;
}

.unscheduled-list .secondary-btn {
  grid-column: 1 / -1; margin-top: var(--s-2); width: 100%;
  padding: 0 var(--s-3); font-size: var(--fs-xs); border-radius: var(--r-sm); min-height: 34px;
  background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.3); color: var(--amber);
}
.unscheduled-list .secondary-btn:hover { background: rgba(251, 191, 36, 0.18); }

/* Scoped to the builder sidebar so it can't reach the dashboard's
   "Stop tracking" button. */
.schedule-picks .remove-btn,
.unscheduled-list .remove-btn {
  background: transparent; border: 0; color: var(--text-faint);
  border-radius: var(--r-xs); width: 28px; height: 28px; min-height: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-lg); line-height: 1; cursor: pointer; flex-shrink: 0;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.schedule-picks .remove-btn:hover,
.unscheduled-list .remove-btn:hover { background: rgba(248, 113, 113, 0.16); color: var(--red); }

.unscheduled-heading { opacity: 1; }

/* =========================================================
   10. Home: timeline
   ========================================================= */

.how-it-works { max-width: var(--w-wide); margin: 0 auto; padding: var(--s-12) var(--gutter) var(--s-16); }
.section-header { text-align: center; margin-bottom: var(--s-12); display: flex; flex-direction: column; align-items: center; gap: var(--s-3); }
/* The eyebrow reads above the headline, where an eyebrow belongs. */
.section-header h2 { font-size: var(--fs-section); letter-spacing: var(--tr-display); order: 2; }
.section-subtitle { color: var(--purple-light); order: 1; margin: 0; }
.section-header .preview-school-toggle { order: 3; margin-top: var(--s-2); }

.timeline-container { position: relative; padding: var(--s-6) 0; max-width: 940px; margin: 0 auto; }
/* The rule stops at the first and last dot instead of hanging past them. */
.timeline-container::before {
    content: ''; position: absolute; top: calc(var(--s-6) + 60px); bottom: calc(var(--s-6) + 60px);
    left: 50%; width: 1px; background: var(--hairline-strong); transform: translateX(-50%);
}

.timeline-step { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-8); position: relative; }
.timeline-step:last-child { margin-bottom: 0; }
.timeline-step:nth-child(even) { flex-direction: row-reverse; }

.timeline-content {
    width: 46%; padding: var(--s-6); border-radius: var(--r-lg);
    background: var(--surface-1); border: 1px solid var(--hairline);
    backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none;
    transition: border-color var(--dur) ease, background var(--dur) ease;
}
.timeline-content:hover { border-color: var(--hairline-strong); background: var(--surface-2); }
.timeline-content h3 { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.timeline-content p { color: var(--text-muted); font-size: var(--fs-base); margin-bottom: var(--s-4); line-height: var(--lh-normal); }
.timeline-content > *:last-child { margin-bottom: 0; }

.timeline-dot {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 32px; height: 32px; background: var(--bg-raised);
    border: 1px solid rgba(192, 132, 252, 0.5); border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-weight: 700; font-size: var(--fs-sm); color: var(--purple-light); z-index: 2;
    box-shadow: 0 0 0 6px var(--bg-dark), 0 0 18px rgba(192, 132, 252, 0.25);
}

.mock-ui { background: var(--surface-sunken); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: var(--s-3); display: flex; gap: var(--s-2); flex-wrap: wrap; }
.mock-input { width: 100%; background: var(--surface-2); padding: var(--s-3); border-radius: var(--r-sm); display: flex; align-items: center; gap: var(--s-2); font-family: var(--mono); font-size: var(--fs-base); color: var(--text-main); border: 1px solid var(--hairline); }
.mock-icon { width: 15px; height: 15px; color: var(--text-faint); display: inline-flex; flex-shrink: 0; }
.mock-icon svg { width: 100%; height: 100%; }
.mock-tag { background: var(--surface-2); padding: var(--s-1) var(--s-3); border-radius: var(--r-xs); font-size: var(--fs-xs); font-family: var(--mono); color: var(--text-muted); border: 1px solid transparent; }
.mock-tag.active { background: var(--brand-tint); color: var(--purple-light); border-color: rgba(147, 51, 234, 0.4); }

.mock-console { background: #05020a; border: 1px solid var(--hairline); border-radius: var(--r-md); padding: var(--s-3); font-family: var(--mono); font-size: var(--fs-xs); color: #b6b6b6; line-height: 1.9; }
.mock-console .c-red { color: #ff7b7b; }
.mock-console .c-purple { color: var(--purple-light); }
.mock-notification-small { background: var(--surface-2); backdrop-filter: blur(10px); border: 1px solid var(--hairline-strong); border-radius: var(--r-md); padding: var(--s-3); display: flex; align-items: center; gap: var(--s-3); }
.notif-icon-small {
    width: 32px; height: 32px; border-radius: var(--r-sm); flex-shrink: 0;
    background: var(--brand-tint); color: var(--purple-light);
    display: inline-flex; align-items: center; justify-content: center;
}
.notif-icon-small svg { width: 17px; height: 17px; }
.notif-text-small { display: flex; flex-direction: column; min-width: 0; }
.notif-text-small strong { font-size: var(--fs-base); }
.notif-text-small span { font-size: var(--fs-xs); color: var(--text-muted); }

/* =========================================================
   11. Footer
   ========================================================= */

.site-footer {
    border-top: 1px solid var(--hairline); padding: var(--s-16) var(--gutter);
    margin-top: var(--s-16); background: rgba(10, 5, 15, 0.6); backdrop-filter: blur(10px);
}
.footer-container { max-width: var(--w-wide); margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: var(--s-5); }
.footer-container .logo { font-size: var(--fs-lg); }
.footer-links { display: flex; gap: var(--s-6); flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: var(--fs-base); font-weight: 500; transition: color var(--dur-fast) ease; }
.footer-links a:hover { color: var(--text-main); text-decoration: underline; text-underline-offset: 3px; }
.secondary-links a { font-size: var(--fs-sm); }
.footer-copy { color: var(--text-faint); font-size: var(--fs-sm); margin-top: var(--s-2); text-align: center; }
.footer-disclaimer { color: var(--text-faint); font-size: var(--fs-sm); text-align: center; max-width: 62ch; line-height: var(--lh-normal); }

/* =========================================================
   12. Auth
   ========================================================= */

.auth-card {
    width: 100%; max-width: var(--w-narrow); padding: var(--s-10) var(--s-8);
    border-radius: var(--r-xl); text-align: center; margin-inline: auto;
}
.auth-header { margin-bottom: var(--s-8); }
.auth-header h1 { font-size: var(--fs-2xl); margin-bottom: var(--s-2); }
.auth-header p { color: var(--text-muted); font-size: var(--fs-base); line-height: var(--lh-normal); }
.oauth-group { display: flex; flex-direction: column; gap: var(--s-3); margin-bottom: var(--s-6); }
.auth-btn {
    display: grid; grid-template-columns: 20px auto; justify-content: center; align-items: center;
    gap: var(--s-3); width: 100%; min-height: 48px; padding: 0 var(--s-4);
    border-radius: var(--r-md); border: 1px solid var(--hairline-strong);
    background: var(--surface-1); color: var(--text-main);
    font-size: var(--fs-md); font-weight: 600; cursor: pointer;
    transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.auth-btn:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, 0.2); }
/* Both marks render inside the same 20px box so the two labels start on
   the same x, whatever the glyph's own proportions. */
.auth-btn > svg { width: 20px; height: 20px; justify-self: center; }
.apple-btn svg { margin-bottom: 1px; }

.auth-divider { display: flex; align-items: center; margin: var(--s-6) 0; color: var(--text-faint); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--tr-label); }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--hairline); }
.auth-divider span { padding: 0 var(--s-3); }
.magic-link-form { display: flex; flex-direction: column; gap: var(--s-5); }

.auth-mode { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin-bottom: var(--s-6); border-radius: var(--r-md); }
.auth-mode-btn { border-radius: var(--r-sm); min-height: 38px; }

.school-choice { text-align: left; }
.school-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.school-card {
    display: flex; align-items: center; justify-content: center; min-height: 68px; padding: var(--s-4);
    border: 1px solid var(--hairline-strong); border-radius: var(--r-md); background: var(--surface-1);
    color: var(--text-main); font-weight: 650; cursor: pointer; text-align: center;
    transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.school-card:hover { background: var(--surface-2); }
.school-card input { position: absolute; opacity: 0; pointer-events: none; }
.school-card:has(input:checked) { border-color: var(--purple-light); background: var(--brand-tint); box-shadow: inset 0 0 0 1px rgba(192, 132, 252, 0.35); }

/* Inline text link inside a field hint — sits on the hint's own baseline
   rather than introducing a second control size. */
.forgot-link {
    background: none; border: 0; padding: 0; margin-left: var(--s-1);
    font-size: inherit; line-height: inherit; color: var(--purple-light);
    cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}
.forgot-link:hover { color: var(--text-main); }

/* Resend-confirmation link under the login status — same underline-link
   treatment, but it stands on its own line, not inside a hint. */
.resend-link {
    align-self: flex-start; margin: calc(-1 * var(--s-3)) 0 0; padding: 0;
    font-size: var(--fs-sm); color: var(--purple-light);
    text-decoration: underline; text-underline-offset: 2px;
}
.resend-link:hover { color: var(--text-main); }

/* reset-password.html stacks input groups straight into the form. */
.auth-card form { display: flex; flex-direction: column; gap: var(--s-5); text-align: left; }

.auth-footer { margin-top: var(--s-8); font-size: var(--fs-xs); color: var(--text-faint); line-height: var(--lh-normal); }
.auth-footer a { color: var(--purple-light); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.auth-footer a:hover { color: var(--text-main); }

.preview-school-toggle { margin-top: 0; }

/* =========================================================
   13. Pricing / FAQ / legal
   ========================================================= */

.pricing-header { text-align: center; margin-bottom: var(--s-10); }
.pricing-header h1 { font-size: var(--fs-section); margin-bottom: var(--s-3); }
.pricing-header p { color: var(--text-muted); font-size: var(--fs-lg); }

.pricing-card { padding: var(--s-8); border-radius: var(--r-xl); display: flex; flex-direction: column; gap: var(--s-5); text-align: left; }
.tier-name { font-size: var(--fs-base); font-weight: 700; color: var(--purple-light); text-transform: uppercase; letter-spacing: var(--tr-label); }
.price { font-size: 3.25rem; font-weight: 750; line-height: 1; letter-spacing: var(--tr-display); display: flex; align-items: flex-end; gap: var(--s-2); }
.currency { font-size: var(--fs-lg); font-weight: 600; color: var(--text-muted); margin-bottom: var(--s-2); }
.billing-term { font-size: var(--fs-base); color: var(--text-muted); border-bottom: 1px solid var(--hairline); padding-bottom: var(--s-5); }
.features-list { list-style: none; display: flex; flex-direction: column; gap: var(--s-3); margin: var(--s-1) 0 var(--s-4); }
.features-list li { font-size: var(--fs-md); color: var(--text-main); display: flex; gap: var(--s-3); align-items: center; }
.secure-checkout { font-size: var(--fs-xs); color: var(--text-faint); text-align: left; line-height: var(--lh-normal); margin-top: var(--s-1); }

/* --- Legal --- */
.legal-body { padding: var(--s-8); border-radius: var(--r-xl); }
.legal-body h2 { font-size: var(--fs-lg); margin: var(--s-8) 0 var(--s-3); }
.legal-body h2:first-of-type { margin-top: 0; }
.legal-body p, .legal-body li { color: var(--text-muted); font-size: var(--fs-md); line-height: var(--lh-relaxed); }
.legal-body p { margin-bottom: var(--s-3); }
.legal-body ul { margin: 0 0 var(--s-3) var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); }
.legal-body a { color: var(--purple-light); }
.legal-updated { color: var(--text-faint); font-size: var(--fs-sm); margin-bottom: var(--s-8); }

/* --- FAQ accordion ---
   A divided list, not eight floating cards: one frame, hairline rules,
   padding proportional to a single line of text. */
.faq-accordion {
    display: flex; flex-direction: column;
    border: 1px solid var(--hairline); border-radius: var(--r-lg);
    background: var(--surface-1); overflow: hidden;
}
.faq-item { border-radius: 0; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.faq-item + .faq-item { border-top: 1px solid var(--hairline); }
.faq-item:hover { background: var(--surface-1); }
.faq-item summary {
    padding: var(--s-5) var(--s-6); font-size: var(--fs-md); font-weight: 600; cursor: pointer;
    list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
    color: var(--text-main); transition: color var(--dur-fast) ease;
}
.faq-item summary:hover { color: var(--purple-light); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: ''; width: 16px; height: 16px; flex-shrink: 0;
    background-color: var(--text-faint);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3v10M3 8h10' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3v10M3 8h10' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
    transition: transform var(--dur) var(--ease), background-color var(--dur-fast) ease;
}
.faq-item summary:hover::after { background-color: var(--purple-light); }
.faq-item[open] summary::after { transform: rotate(45deg); background-color: var(--purple-light); }
.faq-answer { padding: 0 var(--s-6) var(--s-5); color: var(--text-muted); font-size: var(--fs-md); line-height: var(--lh-normal); max-width: 68ch; }
.faq-answer a { color: var(--purple-light); }

/* =========================================================
   14. Dashboard
   ========================================================= */

/* Masthead */
.page-head { display: flex; flex-direction: column; gap: var(--s-6); }
.page-head-text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); }
.page-head h1 { font-size: var(--fs-3xl); font-weight: 750; letter-spacing: var(--tr-display); }
.page-head-sub { color: var(--text-muted); font-size: var(--fs-md); max-width: 60ch; margin: 0; }

/* Stat rule — three figures separated by hairlines. Deliberately
   not three cards; the numbers carry it. */
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.stat-strip .stat { padding: var(--s-4) 0; display: flex; flex-direction: column-reverse; gap: var(--s-2); min-width: 0; }
.stat-strip .stat + .stat { border-left: 1px solid var(--hairline); padding-left: var(--s-5); }
.stat-strip dt { color: var(--text-faint); }
.stat-strip dd { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: var(--tr-display); line-height: 1; font-variant-numeric: tabular-nums; transition: color var(--dur) ease; }
.stat-strip .stat-open dd { color: var(--green); }
.stat-strip .stat-checks dd { color: var(--purple-light); }
/* A zero is not news — it stays plain so the coloured figures only
   light up when there is something worth looking at. */
.stat-strip .stat.is-zero dd { color: var(--text-main); }
.stat-strip .stat-checks.is-zero dd { color: var(--text-faint); font-size: var(--fs-2xl); }

/* Inline add bar */
.tracker-setup {
    display: flex; flex-direction: column; gap: var(--s-3);
    padding: var(--s-4); border-radius: var(--r-lg);
    background: var(--surface-1); border: 1px solid var(--hairline);
    box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.tracker-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-4); flex-wrap: wrap; }
.tracker-setup h2 { color: var(--text-faint); margin: 0; }
.tracker-setup .input-group { margin-bottom: 0; }
/* Codes and section numbers are read character by character. */
#course-code, #section-number { font-family: var(--mono); letter-spacing: 0.02em; }
.tracker-setup .primary-btn {
    padding: 0 var(--s-6); min-height: 46px; font-size: var(--fs-base); border-radius: var(--r-md);
    width: auto; margin-top: 0 !important;
}
.tracker-setup .form-status { margin-top: var(--s-1); }

.tracker-panel { display: block; }
.tracker-panel.hidden { display: none; }
/* Code + section + button on one line; the button is sized to the
   inputs, not stretched across the panel. */
.tracker-code-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.6fr) auto; gap: var(--s-3); align-items: end; }

.tracker-results {
    list-style: none; margin: var(--s-3) 0 0; padding: 0;
    max-height: 264px; overflow-y: auto;
    background: var(--surface-sunken); border: 1px solid var(--hairline); border-radius: var(--r-md);
}
.tracker-results.hidden { display: none; }
.tracker-empty { padding: var(--s-3) var(--s-4); color: var(--text-faint); font-size: var(--fs-base); }

.tracker-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
    gap: var(--s-2) var(--s-3); padding: var(--s-3); border-bottom: 1px solid var(--hairline);
    cursor: pointer; transition: background var(--dur-fast) ease;
}
.tracker-row:last-child { border-bottom: 0; }
.tracker-row.is-active { background: var(--brand-tint); }
.tracker-row.is-tracked { opacity: 0.5; cursor: not-allowed; }
.tracker-row:hover:not(.is-tracked) { background: var(--surface-2); }
.tracker-row .tracked-info h3 { font-size: var(--fs-base); margin-bottom: 1px; }
.tracker-row .tracked-info p { font-size: var(--fs-xs); }
.tracker-row .tracked-status { display: flex; align-items: center; }
.tracker-instructor { margin-top: 2px; }

.pass-status { font-size: var(--fs-base); color: var(--purple-light); margin: 0; }
.pass-status.is-unpaid { color: var(--amber); }

/* The paywall card. The lock is an outline glyph in the brand colour —
   the emoji it replaced rendered differently on every platform. */
.tracker-upgrade {
    padding: var(--s-8) var(--s-6); border-radius: var(--r-lg); text-align: center;
    background: var(--surface-1); border: 1px solid var(--hairline);
    display: flex; flex-direction: column; align-items: center; gap: var(--s-3);
}
.tracker-upgrade.hidden { display: none; }
.tracker-upgrade .upgrade-icon {
    width: 40px; height: 40px; border-radius: var(--r-md); margin-bottom: var(--s-1);
    background: var(--brand-tint); color: var(--purple-light);
    display: inline-flex; align-items: center; justify-content: center;
}
.tracker-upgrade .upgrade-icon svg { width: 20px; height: 20px; }
.tracker-upgrade h2 { font-size: var(--fs-xl); font-weight: 700; margin: 0; color: var(--text-main); }
.tracker-upgrade p { font-size: var(--fs-md); color: var(--text-muted); margin: 0; max-width: 46ch; }
.tracker-upgrade .price-terms { font-size: var(--fs-sm); color: var(--text-faint); }
/* Sized to the decision, not stretched edge to edge across the card. */
.tracker-upgrade .primary-btn { width: auto; min-width: 200px; margin-top: var(--s-3); }
.tracker-upgrade .form-status { width: 100%; }

/* List header */
.section-label { display: flex; align-items: baseline; gap: var(--s-2); color: var(--text-faint); border: 0; padding: 0; margin: 0; }
.section-label .count { font-size: var(--fs-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; letter-spacing: 0; }

.active-trackers { display: flex; flex-direction: column; gap: var(--s-3); }

/* One container, hairline-divided rows. Each row is identified by a
   colour rail rather than its own border. */
#tracker-list { border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; background: var(--surface-1); }
#tracker-list:empty { display: none; }
#tracker-list:has(.empty-state) { border: 0; background: none; border-radius: 0; }

.tracked-item.glass-panel {
    background: transparent; border: 0; border-radius: 0; box-shadow: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
}
.tracked-item {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center;
    gap: var(--s-2) var(--s-4); padding: var(--s-4) var(--s-4) var(--s-4) var(--s-6);
    transition: background var(--dur-fast) ease;
}
.tracked-item + .tracked-item { border-top: 1px solid var(--hairline); }
.tracked-item::before {
    content: ''; position: absolute; left: var(--s-3); top: 50%; transform: translateY(-50%);
    width: 3px; height: 24px; border-radius: var(--r-full); background: var(--amber);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}
.tracked-item.is-open::before { background: var(--green); box-shadow: 0 0 10px rgba(74, 222, 128, 0.5); }
.tracked-item:hover { background: var(--surface-1); transform: none; box-shadow: none; }
.tracked-info { min-width: 0; }
.tracked-info h3 { font-size: var(--fs-md); font-weight: 650; letter-spacing: var(--tr-normal); margin-bottom: 2px; color: var(--text-main); }
.tracked-info p { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: 0.01em; color: var(--text-faint); }
.tracked-status { display: contents; }

.status-indicator {
    justify-self: end; display: inline-flex; align-items: center; gap: var(--s-2);
    font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums;
    padding: 0; border: 0; background: none; border-radius: 0; color: var(--amber); white-space: nowrap;
}
.status-indicator::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-indicator.open { color: var(--green); background: none; border: 0; }
.status-indicator.scanning::before { animation: watchPulse 2.4s ease-in-out infinite; }
@keyframes watchPulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; } 50% { opacity: 0.45; box-shadow: 0 0 0 4px rgba(251, 191, 36, 0); } }

/* Visible enough to find, quiet enough not to compete. */
#tracker-list .remove-btn {
    width: auto; height: auto; font-size: var(--fs-sm); font-weight: 600; line-height: 1;
    padding: 0 var(--s-3); border-radius: var(--r-sm); min-height: 34px;
    display: inline-flex; align-items: center;
    background: transparent; border: 1px solid var(--hairline); color: var(--text-faint);
    cursor: pointer;
    transition: color var(--dur-fast) ease, background var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.tracked-item:hover .remove-btn, .tracked-item:focus-within .remove-btn { color: var(--text-muted); border-color: var(--hairline-strong); }
#tracker-list .remove-btn:hover { background: rgba(248, 113, 113, 0.12); color: var(--red); border-color: rgba(248, 113, 113, 0.35); }

.demo-note { font-size: var(--fs-sm); color: var(--text-faint); line-height: var(--lh-normal); border-left: 2px solid var(--hairline-strong); padding: 2px 0 2px var(--s-3); background: none; border-radius: 0; }

/* Alerts pill */
.alert-pill {
    padding: var(--s-1) var(--s-3); border-radius: var(--r-full);
    background: var(--surface-sunken); border: 1px solid var(--hairline);
    color: var(--text-muted); font-size: var(--fs-sm); font-weight: 600;
    cursor: pointer; transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.alert-pill.on { color: var(--green); border-color: rgba(74, 222, 128, 0.4); }
.alert-pill.off { color: var(--amber); border-color: rgba(251, 191, 36, 0.4); }
.alert-pill.checking { color: var(--text-muted); border-color: var(--hairline); }
.alert-pill:hover { background: var(--surface-2); }

/* Empty state — a quiet framed message, not a dashed placeholder box. */
.empty-state { padding: var(--s-10) var(--s-6); border-radius: var(--r-lg); text-align: center; color: var(--text-muted); font-size: var(--fs-md); line-height: var(--lh-normal); border: 1px solid var(--hairline); background: var(--surface-1); }
.empty-state strong { display: block; color: var(--text-main); margin-bottom: var(--s-2); font-size: var(--fs-lg); font-weight: 650; letter-spacing: var(--tr-normal); }
.empty-state span { display: block; max-width: 44ch; margin: 0 auto; }

/* =========================================================
   15. Builder page
   ========================================================= */

/* The builder is a one-screen app: the page never scrolls, the sidebar
   list does. Everything hangs off the wrapper having a definite height. */
body#builder { height: 100vh; height: 100dvh; overflow: hidden; display: block; }
.builder-wrapper {
    max-width: var(--w-builder); margin: 0 auto;
    padding: calc(var(--nav-h) + var(--s-5)) var(--gutter) var(--s-6);
    height: 100vh; height: 100dvh; min-height: 0; box-sizing: border-box;
    display: flex; flex-direction: column; overflow: hidden;
}
/* Title and supporting line stacked but tight, so the header takes one
   band of the screen. The subtitle no longer rides the h1's baseline. */
.builder-header {
    margin-bottom: var(--s-4); display: flex; flex-direction: column;
    gap: var(--s-1); padding-bottom: var(--s-3); border-bottom: 1px solid var(--hairline);
}
.builder-header h1 { font-size: var(--fs-2xl); font-weight: 750; letter-spacing: var(--tr-display); }
.builder-header p { color: var(--text-faint); font-size: var(--fs-base); margin: 0; }

.builder-full-screen { flex: 1 1 auto; margin-bottom: 0; min-height: 0; overflow: hidden; }

/* The builder runs on the wide rail because a week grid needs the room.
   The nav matches it here so the wordmark sits over the page title
   instead of 220px inside it. */
body#builder .nav-container { max-width: var(--w-builder); }

/* =========================================================
   16. Banners, modals, popups
   ========================================================= */

.install-banner {
    position: fixed; left: var(--s-4); right: var(--s-4); bottom: var(--s-4); z-index: 500;
    max-width: 440px; margin: 0 auto; border-radius: var(--r-lg); padding: var(--s-4);
    display: flex; align-items: flex-start; gap: var(--s-3);
}
.install-banner .app-icon-bg { width: 40px; height: 40px; border-radius: var(--r-sm); }
.install-banner-text { flex: 1; min-width: 0; }
.install-banner-text h2 { font-size: var(--fs-md); margin-bottom: 2px; }
.install-banner-text p { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.45; margin-bottom: var(--s-3); }
.install-banner-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.install-banner .primary-btn,
.install-banner .secondary-btn { padding: 0 var(--s-4); min-height: 38px; font-size: var(--fs-base); border-radius: var(--r-sm); }

/* --- Modals --- */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: var(--s-4);
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 1, 8, 0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.modal-panel {
  position: relative; width: 100%; max-width: 440px; padding: var(--s-6); z-index: 1;
  border-radius: var(--r-lg);
  background: rgba(20, 10, 30, 0.96);
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-pop);
}
.modal-panel h2 { margin-top: 0; font-size: var(--fs-xl); font-weight: 700; }
.modal-body { margin: var(--s-3) 0 var(--s-5); color: var(--text-muted); font-size: var(--fs-md); line-height: var(--lh-normal); }
.modal-body strong { color: var(--text-main); }

.meeting-list, .conflict-list {
  list-style: none; padding: 0; margin: var(--s-3) 0 0;
  display: flex; flex-direction: column; gap: 2px;
}
.meeting-list li, .conflict-list li {
  font-family: var(--mono); font-size: var(--fs-sm); color: var(--text-main);
  background: var(--surface-sunken); border: 1px solid var(--hairline);
  padding: var(--s-2) var(--s-3); border-radius: var(--r-sm);
}
.modal-actions { display: flex; gap: var(--s-2); justify-content: flex-end; flex-wrap: wrap; }
.modal-actions button { flex: 1; min-width: 120px; padding: 0 var(--s-4); font-size: var(--fs-base); border-radius: var(--r-sm); min-height: 42px; }

/* --- Instructor reviews --- */
.reviews-panel { max-width: 520px; }

/* Inline pill — used next to an instructor's name in a dense list row. */
.reviews-btn {
  margin-left: var(--s-2); padding: 1px var(--s-2); font-size: var(--fs-xs);
  font-family: var(--mono); color: var(--purple-light);
  background: var(--brand-tint); border: 1px solid rgba(147, 51, 234, 0.35);
  border-radius: var(--r-full); cursor: pointer; white-space: nowrap;
}
.reviews-btn:hover { background: var(--brand-tint-strong); color: #fff; }

/* Its own row under the meeting list in the confirm modal. The instructor
   belongs to the section, not to one meeting, so it reads as a row rather
   than as an afterthought glued to the first time slot. */
.reviews-cta { margin-top: var(--s-3); }
.reviews-cta .reviews-btn {
  margin-left: 0; width: 100%; min-height: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 0 var(--s-4); border-radius: var(--r-sm);
  font-family: var(--font-sans); font-size: var(--fs-base); font-weight: 600;
  letter-spacing: var(--tr-normal); white-space: normal; text-align: center;
  background: transparent; border: 1px solid rgba(147, 51, 234, 0.4);
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.reviews-cta .reviews-btn::before {
  content: ''; width: 15px; height: 15px; flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.8l1.9 3.9 4.3.6-3.1 3 .7 4.2L8 11.6l-3.8 2 .7-4.2-3.1-3 4.3-.6z' fill='none' stroke='black' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.8l1.9 3.9 4.3.6-3.1 3 .7 4.2L8 11.6l-3.8 2 .7-4.2-3.1-3 4.3-.6z' fill='none' stroke='black' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
.reviews-cta .reviews-btn:hover {
  background: var(--brand-tint); border-color: var(--purple-light); color: var(--purple-light);
}

.rev-tabs { display: flex; width: 100%; margin-bottom: var(--s-3); border-radius: var(--r-md); }
.rev-tab { flex: 1; border-radius: var(--r-sm); }
.rev-head h3 { margin: 0 0 var(--s-1); font-size: var(--fs-md); color: var(--text-main); }
.rev-meta { font-size: var(--fs-sm); color: var(--text-muted); margin: 0 0 var(--s-2); }
.rev-tags { display: flex; flex-wrap: wrap; gap: var(--s-1); margin: 0 0 var(--s-3); }
.rev-tag {
  font-size: var(--fs-xs); font-family: var(--mono); padding: 1px var(--s-2);
  border-radius: var(--r-full); background: var(--brand-tint);
  border: 1px solid var(--hairline); color: var(--text-muted);
}
.rev-source-link { display: inline-block; font-size: var(--fs-xs); color: var(--purple-light); margin-bottom: var(--s-3); }
.rev-list { list-style: none; padding: 0; margin: 0; max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s-2); }
.rev-item { background: var(--surface-sunken); border: 1px solid var(--hairline); border-radius: var(--r-sm); padding: var(--s-2) var(--s-3); }
.rev-item-meta { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-faint); margin: 0 0 var(--s-1); }
.rev-item-text { font-size: var(--fs-base); color: var(--text-muted); margin: 0; }

.time-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-top: var(--s-4); }
.time-form .input-group:first-child { grid-column: 1 / -1; }

/* --- Onboarding + alert popups --- */
.onboarding-modal, .alert-popup {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.onboarding-modal.hidden, .alert-popup.hidden { display: none; }
.onboarding-sheet, .alert-popup-sheet {
    position: relative; width: min(520px, 92vw); max-height: 86vh; overflow-y: auto;
    padding: var(--s-6); border-radius: var(--r-lg); background: var(--bg-raised);
    border: 1px solid var(--hairline-strong); box-shadow: var(--shadow-pop);
}
.alert-popup-sheet { width: min(420px, 92vw); }
.onboarding-close {
    position: absolute; top: var(--s-3); right: var(--s-3);
    background: transparent; border: 0; color: var(--text-faint);
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--r-xs); cursor: pointer;
}
.onboarding-close svg { width: 12px; height: 12px; }
.onboarding-close:hover { color: var(--text-main); background: var(--surface-2); }
.onboarding-sheet h2, .alert-popup-sheet h2 { font-size: var(--fs-xl); font-weight: 700; margin-bottom: var(--s-3); }
.onboarding-sheet p, .alert-popup-sheet p { color: var(--text-muted); font-size: var(--fs-md); line-height: var(--lh-normal); margin-bottom: var(--s-4); }
.onboarding-subtitle { font-size: var(--fs-sm); color: var(--text-faint); margin-bottom: var(--s-1) !important; }
.onboarding-steps, .onboarding-instructions { margin: 0 0 var(--s-5); padding-left: var(--s-5); color: var(--text-muted); font-size: var(--fs-base); line-height: var(--lh-relaxed); }
.onboarding-steps li, .onboarding-instructions li { margin-bottom: var(--s-1); }
.alert-popup-actions { display: flex; flex-direction: column; gap: var(--s-2); }

/* =========================================================
   17. Dawson + enable-alerts
   ========================================================= */

.dawson-panel { padding: var(--s-6); border-radius: var(--r-lg); }
/* The search fills the panel it sits in rather than stopping halfway
   across while the message below it runs the full width. */
.dawson-panel .search-box { max-width: none; margin-bottom: var(--s-5); }
.dawson-list { display: flex; flex-direction: column; gap: var(--s-2); }
.dawson-row { background: var(--surface-sunken); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: var(--s-3) var(--s-4); }
.dawson-code { font-family: var(--mono); font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: 2px; }
.dawson-title { font-weight: 650; font-size: var(--fs-md); margin-bottom: var(--s-2); }
.dawson-meta { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; font-size: var(--fs-base); color: var(--text-faint); }
.dawson-meta .teacher { color: var(--text-muted); }

.alert-warning {
    margin: 0; padding: var(--s-3) var(--s-4); border-radius: var(--r-md);
    background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.25);
    color: var(--amber); font-size: var(--fs-base);
    display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
}
.alert-warning.hidden { display: none; }
.alert-warning-link { color: var(--amber); font-weight: 600; white-space: nowrap; }
.alert-warning-link:hover { text-decoration: underline; }

.enable-page h1 { font-size: var(--fs-3xl); margin-bottom: var(--s-5); }
.status-card, .setup-steps { padding: var(--s-6); border-radius: var(--r-lg); }
.status-card h2 { font-size: var(--fs-xl); margin-bottom: var(--s-4); }
.setup-steps h2 { font-size: var(--fs-xl); margin-bottom: var(--s-3); }
.setup-steps p { color: var(--text-muted); line-height: var(--lh-normal); }
/* These cards run on the 880px app rail, so a full-width button would be
   a 1000px slab for a two-word label. Size it to the action. */
.status-card .primary-btn,
.setup-steps .primary-btn {
    width: auto; min-width: 220px; margin-top: var(--s-3);
}
.status-checklist { list-style: none; padding: 0; margin: 0 0 var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); }
.status-check { display: flex; align-items: center; gap: var(--s-3); color: var(--text-muted); font-size: var(--fs-md); }
.status-check::before {
    content: ''; width: 1.05em; height: 1.05em; flex-shrink: 0;
    border-radius: 50%; border: 1.5px solid var(--hairline-strong); background: none;
}
.status-check.is-done { color: var(--text-main); }
.status-check.is-done::before { border: 0; border-radius: 0; }
.step-list { list-style: none; padding: 0; margin: var(--s-4) 0; display: flex; flex-direction: column; gap: var(--s-3); }
.step-list li { display: flex; align-items: center; gap: var(--s-2); color: var(--text-main); flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: var(--s-1); padding: var(--s-1) var(--s-2); border-radius: var(--r-full); background: var(--surface-sunken); border: 1px solid var(--hairline); font-size: var(--fs-base); color: var(--text-main); font-weight: 600; }
.chip svg { width: 16px; height: 16px; fill: currentColor; }
.ios-menu-icon, .ios-share-icon, .ios-add-icon { width: 18px; height: 18px; fill: currentColor; }
.ios-share-icon { vertical-align: middle; margin: 0 2px; }

/* =========================================================
   18. Mobile
   ========================================================= */

@media (max-width: 900px) {

    :root { --gutter: var(--gutter-sm); --nav-h: 60px; }

    /* backdrop-filter makes an element a containing block for its
       position:fixed descendants — which pinned the bottom tab bar to the
       nav instead of the viewport. Use a solid background here instead. */
    .glass-nav {
        padding-top: max(0, env(safe-area-inset-top));
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(10, 3, 15, 0.96);
    }

    /* Two columns, both in normal flow. The account pill used to be
       absolutely positioned over a centred logo, which is what made the
       avatar land on top of the wordmark. */
    .nav-container {
        grid-template-columns: auto auto;
        justify-content: space-between;
        padding: var(--s-2) var(--gutter);
        min-height: var(--nav-h);
    }
    .nav-container > .nav-account { justify-self: end; }

    /* App-style bottom tab bar */
    .nav-links {
        position: fixed;
        bottom: 0; left: 0; width: 100%;
        display: flex; flex-direction: row; align-items: stretch;
        justify-content: space-between;
        /* Solid, not glass. A translucent tab bar lets the list scrolling
           underneath show through its labels, and backdrop-filter is the
           first thing to fail on older Android WebViews. */
        background: #0B0410;
        border-top: 1px solid var(--hairline-strong);
        padding: var(--s-2) var(--s-2) max(var(--s-2), env(safe-area-inset-bottom));
        z-index: 500; margin: 0; gap: var(--s-1);
        justify-self: stretch;
    }

    .nav-links a {
        font-size: var(--fs-xs);
        font-weight: 600;
        padding: var(--s-1) var(--s-1);
        text-align: center;
        flex: 1 1 0; min-width: 0;
        white-space: nowrap;
        display: flex; align-items: center; justify-content: center;
        min-height: 44px;
        border-radius: var(--r-sm);
        margin: 0;
        color: var(--text-faint);
    }
    .nav-links a:hover { background: transparent; }
    .nav-links a.active { color: var(--purple-light); background: transparent; }
    /* The desktop underline would sit under the safe-area padding here. */
    .nav-links a.active:not(.nav-btn)::after { display: none; }

    /* The CTA keeps its slot but stops being a slab pinned to the edge. */
    .nav-links a.nav-btn {
        flex: 0 1 auto;
        padding: var(--s-2) var(--s-4);
        border-radius: var(--r-full);
        font-weight: 650;
        color: #fff;
    }

    /* Keep content clear of the tab bar */
    body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
    body#builder { padding-bottom: 0; }

    /* Profile pill: label hidden, avatar only */
    .user-profile { padding: 3px; border-radius: var(--r-full); }
    .user-info { display: none; }
    .school-badge { margin-left: var(--s-1); }
    .profile-menu { top: calc(100% + 12px); }

    /* --- Hero --- */
    .hero { padding: calc(var(--nav-h) + var(--s-10)) var(--gutter) var(--s-12); }
    /* Everything in the hero shares one left edge on mobile — the badge,
       the headline, the copy, the buttons and the chips. The old mix of a
       centred badge over left-aligned text had no edge to read down. */
    .hero-container { flex-direction: column; text-align: left; gap: var(--s-10); }
    /* Caps the measure once the hero stacks. Without it, a 820px tablet
       gets a 780px-wide headline and a 780px-wide button. */
    .hero-content { flex: none; width: 100%; max-width: 34rem; }
    .hero h1 { font-size: clamp(2rem, 8.5vw, 2.75rem); }
    .hero p, .hero-note { margin-left: 0; margin-right: 0; max-width: 42ch; font-size: var(--fs-md); }
    .badge { margin-bottom: var(--s-5); font-size: var(--fs-xs); padding: var(--s-2) var(--s-3); text-align: left; }
    .hero-actions { justify-content: stretch; flex-direction: column; gap: var(--s-3); width: 100%; max-width: 24rem; }
    .hero-actions .primary-btn,
    .hero-actions .secondary-btn { width: 100%; font-size: var(--fs-md); min-height: 50px; }
    .hero-chips { justify-content: flex-start; margin-top: var(--s-6); }
    .iphone-mockup { transform: none; }
    .iphone-mockup:hover { transform: translateY(-6px); }

    /* --- Schedule: horizontal swipe with a sticky time gutter --- */
    .schedule-grid { overflow-x: auto; padding: var(--s-5) 0 var(--s-6); -webkit-overflow-scrolling: touch; }
    .days-header, .grid-body { min-width: 660px; padding-left: var(--s-4); padding-right: var(--s-4); }
    /* A fade on the right edge says "there is more week over here",
       which the hard clip did not. */
    .schedule-grid::after {
        content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 40px;
        background: linear-gradient(to right, transparent, rgba(10, 4, 16, 0.9));
        pointer-events: none; z-index: 3;
    }
    .schedule-ui { border-radius: var(--r-lg); }
    .schedule-preview { padding: var(--s-10) var(--gutter) var(--s-12); }
    .schedule-preview .schedule-ui { height: auto; }
    .sidebar-scroll { max-height: 40vh; }

    /* --- Timeline --- */
    .how-it-works { padding: var(--s-8) var(--gutter) var(--s-12); }
    .section-header { margin-bottom: var(--s-8); }
    .timeline-container { padding: var(--s-2) 0; }
    .timeline-container::before { left: 15px; top: 40px; bottom: 40px; }
    .timeline-step, .timeline-step:nth-child(even) { flex-direction: column; align-items: flex-end; margin-bottom: var(--s-5); }
    .timeline-content { width: calc(100% - 44px); padding: var(--s-5); }
    .timeline-dot { left: 15px; top: 28px; transform: translate(-50%, 0); width: 28px; height: 28px; box-shadow: 0 0 0 5px var(--bg-dark); }

    /* --- Page padding --- */
    .page-wrapper, .app-wrapper, .auth-page-wrapper {
        padding-block: calc(var(--nav-h) + var(--s-8)) var(--s-12);
    }
    .builder-wrapper { padding: calc(var(--nav-h) + var(--s-4)) var(--gutter) var(--s-5); }
    .pricing-card, .legal-body, .auth-card { padding: var(--s-6) var(--s-5); }
    .site-footer { padding: var(--s-12) var(--gutter); margin-top: var(--s-12); }
    .footer-links { gap: var(--s-4); }

    /* --- Dashboard --- */
    .page-head h1 { font-size: var(--fs-2xl); }
    .tracker-setup { padding: var(--s-3); }
    .tracker-head { align-items: stretch; flex-direction: column; }
    .tracker-tabs, .auth-mode { width: 100%; }
    .tracker-tab { flex: 1; text-align: center; padding-left: var(--s-2); padding-right: var(--s-2); }
    .tracker-code-form { grid-template-columns: 1fr 1fr; }
    .tracker-code-form .primary-btn { grid-column: 1 / -1; width: 100%; }
    .stat-strip .stat { padding: var(--s-3) 0; }
    .stat-strip .stat + .stat { padding-left: var(--s-3); }
    .stat-strip dt { font-size: 0.6875rem; letter-spacing: 0.06em; }
    .stat-strip dd { font-size: var(--fs-2xl); }
    .stat-strip .stat-checks.is-zero dd { font-size: var(--fs-xl); }
    .tracker-upgrade { padding: var(--s-6) var(--s-5); }
    .tracker-upgrade .primary-btn,
    .status-card .primary-btn,
    .setup-steps .primary-btn { width: 100%; min-width: 0; }
    .tracked-item { grid-template-columns: minmax(0, 1fr) auto; padding: var(--s-4) var(--s-3) var(--s-4) var(--s-5); }
    /* Two-row rows: pin the rail to the title line rather than floating
       it in the middle of the row. */
    .tracked-item::before { top: var(--s-4); transform: none; height: 20px; left: var(--s-2); }
    .tracked-item .remove-btn { grid-column: 2; grid-row: 1; }
    .tracked-item .status-indicator { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
    #tracker-list .remove-btn { color: var(--text-muted); border-color: var(--hairline-strong); }

    /* --- Builder: the stacked layout genuinely needs more than one
       screen, so the page scrolls; the sidebar caps itself. --- */
    body#builder { height: auto; overflow: visible; }
    .builder-wrapper { height: auto; min-height: 100vh; min-height: 100dvh; }
    .builder-header { padding-bottom: var(--s-3); margin-bottom: var(--s-4); }
    .builder-header h1 { font-size: var(--fs-xl); }

    /* --- Sheets --- */
    .onboarding-modal, .alert-popup { align-items: flex-end; }
    .onboarding-sheet, .alert-popup-sheet {
        width: 100%; max-height: 88vh; border-radius: var(--r-lg) var(--r-lg) 0 0;
        padding-bottom: calc(var(--s-6) + env(safe-area-inset-bottom, 0px));
    }
    .modal-panel { padding: var(--s-5); }
    .time-form { grid-template-columns: 1fr; }
    .install-banner { bottom: calc(var(--tabbar-h) + var(--s-3) + env(safe-area-inset-bottom)); }

    .faq-item summary { padding: var(--s-4); font-size: var(--fs-base); }
    .faq-answer { padding: 0 var(--s-4) var(--s-4); font-size: var(--fs-base); }
    .alert-warning { flex-direction: column; align-items: flex-start; gap: var(--s-2); }
}

/* Tablet / small laptop: the hero stacks before the phone mockup starts
   crushing the copy, and buttons stop stretching edge to edge. */
@media (min-width: 901px) and (max-width: 1080px) {
    .hero-container { gap: var(--s-10); }
    .hero h1 { font-size: 3.1rem; }
    .schedule-sidebar { width: 300px; flex: 0 0 300px; }
}

/* =========================================================
   19. Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .ios-notification { opacity: 1; transform: none; }
    .iphone-mockup:hover { transform: rotateY(-10deg) rotateX(5deg); }
    .grid-block:hover { transform: none; }
    .primary-btn:hover { transform: none; }
    .onboarding-modal, .alert-popup { transition: none; }
}
