/* evrythingg: answer guides, hubs and the answer block on /q/ pages.
 * Loaded after site.css and built only from its tokens (petrol ground, bone
 * text, Anybody display, Geologica text, the 14 degree --cut). These pages are
 * documents: one calm column, numbered steps, a contents list that follows on
 * desktop. Everything here is prefixed g-, hub- or answer-. */

.page-guide, .page-hub {
  --measure: 68ch;
  --g-gap: clamp(40px, 6vw, 72px);
}

/* ------------------------------------------------------------------- head */
.g-head, .hub-head { position: relative; padding: 28px 0 0; max-width: 800px; }
.g-title {
  margin: 0; max-width: 24ch;
  font: 900 clamp(30px, 4.8vw, 54px)/1 var(--font-display); font-stretch: 125%;
  letter-spacing: var(--tracking-display); text-wrap: balance; overflow-wrap: break-word;
}
.g-summary {
  max-width: 60ch; margin: 22px 0 0;
  font-size: clamp(18px, 1.55vw, 21px); line-height: 1.5; font-weight: 300; color: var(--bone);
}

/* the fact strip: three strata, one per fact */
.g-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 6px;
  margin: 30px 0 0; padding: 0;
}
.g-fact { --fc: var(--sulphur); --cut-w: 6px; position: relative; padding: 16px 18px 0 0; min-width: 0; }
.g-fact:nth-child(2) { --fc: var(--magma); }
.g-fact:nth-child(3) { --fc: var(--aqua); }
.g-fact::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
  background: var(--fc); clip-path: var(--cut);
}
.g-fact dt {
  color: var(--fc); font-size: 12px; font-weight: 600;
  letter-spacing: var(--tracking-label); text-transform: uppercase;
}
.g-fact dd { margin: 4px 0 0; font-size: 18px; line-height: 1.3; font-weight: 500; color: var(--bone); overflow-wrap: break-word; }

.g-checked { margin: 22px 0 0; color: var(--silt); font-size: 14px; }
.g-checked::before {
  --cut-w: 4px;
  content: ""; display: inline-block; width: 16px; height: 9px; margin-inline-end: 10px;
  background: var(--aqua); clip-path: var(--cut);
}
.g-checked time { color: var(--bone); font-weight: 500; }

.g-unverified {
  max-width: 62ch; margin: 22px 0 0; padding: 14px 18px 14px 16px;
  background: rgba(255, 154, 46, 0.08); border-inline-start: 4px solid var(--amber);
  font-size: 15px; line-height: 1.55;
}
.g-unverified-title {
  margin: 0 0 4px; color: var(--amber); font: 600 12px/1.4 var(--font-text);
  letter-spacing: var(--tracking-label); text-transform: uppercase;
}
.g-unverified p { margin: 0 0 6px; color: var(--silt); }
.g-unverified ul { margin: 0; padding-inline-start: 18px; }
.g-unverified li { margin: 2px 0; }

/* ----------------------------------------------------------------- layout */
.g-layout { margin-top: 36px; }
.g-toc { margin: 0 0 8px; padding: 14px 0 12px; border-block: var(--hairline); }
.g-toc-title, .g-label {
  color: var(--dust); font: 600 11.5px/1.4 var(--font-text);
  letter-spacing: var(--tracking-label); text-transform: uppercase;
}
.g-toc-title { margin: 0 0 8px; }
.g-toc-list { margin: 0; padding: 0; list-style: none; counter-reset: toc; columns: 2; column-gap: 24px; }
.g-toc-list li { counter-increment: toc; break-inside: avoid; }
.g-toc-list a {
  display: flex; gap: 10px; align-items: baseline; padding: 5px 0;
  color: var(--silt); font-size: 14px; line-height: 1.35; text-decoration: none;
}
.g-toc-list a::before {
  content: counter(toc, decimal-leading-zero); flex: none;
  color: var(--seam); font: 900 12px/1 var(--font-display); font-variant-numeric: tabular-nums;
}
.g-toc-list a:hover { color: var(--bone); }
.g-toc-list a:hover::before { color: var(--sulphur); }

@media (min-width: 1040px) {
  .g-layout { display: grid; grid-template-columns: minmax(0, 720px) 240px; gap: var(--g-gap); align-items: start; }
  .g-toc {
    order: 2; position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow-y: auto;
    margin: 8px 0 0; padding: 2px 0 2px 20px; border: 0; border-inline-start: var(--hairline);
  }
  .g-toc-list { columns: 1; }
}

