/*
 * Head Office: components
 * Needs tokens.css first. Every class starts with "hq-" so it can sit next to any other CSS.
 * Put class="hq" on <body>.
 */

/* Base: a browser default page, set on purpose */
.hq { margin: 0; padding: 0 var(--hq-edge) 24px; background: var(--hq-paper); color: var(--hq-ink); font-family: var(--hq-serif); font-size: var(--hq-text-body); line-height: var(--hq-leading); overflow-x: clip; }
.hq *, .hq *::before, .hq *::after { box-sizing: border-box; }
.hq a { color: var(--hq-link); text-decoration: underline; text-underline-offset: 2px; }
.hq a:visited { color: var(--hq-visited); }
.hq a:hover { text-decoration-thickness: 2px; }
.hq a:active { color: var(--hq-active); }
:where(.hq) p { margin: 0 0 14px; }
.hq-center { text-align: center; }
.hq-measure { max-width: var(--hq-measure); }
.hq-measure--center { max-width: var(--hq-measure); margin-inline: auto; }

/* The grooved rule: full width, between every section */
.hq-rule { height: 0; margin: var(--hq-block) 0; border: 0; border-top: var(--hq-groove); border-color: var(--hq-rule); }
.hq-rule--tight { margin: 16px 0; }

/* Masthead: centered, big small caps, street address under it */
.hq-mast { padding-top: 10px; text-align: center; }
.hq-mast__name { margin: 0; font-size: var(--hq-text-mast); font-weight: 700; font-variant: small-caps; letter-spacing: .01em; line-height: 1.05; }
.hq-mast__name a, .hq-mast__name a:visited { color: var(--hq-ink); text-decoration: none; }
.hq-mast__inc { font-size: .5em; }
.hq-mast__address { margin: 6px 0 0; font-size: var(--hq-text-small); font-weight: 700; line-height: 1.25; }
.hq-mast__title { margin: 4px 0 0; font-size: var(--hq-text-h3); font-weight: 700; }

/* Text nav: a centered row of links split by pipes */
.hq-nav { display: flex; flex-wrap: wrap; justify-content: center; row-gap: 2px; margin: 12px 0 0; font-size: var(--hq-text-small); text-align: center; }
.hq-nav a { white-space: nowrap; }
.hq-nav__sep { margin: 0 8px; color: var(--hq-ink-soft); }
.hq-nav__here { font-weight: 700; color: var(--hq-ink); white-space: nowrap; }

/* Headings */
.hq-h1 { margin: 0 0 12px; font-size: var(--hq-text-h1); font-weight: 700; line-height: 1.15; }
.hq-h2 { margin: 0 0 12px; font-size: var(--hq-text-h2); font-weight: 700; line-height: 1.2; }
.hq-h3 { margin: 0 0 8px; font-size: var(--hq-text-h3); font-weight: 700; font-variant: small-caps; letter-spacing: .02em; }
.hq-lead { margin: 0 0 14px; font-size: 19px; }

/* The link index: two columns of bulleted links, each with an "Updated" stamp */
.hq-index { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--hq-gap); padding: 0 var(--hq-gap) 0 var(--hq-indent); }
.hq-index ul { margin: 0; padding-left: 20px; list-style: disc; }
.hq-index li { margin: 0 0 22px; padding-left: 4px; }
.hq-index li::marker { color: var(--hq-link); }
.hq-stamp { display: block; margin-top: 2px; color: var(--hq-ink-soft); font-size: var(--hq-text-stamp); }
.hq-new { margin-left: 6px; color: var(--hq-new); font-size: var(--hq-text-stamp); font-weight: 700; font-variant: small-caps; letter-spacing: .04em; vertical-align: 1px; }

/* Notice: a small centered caps line between rules, like a sponsor line */
.hq-notice { font-size: var(--hq-text-small); text-align: center; text-transform: uppercase; letter-spacing: .02em; line-height: 1.35; }
.hq-notice strong { display: block; margin-bottom: 2px; font-size: 17px; letter-spacing: .14em; }

