:root {
    color-scheme: light dark;
    --text: #1d1d1f;
    --muted: #6e6e73;
    --bg: #ffffff;
    --surface: #f5f5f7;
    --rule: #e3e3e8;
    --accent: #3478f6;
    --glow: rgb(52 120 246 / 0.16);
    --bar: rgb(255 255 255 / 0.72);
    --bezel: #111113;
    --shadow: rgb(15 30 60 / 0.16);
    --glass: rgb(255 255 255 / 0.8);
    --green: #34c759;
    --blue: #3478f6;
    --orange: #ff9500;
    --purple: #8e4ee8;
    --teal: #30b0c7;
    --indigo: #5856d6;
    --red: #ff3b30;

    /* The drawings: cards, tracks and the app's own colours */
    --card: #ffffff;
    --track: #ececf0;
    --ink: #0b0b0d;
    --mark-tile: #f6f6f6;
    --mark-track: #e3e3e3;
    /* Course colours, as the example semester wears them */
    --ads: #1e87f6;
    --linalg: #fa512e;
    --databases: #7b39ef;
    --systems: #20c520;
    /* The default reading and task tags' colours */
    --tag-red: #ff2424;
    --tag-orange: #ff720f;
    --tag-blue: #1f74ff;
    --tag-green: #11d459;
    --tag-grey: #8b96a3;
    --free-study: #8b96a3;
    /* Friends, in the colours FriendColors gives the first two */
    --lena: #fa512e;
    --mia: #20c520;

    /* Motion: one curve for what slides or fills into place, one with a
       little overshoot for what pops in, one for what changes shape. */
    --ease-out: cubic-bezier(0.22, 0.8, 0.24, 1);
    --ease-pop: cubic-bezier(0.3, 0.85, 0.3, 1.12);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --text: #f5f5f7;
        --muted: #98989f;
        --bg: #0b0b0d;
        --surface: #1a1a1d;
        --rule: #2a2a2e;
        --accent: #4a8cff;
        --glow: rgb(74 140 255 / 0.18);
        --bar: rgb(11 11 13 / 0.72);
        --bezel: #2a2a2e;
        --shadow: rgb(0 0 0 / 0.5);
        --glass: rgb(44 44 48 / 0.8);
        --card: #1c1c1f;
        --track: #2e2e33;
        --mark-tile: #2b2b2b;
        --mark-track: #4d4d4d;
    }
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 4rem;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica,
        Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
    overflow-x: clip;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

h1,
h2 {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica,
        Arial, sans-serif;
    letter-spacing: -0.03em;
    line-height: 1.05;
    font-weight: 700;
}

/* The page's glow takes the colour of the section in the middle of the
   screen (scenes.js sets --tint from its eyebrow). */

@property --tint {
    syntax: "<color>";
    inherits: true;
    initial-value: transparent;
}

html {
    transition: --tint 1.2s var(--ease-in-out);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(70% 50% at 50% 0%, color-mix(in srgb, var(--tint) 14%, transparent), transparent 75%);
}

/* Top bar */

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bar);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--rule);
}

.topbar-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.7rem 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text);
    font-weight: 600;
}

.brand:hover {
    text-decoration: none;
}

.brand img {
    border-radius: 7px;
}

.topbar-links {
    display: flex;
    gap: 1.5rem;
    margin: 0;
    font-size: 0.9rem;
}

.topbar-links a {
    color: var(--muted);
}

.topbar-links a:hover {
    color: var(--text);
    text-decoration: none;
}

/* Hero */

