/* ==========================================================================
   Help and guidance (help.html)
   One long reference page: a sticky contents list beside nine numbered sections.
   Builds on css/base.css; every class here is prefixed help-.
   ========================================================================== */

/* Page head ---------------------------------------------------------------- */
.help { padding-bottom: clamp(4rem, 3rem + 5vw, 8rem); }

.help-head {
  display: grid; gap: 1rem;
  padding-block: clamp(1.5rem, 1rem + 2vw, 2.5rem) clamp(2rem, 1.25rem + 3vw, 3.5rem);
}
.help-head h1 { margin-top: clamp(0.5rem, 2vw, 1.5rem); }
.help-head__lede { max-width: 44ch; }

/* Layout ------------------------------------------------------------------- */
.help-layout { display: grid; gap: 2.5rem; }
.help-body { min-width: 0; }

/* Contents: a compact two-column list on phones, a sticky column from 1000px */
.help-toc { padding-block: 1.25rem 0; border-top: 1px solid var(--ink); }
.help-toc__list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.25rem;
  margin-top: 0.75rem;
}
.help-toc__list a {
  display: flex; align-items: baseline; gap: 0.625rem;
  min-height: 44px; padding-block: 0.6875rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem; line-height: 1.3; color: var(--ink-2);
  transition: color 0.15s;
}
.help-toc__list .num { flex: none; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; color: var(--brass-ink); }
.help-toc__list a:hover { color: var(--verdigris); }
.help-toc__aside { display: none; }

@media (min-width: 600px) and (max-width: 999px) {
  .help-toc__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .help-layout {
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: clamp(2.5rem, 5vw, 5.5rem);
    align-items: start;
  }
  .help-toc {
    position: sticky; top: calc(var(--header-h) + 1.5rem);
    max-height: calc(100vh - var(--header-h) - 3rem); overflow-y: auto;
    padding-block: 1.25rem 0.25rem;
  }
  .help-toc__list { display: block; margin-top: 1rem; border-left: 1px solid var(--line); }
  .help-toc__list a {
    min-height: 0; padding: 0.4375rem 0 0.4375rem 1rem; margin-left: -1px;
    border-bottom: 0; border-left: 1px solid transparent;
    color: var(--ink-3);
    transition: color 0.15s, border-color 0.15s;
  }
  .help-toc__list a:hover { color: var(--ink); }
  .help-toc__list .num { color: var(--ink-3); font-weight: 500; }
  .help-toc__list a[aria-current] { color: var(--ink); font-weight: 600; border-left-color: var(--ink); }
  .help-toc__list a[aria-current] .num { color: var(--brass-ink); font-weight: 600; }
  .help-toc__aside { display: block; max-width: 24ch; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--ink-3); }
}

/* Sections ----------------------------------------------------------------- */
.help-sec { padding-top: 0.5rem; }
.help-sec + .help-sec { margin-top: clamp(3.5rem, 2.5rem + 4vw, 6.5rem); }
.help-sec .sec-head { margin-bottom: clamp(1.25rem, 2.5vw, 2rem); }
.help-sec .sec-head .eyebrow { font-size: 0.75rem; }

.help-cols { display: grid; gap: 2rem; }
.help-main { min-width: 0; display: grid; gap: 1.25rem; align-content: start; }
.help-main > .prose, .help-sec > .prose { max-width: 62ch; }
.help-measure { max-width: 62ch; color: var(--ink-2); }
.help-measure + .help-measure { margin-top: 1rem; }
.help-measure a:hover { color: var(--verdigris); }

.help-aside { min-width: 0; display: grid; gap: 0.75rem; align-content: start; }
.help-aside > p { max-width: 62ch; }
.help-aside [data-slot="calc"] { max-width: 30rem; }
.help-aside__title { font: 600 0.6875rem/1.2 var(--font-ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass-ink); }
.help-aside__title--gap { margin-top: 1rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.help-aside a:not(.btn) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 0.15s; }
.help-aside a:not(.btn):hover { color: var(--verdigris); }