/* Boxed note: the one place a box is allowed */
.hq-box { padding: 12px 16px; border: var(--hq-table-border); background: var(--hq-wash); font-size: var(--hq-text-small); }
.hq-box--mark { background: var(--hq-mark); border-color: #D8C866; }

/* Buttons: raised gray system buttons, pressed in when active */
.hq-btn { display: inline-block; padding: 5px 16px 6px; border: 1px solid #3A3A36; border-radius: var(--hq-radius); background: var(--hq-face); box-shadow: var(--hq-bevel-out); color: var(--hq-black); font: 400 15px var(--hq-serif); line-height: 1.3; text-decoration: none; white-space: nowrap; cursor: pointer; }
.hq a.hq-btn, .hq a.hq-btn:visited { color: var(--hq-black); text-decoration: none; }
.hq-btn:active { box-shadow: var(--hq-bevel-in); padding: 6px 15px 5px 17px; }
.hq-btn--default { outline: 1px solid #3A3A36; outline-offset: 1px; font-weight: 700; }
.hq-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hq-center .hq-actions { justify-content: center; }

/* Tables: double borders and cellpadding, like border=1 */
.hq-table-wrap { overflow-x: auto; }
.hq-table { border: var(--hq-table-border); border-spacing: 2px; border-collapse: separate; font-size: 16px; }
.hq-table th, .hq-table td { padding: 6px 10px; border: var(--hq-table-border); text-align: left; vertical-align: baseline; }
.hq-table th { background: var(--hq-wash); font-weight: 700; }
.hq-table td.hq-num, .hq-table th.hq-num { text-align: right; font-family: var(--hq-mono); font-size: 15px; white-space: nowrap; }
.hq-table caption { padding-bottom: 6px; font-weight: 700; text-align: left; }
.hq-table tr.hq-pick td { background: var(--hq-mark); }

/* Fares (pricing): a plain table plus a short list of passes */
.hq-fares { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--hq-gap); }
.hq-fare { padding-top: 10px; border-top: var(--hq-groove); border-color: var(--hq-rule); }
.hq-fare__price { margin: 4px 0 8px; font-size: 30px; font-weight: 700; }
.hq-fare__per { font-size: var(--hq-text-small); font-weight: 400; }
.hq-fare ul { margin: 0 0 14px; padding-left: 20px; }
.hq-fare--pick .hq-fare__price { display: inline-block; padding: 0 6px; background: var(--hq-mark); }

/* Article: a typed letter */
.hq-article { max-width: var(--hq-measure); margin-inline: auto; }
.hq-article p { margin: 0 0 16px; text-indent: 2em; }
.hq-article p.hq-noindent, .hq-article p.hq-salute, .hq-article .hq-salute + p { text-indent: 0; }
.hq-article h2 { margin: 26px 0 10px; font-size: var(--hq-text-h3); font-weight: 700; font-variant: small-caps; letter-spacing: .02em; }
.hq-article blockquote { margin: 18px 0 18px 2em; padding-left: 14px; border-left: 3px double var(--hq-rule); font-style: italic; }
.hq-article ol, .hq-article ul { margin: 0 0 16px; padding-left: 2.5em; }
.hq-dateline { margin: 0 0 18px; font-size: var(--hq-text-small); }
.hq-salute { margin: 0 0 12px; }
.hq-signoff { margin-top: 26px; }
.hq-signoff__name { font-style: italic; font-size: 20px; }

/* Forms: labels above sunken wells, fieldsets with legends */
.hq-form { max-width: 560px; }
.hq-fieldset { margin: 0 0 18px; padding: 10px 16px 14px; border: 2px groove var(--hq-rule-soft); }
.hq-fieldset legend { padding: 0 6px; font-weight: 700; font-variant: small-caps; letter-spacing: .02em; }
.hq-field { margin: 0 0 12px; }
.hq-label { display: block; margin-bottom: 3px; font-size: 16px; }
.hq-input, .hq-select, .hq-textarea { width: 100%; max-width: 100%; padding: 4px 6px; border: 0; border-radius: var(--hq-radius); background: var(--hq-paper); box-shadow: var(--hq-bevel-in); color: var(--hq-black); font: 16px var(--hq-mono); }
.hq-input:focus, .hq-select:focus, .hq-textarea:focus { outline: 1px dotted var(--hq-ink); outline-offset: 2px; }
.hq-select { background: var(--hq-paper); }
.hq-textarea { min-height: 84px; }
.hq-check { display: block; margin: 0 0 8px; }
.hq-check input { margin: 0 8px 0 2px; accent-color: var(--hq-ink); }
.hq-hint { margin: 3px 0 0; color: var(--hq-ink-soft); font-size: var(--hq-text-stamp); }
.hq-error { margin: 3px 0 0; color: var(--hq-active); font-size: var(--hq-text-small); }
.hq-ok { color: var(--hq-ok); font-weight: 700; }

/* Footer: comments line, disclaimer link, copyright */
.hq-footer { font-size: var(--hq-text-small); }
.hq-footer p { margin: 0 0 10px; }
.hq-copy { margin-top: 18px; }

/* Phone: one column, the index loses its indent */
@media (max-width: 720px) {
  .hq-index { grid-template-columns: 1fr; padding: 0 0 0 8px; }
  .hq-fares { grid-template-columns: 1fr; }
  .hq-index li { margin-bottom: 16px; }
}

/* Helpers */
.hq-table--center { margin-inline: auto; }
.hq-actions--center { justify-content: center; }