/* ------------------------------------------------------------------- body */
.g-body { min-width: 0; max-width: var(--measure); font-size: 17px; line-height: 1.68; font-weight: 350; }
.g-section { margin-top: 56px; }
.g-body > .g-section:first-child, .g-body > .g-intro:first-child { margin-top: 8px; }
.g-h2 {
  margin: 0 0 16px; scroll-margin-top: 96px;
  font: 900 clamp(24px, 2.7vw, 31px)/1.05 var(--font-display); font-stretch: 125%;
  letter-spacing: var(--tracking-display); text-wrap: balance;
}
.g-h2::before {
  --cut-w: 6px;
  content: ""; display: block; width: 46px; height: 6px; margin-bottom: 16px;
  background: var(--sulphur); clip-path: var(--cut);
}
.g-h2 a { color: inherit; text-decoration: none; }
.g-h2 a:hover { color: var(--aqua); }
.g-body h3 { margin: 30px 0 10px; scroll-margin-top: 96px; font: 600 19px/1.35 var(--font-text); color: var(--bone); }
.g-body h4 { margin: 24px 0 8px; font: 600 16px/1.4 var(--font-text); color: var(--silt); }
.g-body p { margin: 0 0 1em; }
.g-body strong { font-weight: 650; }
.g-body a { text-decoration-color: rgba(53, 224, 200, 0.5); overflow-wrap: anywhere; }
.g-body ul, .g-body ol { margin: 0 0 1em; padding-inline-start: 24px; }
.g-body li { margin: 0.3em 0; }
.g-body li > p { margin: 0 0 0.5em; }
.g-body ul > li::marker { color: var(--aqua); }
.g-body ol > li::marker { color: var(--sulphur); font-weight: 600; }
.g-body code {
  padding: 1px 6px; background: var(--shale); border-radius: 2px;
  font: 0.86em/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-wrap: anywhere;
}
.g-body pre { margin: 0 0 1em; padding: 14px 16px; background: var(--shale); overflow-x: auto; }
.g-body pre code { padding: 0; background: none; overflow-wrap: normal; }
.g-body blockquote { margin: 0 0 1em; padding: 2px 0 2px 16px; border-inline-start: 3px solid var(--seam); color: var(--silt); }
.g-body hr { margin: 32px 0; border: 0; border-top: var(--hairline); }
.g-s-quick-answer > p:first-of-type { font-size: 19px; line-height: 1.6; }
.g-note { max-width: 62ch; color: var(--silt); font-size: 15px; line-height: 1.55; }

/* steps: each number is a core segment, the seam joins them */
.g-s-steps h3 {
  display: flex; align-items: center; gap: 14px; margin: 34px 0 18px;
  color: var(--sulphur); font: 600 13px/1.3 var(--font-text); letter-spacing: var(--tracking-label); text-transform: uppercase;
}
.g-s-steps h3::after { content: ""; flex: 1; height: 1px; background: var(--seam); }
.g-body .g-steps { margin: 0 0 10px; padding: 0; list-style: none; counter-reset: step; }
.g-steps > li { counter-increment: step; position: relative; margin: 0; padding: 0 0 22px 62px; min-height: 52px; }
.g-steps > li::before {
  --cut-w: 8px;
  content: counter(step); position: absolute; left: 0; top: -1px;
  display: grid; place-items: center; width: 44px; height: 30px;
  background: var(--magma); color: var(--ink); clip-path: var(--cut);
  font: 900 16px/1 var(--font-display); font-stretch: 110%; font-variant-numeric: tabular-nums;
}
.g-steps > li::after { content: ""; position: absolute; left: 21px; top: 35px; bottom: 5px; width: 2px; background: var(--seam); }
.g-steps > li:last-child { padding-bottom: 4px; min-height: 0; }
.g-steps > li:last-child::after { display: none; }
.g-steps > li > ul, .g-steps > li > ol { margin: 0.4em 0 0; }