@media (min-width: 1200px) {
  .help-cols { grid-template-columns: minmax(0, 1fr) 19rem; gap: clamp(2.5rem, 4vw, 4.5rem); }
  .help-aside > .help-aside__title:first-child { padding-top: 0.25rem; }
}

/* The rule, set large */
.help-rule { font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem); line-height: 1.22; letter-spacing: -0.018em; color: var(--ink); max-width: 24ch; }

.help-sub {
  margin-top: clamp(2.25rem, 4vw, 3.25rem); margin-bottom: 1rem;
  font: 400 1.375rem/1.2 var(--font-display); letter-spacing: -0.015em;
}
.help-sub--tight { margin-top: 1rem; margin-bottom: -0.25rem; }

/* Tables ------------------------------------------------------------------- */
.help-table { font-size: 0.9375rem; line-height: 1.45; }
.help-table th, .help-table td { padding: 0.75rem 1rem 0.75rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: baseline; }
.help-table th:last-child, .help-table td:last-child { padding-right: 0; }
.help-table thead th {
  padding-block: 0 0.625rem; border-bottom-color: var(--ink);
  font: 600 0.6875rem/1.3 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3);
  vertical-align: bottom;
}
.help-table tbody th { font: 400 1.0625rem/1.3 var(--font-display); letter-spacing: -0.01em; color: var(--ink); }
.help-table td { color: var(--ink-2); }
.help-table .help-table__num { text-align: right; white-space: nowrap; }
.help-table td.help-table__num { color: var(--ink); }
.help-table__about { font-size: 0.8125rem; color: var(--ink-3); }
.help-table__sub { display: block; margin-top: 0.125rem; font: 400 0.8125rem/1.4 var(--font-ui); letter-spacing: 0; color: var(--ink-3); white-space: normal; }
.help-table__sub:empty { display: none; }
.help-table .help-table__group th {
  padding-block: 1.375rem 0.5rem; border-bottom-color: var(--line-2);
  font: 600 0.6875rem/1.3 var(--font-ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass-ink);
}
.help-table .help-table__group:first-child th { padding-top: 0.875rem; }
.help-table--sizes th:first-child { width: 22%; }
.help-table--sizes .help-table__who { padding-left: clamp(1rem, 3vw, 2.5rem); }
.help-table--sizes thead th:last-child { padding-left: clamp(1rem, 3vw, 2.5rem); }

/* On narrow screens each size becomes a small block: name and figures on one line, who it is for beneath. */
@media (max-width: 559px) {
  .help-table--sizes thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .help-table--sizes, .help-table--sizes tbody { display: block; }
  .help-table--sizes tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 1.25rem; align-items: baseline; padding-block: 0.75rem; border-bottom: 1px solid var(--line); }
  .help-table--sizes th, .help-table--sizes td { padding: 0; border: 0; width: auto; }
  .help-table--sizes th:first-child { width: auto; }
  .help-table--sizes td.help-table__num::after { content: " " attr(data-label); font-size: 0.75rem; color: var(--ink-3); }
  .help-table--sizes td[data-label="Cubic inches"]::after { content: " cu in"; }
  .help-table--sizes td[data-label="Liters"]::after { content: " L"; }
  .help-table--sizes .help-table__who { grid-column: 1 / -1; padding: 0.25rem 0 0; font-size: 0.875rem; }
  .help-table--sizes .help-table__group { display: block; padding-block: 1.25rem 0.5rem; border-bottom-color: var(--line-2); }
  .help-table--sizes .help-table__group:first-child { padding-top: 0.25rem; }
  .help-table--sizes .help-table__group th { display: block; padding: 0; }
}

.help-table--dispatch th:first-child { width: 44%; }

