/*
  Curbcut — site styles.

  Written to pass the standard the product is about. Every choice below that looks like
  restraint is a requirement:

  - System fonts, so nothing blocks first paint and nothing is downloaded from a third
    party. An agency's IT department will look at the network tab.
  - Colours measured against WCAG 1.4.3, not estimated. In the browser, against white:
    ink 16.5:1, slate 7.3:1, link 8.5:1. The requirement is 4.5:1 for body text. The first
    version of this file carried guessed figures that were all wrong in one direction or
    another — which is precisely the fault the product exists to catch, committed in the
    stylesheet of the site that says so.
  - Relative units throughout, so WCAG 1.4.4 (resize to 200%) and 1.4.10 (reflow at 320px)
    hold without a separate mobile stylesheet.
  - A visible focus ring that is never removed. Removing it is the single most common
    accessibility fault on a marketing site, and we would deserve everything we got.
*/

:root {
    /* Measured against #ffffff: ink 16.5:1, slate 7.3:1. --rule is non-text, 1.4.11 only. */
    --ink: #16202b;
    --slate: #4a5866;
    --rule: #d8dee4;
    --paper: #ffffff;
    --wash: #f5f7f9;
    /* Measured 8.5:1 on white — passes 1.4.3 for body-size link text. */
    --link: #14507d;
    --link-hover: #0d3a5c;
    --flag: #8a4b00;
    --measure: 34rem;
}

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

html {
    /* Never a fixed px root: it defeats the browser's own text-size setting. */
    font-size: 100%;
}

body {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

/* WCAG 2.4.1 Bypass Blocks. Visible on focus, not hidden from everyone forever. */
.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink);
    color: var(--paper);
    padding: 0.75rem 1rem;
    z-index: 10;
    text-decoration: underline;
}

.skip:focus {
    left: 0;
}

a {
    color: var(--link);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.15em;
}

a:hover {
    color: var(--link-hover);
}

/* Never removed, and thick enough to see against any background here. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--link);
    outline-offset: 2px;
    border-radius: 2px;
}

.wrap {
    max-width: 46rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

header.masthead {
    border-bottom: 1px solid var(--rule);
    padding: 1.25rem 0;
}

.masthead .wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    align-items: baseline;
    justify-content: space-between;
}

.wordmark {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
    text-decoration: none;
}

.parent {
    font-size: 0.875rem;
    color: var(--slate);
    margin: 0;
}

main {
    padding: 2.5rem 0 1rem;
}

h1 {
    font-size: 1.875rem;
    line-height: 1.25;
    letter-spacing: -0.015em;
    margin: 0 0 1rem;
    max-width: var(--measure);
}

h2 {
    font-size: 1.3125rem;
    line-height: 1.3;
    margin: 2.75rem 0 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
    max-width: var(--measure);
}

h3 {
    font-size: 1.0625rem;
    margin: 1.5rem 0 0.5rem;
}

p,
li {
    max-width: var(--measure);
}

.lead {
    font-size: 1.1875rem;
    color: var(--slate);
}

.note {
    background: var(--wash);
    border-left: 4px solid var(--rule);
    padding: 0.875rem 1rem;
    margin: 1.5rem 0;
    max-width: var(--measure);
}

.note.flag {
    border-left-color: var(--flag);
}

.note p {
    margin: 0.5rem 0;
}

.note p:first-child {
    margin-top: 0;
}

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

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.25rem 0;
    font-size: 0.9375rem;
}

caption {
    text-align: left;
    color: var(--slate);
    font-size: 0.9375rem;
    padding-bottom: 0.5rem;
}

th,
td {
    text-align: left;
    vertical-align: top;
    padding: 0.625rem 0.75rem 0.625rem 0;
    border-bottom: 1px solid var(--rule);
}

th {
    font-weight: 600;
}

/* Wide content scrolls in its own box rather than the page scrolling sideways. */
.scrolls {
    overflow-x: auto;
    max-width: 100%;
}

dl.buckets {
    margin: 1.25rem 0;
}

dl.buckets dt {
    font-weight: 600;
    margin-top: 1rem;
}

dl.buckets dd {
    margin: 0.25rem 0 0;
    color: var(--slate);
    max-width: var(--measure);
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

footer {
    border-top: 1px solid var(--rule);
    margin-top: 3rem;
    padding: 1.75rem 0 3rem;
    color: var(--slate);
    font-size: 0.9375rem;
}

footer p {
    margin: 0.4rem 0;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
