/* Guides: the article template (blog/*.html) and the guides index (blog/index.html).
   Loaded after tru.css. Colors, type and radii come from the variables there. */

/* ───────── Article: title, photo and the pulled-out number ───────── */
.g-head { padding: clamp(28px, 4vw, 56px) 0 0; }
.g-head-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(32px, 6vw, 88px); align-items: end; }
.g-crumb ol { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 14px; color: var(--quiet); }
.g-crumb li + li::before { content: "/"; margin-right: 10px; color: var(--faint); }
.g-crumb a { text-decoration: none; }
.g-crumb a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.g-head .chip { margin-top: clamp(30px, 5vw, 64px); }
.g-h1 { font-family: var(--serif); font-weight: 400; color: var(--ink); letter-spacing: -0.022em; line-height: 1.05; font-size: clamp(36px, 4.7vw, 64px); text-wrap: balance; margin-top: 20px; }
.g-meta { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 14.5px; color: var(--quiet); margin-top: 26px; }
.g-meta span + span::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--faint); vertical-align: middle; margin: 0 12px; }

.g-photo { position: relative; margin: 0; border-radius: var(--r-panel); overflow: hidden; aspect-ratio: 5 / 4; background: var(--panel); }
.g-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.g-photo.has-key::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,11,15,0) 30%, rgba(8,11,15,.5)); }
.g-key { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 14px; padding: 16px 18px 17px; border-radius: 16px; color: #fff; background: rgba(15,20,26,.52); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
.g-key span { display: block; font-size: 14px; line-height: 1.35; color: rgba(255,255,255,.88); }
.g-key b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 3.6vw, 46px); letter-spacing: -0.025em; line-height: 1.05; margin: 6px 0 8px; font-variant-numeric: tabular-nums; }
.g-key span + b + span { padding-top: 10px; border-top: 1px solid rgba(255,255,255,.2); }

/* ───────── Article: a quiet rail beside a comfortable measure ───────── */
.g-body { display: grid; grid-template-columns: 216px minmax(0, 720px); gap: clamp(40px, 7vw, 104px); align-items: start; padding: clamp(44px, 6vw, 84px) 0 clamp(56px, 7vw, 96px); }
.g-rail { position: sticky; top: 96px; }
.g-toc summary { list-style: none; display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--quiet); pointer-events: none; }
.g-toc summary::-webkit-details-marker { display: none; }
.g-now, .g-toc summary svg { display: none; }
.g-toc ol { margin-top: 16px; border-left: 1px solid var(--line); }
.g-toc a { display: block; margin-left: -1px; padding: 7px 0 7px 16px; border-left: 1px solid transparent; font-size: 14.5px; line-height: 1.35; color: var(--quiet); text-decoration: none; transition: color .2s ease, border-color .2s ease; }
.g-toc a:hover { color: var(--ink); }
.g-toc a.on { color: var(--ink); font-weight: 500; border-left-color: var(--amber-deep); }
.g-rail .textlink { margin-top: 28px; font-size: 15px; }
.g-rail .textlink svg, .g-next .textlink svg { flex: none; width: 14px; height: 14px; }
.g-next .textlink { flex: none; white-space: nowrap; font-size: 15.5px; }

.g-main { min-width: 0; }
.g-lede { font-family: var(--serif); font-size: clamp(21px, 2vw, 26px); line-height: 1.38; letter-spacing: -0.008em; color: var(--ink); text-wrap: pretty; }
.g-lede strong { font-weight: 500; background: linear-gradient(transparent 58%, var(--amber-wash) 0); padding: 0 .08em; }
.g-lede a, .g-prose a, .g-see a { color: var(--ink); text-decoration-line: underline; text-decoration-thickness: 1px; text-decoration-color: var(--amber-deep); text-underline-offset: 4px; }
.g-lede a:hover, .g-prose a:hover, .g-see a:hover { text-decoration-thickness: 2px; }
.g-see { display: flex; gap: 10px; align-items: baseline; margin-top: 26px; font-size: 15.5px; color: var(--quiet); }
.g-see svg { flex: none; width: 14px; height: 14px; color: var(--amber-deep); transform: translateY(2px); }

.g-prose { font-size: 18.5px; line-height: 1.68; color: var(--text); margin-top: clamp(8px, 1.5vw, 16px); }
.g-prose > p { margin-top: 1.1em; text-wrap: pretty; }
.g-prose h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(27px, 3vw, 38px); line-height: 1.12; letter-spacing: -0.018em; color: var(--ink); text-wrap: balance; margin: 1.8em 0 0; scroll-margin-top: 104px; }
.g-prose h2 + p { margin-top: .75em; }
.g-prose strong { color: var(--ink); font-weight: 600; }
.g-prose > ul, .g-prose > ol { margin-top: 1.15em; }
.g-prose li { position: relative; padding-left: 30px; }
.g-prose li + li { margin-top: .72em; }
.g-prose ul > li::before { content: ""; position: absolute; left: 3px; top: .78em; width: 12px; height: 2px; background: var(--amber-deep); }
.g-prose ol { counter-reset: g-step; }
.g-prose ol > li { counter-increment: g-step; padding-left: 42px; }
.g-prose ol > li::before { content: counter(g-step); position: absolute; left: 0; top: -.12em; width: 28px; text-align: center; font-family: var(--serif); font-size: 1.32em; line-height: 1.5; color: var(--amber-deep); }

