/* ── Learner & family portal — the Genius Sync website's own components ───────────────────────
   Taken from the product website (iNdex-Website, /geniussync): the tilted-block kicker, the
   sun-underlined headline word, white cards with a soft hairline, tinted icon tiles, pill tags,
   ink buttons with a sun drop-shadow, the Caveat handwritten note and, on phones, the bottom tab
   bar in place of a menu. Colours and fonts come from the --gs-* tokens in app.css. */
:root {
    --gs-font-hand: 'Caveat', 'Segoe Print', cursive;
    --gs-radius: 22px;
    --gs-tabbar-h: 64px;
}

body { background: var(--gs-paper); }

/* Kicker: small uppercase label with the two toy blocks. */
.gs-kick {
    display: inline-flex; align-items: center; gap: .55rem;
    font: 700 .74rem/1 var(--gs-font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--gs-berry);
}
.gs-kick::before {
    content: ""; width: 13px; height: 13px; border-radius: 4px; background: var(--gs-sun);
    box-shadow: 8px -6px 0 -3px var(--gs-sky); transform: rotate(-8deg); flex-shrink: 0;
}

.gs-title {
    font: 600 clamp(1.7rem, 4.6vw, 2.6rem)/1.06 var(--gs-font-display); letter-spacing: -.015em; color: var(--gs-ink);
    margin: .55rem 0 .4rem; text-wrap: balance;
}
.gs-title em {
    font-style: normal; position: relative; white-space: nowrap; color: var(--gs-berry); z-index: 0;
}
.gs-title em::after {
    content: ""; position: absolute; left: -2%; right: -2%; bottom: -.06em; height: .32em; z-index: -1;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3 13c40-9 90-10 194-5' stroke='%23FFC52E' stroke-width='9' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.gs-lead { color: var(--gs-ink2); font-size: 1rem; line-height: 1.55; max-width: 60ch; }
.gs-hand { font: 600 1.35rem/1.1 var(--gs-font-hand); color: var(--gs-berry); }
.gs-section-title { font: 600 1.25rem/1.2 var(--gs-font-display); color: var(--gs-ink); margin: 0; }

/* Cards */
.gs-card {
    background: #fff; border-radius: var(--gs-radius); border: 1.5px solid var(--gs-line);
    padding: 20px; position: relative; box-sizing: border-box; min-width: 0;
}
.gs-card.gs-card-lift { transition: transform .25s, box-shadow .25s; }
.gs-card.gs-card-lift:hover { transform: translateY(-3px); box-shadow: 0 26px 40px -28px rgba(30, 33, 69, .5); }
.gs-card-continue { background: var(--gs-ink); color: #fff; border-color: transparent; box-shadow: var(--gs-shadow); }
.gs-card-continue .gs-kick { color: var(--gs-sun); }
.gs-card-continue h2, .gs-card-continue h3 { color: #fff; }
.gs-card-continue .gs-muted { color: #C9CBE3; }

.gs-muted { color: var(--gs-mute); }
.gs-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.gs-stack { display: grid; gap: 12px; }
.gs-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gs-row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gs-spacer { flex: 1 1 auto; }

/* Icon tiles (tinted rounded squares) */
.gs-tile {
    width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0;
    background: var(--gs-sky-l); color: var(--gs-sky-d);
}
.gs-tile.sun { background: var(--gs-sun-l); color: var(--gs-amber); }
.gs-tile.berry { background: var(--gs-berry-l); color: var(--gs-berry); }
.gs-tile.leaf { background: var(--gs-leaf-l); color: var(--gs-leaf); }
.gs-tile.amber { background: var(--gs-amber-l); color: var(--gs-amber); }

/* Pills (where a learner stands) */
.gs-pill {
    display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap;
    font: 700 .74rem/1 var(--gs-font-body); letter-spacing: .02em; padding: .38rem .65rem; border-radius: 999px;
    background: var(--gs-sky-l); color: var(--gs-sky-d);
}
.gs-pill.due-soon { background: var(--gs-sun-l); color: var(--gs-amber); }
.gs-pill.overdue { background: var(--gs-berry-l); color: var(--gs-berry); }
.gs-pill.draft { background: var(--gs-cream); color: var(--gs-amber); }
.gs-pill.done { background: var(--gs-leaf-l); color: var(--gs-leaf); }
.gs-pill.late { background: var(--gs-amber-l); color: var(--gs-amber); }
.gs-pill.returned { background: var(--gs-ink); color: var(--gs-sun); }
.gs-pill.cancelled { background: #EDEDF3; color: var(--gs-mute); text-decoration: line-through; }
.gs-pill.quiet { background: #F1F1F6; color: var(--gs-ink2); }

/* Buttons: ink with a sunflower drop-shadow, like the website's primary button. */
.gs-btn.mud-button-root {
    border-radius: 999px !important; font-weight: 700 !important; text-transform: none !important; letter-spacing: 0 !important;
    min-height: 44px; padding: .65rem 1.25rem !important;
}
.gs-btn-ink.mud-button-root {
    background: var(--gs-ink) !important; color: #fff !important;
    box-shadow: 0 5px 0 var(--gs-sun), 0 16px 30px -14px rgba(30, 33, 69, .7) !important;
}
.gs-btn-ink.mud-button-root:hover { transform: translateY(-1px); }
.gs-btn-ink.mud-button-root.mud-button-disabled { opacity: .55; box-shadow: none !important; }
.gs-btn-line.mud-button-root { border: 2px solid var(--gs-ink) !important; color: var(--gs-ink) !important; background: #fff !important; }

/* Homework rows */
.hw-list { display: grid; gap: 10px; }
.hw-row {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border-radius: 18px;
    border: 1.5px solid var(--gs-line); text-decoration: none; color: inherit; min-height: 64px; box-sizing: border-box;
    transition: border-color .2s, transform .2s;
}
.hw-row:hover { border-color: var(--gs-sky); transform: translateY(-1px); }
.hw-row:focus-visible { outline: 3px solid var(--gs-sky); outline-offset: 2px; }
.hw-row .hw-main { flex: 1 1 auto; min-width: 0; }
.hw-row .hw-title { font: 600 1rem/1.25 var(--gs-font-display); color: var(--gs-ink); overflow-wrap: anywhere; }
.hw-row .hw-meta { font-size: .82rem; color: var(--gs-mute); margin-top: 2px; }

/* Learner switcher (family) */
.gs-switch { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.gs-switch::-webkit-scrollbar { display: none; }
.gs-switch a {
    display: inline-flex; align-items: center; gap: .5rem; flex-shrink: 0; min-height: 44px; padding: 0 16px 0 6px;
    border-radius: 999px; background: #fff; border: 1.5px solid var(--gs-line); color: var(--gs-ink);
    font: 700 .92rem/1 var(--gs-font-body); text-decoration: none;
}
.gs-switch a .gs-avatar { width: 32px; height: 32px; font-size: .8rem; }
.gs-switch a[aria-current="true"] { background: var(--gs-ink); color: #fff; border-color: var(--gs-ink); }
.gs-avatar {
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
    background: var(--gs-sun); color: var(--gs-ink); font: 700 .95rem/1 var(--gs-font-display);
}

/* Sync / connection chip in the app bar */
.gs-sync {
    display: inline-flex; align-items: center; gap: .4rem; font: 700 .75rem/1 var(--gs-font-body);
    padding: .42rem .7rem; border-radius: 999px; background: var(--gs-leaf-l); color: var(--gs-leaf); white-space: nowrap;
}
.gs-sync.offline { background: #ECECF3; color: var(--gs-ink2); }
.gs-sync.waiting { background: var(--gs-sun-l); color: var(--gs-amber); }
.gs-sync.problem { background: var(--gs-berry-l); color: var(--gs-berry); }
.gs-sync .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* "Saved on this phone" notice */
.gs-device-note { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--gs-ink2); }
.gs-device-note .gs-hand { font-size: 1.15rem; }

/* Work editor */
.gs-editor textarea { font: 400 1rem/1.55 var(--gs-font-body) !important; }
.gs-instructions { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.gs-feedback { border-left: 4px solid var(--gs-sun); background: var(--gs-cream); border-radius: 14px; padding: 14px 16px; }
.gs-timeline { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.gs-timeline li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.gs-timeline .step { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: #EFEFF5; color: var(--gs-mute); flex-shrink: 0; }
.gs-timeline .step.on { background: var(--gs-leaf-l); color: var(--gs-leaf); }

/* Empty states */
.gs-empty { text-align: center; padding: 28px 16px; }
.gs-empty .gs-tile { margin: 0 auto 12px; width: 56px; height: 56px; border-radius: 18px; }

/* Phones and small tablets (below 960px): the website's bottom tab bar, in place of the side menu. */
.gs-tabbar { display: none; }
@media (max-width: 959.98px) {
    nav.gs-tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1300; display: grid;
        grid-template-columns: repeat(var(--gs-tabs, 4), 1fr); padding: 0 0 env(safe-area-inset-bottom);
        background: var(--gs-paper); box-shadow: inset 0 1.5px 0 var(--gs-line), 0 -12px 28px -20px rgba(30, 33, 69, .4);
    }
    .gs-tabbar a {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 44px;
        height: var(--gs-tabbar-h); color: var(--gs-ink2); font: 700 11px/1.15 var(--gs-font-body); text-decoration: none;
        -webkit-tap-highlight-color: transparent; position: relative;
    }
    .gs-tabbar .tb-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; transition: background-color .2s ease; }
    .gs-tabbar a[aria-current="page"] { color: var(--gs-ink); }
    .gs-tabbar a[aria-current="page"] .tb-ic { background: var(--gs-sun); }
    .gs-tabbar a:focus-visible { outline: 2px solid var(--gs-sky); outline-offset: -3px; border-radius: 12px; }
    .gs-tabbar .tb-badge {
        position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
        background: var(--gs-berry); color: #fff; font: 700 10px/17px var(--gs-font-body); box-sizing: border-box;
    }
    .gs-has-tabbar .mud-main-content { margin-left: 0 !important; padding-bottom: calc(var(--gs-tabbar-h) + env(safe-area-inset-bottom) + 12px) !important; }
    .gs-has-tabbar .gs-desktop-nav { display: none !important; }
    .gs-title { font-size: clamp(1.55rem, 7vw, 2rem); }
    .gs-card { padding: 16px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .gs-card.gs-card-lift, .hw-row, .gs-btn-ink.mud-button-root { transition: none !important; transform: none !important; }
}
