/*
 * The public page (M7-01, styled by M7-04). One stylesheet served straight from `public/`,
 * no build step, on top of the shared palette in `tokens.css` — the same file the employee
 * screens and the panel read. Nothing here states a colour of its own: if a hex appears, it
 * belongs in the token file instead.
 */

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
}

.shell {
    margin: 0 auto;
    max-width: 68rem;
    padding: 0 20px;
}

.site-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 20px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.brand-mark {
    display: block;
    flex: 0 0 auto;
}

/* M7-08: the header carries the two doors a stranger needs, and a signed-in account gets the
   door it actually uses instead of a signup button. */
.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.15rem;
}

/* M7-13: the row sits at the right of the header above 640; the copy inside the phone menu does not. */
.site-nav--row {
    margin-left: auto;
}

.site-nav a {
    color: var(--ink-soft);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.site-nav a:hover {
    color: var(--ink);
}

.site-header .button--small,
.site-header .button--small:hover {
    padding: 0.45rem 0.95rem;
    font-size: 0.82rem;
    color: var(--button-ink);
}

.site-header .button--small:hover {
    background: var(--button-bg-hover);
}

/* M7-14: below 640 the row of links folds into one button that opens a short panel. The markup is
   a `details`, so the open state, the keyboard and the screen-reader announcement are the
   browser's work — there is no script on these pages. Above that width the menu does not exist
   and the row is the header. */
.site-menu {
    display: none;
    position: relative;
}

.site-menu-toggle {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    cursor: pointer;
    list-style: none;
}

/* The default triangle marker is a second icon nobody asked for. */
.site-menu-toggle::-webkit-details-marker {
    display: none;
}

/* Three bars out of one pseudo-element: a 2px line, and the same line twice more as a shadow. */
.site-menu-toggle::before {
    content: "";
    width: 16px;
    height: 2px;
    border-radius: 1px;
    background: var(--ink);
    box-shadow: 0 -5px 0 var(--ink), 0 5px 0 var(--ink);
}

.site-menu-toggle:hover {
    border-color: var(--ink-soft);
}

.site-menu[open] .site-menu-toggle {
    border-color: var(--accent);
}

.site-menu-panel {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    z-index: 20;
    display: grid;
    gap: 0.5rem;
    min-width: 13rem;
    padding: 0.65rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 20px 44px -28px rgb(15 23 42 / 0.5);
}

.site-menu-panel .button {
    display: block;
    width: 100%;
    padding: 0.65rem 0.95rem;
    text-align: center;
}

/* Inside the panel the links are a list, not a row: a thumb aims at a 40px line, not a 12px one. */
.site-menu-panel .site-nav {
    display: grid;
    gap: 0.1rem;
    margin-left: 0;
    padding-top: 0.4rem;
    border-top: 1px solid var(--line);
}

.site-menu-panel .site-nav a {
    padding: 0.55rem 0.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.site-menu-panel .site-nav a:hover {
    background: var(--cool);
}

/* For a label that must be readable by a screen reader and invisible on the page. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: 3rem;
    align-items: center;
    padding: 3.25rem 0 3rem;
    background:
        radial-gradient(760px 320px at 4% -20%, var(--wash-warm), transparent 65%),
        radial-gradient(640px 300px at 100% -10%, var(--wash-cool), transparent 60%);
}

.hero-copy {
    max-width: 34rem;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 18px;
    font-size: clamp(1.9rem, 5vw, 2.9rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
}

/* M7-08: the one warm line on the page, so the eye has somewhere to land. */
h1 .tint {
    color: var(--accent-ink);
}

h2 {
    margin: 0 0 18px;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}

h3 {
    margin: 0 0 6px;
    font-size: 0.95rem;
}

p {
    margin: 0 0 12px;
}

.lede {
    color: var(--ink-soft);
    font-size: 1.06rem;
    max-width: 40rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-top: 26px;
}

.button {
    display: inline-block;
    border-radius: var(--radius-control);
    background: var(--button-bg);
    padding: 0.7rem 1.3rem;
    color: var(--button-ink);
    font-weight: 600;
    text-decoration: none;
}

.button:hover {
    background: var(--button-bg-hover);
}

.alongside {
    color: var(--ink-faint);
    font-size: 0.85rem;
}

.link-quiet {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.link-quiet:hover {
    text-decoration: underline;
}

/* M7-08: the sample fortnight in the hero. It is the product in one glance — the same chips and
   hours the grid prints, in the same three tints — drawn as HTML so it cannot age like a
   screenshot. */

.strip {
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: 0 20px 48px rgb(17 24 39 / 0.09);
    overflow: hidden;
}

.strip-head {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-top: 3px solid var(--accent);
    border-bottom: 1px solid var(--line);
}

.strip-head b {
    font-size: 0.82rem;
}

.strip-head span {
    margin-left: auto;
    color: var(--ink-faint);
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
}

.strip table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.strip th {
    padding: 0.45rem 0 0.4rem;
    color: var(--ink-faint);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-align: center;
    text-transform: uppercase;
}

.strip th.name,
.strip td.name {
    padding-left: 0.9rem;
    text-align: left;
}

.strip td {
    height: 2.1rem;
    border-top: 1px solid var(--line);
}

.strip td.name {
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}

.strip td.name small {
    display: block;
    color: var(--ink-faint);
    font-size: 0.62rem;
    font-weight: 400;
}

.strip td.cell {
    border-left: 1px solid var(--line);
    text-align: center;
}

.strip td.cell b {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.35;
}

.strip td.cell i {
    display: block;
    font-size: 0.55rem;
    font-style: normal;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    opacity: 0.75;
}

.strip .cell--worked {
    background: var(--tint-worked);
    color: var(--tint-worked-ink);
}

.strip .cell--leave {
    background: var(--tint-leave);
    color: var(--tint-leave-ink);
}

.strip .cell--unpaid {
    background: var(--tint-unpaid);
    color: var(--tint-unpaid-ink);
}

.strip .cell--empty {
    color: var(--ink-faint);
}

.strip figcaption {
    padding: 0.55rem 0.9rem;
    border-top: 1px solid var(--line);
    color: var(--ink-faint);
    font-size: 0.68rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.band {
    border-top: 1px solid var(--line);
    padding: 36px 0;
}

/* One band reads cooler than the page, so the two answers sit apart from the prose. It paints
   past the content column to the window edges, so it reads as a band and not as a pale frame
   around the cards. */
.band.cool {
    background: var(--cool);
    box-shadow: 0 0 0 100vmax var(--cool);
    clip-path: inset(0 -100vmax);
}

.steps {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.step {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface);
    padding: 1.1rem 1.2rem;
}

.step p,
.audience p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.92rem;
}

/* M7-08: each feature carries the tint of the kind of hour it is about. */
.step .glyph {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-bottom: 12px;
    border-radius: 9px;
}

.step .glyph svg {
    width: 17px;
    height: 17px;
}

.glyph--worked {
    background: var(--tint-worked);
    color: var(--tint-worked-ink);
}

.glyph--leave {
    background: var(--tint-leave);
    color: var(--tint-leave-ink);
}

.glyph--unpaid {
    background: var(--tint-unpaid);
    color: var(--tint-unpaid-ink);
}

/* R33: the guide's four vocabulary cards hold longer text than the home page's three. */

.steps--wide {
    grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr));
}

code {
    border-radius: 0.25rem;
    background: var(--accent-soft);
    padding: 0.05rem 0.3rem;
    color: var(--accent-ink);
    font-size: 0.85em;
}

.answers {
    display: grid;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.answers li {
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent-line);
    border-radius: var(--radius-card);
    background: var(--surface);
    padding: 1rem 1.1rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.answers strong {
    color: var(--ink);
}

.audience {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.audience > div {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface);
    padding: 1.1rem 1.2rem;
}

.start {
    border: 1px solid var(--accent-line);
    border-radius: var(--radius-card);
    background: linear-gradient(90deg, var(--accent-soft), var(--surface) 62%);
    padding: 1.4rem 1.5rem;
}

.start p:last-child {
    margin-bottom: 0;
}

.start a {
    color: var(--accent);
    font-weight: 600;
}

/* R33 / M7-08: the footer carries the way to the guide from every public page, and is where a
   new page is added — one entry in the partial's list. */

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 26px;
    border-top: 1px solid var(--line);
    padding: 22px 0 34px;
}

.site-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--ink-soft);
    font-size: 0.78rem;
    text-decoration: none;
}