/* tables */
.g-table { margin: 0 0 1.2em; overflow-x: auto; }
.g-table:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; box-shadow: none; }
.g-table table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.g-table th, .g-table td { padding: 10px 18px 10px 0; text-align: start; vertical-align: top; border-bottom: 1px solid rgba(44, 105, 118, 0.55); }
.g-table th:last-child, .g-table td:last-child { padding-inline-end: 0; }
.g-table thead th {
  color: var(--dust); font-size: 11.5px; font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase;
  border-bottom: var(--hairline); white-space: nowrap;
}
.g-table td:first-child { font-weight: 550; color: var(--bone); }
.g-table td { color: #DDE3DC; }
.g-table .al-end { text-align: end; }
.g-table .al-center { text-align: center; }
.g-table tbody tr:hover { background: none; }

/* FAQ */
.g-faq-item { padding: 18px 0 6px; border-top: 1px solid rgba(44, 105, 118, 0.55); }
.g-body .g-faq-q { margin: 0 0 6px; }
.g-faq-a { color: #DDE3DC; }

/* official links, sources, archive searches, related */
.g-body .g-links, .g-body .g-source-list, .g-body .g-search-list, .g-body .g-related-list { margin: 0; padding: 0; list-style: none; }
.g-links li { margin: 0; padding: 11px 0; border-bottom: 1px solid rgba(44, 105, 118, 0.55); }
.g-links a { font-weight: 500; }
.g-links a::after { content: " \2197"; color: var(--dust); }
.g-source-list { counter-reset: src; }
.g-source { counter-increment: src; position: relative; margin: 0; padding: 12px 0 12px 40px; border-bottom: 1px solid rgba(44, 105, 118, 0.55); }
.g-source::before { content: counter(src, decimal-leading-zero); position: absolute; left: 0; top: 15px; color: var(--sulphur); font: 900 14px/1 var(--font-display); }
.g-source-name { font-weight: 500; }
.g-source-supports { display: block; margin-top: 2px; color: var(--silt); font-size: 15px; line-height: 1.5; }
.g-source-supports .g-label { margin-inline-end: 6px; }
.g-search-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin: 0; padding: 9px 0; border-bottom: 1px solid rgba(44, 105, 118, 0.4); }
.g-search-list .q-link { color: var(--bone); font-weight: 500; text-decoration-color: var(--seam); }
.g-search-list .q-link:hover { text-decoration-color: var(--aqua); }
.g-search-meta { color: var(--dust); font-size: 13px; }
.g-related-list li { margin: 0; padding: 14px 0; border-top: 1px solid rgba(44, 105, 118, 0.55); }
.g-related-link, .hub-item-title a {
  color: var(--bone); text-decoration: none;
  font: 800 19px/1.2 var(--font-display); font-stretch: 112%; letter-spacing: var(--tracking-display);
}
.g-related-link:hover, .hub-item-title a:hover { color: var(--aqua); text-decoration: underline; text-decoration-thickness: 2px; }
.g-related-sum { display: block; margin-top: 4px; color: var(--silt); font-size: 15px; line-height: 1.5; }
.g-explore { margin: 22px 0 0; font-size: 15px; color: var(--silt); }
.g-explore a { font-weight: 600; }

/* ------------------------------------------------------------------- hubs */
.hub-section { max-width: 860px; margin-top: 52px; }
.hub-section:first-of-type { margin-top: 40px; }
.hub-list { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: hub; }
.hub-item {
  counter-increment: hub; display: grid; grid-template-columns: 54px minmax(0, 1fr); column-gap: 6px;
  padding: 20px 0 18px; border-top: var(--hairline);
}
.hub-item:last-child { border-bottom: var(--hairline); }
.hub-item::before {
  content: counter(hub, decimal-leading-zero); grid-row: 1 / span 3; padding-top: 3px;
  color: var(--sulphur); font: 900 18px/1.2 var(--font-display); font-stretch: 110%; font-variant-numeric: tabular-nums;
}
.hub-item > * { grid-column: 2; }
.hub-item-title { margin: 0; font-size: inherit; }
.hub-item-title a { font-size: clamp(20px, 2.2vw, 25px); }
.hub-item-sum { max-width: 64ch; margin: 6px 0 10px; color: var(--silt); font-size: 16px; line-height: 1.55; font-weight: 350; }
.hub-item-facts { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; color: var(--bone); font-size: 14px; }
.hub-item-facts .g-label { margin-inline-end: 6px; }
.hub-more { max-width: 860px; margin-top: 52px; }
.hub-topic-list { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; list-style: none; font-size: 17px; }
.hub-topic-list a { font-weight: 600; }

/* ----------------------------------------------- answer block on /q/ pages */
.answer {
  position: relative; max-width: 760px; margin: 28px 0 6px; padding: 22px 24px 22px 22px;
  background: var(--shale); border-inline-start: 6px solid var(--sulphur);
}
.answer-eyebrow { margin: 0 0 8px; color: var(--sulphur); font: 600 12px/1.4 var(--font-text); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.answer-title { margin: 0; font: 900 clamp(22px, 2.8vw, 30px)/1.05 var(--font-display); font-stretch: 120%; letter-spacing: var(--tracking-display); text-wrap: balance; }
.answer-title a { color: var(--bone); text-decoration: none; }
.answer-title a:hover { color: var(--aqua); }
.answer-summary { max-width: 62ch; margin: 12px 0 0; font-size: 17px; line-height: 1.55; font-weight: 350; }
.answer .g-facts { margin-top: 22px; }
.answer .g-fact dd { font-size: 16px; }
.answer-more { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 22px 0 0; }
.answer-link {
  --cut-w: 9px;
  display: inline-flex; align-items: center; min-height: 42px; padding: 8px 24px;
  background: var(--sulphur); color: var(--ink); clip-path: var(--cut);
  font: 800 14px/1.2 var(--font-display); font-stretch: 112%; text-decoration: none;
}
.answer-link:hover { background: var(--bone); color: var(--ink); }
.answer-link:focus-visible { box-shadow: none; outline: 2px solid var(--ink); outline-offset: -5px; }
.answer-checked { color: var(--dust); font-size: 13px; }

/* ----------------------------------------------------------------- footer */
.g-independent { color: var(--silt); }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 8px !important; }

/* ------------------------------------------------------------------ phone */
@media (max-width: 640px) {
  .g-head, .hub-head { padding-top: 20px; }
  .g-facts { grid-template-columns: 1fr; gap: 0; margin-top: 24px; border-top: var(--hairline); }
  .g-fact { display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: baseline; padding: 11px 0 11px 16px; border-bottom: var(--hairline); }
  .g-fact::before { inset: 0 auto 0 0; width: 6px; height: auto; clip-path: none; }
  .g-fact dd { margin: 0; font-size: 16px; }
  .g-layout { margin-top: 28px; }
  .g-body { font-size: 16.5px; line-height: 1.66; }
  .g-section { margin-top: 44px; }
  .g-h2, .g-body h3 { scroll-margin-top: 132px; }
  .g-steps > li { padding-left: 52px; }
  .g-steps > li::before { width: 38px; height: 28px; font-size: 15px; }
  .g-steps > li::after { left: 18px; top: 33px; }

  /* tables of three or more columns become one labelled block per row */
  .g-table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .g-table-stack table, .g-table-stack tbody, .g-table-stack td { display: block; }
  /* the first cell heads the block; short cells (Yes / No, a fee) share one line */
  .g-table-stack tr { display: flex; flex-wrap: wrap; gap: 6px 26px; padding: 12px 0; border-bottom: 1px solid rgba(44, 105, 118, 0.55); }
  .g-table-stack td { flex: 0 1 auto; min-width: 0; }
  .g-table-stack td:first-child { flex: 0 0 100%; }
  .g-table-stack tr:first-child { border-top: var(--hairline); }
  .g-table-stack td { padding: 3px 0; border: 0; text-align: start !important; }
  .g-table-stack td::before {
    content: attr(data-label); display: block; color: var(--dust);
    font: 600 11px/1.5 var(--font-text); letter-spacing: var(--tracking-label); text-transform: uppercase;
  }
  .g-table-stack td:first-child { font-size: 16.5px; font-weight: 600; }
  .g-table-stack td:first-child::before { display: none; }
  .g-table-stack td:empty { display: none; }
  .g-table:not(.g-table-stack) table { font-size: 14.5px; }
  .g-table:not(.g-table-stack) th, .g-table:not(.g-table-stack) td { padding-inline-end: 12px; }
  .g-table thead th { white-space: normal; }

  .hub-item { grid-template-columns: 36px minmax(0, 1fr); padding: 16px 0 14px; }
  .hub-item::before { font-size: 15px; padding-top: 4px; }
  .answer { padding: 18px 16px 18px 14px; }
  .answer-link { width: 100%; justify-content: center; text-align: center; }
}

@media print {
  .site-header, .g-toc, .g-explore, .site-footer-links { display: none; }
  .page-guide { background: #fff !important; color: #000; }
}
