/* Shared styles for the About / Privacy / Contact pages (same look as the planner on the homepage).
   Color tokens, the control cursor, the logo swap, and the theme menu live in assets/tokens.css.
   Toast, footer, button, the form reset, and the header live in assets/components.css. */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Outfit, system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; }
.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lbl-short { display: none; }
main.page { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 40px 28px 64px; }
/* Readable long-form text: shared by these pages and the homepage explainer. */
.prose { line-height: 1.65; font-size: 1.05rem; }
.prose h1 { font-size: 2rem; line-height: 1.2; letter-spacing: 0.01em; margin-bottom: 12px; }
.prose h2 { font-size: 1.3rem; line-height: 1.3; margin: 32px 0 10px; }
.prose p, .prose ul, .prose ol { margin-bottom: 14px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--link); text-underline-offset: 3px; }
.prose a:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; border-radius: 3px; }
.prose .lead { color: var(--muted); font-size: 1.15rem; }
html.light .prose .lead { color: var(--slate-700); }
.prose .overlap-line {
    color: var(--text); font-size: 1.35rem; font-weight: 700; line-height: 1.35;
    max-width: 22em; margin: 4px 0 18px;
}
.prose .updated { color: var(--muted); font-size: 0.9rem; }
.prose h3 { font-size: 1.05rem; line-height: 1.35; margin: 22px 0 8px; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: color-mix(in srgb, var(--text) 8%, transparent); padding: 1px 5px; border-radius: 5px; }
.prose pre { overflow: auto; margin: 0 0 14px; padding: 12px 14px; border-radius: 8px; background: color-mix(in srgb, var(--text) 8%, transparent); }
.prose pre code { background: none; padding: 0; }
@media (max-width: 767px) {
    .prose pre, .prose pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
}
/* Theme image pairs follow html.light / html.dark (System sets the class from
   the OS). Same idea as the logo swap in tokens.css. */
.theme-img-dark { display: block; }
.theme-img-light { display: none; }
html.light .theme-img-light { display: block; }
html.light .theme-img-dark { display: none; }
/* Theme figures: both pictures stay in the DOM. The visible one follows
   html.light / html.dark (see .theme-img-* above). The img width/height
   attributes are the bitmap size (e.g. 1440x1228). Without a cap that
   is the used CSS size, so the figure is wider than a phone viewport
   and the image is cropped. max-width: 100% on the figure, the picture,
   and the img keeps every theme path inside the column. min(100%, 720px)
   also keeps the 2x layout cap from the terminal article. */
.prose figure { margin: 0 0 14px; max-width: 100%; min-width: 0; }
.prose figure picture { max-width: 100%; min-width: 0; }
.prose figure img {
    display: block;
    width: 100%;
    max-width: min(100%, 720px);
    height: auto;
}
.prose figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.prose summary { min-block-size: 44px; display: flex; align-items: center; }
.at-badge { line-height: 0; }
.at-badge a { display: inline-block; border-radius: 12px; }
.at-badge a:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.at-badge img { display: block; width: 180px; max-width: 100%; height: auto; }
.callout { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin: 18px 0; }
.callout p:last-child { margin-bottom: 0; }
.mcp-url {
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    padding: 16px 18px; margin: 18px 0 8px; max-inline-size: 100%;
}
.mcp-url label { font-weight: 600; color: var(--text); }
.mcp-url-row {
    display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px;
    max-inline-size: 100%;
}
.mcp-url-row .btn { flex: 0 0 auto; }
.mcp-url input {
    /* Basis is a short field so the button stays beside it. The max is the
       address (ch units), so a wide card does not stretch the box. */
    width: auto;
    flex: 1 1 12ch;
    min-inline-size: min(12ch, 100%);
    max-inline-size: min(100%, calc(var(--url-ch, 29) * 1ch + 1.6rem));
    min-block-size: 44px; padding: 8px 12px;
    border: 1px solid var(--line); border-radius: 12px;
    background: var(--bg); color: var(--text);
}
@supports (field-sizing: content) {
    .mcp-url input {
        field-sizing: content;
        width: auto;
        max-inline-size: min(100%, max-content);
    }
}
.mcp-url input:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