.site-footer-brand b {
    font-weight: 600;
}

.site-footer-note {
    color: var(--ink-faint);
    font-size: 0.78rem;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.1rem;
    margin-left: auto;
}

.site-footer-links a {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}

.site-footer-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* R31: the signup form. Same card as the panel's sections, hand-written like the rest. */

.narrow {
    max-width: 38rem;
}

.form-card {
    display: grid;
    gap: 1rem;
    max-width: 38rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface);
    padding: 1.5rem;
}

.field {
    display: grid;
    gap: 0.35rem;
}

.field label {
    font-size: 0.85rem;
    font-weight: 600;
}

.field input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
    padding: 0.55rem 0.7rem;
    color: var(--ink);
    font: inherit;
}

.field input::placeholder {
    color: var(--ink-faint);
}

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

.field input[aria-invalid="true"] {
    border-color: var(--danger);
}

.field-error {
    margin: 0;
    color: var(--danger);
    font-size: 0.8rem;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-top: 0.25rem;
}

.form-actions a {
    color: var(--accent);
    font-weight: 600;
}

.hint-small {
    margin-top: 1.25rem;
    color: var(--ink-faint);
    font-size: 0.85rem;
}

/*
 * No dark block here any more: the inversion lives in `tokens.css`, so this sheet and the
 * employee screens darken together instead of one of them doing it alone.
 */

/* M7-08: on a narrow screen the hero stacks — copy first, the sample strip under it. */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2.5rem 0 2rem;
    }

    .strip {
        max-width: 26rem;
    }

    /* M7-13: the links take their own row and keep the left edge — right-aligned they left a
       hole between the note and themselves on a narrow window. */
    .site-footer-links {
        width: 100%;
        margin-left: 0;
    }
}

/* The strip keeps all five days on a phone by shrinking its type rather than its content: a
   long code (ANNUAL) must not spill into the next cell. */
@media (max-width: 640px) {
    /* M7-14: the row folds into one button; the panel carries the door and the links. No wrap,
       no second line of text — the header is brand and button, 40px apart. */
    .site-header {
        gap: 1rem;
        padding: 16px 0 12px;
    }

    .site-nav--row,
    .site-header > .button--small {
        display: none;
    }

    .site-menu {
        display: block;
        margin-left: auto;
    }

    /* M7-13: the footer tightens up; the brand and the note share the first row (both are short),
       because a row each for six words reads as a broken column. */
    .site-footer {
        gap: 0.35rem 0.9rem;
        padding: 20px 0 28px;
    }

    .site-footer-links {
        margin-top: 0.15rem;
    }

    .strip th {
        font-size: 0.5rem;
        letter-spacing: 0.06em;
    }

    .strip td.name {
        font-size: 0.7rem;
        padding-left: 0.6rem;
    }

    .strip td.name small {
        font-size: 0.55rem;
    }

    .strip td.cell b {
        font-size: 0.6rem;
    }

    .strip td.cell i {
        font-size: 0.5rem;
    }
}