.hero {
    position: relative;
    text-align: center;
    padding: 5rem 16px 0;
    max-width: 72rem;
    margin: 0 auto;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -4rem 0 auto;
    height: 46rem;
    background: radial-gradient(50% 50% at 50% 40%, var(--glow), transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* The app's mark, drawn as AppMark draws it: four bars in their tracks on
   the icon's 1024-point grid (tracks 544 by 76, 40 apart). While it is on
   screen each bar fills its track and drops back, a little after the one
   above, as on the app's loading screen (loadingMarkShares). */

.mark {
    --size: 96px;
    width: var(--size);
    height: var(--size);
    border-radius: 22.5%;
    background: var(--mark-tile);
    box-shadow: 0 calc(var(--size) * 0.03) calc(var(--size) * 0.16) rgb(0 0 0 / 0.12);
    display: grid;
    align-content: center;
    justify-content: center;
    gap: calc(var(--size) * 40 / 1024);
}

.mark span {
    display: block;
    width: calc(var(--size) * 544 / 1024);
    height: calc(var(--size) * 76 / 1024);
    border-radius: 999px;
    background: var(--mark-track);
    overflow: hidden;
}

.mark i {
    display: block;
    height: 100%;
    width: calc(var(--rest) * 100%);
    border-radius: 999px;
}

.mark span:nth-child(1) i { background: #5cb85c; }
.mark span:nth-child(2) i { background: #4a90d9; animation-delay: 0.12s; }
.mark span:nth-child(3) i { background: #f0ad4e; animation-delay: 0.24s; }
.mark span:nth-child(4) i { background: #7e57c2; animation-delay: 0.36s; }

.mark.playing i {
    animation-name: mark-fill;
    animation-duration: 2s;
    animation-iteration-count: infinite;
}

@keyframes mark-fill {
    0% { width: calc(var(--rest) * 100%); animation-timing-function: ease-in-out; }
    27.5% { width: 100%; animation-timing-function: linear; }
    47.5% { width: 100%; animation-timing-function: ease-in-out; }
    75%,
    100% { width: calc(var(--rest) * 100%); }
}

.hero-mark {
    margin: 0 auto 1.5rem;
}

/* The semester's weeks up to this one, a vacation week among them */

.weeks {
    margin: 2rem auto 0;
    max-width: 24rem;
}

.weeks ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(14, 1fr);
    gap: 4px;
}

.weeks li {
    aspect-ratio: 1;
    border-radius: 6px;
    background: var(--track);
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 600;
    display: grid;
    place-items: center;
    transition: background 0.35s, color 0.35s, box-shadow 0.35s;
}

.weeks li.done {
    background: var(--accent);
    color: #ffffff;
}

.weeks li.now {
    background: var(--bg);
    color: var(--accent);
    box-shadow: inset 0 0 0 2px var(--accent);
}

.weeks li.now.pulse {
    animation: week-pulse 1.8s ease-in-out infinite;
}

@keyframes week-pulse {
    50% { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 5px var(--glow); }
}

.weeks li.vacation {
    background: repeating-linear-gradient(135deg, var(--track) 0 3px, transparent 3px 6px);
}

.weeks figcaption {
    margin-top: 0.65rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.hero h1 {
    font-size: clamp(2.6rem, 8vw, 5rem);
    margin: 0;
}

.lede {
    max-width: 30rem;
    margin: 1.25rem auto 0;
    font-size: clamp(1.1rem, 2.4vw, 1.3rem);
    color: var(--muted);
}

.cta {
    margin: 2rem 0 0;
}

/* Apple's badge artwork, shown as it is: no shadow, filter or recolouring.
   The radius only rounds the focus ring to the badge's corners. */
.badge {
    display: inline-block;
    vertical-align: top;
    border-radius: 9px;
}

.badge img {
    display: block;
    width: auto;
    height: 54px;
}

.hero-shot {
    position: relative;
    margin: 4.5rem auto 0;
    max-width: 64rem;
}

/* The Mac shot carries the window's own rounded corners, so a drop shadow
   follows them. */

.mac {
    display: block;
    width: 100%;
    filter: drop-shadow(0 24px 48px var(--shadow)) drop-shadow(0 2px 6px var(--shadow));
}

/* As the page loads, the hero's parts rise into place one after another:
   the mark, the headline, the line under it, the weeks, the badge and last
   the Mac. Their finished place is where they stand without motion. */

@media (prefers-reduced-motion: no-preference) {
    .hero > * {
        animation: hero-rise 0.9s var(--ease-out) both;
    }

    .hero > .hero-mark {
        animation: hero-mark-in 0.8s var(--ease-pop) both;
    }

    .hero > h1 { animation-delay: 0.08s; }
    .hero > .lede { animation-delay: 0.16s; }
    .hero > .weeks { animation-delay: 0.24s; }
    .hero > .cta { animation-delay: 0.32s; }

    .hero > .hero-shot {
        animation: hero-shot-rise 1.2s var(--ease-out) 0.4s both;
    }
}

@keyframes hero-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
}

@keyframes hero-mark-in {
    from {
        opacity: 0;
        transform: scale(0.82);
    }
}

@keyframes hero-shot-rise {
    from {
        opacity: 0;
        transform: translateY(56px) scale(0.97);
    }
}

/* Features */

main {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 16px;
}

.feature {
    padding: 9rem 0 0;
}

.copy h2 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    margin: 0;
}

.copy p {
    margin: 1rem 0 0;
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 26rem;
}

.copy .eyebrow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c);
}

.eyebrow::before {
    content: "";
    width: 1.5rem;
    height: 0.4rem;
    border-radius: 999px;
    background: var(--c);
}

.split {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    align-items: center;
    gap: 4rem;
}

.split.reverse .copy {
    order: 2;
}

.wide {
    text-align: center;
}

.wide .copy p {
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.wide .eyebrow {
    justify-content: center;
}

.wide .visual {
    margin: 3.5rem auto 0;
    max-width: 60rem;
}

/* Drawn cards: pieces of the app's screens in its own colours */

.card {
    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 18px 44px var(--shadow), 0 1px 3px var(--shadow);
    text-align: left;
    overflow: hidden;
}

.card-title {
    margin: 0 1.1rem 0.4rem;
    font-weight: 700;
}

.card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dot {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c);
}

.ring {
    position: relative;
    flex: none;
    width: 56px;
    height: 56px;
}

.ring svg {
    display: block;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring circle {
    fill: none;
    stroke-width: 6;
}

.ring-track {
    stroke: var(--track);
}

.ring-fill {
    stroke: var(--c);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.7s var(--ease-out);
}

.ring output {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Plan: Up Next above a course */

.planner {
    display: grid;
    gap: 1.25rem;
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
}

.upnext {
    position: relative;
    padding-top: 0.9rem;
}

.upnext li {
    position: relative;
    background: var(--red);
    border-top: 1px solid var(--rule);
    /* One row track that closes from the row's own height to none, so the
       collapse moves from its first frame to its last. */
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.4s var(--ease-in-out), border-color 0.4s;
    overflow: hidden;
}

.row-inner {
    position: relative;
    z-index: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 1.1rem;
    background: var(--card);
    transition: transform 0.45s var(--ease-out),
        padding-block 0.4s var(--ease-in-out);
}

.row-text {
    min-width: 0;
    font-size: 0.95rem;
}

.row-text small,
.items .title small {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
}

.when {
    color: var(--muted);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.swipe-action {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 6rem;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
}

.upnext li.swiped .row-inner {
    transform: translateX(-6rem);
}

.upnext li.gone {
    grid-template-rows: 0fr;
    border-color: transparent;
}

.upnext li.gone .row-inner {
    padding-block: 0;
}

.more-row {
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 0.6rem 1.1rem 0.7rem;
    border-top: 1px solid var(--rule);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
}

.more-row span {
    color: var(--muted);
}

.undo-bar {
    position: absolute;
    left: 50%;
    bottom: 0.6rem;
    z-index: 2;
    display: flex;
    gap: 1.1rem;
    margin: 0;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    background: var(--glass);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 8px 24px var(--shadow), 0 0 0 1px var(--rule);
    font-size: 0.88rem;
    white-space: nowrap;
    transform: translate(-50%, 180%);
    transition: transform 0.45s var(--ease-out);
}

.undo-bar span {
    color: var(--accent);
    font-weight: 600;
}

.undo-bar.in {
    transform: translate(-50%, 0);
}

.course header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    border-top: 5px solid var(--c);
}

.course header b {
    display: block;
    line-height: 1.3;
}

.course header small {
    color: var(--muted);
    font-size: 0.82rem;
}

.items li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1.1rem;
    border-top: 1px solid var(--rule);
    font-size: 0.95rem;
}

.kind {
    width: 1.1rem;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
}

.items .title {
    min-width: 0;
    transition: color 0.3s;
}

.items li.done .title {
    color: var(--muted);
}

.tag {
    border: 0;
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    background: var(--c);
    color: #ffffff;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.3s, filter 0.2s, transform 0.2s var(--ease-pop);
}

.tag:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.tag.bump {
    animation: tag-bump 0.35s ease;
}

@keyframes tag-bump {
    40% { transform: scale(1.15); }
}

/* Schedule: a week's timetable. Each class sits by its day (--d, Monday 1),
   start (--s, in hours) and length (--l), in its lane (--lane) of the
   timetable's --lanes, so friends' classes can stand beside it. */

.timetable {
    --hour: 44px;
    --start: 8;
    --lanes: 1;
    position: relative;
    padding: 0.8rem 0.9rem 1rem 0.4rem;
}

.tt-head,
.tt-body {
    display: grid;
    grid-template-columns: 2.8rem 1fr;
}

.tt-head {
    grid-template-columns: 2.8rem repeat(5, 1fr);
    padding-bottom: 0.5rem;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.tt-head .today {
    color: var(--accent);
}

.tt-hours {
    display: grid;
    grid-template-rows: repeat(10, var(--hour));
    color: var(--muted);
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
    padding-right: 0.45rem;
}

.tt-hours span {
    transform: translateY(-0.5em);
}

.tt-grid {
    position: relative;
    height: calc(10 * var(--hour));
    background-image:
        linear-gradient(var(--rule) 1px, transparent 1px),
        linear-gradient(90deg, var(--rule) 1px, transparent 1px);
    background-size: 100% var(--hour), 20% 100%;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.cls,
.drawn-class {
    position: absolute;
    top: calc((var(--s) - var(--start)) * var(--hour) + 1px);
    left: calc((var(--d) - 1) * 20% + var(--lane, 0) * 20% / var(--lanes) + 2px);
    width: calc(20% / var(--lanes) - 4px);
    height: calc(var(--l, 1.5) * var(--hour) - 3px);
    overflow: hidden;
    border-radius: 7px;
    padding: 0.3rem 0.4rem;
    font-size: 0.72rem;
    line-height: 1.25;
    text-align: left;
    overflow-wrap: normal;
    hyphens: auto;
}

.cls {
    background: color-mix(in srgb, var(--c) 20%, var(--card));
    border-left: 3px solid var(--c);
    transition: opacity 0.35s, transform 0.45s var(--ease-pop),
        left 0.5s var(--ease-out), width 0.5s var(--ease-out),
        background 0.4s, border-color 0.4s;
}

.cls b {
    display: block;
    font-weight: 600;
}

.cls small,
.drawn-class small {
    display: block;
    color: var(--muted);
    font-size: 0.68rem;
}

.cls.hidden {
    opacity: 0;
    transform: translateY(-10px) scale(0.94);
}

.due-mark {
    position: absolute;
    top: calc((var(--s) - var(--start)) * var(--hour));
    left: calc((var(--d) - 1) * 20%);
    width: 20%;
    height: 2px;
    background: var(--c);
    transition: opacity 0.4s;
}

.due-mark::before {
    content: "";
    position: absolute;
    left: -3px;
    top: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c);
}

.due-mark span {
    position: absolute;
    right: 3px;
    bottom: 4px;
    padding: 0 3px;
    border-radius: 4px;
    background: var(--card);
    color: var(--c);
    font-size: 0.66rem;
    font-weight: 700;
    white-space: nowrap;
}

.due-mark.hidden {
    opacity: 0;
}

.drawn-class {
    height: calc(0.25 * var(--hour));
    border: 1.5px dashed var(--accent);
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent);
    font-weight: 700;
    opacity: 0;
    transition: height 1.1s var(--ease-out), opacity 0.2s;
}

.drawn-class.in {
    opacity: 1;
}

.drawn-class.grown {
    height: calc(1.5 * var(--hour) - 3px);
}

/* The New sheet's Class tab, filled in from the class just drawn */
.new-sheet {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(80%, 19rem);
    padding: 0.5rem 1rem 1rem;
    border-radius: 18px 18px 0 0;
    background: var(--card);
    box-shadow: 0 -10px 34px var(--shadow), 0 0 0 1px var(--rule);
    font-size: 0.85rem;
    text-align: left;
    transform: translate(-50%, 115%);
    transition: transform 0.5s var(--ease-out);
}

.new-sheet.in {
    transform: translate(-50%, 0);
}

.new-sheet::before {
    content: "";
    display: block;
    width: 2.2rem;
    height: 4px;
    margin: 0 auto 0.6rem;
    border-radius: 999px;
    background: var(--rule);
}

.new-sheet p {
    margin: 0;
}

.sheet-tabs {
    display: flex;
    gap: 2px;
    padding: 2px;
    margin-bottom: 0.4rem !important;
    border-radius: 9px;
    background: var(--surface);
    font-size: 0.78rem;
    font-weight: 600;
}

.sheet-tabs span {
    flex: 1;
    padding: 0.2rem;
    border-radius: 7px;
    color: var(--muted);
    text-align: center;
}

.sheet-tabs .on {
    background: var(--card);
    color: var(--text);
    box-shadow: 0 1px 2px var(--shadow);
}

.sheet-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-top: 1px solid var(--rule);
}

.sheet-row span:last-child {
    color: var(--muted);
}

/* Reminders: a notification over the Edit sheet */

.notify {
    position: relative;
    padding-bottom: 3rem;
}

/* The Edit sheet of the task the notification is for */
.edit-sheet {
    width: 66%;
    max-width: 23rem;
    margin-left: auto;
    padding: 0.8rem 1rem 1.1rem;
    background: var(--surface);
    font-size: 0.85rem;
}

.edit-sheet p {
    margin: 0;
}

.edit-bar {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.8rem !important;
    color: var(--accent);
}

.edit-bar b {
    color: var(--text);
}

.edit-bar .save {
    font-weight: 600;
}

.edit-group {
    margin-top: 0.7rem;
    padding: 0 0.8rem;
    border-radius: 12px;
    background: var(--card);
}

.edit-group .sheet-row:first-child {
    border-top: 0;
}

.edit-group .sheet-row {
    gap: 1rem;
    padding: 0.5rem 0;
}

.edit-group .sheet-row span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.edit-sheet .sheet-row .tag {
    color: #ffffff;
    cursor: default;
}

.switch {
    flex: none;
    width: 2.3rem;
    height: 1.4rem;
    border-radius: 999px;
    background: var(--green);
    position: relative;
}

.switch::after {
    content: "";
    position: absolute;
    right: 2px;
    top: 2px;
    width: calc(1.4rem - 4px);
    height: calc(1.4rem - 4px);
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
}

.notification {
    transition: opacity 0.4s, transform 0.55s var(--ease-pop);
}

.notification.away {
    opacity: 0;
    transform: translateY(-24px) scale(0.96);
}

.notification-action {
    transition: transform 0.15s, filter 0.15s;
}

.notification-action.press {
    transform: scale(0.95);
    filter: brightness(0.9);
}

.notification {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 68%;
    max-width: 23rem;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0 0.75rem;
    padding: 0.85rem 1rem 1rem;
    border-radius: 24px;
    background: var(--glass);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    box-shadow: 0 18px 40px var(--shadow), 0 1px 3px var(--shadow);
    font-size: 0.92rem;
    line-height: 1.35;
}

.notification img {
    border-radius: 9px;
}

.notification p {
    margin: 0;
}

.notification .notification-app {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.15rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.notification-title {
    font-weight: 600;
}

.notification-action {
    grid-column: 1 / -1;
    margin-top: 0.8rem;
    padding: 0.55rem;
    border-radius: 14px;
    background: var(--surface);
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Timer: the pomodoro card. Focus Clock turns it into the dark, large focus
   clock; the phase-end pop-up asks what next when a block runs out. */

/* The timer and the week's study time side by side, or one above the
   other where the column is narrow. */
.timer-pair {
    container-type: inline-size;
}

.timer-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 1rem;
}

.timer-cards .study-card {
    margin-top: 3rem;
}

@container (max-width: 30rem) {
    .timer-cards {
        grid-template-columns: minmax(0, 20rem);
        justify-content: center;
    }

    .timer-cards .study-card {
        margin-top: 0;
    }
}

.timer-card {
    position: relative;
    padding: 0.9rem 1rem 3.4rem;
    text-align: center;
    transition: background 0.5s, color 0.5s;
}

.timer-card p {
    margin: 0;
}

.timer-ring {
    position: relative;
    width: 80%;
    max-width: 13rem;
    margin: 1.1rem auto 0.8rem;
    aspect-ratio: 1;
}

.timer-ring svg {
    display: block;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-ring circle {
    fill: none;
    stroke-width: 10;
}

.timer-ring .ring-fill {
    transition: stroke 0.4s;
}

.timer-face {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 0.1rem;
}

.timer-phase {
    color: var(--c);
    font-size: 0.85rem;
    font-weight: 600;
}

.timer-clock {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.timer-course {
    color: var(--muted);
    font-size: 0.8rem;
}

.timer-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.timer-dots i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--track);
}

.timer-dots i.on {
    background: var(--orange);
}

.timer-buttons {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.9rem !important;
}

.timer-buttons span {
    padding: 0.4rem 1.2rem;
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.85rem;
    font-weight: 600;
}

.focus-toggle {
    position: absolute;
    left: 50%;
    bottom: 0.9rem;
    transform: translateX(-50%);
    border: 0;
    border-radius: 999px;
    padding: 0.4rem 1rem;
    background: var(--orange);
    color: #ffffff;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: filter 0.2s, transform 0.2s var(--ease-pop);
}

.focus-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.timer-card.clock {
    background: #000000;
    color: #f5f5f7;
}

.timer-card.clock .sheet-tabs {
    visibility: hidden;
}

.timer-card.clock .ring-track {
    stroke: #2a2a2e;
}

.timer-card.clock .timer-buttons span {
    background: #1c1c1f;
}

.timer-card.clock .timer-course {
    color: #98989f;
}

.phase-end {
    position: absolute;
    left: 50%;
    top: 46%;
    width: 86%;
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    border-radius: 18px;
    background: var(--card);
    color: var(--text);
    box-shadow: 0 20px 50px var(--shadow), 0 0 0 1px var(--rule);
    font-size: 0.82rem;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -40%) scale(0.92);
    transition: opacity 0.3s, transform 0.4s var(--ease-pop);
}

.phase-end.in {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.phase-end b {
    font-size: 0.95rem;
}

.phase-end > span:nth-child(2) {
    color: var(--muted);
    margin-bottom: 0.3rem;
}

.phase-end-button {
    padding: 0.45rem;
    border-radius: 10px;
    background: var(--surface);
    font-weight: 600;
    transition: transform 0.15s, filter 0.15s;
}

.phase-end-button.go {
    background: var(--green);
    color: #ffffff;
}

.phase-end-button.press {
    transform: scale(0.95);
    filter: brightness(0.9);
}

/* Study time: the week by course, and its days */

.study-card {
    padding: 0.9rem 1rem 1rem;
}

.study-card .card-title {
    margin: 0 0 0.6rem;
}

.donut {
    position: relative;
    width: 9.5rem;
    margin: 0 auto;
    aspect-ratio: 1;
}

.donut svg {
    display: block;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.donut circle {
    fill: none;
    stroke-width: 18;
}

.donut .segment {
    transition: stroke-dasharray 0.8s var(--ease-out),
        stroke-dashoffset 0.8s var(--ease-out);
}

.donut-face {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    margin: 0;
    text-align: center;
}

.donut-face b {
    font-size: 1.2rem;
    font-variant-numeric: tabular-nums;
}

.donut-face small {
    color: var(--muted);
    font-size: 0.72rem;
}

.study-legend {
    display: grid;
    gap: 0.35rem;
    margin: 0.9rem 0 0 !important;
    font-size: 0.82rem;
}

.study-legend li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.5rem;
}

.study-legend li span:nth-child(2) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.study-legend li span:last-child {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.day-bars {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    height: 6rem;
    margin-top: 1rem;
}

.day-bars button {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 4px;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s var(--ease-pop);
}

.day-bars button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.day-bars .bar {
    align-self: end;
    height: calc(var(--h) * 100%);
    min-height: 3px;
    border-radius: 5px 5px 2px 2px;
    background: var(--accent);
    transition: height 0.8s var(--ease-out), opacity 0.3s;
}

.day-bars.picked button[aria-pressed="false"] .bar {
    opacity: 0.3;
}

.day-bars small {
    font-size: 0.68rem;
    font-weight: 600;
}

.day-bars.grow-from-zero .bar {
    height: 3px;
}

/* The Mac's mini player: a timer chip in the corner of the screen. It waits
   in the page's corner while the Timer section is on screen, on screens
   wide enough to be a Mac's. */

.mini-player {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 20;
    display: none;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.95rem 0.45rem 0.45rem;
    border-radius: 999px;
    background: rgb(28 28 30 / 0.9);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 12px 30px rgb(0 0 0 / 0.3);
    color: #f5f5f7;
    transform: translateY(160%);
    transition: transform 0.45s var(--ease-out);
}

.mini-player.in {
    transform: none;
}

.mini-player svg {
    width: 30px;
    height: 30px;
    transform: rotate(-90deg);
}

.mini-player circle {
    fill: none;
    stroke: #3a3a3c;
    stroke-width: 4;
}

.mini-player .mini-fill {
    stroke: var(--orange);
    stroke-linecap: round;
}

.mini-player p {
    margin: 0;
    line-height: 1.2;
}

.mini-player b {
    display: block;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

.mini-player small {
    color: #98989f;
    font-size: 0.72rem;
}

@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
    .js .mini-player {
        display: flex;
    }
}

/* Progress: credits toward the degree by category, and the GPA */

.progress-card {
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
    padding: 1.2rem 1.2rem 0.6rem;
}

.progress-card p {
    margin: 0;
}

.progress-top {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
}

.credits b {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
    font-size: 2.6rem;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.credits span {
    color: var(--muted);
    font-weight: 600;
}

.gpa {
    text-align: right;
}

.gpa b {
    display: block;
    font-size: 1.7rem;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.gpa span {
    color: var(--muted);
    font-size: 0.8rem;
}

.gpa .gpa-band {
    transition: opacity 0.3s;
}

.gpa .gpa-band.fading {
    opacity: 0;
}

.credit-bar {
    display: flex;
    height: 14px;
    margin: 1rem 0 !important;
    border-radius: 999px;
    overflow: hidden;
    background: var(--track);
}

.credit-bar i {
    width: var(--w);
    height: 100%;
    background: var(--c);
    transition: width 0.9s var(--ease-out);
}

.credit-bar i.in-progress,
.categories .in-progress .dot {
    background: repeating-linear-gradient(135deg, var(--muted) 0 3px, transparent 3px 6px);
}

.credit-bar.empty i {
    width: 0;
}

.categories,
.semesters {
    display: grid;
    gap: 0.45rem;
    font-size: 0.88rem;
}

.categories li,
.semesters li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.categories li span:last-child,
.semesters li span {
    margin-left: auto;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.semesters {
    margin-top: 1rem !important;
    padding-top: 0.4rem !important;
    border-top: 1px solid var(--rule);
}

.semesters li {
    padding: 0.35rem 0;
}

.semesters li + li {
    border-top: 1px solid var(--rule);
}

/* Friends: their classes beside yours, each friend in a lane of their own.
   While any friend shows, your own classes wear the accent colour. */

.friend-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 0.8rem 0.5rem;
}

.friend-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.85rem 0.3rem 0.35rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease-pop);
}

.friend-check:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.friend-check i {
    display: grid;
    place-items: center;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    border: 2px solid var(--c);
    transition: background 0.25s;
}

.friend-check[aria-pressed="true"] i {
    background: var(--c);
}

.friend-check[aria-pressed="true"] i::after {
    content: "";
    width: 0.45rem;
    height: 0.22rem;
    border: 2px solid #ffffff;
    border-top: 0;
    border-right: 0;
    transform: translateY(-1px) rotate(-45deg);
}

.friends-on .cls.mine {
    --c: var(--accent) !important;
}

.cls.friend {
    border: 1.5px dashed var(--c);
    background: color-mix(in srgb, var(--c) 12%, var(--card));
}

/* Import */

.imports {
    text-align: center;
}

.imports .eyebrow {
    justify-content: center;
}

.imports > ul {
    list-style: none;
    margin: 3rem auto 0;
    padding: 0;
    max-width: 64rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: left;
}

.imports > ul > li {
    padding: 1.6rem 1.5rem 1.75rem;
    border-radius: 22px;
    background: var(--surface);
}

.imports > ul svg {
    display: block;
    width: 2rem;
    height: 2rem;
    fill: none;
    stroke: var(--teal);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.imports > ul h3 {
    margin: 1rem 0 0.4rem;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}

.imports > ul p {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

/* Import: new Moodle material ticked and moved into its course */

.moodle-sync {
    max-width: 52rem;
    margin: 3rem auto 0;
}

.moodle-panels {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.moodle-panels .card {
    align-self: stretch;
    padding: 0.9rem 0.9rem 1rem;
}

.moodle-panels .card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.6rem;
    font-size: 0.95rem;
}

.moodle-panels ul {
    display: grid;
    gap: 0.4rem;
}

.moodle-panels li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    background: var(--surface);
    font-size: 0.88rem;
    transition: opacity 0.4s;
}

.moodle-new li.added {
    opacity: 0.4;
}

.badge-count {
    min-width: 1.3rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--red);
    color: #ffffff;
    font-size: 0.72rem;
    text-align: center;
    transition: opacity 0.3s;
}

.badge-count.none {
    opacity: 0;
}

.check {
    flex: none;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 1.5px solid var(--muted);
    transition: background 0.2s, border-color 0.2s;
}

.check.on {
    border-color: var(--accent);
    background: var(--accent);
}

.moodle-arrow {
    width: 1.8rem;
    height: 1.8rem;
    fill: none;
    stroke: var(--teal);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.new-pill {
    margin-left: auto;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
}

.moodle-course li.incoming.waiting {
    display: none;
}

.moodle-course li.arrive {
    animation: arrive 0.5s var(--ease-pop);
}

@keyframes arrive {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }
}

/* And more */

.more {
    padding: 9rem 0 0;
    text-align: center;
}

.more h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin: 0 0 2.5rem;
}

.more ul {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 52rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.more li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    background: var(--surface);
    font-weight: 500;
    font-size: 0.97rem;
    text-align: left;
}

.more svg {
    flex: none;
    width: 1.4rem;
    height: 1.4rem;
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* One app: one drawn device that takes the shape of each platform's
   layout. Every size is in em of --u, so the stage scales with its width. */

.device-picker {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
    margin: 0 0 1.5rem;
}

.device-picker button {
    border: 0;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.2s var(--ease-pop);
}

.device-picker button[aria-pressed="true"] {
    background: var(--surface);
    color: var(--text);
}

.device-picker button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.device-stage {
    container-type: inline-size;
    display: grid;
    place-items: center;
}

.device {
    --u: min(1rem, 2.8cqw);
    --top: 1.4em;
    --tab: 0em;
    --rail: 0em;
    --side: 7em;
    --list: 10em;
    --detail: 1fr;
    font-size: var(--u);
    width: 34em;
    height: 21.25em;
    margin-block: 0.4em calc(23em - 21.25em);
    display: grid;
    grid-template-rows: var(--top) 1fr var(--tab);
    grid-template-columns: var(--rail) var(--side) var(--list) var(--detail);
    overflow: hidden;
    border: 0.45em solid var(--bezel);
    border-radius: 1.2em;
    background: var(--card);
    box-shadow: 0 24px 48px var(--shadow), 0 2px 6px var(--shadow);
    transition-property: width, height, margin, border-radius, grid-template-columns, grid-template-rows;
    transition-duration: 0.8s;
    transition-timing-function: var(--ease-in-out);
}

.device[data-shape="ipad"] {
    --top: 2em;
    --side: 0em;
    --list: 7.5em;
    width: 16em;
    height: 21.5em;
    margin-block: 0.4em calc(23em - 21.5em);
    border-radius: 1.6em;
}

.device[data-shape="iphone"] {
    --top: 2.6em;
    --tab: 2.6em;
    --side: 0em;
    --list: 1fr;
    --detail: 0em;
    width: 10em;
    height: 21.5em;
    margin-block: 0.4em calc(23em - 21.5em);
    border-radius: 2em;
}

.device[data-shape="sideways"] {
    --top: 1.8em;
    --rail: 2.4em;
    --side: 0em;
    --list: 1fr;
    --detail: 0em;
    width: 21.5em;
    height: 10em;
    margin-block: 6.5em 6.5em;
    border-radius: 2em;
}

.device > span {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    transition: opacity 0.4s;
}

.device i,
.device b,
.device s {
    display: block;
    text-decoration: none;
}

.d-top {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.4em;
    padding: 0 0.7em;
    border-bottom: 1px solid var(--rule);
}

.d-lights {
    display: flex;
    gap: 0.25em;
}

.d-lights i {
    width: 0.45em;
    height: 0.45em;
    border-radius: 50%;
    background: #ff5f57;
}

.d-lights i:nth-child(2) { background: #febc2e; }
.d-lights i:nth-child(3) { background: #28c840; }

.d-title {
    font-size: 0.6em;
    font-weight: 700;
}

.d-tabs {
    display: flex;
    gap: 0.2em;
    margin-left: auto;
    margin-right: auto;
    padding: 0.2em;
    border-radius: 999px;
    background: var(--surface);
}

.d-tabs i {
    width: 1.4em;
    height: 0.5em;
    border-radius: 999px;
    background: var(--track);
}

.d-tabs i:first-child,
.d-rail i:first-child,
.d-tab i:first-child {
    background: var(--accent);
}

.device[data-shape="mac"] .d-tabs,
.device:not([data-shape="mac"]) .d-lights,
.device[data-shape="iphone"] .d-tabs,
.device[data-shape="sideways"] .d-tabs {
    display: none;
}

.device[data-shape="ipad"] .d-title {
    display: none;
}

.d-rail {
    grid-row: 2 / 4;
    grid-column: 1;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 0.6em;
    background: var(--surface);
}

.d-rail i,
.d-tab i {
    width: 0.9em;
    height: 0.9em;
    border-radius: 0.3em;
    background: var(--track);
}

.d-side {
    grid-row: 2 / 4;
    grid-column: 2;
    display: grid;
    align-content: start;
    gap: 0.5em;
    padding: 0.7em 0.6em;
    background: var(--surface);
}

.d-side i {
    height: 0.55em;
    border-radius: 0.3em;
    background: var(--track);
}

.d-side i:first-child {
    background: color-mix(in srgb, var(--accent) 45%, transparent);
}

.d-list {
    grid-row: 2;
    grid-column: 3;
    display: grid;
    align-content: start;
    gap: 0.45em;
    padding: 0.6em;
    border-right: 1px solid var(--rule);
}

.d-row {
    display: grid;
    grid-template-columns: 0.6em 1fr;
    align-items: center;
    gap: 0.2em 0.45em;
    padding: 0.5em;
    border-radius: 0.6em;
    background: var(--surface);
}

.d-row i {
    grid-row: span 2;
    width: 0.6em;
    height: 0.6em;
    border-radius: 50%;
    background: var(--c);
}

.d-row b {
    height: 0.4em;
    width: 70%;
    border-radius: 0.2em;
    background: var(--track);
}

.d-row s {
    height: 0.25em;
    border-radius: 0.2em;
    background: linear-gradient(90deg, var(--c) var(--p), var(--track) var(--p));
}

.d-detail {
    grid-row: 2;
    grid-column: 4;
    display: grid;
    align-content: start;
    gap: 0.5em;
    padding: 0.7em;
}

.d-detail i {
    height: 0.55em;
    border-radius: 0.3em;
    background: var(--track);
}

.d-detail i:first-child {
    height: 0.3em;
    background: var(--ads);
}

.d-detail i:nth-child(odd) {
    width: 80%;
}

.d-tab {
    grid-row: 3;
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.6em;
    border-top: 1px solid var(--rule);
}

/* And more: small working pieces of the system features */

.system-pieces {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem 2.5rem;
    margin: 0 auto 2.5rem;
    max-width: 52rem;
}

.piece {
    margin: 0;
}

.piece figcaption {
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.piece-column {
    display: grid;
    gap: 1.5rem;
    justify-items: center;
}

.lock-screen {
    position: relative;
    width: min(21rem, 86vw);
    height: 14rem;
    overflow: hidden;
    border-radius: 34px;
    background:
        radial-gradient(80% 70% at 25% 85%, rgb(52 120 246 / 0.9), transparent 60%),
        radial-gradient(70% 60% at 85% 25%, rgb(142 78 232 / 0.85), transparent 60%),
        var(--ink);
    box-shadow: 0 18px 40px var(--shadow), 0 0 0 1px var(--rule);
    text-align: left;
}

.island {
    position: absolute;
    left: 50%;
    top: 12px;
    z-index: 1;
    width: 8.5rem;
    height: 2rem;
    overflow: hidden;
    border-radius: 999px;
    background: #000000;
    color: #f5f5f7;
    transform: translateX(-50%);
    transition: width 0.55s var(--ease-pop), height 0.55s var(--ease-pop),
        border-radius 0.55s;
}

.island p {
    margin: 0;
}

.island-compact,
.island-open {
    position: absolute;
    inset: 0;
    transition: opacity 0.3s;
}

.island-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.8rem;
    color: var(--orange);
    font-size: 0.78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.island-compact i {
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50%;
    border: 2.5px solid var(--orange);
    border-right-color: #3a3a3c;
}

.island-open {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.1rem;
    opacity: 0;
}

.island-open small {
    display: block;
    color: #98989f;
    font-size: 0.72rem;
}

.island-open b {
    color: var(--orange);
    font-size: 1.7rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.island-buttons {
    display: flex;
    gap: 0.4rem;
}

.island-buttons span {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #2c2c2e;
    font-size: 0.7rem;
}

.island.open {
    width: calc(100% - 20px);
    height: 5.6rem;
    border-radius: 30px;
}

.island.open .island-compact {
    opacity: 0;
}

.island.open .island-open {
    opacity: 1;
    transition-delay: 0.2s;
}

.widget {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    display: grid;
    gap: 0.3rem;
    padding: 0.65rem 0.85rem;
    border-radius: 20px;
    background: rgb(255 255 255 / 0.16);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    color: #ffffff;
    font-size: 0.8rem;
}

.widget b {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.85;
}

.widget p {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
}

.widget p span:last-child {
    margin-left: auto;
    opacity: 0.75;
}

.menu-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.2rem;
    width: min(19rem, 86vw);
    margin: 0;
    padding: 0.35rem 0.9rem;
    border-radius: 10px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 6px 18px var(--shadow), 0 0 0 1px var(--rule);
    font-size: 0.82rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.menu-timer {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
}

.menu-timer svg {
    width: 15px;
    height: 15px;
    transform: rotate(-90deg);
}

.menu-timer circle {
    fill: none;
    stroke: var(--track);
    stroke-width: 3;
}

.menu-timer .menu-fill {
    stroke: var(--orange);
}

.control {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    width: 5.5rem;
    margin: 0;
    padding: 0.9rem 0.5rem 0.7rem;
    border-radius: 22px;
    background: var(--surface);
    font-size: 0.78rem;
    font-weight: 600;
}

.control svg {
    width: 1.7rem;
    height: 1.7rem;
    fill: none;
    stroke: var(--green);
    stroke-width: 1.8;
    stroke-linecap: round;
}

/* Closing */

.closing {
    text-align: center;
    padding: 9rem 0 7rem;
}

.closing > img {
    display: block;
    margin: 0 auto 1rem;
    filter: drop-shadow(0 8px 20px var(--shadow));
}

.closing h2 {
    font-size: 2.25rem;
    margin: 0;
}

.closing p {
    margin: 0.4rem 0 0;
    color: var(--muted);
}

.closing .cta {
    margin-top: 1.75rem;
}

/* Scroll reveal */

.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s ease, transform 0.8s var(--ease-out);
}

.js .reveal.shown {
    opacity: 1;
    transform: none;
}

/* The drawings' controls answer the pointer: they lighten under it and
   give a little as they are pressed. */

@media (hover: hover) {
    button.tag:hover,
    .focus-toggle:hover {
        filter: brightness(1.08);
    }

    .friend-check:hover {
        border-color: color-mix(in srgb, var(--c) 45%, var(--rule));
        background: var(--surface);
    }

    .day-bars button:hover {
        color: var(--text);
    }

    .device-picker button:hover {
        color: var(--text);
    }

    .device-picker button[aria-pressed="false"]:hover {
        background: color-mix(in srgb, var(--surface) 60%, transparent);
    }
}

@media (prefers-reduced-motion: no-preference) {
    button.tag:active,
    .friend-check:active,
    .device-picker button:active {
        transform: scale(0.95);
    }

    .day-bars button:active {
        transform: scale(0.92);
    }

    .focus-toggle:active {
        transform: translateX(-50%) scale(0.95);
    }
}

/* Side by side, a section's drawing follows its words a beat later. */
@media (min-width: 761px) {
    .js .feature .reveal + .reveal {
        transition-delay: 0.12s;
    }

    .js .feature .reveal + .reveal + .reveal {
        transition-delay: 0.24s;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .tag.bump {
        animation: none;
    }
}

/* Narrow screens */

@media (max-width: 760px) {
    .hero {
        padding-top: 3.5rem;
    }

    .hero-shot {
        margin-top: 3rem;
    }

    .feature {
        padding-top: 6rem;
    }

    .split {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .split .copy p {
        margin-left: auto;
        margin-right: auto;
    }

    .split .eyebrow {
        justify-content: center;
    }

    .split.reverse .copy {
        order: 0;
    }

    .wide .visual {
        margin-top: 2.5rem;
    }

    .notify {
        padding-bottom: 4.5rem;
    }

    .edit-sheet {
        width: 78%;
        font-size: 0.8rem;
    }

    .notification {
        width: 82%;
        font-size: 0.85rem;
        text-align: left;
    }

    .imports > ul {
        grid-template-columns: 1fr;
        margin-top: 2.5rem;
    }

    .moodle-panels {
        grid-template-columns: 1fr;
    }

    .moodle-arrow {
        justify-self: center;
        transform: rotate(90deg);
    }

    .more {
        padding-top: 6rem;
    }

    .more ul {
        grid-template-columns: 1fr 1fr;
    }

    .timetable {
        --hour: 36px;
        padding-right: 0.5rem;
    }

    .tt-head,
    .tt-body {
        grid-template-columns: 2.1rem 1fr;
    }

    .tt-head {
        grid-template-columns: 2.1rem repeat(5, 1fr);
    }

    .tt-hours {
        font-size: 0.6rem;
        padding-right: 0.3rem;
    }

    .cls,
    .drawn-class {
        padding: 0.2rem 0.25rem;
        font-size: 0.6rem;
        border-radius: 5px;
    }

    .cls small,
    .drawn-class small,
    .due-mark span {
        display: none;
    }

    .friends-on .cls b {
        display: none;
    }

    .closing {
        padding: 6rem 0 5rem;
    }
}

/* Footer */

footer {
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    border-top: 1px solid var(--rule);
    padding: 1.25rem 16px 2.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

footer p {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
}

footer a {
    color: var(--muted);
}

footer a:hover {
    color: var(--text);
}

/* Support page: the questions, then the feedback form */

main.narrow {
    max-width: 36rem;
    padding-top: 1.5rem;
    padding-bottom: 4rem;
}

nav.back {
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

main.narrow h1 {
    font-size: 2.2rem;
    margin: 0 0 0.5rem;
}

main.narrow h2 {
    font-size: 1.5rem;
    margin: 3rem 0 1rem;
}

.lede-left {
    color: var(--muted);
    margin: 0 0 1.5rem;
}

.faq details {
    border-bottom: 1px solid var(--rule);
}

.faq details:first-child {
    border-top: 1px solid var(--rule);
}

.faq summary {
    cursor: pointer;
    padding: 0.9rem 1.75rem 0.9rem 0;
    font-weight: 600;
    list-style: none;
    position: relative;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    position: absolute;
    right: 0.25rem;
    top: 0.8rem;
    color: var(--muted);
    font-weight: 400;
    font-size: 1.2rem;
}

.faq details[open] summary::after {
    content: "−";
}

.faq details p {
    margin: 0 0 1.1rem;
    color: var(--muted);
}

form label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 1.25rem 0 0.4rem;
}

form input[type="text"],
form textarea {
    display: block;
    width: 100%;
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
}

form input[type="text"]:focus,
form textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: -1px;
}

form textarea {
    resize: vertical;
}

.hint {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.segmented {
    display: inline-flex;
    border: 0;
    padding: 3px;
    margin: 0;
    background: var(--surface);
    border-radius: 10px;
}

.segmented legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.segmented label {
    margin: 0;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.segmented input {
    position: absolute;
    opacity: 0;
}

.segmented label:has(input:checked) {
    background: var(--bg);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.15);
}

.segmented label:has(input:focus-visible) {
    outline: 2px solid var(--accent);
}

.trap {
    position: absolute;
    left: -10000px;
}

#status {
    min-height: 1.5rem;
    margin: 1.25rem 0 0.75rem;
    font-size: 0.95rem;
    color: var(--muted);
}

#status.error {
    color: #d93025;
}

#status.ok {
    color: var(--green);
}

form button {
    font: inherit;
    font-weight: 600;
    color: #ffffff;
    background: var(--accent);
    border: 0;
    border-radius: 999px;
    padding: 0.6rem 1.75rem;
    cursor: pointer;
}

form button:disabled {
    opacity: 0.5;
    cursor: default;
}
