/*
 * Civic Mast: components
 * Needs tokens.css first. Every class starts with "cm-" so it can sit next to any other CSS.
 */

/* Base */
.cm { margin: 0; background: var(--cm-night); color: var(--cm-white); font-family: var(--cm-sans); font-size: var(--cm-text-body); font-weight: var(--cm-weight-regular); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
.cm *, .cm *::before, .cm *::after { box-sizing: border-box; }
.cm a { color: inherit; }
.cm ::selection { background: var(--cm-amber); color: var(--cm-mast); }
.cm-container { width: min(100% - 2 * var(--cm-gutter), var(--cm-container)); margin-inline: auto; }
.cm-narrow { width: min(100% - 2 * var(--cm-gutter), var(--cm-narrow)); margin-inline: auto; }

/* Sections */
.cm-section { padding-block: var(--cm-section); }
.cm-section--graphite { background: var(--cm-graphite); }
.cm-section--mast { background: var(--cm-mast); }
.cm-section--rule { border-top: var(--cm-border); }

/* Type: heavy tight sans for headlines, mono caps for status lines */
.cm-hero-title, .cm-h1, .cm-h2, .cm-h3 { margin: 0; font-family: var(--cm-sans); color: inherit; }
.cm-hero-title { font-size: var(--cm-text-hero); font-weight: var(--cm-weight-heavy); letter-spacing: var(--cm-tracking-hero); line-height: .92; }
.cm-h1 { font-size: var(--cm-text-h1); font-weight: var(--cm-weight-heavy); letter-spacing: var(--cm-tracking-hero); line-height: .96; }
.cm-h2 { font-size: var(--cm-text-h2); font-weight: var(--cm-weight-heavy); letter-spacing: var(--cm-tracking-head); line-height: 1.02; }
.cm-h3 { font-size: var(--cm-text-h3); font-weight: var(--cm-weight-bold); letter-spacing: -.01em; line-height: 1.25; }
.cm-lead { max-width: 560px; margin: 22px 0 0; color: var(--cm-read); font-size: var(--cm-text-lead); font-weight: var(--cm-weight-medium); line-height: 1.55; }
.cm-label { display: inline-flex; align-items: center; gap: 12px; margin: 0; font-family: var(--cm-mono); font-size: var(--cm-text-micro); font-weight: var(--cm-weight-medium); letter-spacing: var(--cm-tracking-micro); text-transform: uppercase; color: var(--cm-mute); }
.cm-label--white { color: var(--cm-white); }
.cm-amber { color: var(--cm-amber); }
.cm-num { font-family: var(--cm-mono); font-variant-numeric: tabular-nums; }

/* Status: a coloured dot then a mono line. The reference's signature label */
.cm-status { display: inline-flex; align-items: center; gap: 12px; font-family: var(--cm-mono); font-size: var(--cm-text-micro); font-weight: var(--cm-weight-medium); letter-spacing: var(--cm-tracking-micro); text-transform: uppercase; color: var(--cm-white); white-space: nowrap; }
.cm-status::before { content: ""; width: 9px; height: 9px; border-radius: var(--cm-radius-dot); background: var(--cm-go); box-shadow: 0 0 0 3px rgba(61, 214, 140, .18); }
.cm-status--hold::before { background: var(--cm-hold); box-shadow: 0 0 0 3px var(--cm-amber-soft); }
.cm-status--off::before { background: var(--cm-faint); box-shadow: none; }

/* Tags: hairline boxes in mono. --live is the red outlined broadcast tag */
.cm-tag { display: inline-flex; align-items: center; padding: 2px 6px; border: 1px solid var(--cm-rule-bright); font-family: var(--cm-mono); font-size: 11px; font-weight: var(--cm-weight-medium); letter-spacing: .14em; line-height: 1.4; text-transform: uppercase; color: var(--cm-read); white-space: nowrap; }
.cm-tag--live { border-color: var(--cm-live); color: var(--cm-white); }
.cm-tag--amber { border-color: var(--cm-amber); color: var(--cm-amber); }

/* Mast: the black top bar. Wordmark in the middle, actions either side */
.cm-mast { position: relative; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; height: var(--cm-mast-h); padding: 0 var(--cm-gutter); background: var(--cm-mast); }
.cm-mast__left, .cm-mast__right { display: flex; align-items: center; gap: 28px; font-size: 17px; font-weight: var(--cm-weight-heavy); letter-spacing: -.01em; }
.cm-mast__right { justify-content: flex-end; }
.cm-mast__left a, .cm-mast__right a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.cm-mast__right a:hover, .cm-mast__left a:hover { color: var(--cm-amber); }
.cm-caret { width: 8px; height: 8px; margin-top: -4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.cm-seal { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.cm-seal svg { width: 52px; height: 52px; display: block; }
.cm-search { width: 200px; padding: 7px 10px; border: 1px solid var(--cm-rule-bright); background: transparent; color: var(--cm-white); font-family: var(--cm-sans); font-size: 14px; }
.cm-search::placeholder { color: var(--cm-mute); }
@media (max-width: 1080px) { .cm-search, .cm-mast .cm-mast__hide { display: none; } }
@media (max-width: 640px) { .cm-mast { grid-template-columns: auto 1fr; } .cm-mast__left { display: none; } .cm-seal { justify-self: start; } .cm-mast__right { gap: 16px; font-size: 15px; } }

/* Sub-nav band: graphite strip with a breadcrumb and the section links */
.cm-band { position: relative; z-index: 4; background: var(--cm-graphite); }
.cm-band__crumbs { display: flex; flex-wrap: wrap; gap: 10px; padding: 22px var(--cm-gutter) 0; font-size: 13px; font-weight: var(--cm-weight-medium); color: var(--cm-mute); }
.cm-band__crumbs a { text-decoration: none; }
.cm-band__crumbs span[aria-current] { color: var(--cm-white); }
.cm-band__crumbs i { font-style: normal; color: var(--cm-faint); }
.cm-band__links { display: flex; justify-content: center; gap: 30px; padding: 18px var(--cm-gutter) 22px; font-size: var(--cm-text-nav); font-weight: var(--cm-weight-heavy); letter-spacing: -.005em; overflow-x: auto; scrollbar-width: none; }
.cm-band__links a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.cm-band__links a[aria-current] { color: var(--cm-amber); }
.cm-band__links a:hover { color: var(--cm-amber); }
@media (max-width: 760px) { .cm-band__links { justify-content: flex-start; gap: 22px; } }

/* Buttons: square, heavy, no shadow. One amber button per screen */
.cm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 15px 24px; border: 1px solid var(--cm-white); border-radius: var(--cm-radius); background: transparent; color: var(--cm-white); font-family: var(--cm-sans); font-size: 16px; font-weight: var(--cm-weight-heavy); letter-spacing: -.005em; line-height: 1.1; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background var(--cm-fast) var(--cm-ease), color var(--cm-fast) var(--cm-ease), border-color var(--cm-fast) var(--cm-ease); }
.cm-btn::after { content: ""; width: 7px; height: 7px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); transition: transform var(--cm-fast) var(--cm-ease); }
.cm-btn:hover { background: var(--cm-white); color: var(--cm-mast); }
.cm-btn:hover::after { transform: translateX(3px) rotate(45deg); }
.cm-btn--amber { border-color: var(--cm-amber); background: var(--cm-amber); color: var(--cm-mast); }
.cm-btn--amber:hover { border-color: var(--cm-white); background: var(--cm-white); }
.cm-btn--plain::after { display: none; }
.cm-btn--block { width: 100%; }
.cm-btn:focus-visible { outline: 2px solid var(--cm-amber); outline-offset: 3px; }
.cm-link { display: inline-flex; align-items: center; gap: 10px; font-weight: var(--cm-weight-heavy); text-decoration: none; color: var(--cm-white); border-bottom: 2px solid var(--cm-amber); padding-bottom: 2px; }
.cm-link::after { content: "\2192"; color: var(--cm-amber); transition: transform var(--cm-fast) var(--cm-ease); }
.cm-link:hover::after { transform: translateX(3px); }
.cm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 34px; }