/* Tables: a panel on wide screens, a list of cards on a phone */
.g-table { margin-top: 1.5em; background: var(--panel); border-radius: 20px; padding: 6px clamp(16px, 2.6vw, 28px) 8px; }
.g-table table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.42; }
.g-table th { text-align: left; vertical-align: bottom; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--quiet); padding: 14px 18px 12px 0; }
.g-table td { vertical-align: baseline; padding: 14px 18px 14px 0; border-top: 1px solid #dde0e4; }
.g-table th:last-child, .g-table td:last-child { padding-right: 0; }
.g-table td:first-child { color: var(--ink); font-weight: 600; }
.g-table td:last-child { color: var(--quiet); font-size: 15px; }
.g-table .g-val { font-family: var(--serif); font-size: 21px; line-height: 1.2; letter-spacing: -0.012em; color: var(--ink); font-variant-numeric: tabular-nums; }
.g-table .g-val.is-short { white-space: nowrap; }
.g-table .g-mid { color: var(--ink); font-weight: 500; }
.g-table--text td:first-child { white-space: nowrap; }
.g-table--text td:last-child { color: var(--text); }
.g-table a { text-decoration-color: var(--faint); }

/* The takeaway the guide already states, set apart */
.g-call { margin-top: 1.9em; background: var(--amber-wash); border-radius: 20px; padding: clamp(22px, 3vw, 32px) clamp(20px, 3.2vw, 36px); }
.g-call-k { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: clamp(22px, 2.2vw, 27px); line-height: 1.18; letter-spacing: -0.014em; color: var(--ink); }
.g-call-k svg { flex: none; width: 34px; height: 13px; color: var(--amber-deep); }
.g-call p + p { margin-top: .8em; font-size: 17px; line-height: 1.6; }

/* Frequently asked: open, so it reads with no taps */
.g-faq { margin-top: 1.2em; border-bottom: 1px solid var(--line); }
.g-qa { padding: 22px 0 24px; border-top: 1px solid var(--line); }
.g-qa h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(21px, 2vw, 24px); line-height: 1.22; letter-spacing: -0.012em; color: var(--ink); text-wrap: balance; }
.g-qa p { margin-top: 10px; font-size: 17px; line-height: 1.62; }
.g-prose > .g-note { margin-top: 2em; font-size: 14.5px; line-height: 1.6; color: var(--quiet); }
.g-note a { text-decoration-color: var(--faint); }

/* ───────── After the article: where to go next ───────── */
.g-next { padding: 0 0 clamp(8px, 2vw, 24px); }
.g-next .wrap { border-top: 1px solid var(--line); padding-top: clamp(40px, 5vw, 64px); }
.g-aud { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 32px; align-items: center; background: var(--panel); border-radius: var(--r-panel); padding: clamp(24px, 3.2vw, 38px) clamp(22px, 3.4vw, 42px); margin-bottom: clamp(44px, 6vw, 72px); }
.g-aud p { font-family: var(--serif); font-size: clamp(22px, 2.3vw, 30px); line-height: 1.22; letter-spacing: -0.014em; color: var(--ink); margin-top: 14px; max-width: 24em; text-wrap: balance; }
.g-aud ul { margin-top: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 40px; grid-column: 1 / -1; }
.g-aud li { padding-top: 16px; }
.g-aud li b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -0.014em; line-height: 1.2; color: var(--ink); }
.g-aud li span { display: block; font-size: 16px; color: var(--text); margin-top: 8px; max-width: 26em; }
.g-rel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.g-rel-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(27px, 3vw, 38px); letter-spacing: -0.018em; line-height: 1.1; color: var(--ink); }
.g-rel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: clamp(24px, 3vw, 36px); }
.g-card { display: flex; flex-direction: column; height: 100%; background: var(--panel); border-radius: var(--r-panel); padding: clamp(22px, 2.6vw, 30px); text-decoration: none; transition: background .2s ease, transform .25s ease; }
.g-card:hover { background: #eceef1; transform: translateY(-2px); }
.g-card small { font-size: 13px; font-weight: 600; color: var(--amber-deep); }
.g-card h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.1vw, 26px); line-height: 1.16; letter-spacing: -0.014em; color: var(--ink); margin-top: 12px; text-wrap: balance; }
.g-card p { font-size: 15px; line-height: 1.5; color: var(--text); margin: 10px 0 22px; }
.g-more { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--ink); }
.g-more svg { width: 14px; height: 14px; transition: transform .25s ease; }
a:hover > .g-more svg, a:hover .g-more svg { transform: translateX(3px); }