main.holiday-page { max-width: 1100px; }
.holiday-title {
    display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.holiday-title h1 { margin-bottom: 0; text-wrap: balance; }
.holiday-title__icon { width: 28px; height: 28px; flex: none; }
.holiday-page .lead { text-wrap: pretty; }
.holiday-page .field { margin: 0 0 16px; }
.holiday-page .field label { display: block; font-weight: 650; margin-bottom: 6px; color: var(--text); }
/* 10px matches the planner's help line under a field (.dur-custom). The label stays closer than that. */
.holiday-page #holiday-region-help { margin-top: 10px; max-width: 28rem; }
.holiday-page input[type="search"],
.holiday-page select {
    width: 100%;
    max-width: 28rem;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--slate-800);
    color: var(--slate-50);
}
html.light .holiday-page input[type="search"],
html.light .holiday-page select { background: var(--white); color: var(--slate-900); }
.holiday-page input:focus-visible,
.holiday-page select:focus-visible,
.holiday-page button:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.holiday-page button[type="submit"] {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; min-width: 44px; padding: 10px 16px;
    border: 1px solid var(--btn-primary); border-radius: 12px;
    background: var(--btn-primary); color: var(--white);
    font-weight: var(--btn-weight); font-size: var(--btn-size);
}
.holiday-page #holiday-search-list {
    list-style: none;
    margin: 6px 0 0;
    padding: 4px;
    max-width: 28rem;
    max-height: 16rem;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card, var(--gray-900));
}
.holiday-page #holiday-search-list button {
    display: block;
    width: 100%;
    text-align: start;
    min-height: 44px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
}
.holiday-page #holiday-search-list button[aria-selected="true"],
.holiday-page #holiday-search-list button:hover { background: color-mix(in srgb, var(--cyan) 16%, transparent); }
.holiday-shortcuts, .holiday-countries { list-style: none; padding: 0; }
.holiday-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; }
.holiday-shortcuts a, .holiday-years a, .holiday-countries a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}
.holiday-shortcuts a[aria-current="true"],
.holiday-years a[aria-current="page"] {
    outline: 2px solid var(--text);
    background: color-mix(in srgb, var(--text) 8%, var(--card));
}
.holiday-years { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.holiday-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 8px 0 20px; }
.holiday-months { display: grid; gap: 16px; }
.holiday-month {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px 20px 16px;
    container: holiday-month / inline-size;
}
.holiday-month h2 {
    margin: 0 0 14px;
    letter-spacing: 0.04em;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
    text-wrap: balance;
}
/* The first month is in the first screen. Later months wait until they scroll near.
   December stays in normal flow so the phone Feedback tab can use its real bottom edge:
   a skipped month's border box can collapse, and the grid container then ends at January.
   The plain block size is the fallback when `auto <length>` is dropped; the auto line wins
   where it is understood and lets the browser remember the real height after the first paint. */
.holiday-months .holiday-month:not(:first-child):not(:last-child) {
    content-visibility: auto;
    contain-intrinsic-size: auto none auto 32rem;
    contain-intrinsic-block-size: 32rem;
    contain-intrinsic-block-size: auto 32rem;
}
.holiday-cal, .holiday-list { width: 100%; border-collapse: collapse; }
.holiday-cal th, .holiday-cal td {
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    padding: 8px 6px;
    vertical-align: top;
    text-align: start;
    color: var(--text);
}
.holiday-list th, .holiday-list td {
    border: 1px solid var(--line);
    padding: 8px 6px;
    vertical-align: top;
    text-align: start;
    color: var(--text);
}
.holiday-cal { table-layout: fixed; }
.holiday-cal th:nth-child(6),
.holiday-cal th:nth-child(7),
.holiday-cal td:nth-child(6),
.holiday-cal td:nth-child(7) { background: var(--weekend-wash); }
/* US grids start on Sunday, so the weekend columns are 1 and 7, not 6 and 7. */
.holiday-cal--sun th:nth-child(6),
.holiday-cal--sun td:nth-child(6) { background: transparent; }
.holiday-cal--sun th:nth-child(1),
.holiday-cal--sun td:nth-child(1) { background: var(--weekend-wash); }
.holiday-cal time { font-weight: 700; color: var(--text); }
.holiday-mark {
    display: block;
    margin-top: 4px;
    padding: 2px 4px;
    border-radius: 8px;
    background: var(--green-900);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.35;
}
/* A fixed 7-column month is narrower than a long name. Break inside the mark
   so the fill, and the forced-colours border, holds every glyph. Do not clip. */