/* Plate: a full-bleed drawn night picture. The signature surface */
.cm-plate { position: relative; overflow: hidden; isolation: isolate; background: var(--cm-plate-sky); }
.cm-plate::before { content: ""; position: absolute; inset: 0; z-index: 0; background-image: var(--cm-stars); background-size: 160px 160px, 230px 230px, 96px 96px; opacity: .8; pointer-events: none; }
.cm-plate--dusk { background: var(--cm-plate-dusk); }
.cm-plate__art { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }
.cm-plate__scrim { position: absolute; inset: 0; z-index: 2; background: var(--cm-scrim); }
.cm-plate__scrim--low { background: var(--cm-scrim-low); }
.cm-plate__content { position: relative; z-index: 3; }

/* Hero: tall plate, a giant stacked title on the left, a status line under the lead */
.cm-hero { min-height: min(calc(100vh - var(--cm-mast-h)), 780px); display: flex; flex-direction: column; justify-content: center; }
.cm-hero .cm-plate__content { width: min(100% - 2 * var(--cm-gutter), var(--cm-container)); margin-inline: auto; padding-block: clamp(64px, 9vw, 120px); }
.cm-hero .cm-hero-title { max-width: 8.5ch; }
.cm-hero .cm-lead { max-width: 470px; margin-top: 44px; color: var(--cm-white); }
.cm-hero .cm-status { margin-top: 26px; }
.cm-hero--short { min-height: 0; }
.cm-hero--short .cm-plate__content { padding-block: clamp(56px, 7vw, 96px); }
@media (max-width: 640px) { .cm-hero .cm-plate__scrim { background: var(--cm-scrim-low); } .cm-hero { justify-content: flex-end; } }