/* Delivery methods on narrow screens: method and price on one line, the time beneath. */
@media (max-width: 559px) {
  .help-table--methods thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .help-table--methods, .help-table--methods tbody { display: block; }
  .help-table--methods tbody { border-top: 1px solid var(--ink); }
  .help-table--methods tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1.25rem; align-items: baseline; padding-block: 0.75rem; border-bottom: 1px solid var(--line); }
  .help-table--methods th, .help-table--methods td { padding: 0; border: 0; }
  .help-table--methods td:not(.help-table__num) { grid-column: 1; grid-row: 2; font-size: 0.875rem; }
  .help-table--methods td.help-table__num { grid-column: 2; grid-row: 1 / span 2; }
  .help-table--sizes tbody { border-top: 1px solid var(--ink); }
}

/* Facts: a label and a statement, ruled */
.help-facts { border-top: 1px solid var(--ink); font-size: 0.9375rem; }
.help-facts > div { display: grid; gap: 0.125rem; padding-block: 0.75rem; border-bottom: 1px solid var(--line); }
.help-facts dt { font: 600 0.6875rem/1.9 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.help-facts dd { color: var(--ink); }
@media (min-width: 560px) {
  .help-facts > div { grid-template-columns: 9rem minmax(0, 1fr); gap: 1.5rem; align-items: baseline; }
  .help-facts--wide > div { grid-template-columns: 12rem minmax(0, 1fr); }
}

/* Numbered steps */
.help-steps { list-style: none; padding: 0; counter-reset: step; display: grid; font-size: 0.9375rem; line-height: 1.5; color: var(--ink-2); }
.help-steps li { counter-increment: step; position: relative; padding: 0.625rem 0 0.625rem 1.75rem; border-bottom: 1px solid var(--line); }
.help-steps li:first-child { border-top: 1px solid var(--line); }
.help-steps li::before { content: counter(step); position: absolute; left: 0; top: 0.625rem; font: italic 400 1.0625rem/1.4 var(--font-display); color: var(--brass-ink); }
.help-steps strong { font-weight: 600; color: var(--ink); }
.help-steps + .note { margin-top: 0.5rem; }
.help-steps--lg { font-size: 1rem; }
.help-steps--lg li { padding: 1rem 0 1rem 3rem; }
.help-steps--lg li:first-child { border-top-color: var(--ink); }
.help-steps--lg li::before { top: 1rem; font-size: 1.75rem; line-height: 1; }
.help-steps--lg strong { display: block; font: 400 1.1875rem/1.3 var(--font-display); letter-spacing: -0.012em; }

/* Lettering samples -------------------------------------------------------- */
.help-fonts { display: grid; gap: 1.5rem; }
.help-font { display: grid; gap: 0.75rem; align-content: start; min-width: 0; }
.help-font__plate {
  display: grid; place-content: center; justify-items: center; gap: 0.25rem;
  min-height: 9.5rem; padding: 1.5rem 0.75rem;
  background: var(--tile); color: var(--ink);
  text-align: center; line-height: 1.15;
}
.help-font__name { font-size: 1.75rem; }
.help-font__dates { font-size: 1.125rem; font-variant-numeric: lining-nums; }
.help-font__plate[data-font="roman"] { font-weight: 500; }
.help-font__plate[data-font="roman"] .help-font__name { font-size: 1.9375rem; }
.help-font__plate[data-font="script"] .help-font__name { font-size: 2.375rem; }
.help-font__plate[data-font="script"] .help-font__dates { font-size: 1.5rem; }
.help-font__plate[data-font="block"] { font-weight: 500; letter-spacing: 0.01em; }
.help-font__plate[data-font="block"] .help-font__name { font-size: 1.4375rem; }
.help-font__plate[data-font="block"] .help-font__dates { font-size: 1rem; }
.help-font__plate[data-font="inscription"] .help-font__name { font-size: 1.5625rem; }
.help-font figcaption { display: grid; gap: 0.25rem; padding-right: 1rem; }
.help-font__label { font: 600 0.6875rem/1.3 var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.help-font__label .num { margin-right: 0.375rem; color: var(--brass-ink); }
.help-font__note { font-size: 0.8125rem; line-height: 1.45; color: var(--ink-3); max-width: 34ch; }
@media (min-width: 620px) {
  .help-fonts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.5rem; }
}

/* Engravable pieces: a catalogue index -------------------------------------- */
.help-pieces { margin-top: 1.25rem; border-top: 1px solid var(--ink); }
.help-pieces + .help-measure { margin-top: 1.25rem; }
.help-piece {
  display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); column-gap: 0.5rem; row-gap: 0.125rem;
  padding-block: 0.75rem; border-bottom: 1px solid var(--line);
  font-size: 0.875rem; line-height: 1.45;
}
.help-piece__no { grid-row: 1 / span 3; font: italic 400 0.9375rem/1.5 var(--font-display); color: var(--brass-ink); }
.help-piece__name { justify-self: start; font: 400 1.125rem/1.3 var(--font-display); letter-spacing: -0.012em; color: var(--ink); }
.help-piece__name:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; color: var(--verdigris); }
.help-piece__sizes { font-weight: 500; color: var(--ink-2); }
.help-piece__place { color: var(--ink-3); }
@media (min-width: 760px) {
  .help-piece { grid-template-columns: 3.75rem minmax(0, 1fr) minmax(0, 1.2fr); column-gap: 1.5rem; }
  .help-piece__no { grid-row: 1 / span 2; }
  .help-piece__name, .help-piece__sizes { grid-column: 2; }
  .help-piece__place { grid-column: 3; grid-row: 1 / span 2; padding-top: 0.25rem; }
}
@media (min-width: 1240px) {
  .help-piece { grid-template-columns: 3.75rem minmax(0, 17rem) 10.5rem minmax(0, 1fr); align-items: baseline; }
  .help-piece__no, .help-piece__place { grid-row: auto; }
  .help-piece__name, .help-piece__sizes, .help-piece__place { grid-column: auto; }
  .help-piece__place { padding-top: 0; }
}