/* ───────── Guides index ───────── */
.gi-hero { padding: clamp(60px, 8vw, 116px) 0 clamp(44px, 6vw, 80px); text-align: center; }
.gi-hero .display { margin-top: 26px; }
.gi-hero .lede { margin: 26px auto 0; max-width: 33em; }
.gi-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 34px; }
.gi-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r-btn); font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; transition: background .2s ease, border-color .2s ease; }
.gi-jump a:hover { background: var(--panel); border-color: var(--faint); }
.gi-sec { padding: 0 0 clamp(64px, 8vw, 112px); }
.gi-sec[id], .gi-duo [id] { scroll-margin-top: 92px; }
.gi-h { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.3vw, 44px); letter-spacing: -0.02em; line-height: 1.08; color: var(--ink); }
.gi-pro { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: clamp(24px, 3vw, 40px); }
.gi-big { position: relative; display: block; height: 100%; min-height: 460px; aspect-ratio: 4 / 5; width: 100%; border-radius: var(--r-panel); overflow: hidden; background: #14181d; color: #fff; text-decoration: none; }
.gi-big img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.gi-big:hover img { transform: scale(1.04); }
.gi-big::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,11,15,0) 30%, rgba(8,11,15,.5)); }
.gi-glass { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 14px; padding: 18px 20px 20px; border-radius: 16px; background: rgba(15,20,26,.52); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); display: flex; flex-direction: column; }
.gi-glass small { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--ink); background: var(--amber); padding: 3px 8px; border-radius: 6px; }
.gi-glass h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(23px, 2.3vw, 29px); line-height: 1.14; letter-spacing: -0.016em; margin-top: 14px; text-wrap: balance; }
.gi-glass p { font-size: 15px; line-height: 1.45; color: rgba(255,255,255,.88); margin: 10px 0 16px; }
.gi-glass .g-more { color: #fff; }

.gi-feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); background: var(--panel); border-radius: var(--r-panel); overflow: hidden; text-decoration: none; margin-top: clamp(24px, 3vw, 40px); transition: background .2s ease; }
.gi-feature:hover { background: #eceef1; }
.gi-feature-t { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(28px, 4.4vw, 60px); }
.gi-feature-t h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.6vw, 50px); line-height: 1.06; letter-spacing: -0.02em; color: var(--ink); margin-top: 20px; text-wrap: balance; }
.gi-feature-t p { font-size: clamp(17px, 1.4vw, 19px); color: var(--text); margin: 18px 0 30px; max-width: 28em; }
.gi-feature-i { position: relative; min-height: 320px; }
.gi-feature-i img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.gi-rows { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 5vw, 72px); margin-top: clamp(20px, 3vw, 36px); }
.gi-rows.is-one { grid-template-columns: 1fr; }
.gi-rows li { border-top: 1px solid var(--line); }
.gi-row { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 4px 20px; align-items: center; height: 100%; padding: 22px 0 24px; text-decoration: none; }
.gi-row h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(21px, 2vw, 25px); line-height: 1.16; letter-spacing: -0.014em; color: var(--ink); text-wrap: balance; }
.gi-row p { grid-column: 1; font-size: 15px; line-height: 1.5; color: var(--quiet); max-width: 34em; }
.gi-row i { grid-column: 2; grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); transition: background .2s ease, border-color .2s ease, color .2s ease; }
.gi-row i svg { width: 14px; height: 14px; }
.gi-row:hover i { background: var(--ink); border-color: var(--ink); color: #fff; }
.gi-row:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.gi-duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }

@media (max-width: 1000px) {
  .g-rel { grid-template-columns: 1fr; }
  .g-card p { margin-bottom: 18px; }
  .gi-pro { grid-template-columns: 1fr; }
  .gi-big { aspect-ratio: 4 / 3; min-height: 380px; }
}
@media (max-width: 900px) {
  .g-head-in { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .g-head .chip { margin-top: 26px; }
  .g-photo { aspect-ratio: 16 / 10; }
  .g-photo.has-key { aspect-ratio: auto; min-height: 250px; display: flex; align-items: flex-end; padding: 96px 12px 12px; }
  .g-photo.has-key .g-key { position: relative; left: auto; right: auto; bottom: auto; width: 100%; }

  .g-body { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
  .g-rail { position: static; margin: 22px 0 0; padding: 4px 0 6px; border-bottom: 1px solid var(--line); }
  .g-rail .textlink { display: none; }
  .g-toc summary { pointer-events: auto; cursor: pointer; min-height: 48px; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); }
  .g-toc ol { margin: 4px 0 10px; }
  .g-toc a { padding: 9px 0 9px 16px; font-size: 15.5px; }
  .g-main { padding-top: 30px; }
  .g-prose h2 { scroll-margin-top: 132px; }
  /* With scripts on, the list of sections folds into one bar that follows the reader down the page */
  .js .g-rail { position: sticky; top: var(--g-top, 62px); z-index: 40; margin: 22px -24px 0; padding: 0 24px; border-bottom: 0; background: rgba(255,255,255,.96); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); box-shadow: 0 1px 0 var(--line); }
  .js .g-toc summary b { flex: none; font-weight: 600; }
  .js .g-now { display: block; flex: 1; min-width: 0; text-align: right; font-size: 14px; font-weight: 400; color: var(--quiet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .js .g-toc summary svg { display: block; flex: none; width: 14px; height: 14px; color: var(--quiet); transition: transform .2s ease; }
  .js .g-toc[open] summary svg { transform: rotate(180deg); }
  .js .g-toc ol { position: absolute; left: 0; right: 0; top: 100%; margin: 0; padding: 6px 24px 14px; border-left: 0; background: #fff; box-shadow: 0 1px 0 var(--line), 0 18px 30px rgba(15,20,26,.10); max-height: 62vh; overflow: auto; }
  .js .g-toc ol a { margin: 0; padding: 11px 0 11px 14px; border-left-width: 2px; }

  .g-aud { grid-template-columns: minmax(0, 1fr); }
  .g-aud ul { grid-template-columns: 1fr; }
  .gi-feature { grid-template-columns: minmax(0, 1fr); }
  .gi-feature-i { min-height: 0; aspect-ratio: 16 / 10; order: -1; }
  .gi-rows, .gi-duo { grid-template-columns: 1fr; }
  .gi-duo { gap: clamp(56px, 8vw, 80px); }
  .gi-jump { justify-content: flex-start; }
  .gi-hero { text-align: left; }
  .gi-hero .lede { margin-inline: 0; }
}
@media (max-width: 640px) {
  .g-prose { font-size: 17.5px; line-height: 1.66; }
  .g-table { padding: 2px 16px 4px; border-radius: 18px; }
  .g-table table, .g-table tbody, .g-table thead { display: block; }
  .g-table tr { display: grid; grid-template-columns: minmax(0, 1fr) fit-content(54%); gap: 3px 16px; align-items: baseline; padding: 14px 0; border-top: 1px solid #dde0e4; }
  .g-table thead tr { border-top: 0; padding: 12px 0 10px; }
  .g-table th, .g-table td { display: block; padding: 0; border: 0; }
  .g-table th:nth-child(2) { text-align: right; }
  .g-table th:nth-child(3) { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .g-table td:nth-child(2) { text-align: right; }
  .g-table td:nth-child(3) { grid-column: 1 / -1; font-size: 14.5px; }
  .g-table td:empty { display: none; }
  .g-table .g-val { font-size: 20px; }
  .g-table--price td:nth-child(3)[data-label]::before { content: attr(data-label) ": "; }
  /* Tables with two columns of figures, or long text: every cell on its own line, with its column name */
  .g-table--stack thead, .g-table--text thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
  .g-table--stack tbody tr:first-child, .g-table--text tbody tr:first-child { border-top: 0; }
  .g-table--stack tr, .g-table--text tr { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 16px 0; }
  .g-table--stack td:nth-child(2), .g-table--text td:nth-child(2) { text-align: left; }
  .g-table--stack td:nth-child(n+2), .g-table--text td:nth-child(n+2) { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 12px; align-items: baseline; font-size: 15.5px; color: var(--ink); white-space: normal; }
  .g-table--stack td[data-label]::before, .g-table--text td[data-label]::before { content: attr(data-label); font-family: var(--sans); font-size: 13px; font-weight: 500; line-height: 1.35; letter-spacing: 0; color: var(--quiet); white-space: normal; }
  .g-table--stack .g-val { font-family: var(--sans); font-size: 15.5px; font-weight: 500; letter-spacing: 0; line-height: 1.42; }
  .g-table--text td:first-child { font-family: var(--serif); font-weight: 400; font-size: 22px; letter-spacing: -0.014em; }
  .g-table--text td:nth-child(n+2) { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .g-table--text td:last-child { color: var(--text); }
  .g-qa p { font-size: 16.5px; }
  .g-rel-head { flex-direction: column; gap: 12px; }
  .gi-big { aspect-ratio: auto; min-height: 400px; }
  .gi-row { padding: 20px 0 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .g-card, .g-card:hover, .gi-big img, .gi-big:hover img, .g-more svg, a:hover .g-more svg, .g-toc a, .js .g-toc summary svg { transition: none; transform: none; }
}