/* Facts: a ruled strip of big numbers with mono labels */
.cm-facts { display: grid; grid-template-columns: repeat(var(--cm-cells, 4), minmax(0, 1fr)); border-top: var(--cm-border); }
.cm-facts__cell { padding: 28px var(--cm-gutter) 30px 0; border-right: var(--cm-border); }
.cm-facts__cell + .cm-facts__cell { padding-left: var(--cm-gutter); }
.cm-facts__cell:last-child { border-right: 0; }
.cm-facts__value { display: block; margin-top: 12px; font-size: clamp(34px, 4vw, 56px); font-weight: var(--cm-weight-heavy); letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.cm-facts__value small { margin-left: 6px; font-family: var(--cm-mono); font-size: 14px; font-weight: var(--cm-weight-regular); letter-spacing: 0; color: var(--cm-mute); }
@media (max-width: 860px) { .cm-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cm-facts__cell { padding-left: 0 !important; padding-right: 12px; border-right: 0; border-bottom: var(--cm-border); } }

/* Section head: label, headline and lead on the left, a link on the right */
.cm-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(36px, 5vw, 64px); }
.cm-head > div { max-width: 760px; }
.cm-head .cm-label { margin-bottom: 18px; }

/* Cards: square graphite tiles with a top rule and a mono index */
.cm-grid { display: grid; gap: 1px; grid-template-columns: repeat(var(--cm-cols, 3), minmax(0, 1fr)); background: var(--cm-rule); border: var(--cm-border); }
.cm-card { display: flex; flex-direction: column; gap: 12px; padding: 30px 28px 32px; background: var(--cm-graphite); text-decoration: none; }
.cm-card--night { background: var(--cm-night); }
.cm-card__index { font-family: var(--cm-mono); font-size: var(--cm-text-micro); letter-spacing: .16em; text-transform: uppercase; color: var(--cm-amber); }
.cm-card p { margin: 0; color: var(--cm-mute); }
.cm-card .cm-status { margin-top: auto; padding-top: 14px; }
a.cm-card:hover { background: var(--cm-panel); }
@media (max-width: 900px) { .cm-grid { grid-template-columns: minmax(0, 1fr); } }

/* Feature: text beside a plate tile, the plate full height */
.cm-feature { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); min-height: 520px; background: var(--cm-graphite); }
.cm-feature__plate { position: relative; min-height: 340px; }
.cm-feature__body { display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 5vw, 72px); }
.cm-feature--flip .cm-feature__plate { order: 2; }
@media (max-width: 900px) { .cm-feature { grid-template-columns: minmax(0, 1fr); } .cm-feature--flip .cm-feature__plate { order: 0; } }

/* Spec rows: mono label and value */
.cm-specs { margin: 28px 0 0; padding: 0; list-style: none; border-top: var(--cm-border); }
.cm-specs li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: var(--cm-border); font-size: var(--cm-text-small); }
.cm-specs li span:first-child { font-family: var(--cm-mono); font-size: var(--cm-text-micro); letter-spacing: .14em; text-transform: uppercase; color: var(--cm-mute); }
.cm-specs li span:last-child { font-weight: var(--cm-weight-bold); text-align: right; }