.holiday-cal td { min-inline-size: 0; }
.holiday-cal .holiday-mark {
    max-inline-size: 100%;
    overflow-wrap: break-word;
}
/* Below this the word "holiday" no longer fits at 0.75rem, so the label would
   split mid-word. Slightly smaller type and tighter inline padding keep
   "Bank" and "holiday" as whole words inside the amber fill. */
@container holiday-month (inline-size < 26rem) {
    .holiday-cal th,
    .holiday-cal td { padding-inline: 1px; }
    .holiday-cal .holiday-mark {
        padding-inline: 1px;
        font-size: 0.625rem;
        line-height: 1.3;
    }
}
html.light .holiday-mark { background: var(--green-100); color: var(--green-950); border: 0; }
/* Bank-only closure. Same amber as the planner bank swatch (#fcd34d / #78350f),
   not the Early/late shoulder colours. Dark text on #fcd34d is 10.4:1.
   Light text #78350f on #fef3c7 is 8.2:1. The words "Bank holiday" travel with the colour. */
.holiday-mark--bank { background: var(--amber-300); color: var(--amber-975); }
html.light .holiday-mark--bank { background: var(--amber-100); color: var(--amber-950); }
.holiday-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}
.holiday-legend .holiday-mark { display: inline-block; margin-top: 0; }
@media (forced-colors: active) {
    .holiday-mark,
    .holiday-mark--bank,
    html.light .holiday-mark,
    html.light .holiday-mark--bank {
        background: Canvas;
        color: CanvasText;
        /* Outline, not a border: a border would shrink the text box and split
           "holiday" off the amber (or Canvas) fill. The outline sits inside. */
        border: 0;
        outline: 1px solid CanvasText;
        outline-offset: -1px;
    }
    .holiday-title__icon { forced-color-adjust: auto; }
}
.holiday-list tr[hidden], .holiday-mark[hidden] { display: none; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
/* The shared menu list is 520px minus its 16px padding and 1px border (486px),
   which fits three 130px tracks. The holiday page is wider, so cap the same list. */
.holiday-page .nav-dropdown__list--grid { max-width: 486px; }
/* Menu hover text is --cyan. That pair is below 7:1 on the page background, so country names stay --text. */
.holiday-page .nav-dropdown__list.nav-dropdown__list a:hover { color: var(--text); }

@media (max-width: 600px) {
    .lbl-long { display: none; }
    .lbl-short { display: inline; }
    main.page { padding: 28px 18px 48px; }
    .prose { font-size: 1rem; }
    .prose h1 { font-size: 1.6rem; }
    .holiday-month { padding: 14px 10px 12px; }
}

/* Phones through 767px: the country table scrolls inside itself. 768px is a gate
   width, so this does not become ≤600. The Feedback pill is hidden on every phone
   page (feedback.css); footer Feedback opens the dialog. The old edge-tab
   clearance is gone, because that tab is not on screen. Long holiday names
   overflow a fixed cell; clip them at the card so that overflow does not widen
   the page. */
@media (max-width: 767px) {
    .holiday-page .holiday-list { display: block; max-inline-size: 100%; overflow-x: auto; }
    .holiday-months .holiday-month { min-inline-size: 0; overflow-x: clip; }
}

/* Placeholder copy awaiting the writer: one style for every [COPY NEEDED] block. Uses --text on --card (well above 7:1 in both themes). */
.copy-needed { border: 2px dashed var(--text); border-radius: 14px; padding: 14px 18px; margin: 14px 0; background: var(--card); color: var(--text); }
.copy-needed p:last-child { margin-bottom: 0; }