/* Questions ---------------------------------------------------------------- */
.help-faq { border-top-color: var(--ink); }
.help-faq .acc__item { scroll-margin-top: 0.5rem; }
.help-faq .acc__item > summary { min-height: 44px; }
.help-faq .acc__body { max-width: 62ch; }

/* Contact ------------------------------------------------------------------ */
.help-form { display: grid; gap: 1.25rem; }
.help-form__row { display: grid; gap: 1.25rem; }
@media (min-width: 620px) {
  .help-form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.help-form__foot { display: grid; gap: 0.875rem; justify-items: start; }
.help-form__foot p { max-width: 46ch; }
.help-form__result:empty { display: none; }
.help-form__result .note { display: grid; gap: 0.5rem; }
@media (min-width: 620px) {
  .help-form__foot { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1.5rem; }
}
@media (max-width: 479px) {
  .help-form__foot .btn { width: 100%; }
}

.help-email { font-size: clamp(1.1875rem, 1rem + 0.6vw, 1.375rem); line-height: 1.25; letter-spacing: -0.012em; overflow-wrap: anywhere; }
.help-email a { text-decoration-color: var(--line-2); }

.help-flag { margin-top: 1.25rem; }
.help-aside .help-flag { margin-top: 0.25rem; }

@media print {
  .help-toc { display: none; }
}

/* Touch: the whole row of a listed piece opens it, and the address has a full-height target. */
.help-piece { position: relative; }
.help-piece__name::after { content: ""; position: absolute; inset: 0; }
.help-email a { display: inline-block; padding-block: 0.625rem; margin-block: -0.625rem; }

/* A list that opens a section sits straight under the section rule, so it needs no rule of its own. */
.help-main > .help-facts:first-child { border-top: 0; margin-top: -0.75rem; }