/* Feed: a dated list of updates with tags */
.cm-feed { margin: 0; padding: 0; list-style: none; border-top: var(--cm-border); }
.cm-feed li { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 24px; align-items: baseline; padding: 22px 0; border-bottom: var(--cm-border); }
.cm-feed time { font-family: var(--cm-mono); font-size: 13px; color: var(--cm-mute); }
.cm-feed a { font-size: 20px; font-weight: var(--cm-weight-bold); letter-spacing: -.01em; text-decoration: none; }
.cm-feed a:hover { color: var(--cm-amber); }
@media (max-width: 700px) { .cm-feed li { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

/* Quote: a big heavy line with a mono source */
.cm-quote { margin: 0; padding-left: 28px; border-left: 3px solid var(--cm-amber); }
.cm-quote blockquote { margin: 0; font-size: clamp(24px, 2.6vw, 34px); font-weight: var(--cm-weight-bold); letter-spacing: -.02em; line-height: 1.25; }
.cm-quote figcaption { margin-top: 18px; }

/* Pricing */
.cm-toggle { display: inline-flex; border: var(--cm-border-bright); }
.cm-toggle button { padding: 10px 18px; border: 0; background: transparent; color: var(--cm-mute); font-family: var(--cm-sans); font-size: 14px; font-weight: var(--cm-weight-heavy); cursor: pointer; white-space: nowrap; }
.cm-toggle button[aria-pressed="true"] { background: var(--cm-white); color: var(--cm-mast); }
.cm-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--cm-rule); border: var(--cm-border); }
.cm-plan { display: flex; flex-direction: column; padding: 34px 30px; background: var(--cm-graphite); }
.cm-plan--pick { background: var(--cm-panel); box-shadow: inset 0 3px 0 var(--cm-amber); }
.cm-plan__price { margin: 26px 0 4px; font-size: 64px; font-weight: var(--cm-weight-heavy); letter-spacing: -.04em; line-height: 1; }
.cm-plan__price small { margin-left: 6px; font-family: var(--cm-mono); font-size: 13px; font-weight: var(--cm-weight-regular); letter-spacing: 0; color: var(--cm-mute); }
.cm-plan ul { flex: 1; margin: 26px 0 30px; padding: 0; list-style: none; }
.cm-plan li { position: relative; padding: 10px 0 10px 22px; border-top: var(--cm-border); font-size: var(--cm-text-small); color: var(--cm-read); }
.cm-plan li::before { content: ""; position: absolute; left: 0; top: 17px; width: 8px; height: 8px; background: var(--cm-amber); }
@media (max-width: 900px) { .cm-plans { grid-template-columns: minmax(0, 1fr); } }
.cm-table-wrap { overflow-x: auto; border-top: var(--cm-border); }
.cm-table { width: 100%; border-collapse: collapse; font-size: var(--cm-text-small); }
.cm-table th, .cm-table td { padding: 15px 12px; border-bottom: var(--cm-border); text-align: left; }
.cm-table th { font-family: var(--cm-mono); font-size: 11px; font-weight: var(--cm-weight-medium); letter-spacing: .16em; text-transform: uppercase; color: var(--cm-mute); }
.cm-table td:first-child { font-weight: var(--cm-weight-bold); }
.cm-table td:not(:first-child), .cm-table th:not(:first-child) { text-align: center; font-family: var(--cm-mono); }

/* FAQ */
.cm-faq details { border-bottom: var(--cm-border); }
.cm-faq details:first-child { border-top: var(--cm-border); }
.cm-faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0; font-size: 19px; font-weight: var(--cm-weight-bold); letter-spacing: -.01em; cursor: pointer; list-style: none; }
.cm-faq summary::-webkit-details-marker { display: none; }
.cm-faq summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-top: 6px; border-right: 2px solid var(--cm-amber); border-bottom: 2px solid var(--cm-amber); transform: rotate(45deg); transition: transform var(--cm-fast) var(--cm-ease); }
.cm-faq details[open] summary::after { transform: rotate(225deg); }
.cm-faq p { margin: 0 0 22px; max-width: 640px; color: var(--cm-mute); }

/* Article */
.cm-byline { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 30px; }
.cm-prose { font-size: 18px; line-height: 1.75; color: var(--cm-read); }
.cm-prose > * { margin: 0; }
.cm-prose > * + * { margin-top: 1.2em; }
.cm-prose > h2 { margin-top: 2em; }
.cm-prose h2 { font-size: 30px; font-weight: var(--cm-weight-heavy); letter-spacing: -.02em; line-height: 1.12; color: var(--cm-white); }
.cm-prose strong { color: var(--cm-white); }
.cm-prose a { color: var(--cm-white); text-decoration-color: var(--cm-amber); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.cm-prose ul { padding-left: 20px; }
.cm-prose li + li { margin-top: .4em; }
.cm-prose > .cm-quote, .cm-prose > .cm-figure, .cm-prose > .cm-callout { margin-top: 2em; }
.cm-figure .cm-plate { height: 340px; }
.cm-figure figcaption { margin-top: 12px; font-family: var(--cm-mono); font-size: 13px; color: var(--cm-mute); }
.cm-callout { padding: 22px 24px; border: var(--cm-border); border-left: 3px solid var(--cm-go); background: var(--cm-graphite); font-size: 16px; color: var(--cm-read); }
.cm-callout .cm-status { display: flex; margin-bottom: 10px; }

/* Forms */
.cm-form { display: grid; gap: 20px; }
.cm-field { display: grid; gap: 8px; }
.cm-field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 560px) { .cm-field-row { grid-template-columns: minmax(0, 1fr); } }
.cm-field-label { font-size: 14px; font-weight: var(--cm-weight-bold); color: var(--cm-white); }
.cm-input, .cm-select { width: 100%; padding: 13px 14px; border: var(--cm-border-bright); border-radius: var(--cm-radius); background: var(--cm-night); color: var(--cm-white); font-family: var(--cm-sans); font-size: 16px; appearance: none; }
.cm-select { background-image: linear-gradient(45deg, transparent 50%, var(--cm-mute) 50%), linear-gradient(135deg, var(--cm-mute) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.cm-input::placeholder { color: var(--cm-faint); }
.cm-input:focus, .cm-select:focus { outline: 0; border-color: var(--cm-amber); box-shadow: var(--cm-focus); }
.cm-help { font-size: 13px; color: var(--cm-mute); }
.cm-check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--cm-read); }
.cm-check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--cm-amber); }
.cm-choice { display: grid; grid-template-columns: repeat(var(--cm-choices, 3), minmax(0, 1fr)); gap: 1px; background: var(--cm-rule-bright); border: var(--cm-border-bright); }
.cm-choice label { display: grid; gap: 4px; padding: 14px; background: var(--cm-night); cursor: pointer; }
.cm-choice input { position: absolute; opacity: 0; pointer-events: none; }
.cm-choice b { font-size: 15px; font-weight: var(--cm-weight-heavy); }
.cm-choice span { font-family: var(--cm-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--cm-mute); }
.cm-choice label:has(input:checked) { background: var(--cm-panel); box-shadow: inset 0 3px 0 var(--cm-amber); }
@media (max-width: 560px) { .cm-choice { grid-template-columns: minmax(0, 1fr); } }
.cm-steps { margin: 0; padding: 0; list-style: none; counter-reset: cm-step; border-top: var(--cm-border); }
.cm-steps li { counter-increment: cm-step; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 18px 0; border-bottom: var(--cm-border); }
.cm-steps li::before { content: "0" counter(cm-step); font-family: var(--cm-mono); font-size: 13px; color: var(--cm-amber); padding-top: 3px; }
.cm-steps b { display: block; font-size: 17px; font-weight: var(--cm-weight-heavy); }
.cm-steps span { color: var(--cm-mute); font-size: 15px; }

/* Footer */
.cm-footer { background: var(--cm-mast); border-top: var(--cm-border); padding: 64px 0 28px; }
.cm-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 40px; }
.cm-footer__grid h4 { margin: 0 0 16px; font-family: var(--cm-mono); font-size: 11px; font-weight: var(--cm-weight-medium); letter-spacing: .2em; text-transform: uppercase; color: var(--cm-mute); }
.cm-footer__grid ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-weight: var(--cm-weight-bold); }
.cm-footer__grid a { text-decoration: none; }
.cm-footer__grid a:hover { color: var(--cm-amber); }
.cm-footer__grid p { max-width: 340px; margin: 16px 0 0; color: var(--cm-mute); font-size: 14px; }
.cm-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 22px; border-top: var(--cm-border); font-size: 13px; color: var(--cm-mute); }
@media (max-width: 860px) { .cm-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cm-footer__grid > :first-child { grid-column: 1 / -1; } }
