/* Guides & News list and guide pages. Tokens, typography, buttons and effects come from base.css. */

/* Long guide text is the one exception to "no max-width" (Egor, 05.11). Everything else runs the width of the container. */
:root { --read: 680px; }

.b-hero h1, .g-feature h3 { text-wrap: balance; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 14px 0 0; color: var(--ink-soft); }
.crumbs a { display: inline-flex; align-items: center; min-height: 28px; }
.crumbs a:hover { color: var(--red); }
.crumbs [aria-current] { color: var(--ink); }
.crumb-sep { color: var(--ink-faint); }

/* ===== First screen, both pages ===== */
.b-hero { background: var(--hero-cream); padding-bottom: 32px; }
.b-hero-grid { display: grid; gap: 16px; padding-top: 24px; }
.b-lede { color: rgba(10,14,20,.75); }
.b-note { margin-top: 8px; }
.b-note .u { display: inline; }

/* ===== Guide cards. One list: the label and the card color say what it is about, there is no filter. ===== */
.g-grid { display: grid; gap: 12px; }
.g-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--rule); color: var(--ink); min-width: 0; transition: border-color .3s, box-shadow .3s; }
.g-card:hover { border-color: var(--ink); box-shadow: 0 12px 28px -10px rgba(10,14,20,.18); }
.g-link { display: flex; flex-direction: column; height: 100%; }
.g-img { display: block; aspect-ratio: 16 / 10; background: #fff; overflow: hidden; }
.g-img img { width: 100%; height: 100%; object-fit: contain; }
.g-img picture { display: block; width: 100%; height: 100%; }
.g-img-photo img { object-fit: cover; }
.g-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px; flex: 1; }
.g-text { color: var(--ink-soft); }
.g-label { display: inline-flex; align-items: center; gap: 8px; color: var(--red); }
.g-label i { width: 8px; height: 8px; background: var(--red); flex-shrink: 0; }
.g-label-tss { color: rgba(255,255,255,.85); }
.g-label-tss img { width: 24px; height: 24px; }
.g-tss { background: var(--tss-black); border-color: var(--tss-black); color: #fff; border-top: 4px solid var(--red); }
.g-tss:hover { border-color: var(--tss-black); border-top-color: var(--red); }
.g-tss .g-text { color: rgba(255,255,255,.72); }
.g-tss .g-more { color: #fff; }
.g-feature .g-body { gap: 14px; padding: 20px; }
.g-feature .g-img img { object-position: 20% 50%; }
.g-more { margin-top: auto; font-family: 'Funnel Display', 'Funnel Display Fallback', sans-serif; font-weight: 600; font-size: 15px; color: var(--red); padding: 8px 0 0; }

/* ===== News ===== */
.h-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.h-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.h-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--rule-light); }
.h-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.h-card:nth-child(1) .h-img img { object-position: 50% 15%; }
.h-card:hover .h-img img { transform: scale(1.04); }
.h-card:hover .h-title { color: var(--red); }
.h-date { color: var(--ink-soft); }
.y-list { margin-top: 28px; }
.y-group { break-inside: avoid; padding-bottom: 20px; }
.y-year { padding: 12px 0 8px; }
.y-group ul { border-top: 2px solid var(--ink); }
.y-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.y-row:hover .y-title { color: var(--red); }
.y-date { grid-column: 1; color: var(--ink-soft); }
.y-kind { grid-column: 2; grid-row: 1; color: var(--ink-faint); white-space: nowrap; }
.y-title { grid-column: 1 / -1; font-size: 15px; line-height: 1.35; font-weight: 500; }

/* ===== Guide ===== */
.art-hero { padding-bottom: 28px; }
.art-grid { display: grid; gap: 16px; }
.art-hero-grid { padding-top: 24px; }
.art-lede { font-size: 18px; line-height: 1.55; color: rgba(10,14,20,.86); }
.art-meta { margin-top: 16px; line-height: 1.7; }
.art-meta span { color: var(--ink-faint); }
.art-photo { margin-top: 0; padding-top: 16px; }
.art-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.art-photo picture { display: block; }
.art-toc { padding-top: 28px; }
.art-toc ol { display: grid; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.art-toc li { border-bottom: 1px solid var(--rule); }
.art-toc a { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; min-height: 44px; font-size: 15px; line-height: 1.3; font-weight: 500; }
.art-toc a:hover { color: var(--red); }
.toc-n { color: var(--ink-faint); flex-shrink: 0; }
.art-body { padding-top: 12px; padding-bottom: 28px; }
.art-sec { padding: 28px 0; border-bottom: 1px solid var(--rule); }
.art-sec:last-child { border-bottom: 0; }
.art-h2 { margin-bottom: 14px; }
.art-read { font-size: 17px; line-height: 1.65; color: rgba(10,14,20,.9); }
.art-read > * + * { margin-top: 16px; }
.art-read b, .art-read strong { font-weight: 600; color: var(--ink); }
.art-read h3 { font-family: 'Funnel Display', 'Funnel Display Fallback', sans-serif; font-weight: 600; font-size: 21px; line-height: 1.2; letter-spacing: -0.02em; }
.art-read-next { margin-top: 24px; }
.art-body ul li { position: relative; padding-left: 18px; }
.art-body ul li + li { margin-top: 10px; }
.art-body ul li::before { content: ''; position: absolute; left: 0; top: .68em; width: 7px; height: 7px; background: var(--red); }
.art-read ol { margin: 0; padding-left: 22px; }
.art-read ol li + li { margin-top: 10px; }
.art-body a:not(.v-card) { text-decoration: underline; text-decoration-color: rgba(180,51,53,.55); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.art-body a:not(.v-card):hover { color: var(--red); text-decoration-color: var(--red); }

/* Diagram, table and pictures run wider than the text */
.art-wide { margin-top: 24px; }
.art-img img { width: 100%; }
.art-fig { background: var(--cream); border: 1px solid var(--rule); }
.art-fig-draw { background: #fff; border-bottom: 1px solid var(--rule); }
.art-svg { width: 100%; height: auto; }
.art-fig-legend { padding: 18px; font-size: 16px; line-height: 1.5; }
.art-fig-legend > p { font-family: 'JetBrains Mono', 'JetBrains Mono Fallback', monospace; font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 500; color: var(--ink-soft); }
.art-fig-legend ol { list-style: none; margin: 12px 0 0; padding: 0; counter-reset: dg; }
.art-fig-legend li { position: relative; counter-increment: dg; padding: 12px 0 12px 38px; border-top: 1px solid var(--rule); }
.art-fig-legend li::before { content: counter(dg); position: absolute; left: 0; top: 10px; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1.5px solid var(--ink); border-radius: 50%; background: #fff; font-family: 'JetBrains Mono', 'JetBrains Mono Fallback', monospace; font-size: 12px; font-weight: 500; }
.art-fig-legend b, .art-fig-legend strong { font-weight: 600; }

.fit-wrap table { width: 100%; border-collapse: collapse; }
.fit-wrap thead { display: none; }
.fit-wrap tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 0; border-top: 1px solid var(--rule); }
.fit-wrap tbody tr:first-child { border-top: 2px solid var(--ink); }
.fit-wrap th, .fit-wrap td { text-align: left; padding: 0; font-weight: inherit; }
.fit-wrap thead th { font-family: 'JetBrains Mono', 'JetBrains Mono Fallback', monospace; font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 500; }
.fit-wrap tbody th { font-family: 'Funnel Display', 'Funnel Display Fallback', sans-serif; font-weight: 600; font-size: 16px; line-height: 24px; letter-spacing: -0.02em; }
.fit-wrap td { font-size: 14px; line-height: 1.625; color: var(--ink-soft); }
.fit-wrap td:first-of-type { font-family: 'Funnel Display', 'Funnel Display Fallback', sans-serif; font-weight: 600; color: var(--red); font-size: 15px; line-height: 1.4; }

/* Video: a plain link with a poster. YouTube loads only when someone clicks. */
.v-card { display: grid; gap: 10px; border: 1px solid var(--rule); padding: 10px; margin-top: 20px; transition: border-color .3s; }
.v-card:hover { border-color: var(--ink); }
.v-poster { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); }
.v-poster img { width: 100%; height: 100%; object-fit: cover; }
.v-play { position: absolute; left: 50%; top: 50%; width: 56px; height: 40px; margin: -20px 0 0 -28px; background: var(--red); }
.v-play::after { content: ''; position: absolute; left: 22px; top: 11px; border-left: 16px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.v-body { display: flex; flex-direction: column; gap: 6px; justify-content: center; padding: 2px; line-height: 1.3; }

/* Transducer Shield & Saver next to a jack plate guide */
.b-tss { display: grid; background: var(--tss-black); color: #fff; border-top: 4px solid var(--red); }
.b-tss-photo { aspect-ratio: 16 / 10; overflow: hidden; }
.b-tss-photo img { width: 100%; height: 100%; object-fit: cover; }
.b-tss-body { padding: 22px 18px 26px; }
.b-tss-logo { width: 72px; height: auto; margin-bottom: 14px; }
.b-tss-text { color: rgba(255,255,255,.78); margin-top: 12px; }
.b-tss-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 20px; }
.b-tss-more { color: rgba(255,255,255,.8); display: inline-block; padding: 12px 0; }
.b-tss-more:hover { color: #fff; }

/* Help strip */
.b-help { position: relative; background: var(--ink); color: #fff; padding: 28px 0; }
.b-help::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--red); }
.b-help-row { display: grid; gap: 18px; }
.b-help-note { color: rgba(255,255,255,.6); margin-top: 8px; line-height: 1.6; }
.b-help-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.b-back { padding-top: 24px; padding-bottom: 24px; }

/* ===== Tablet ===== */
@media (min-width: 640px) {
  .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-feature { grid-column: 1 / -1; }
  .h-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .art-photo img { aspect-ratio: 21 / 9; }
  .art-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .v-card { grid-template-columns: 240px minmax(0, 1fr); gap: 16px; }
}
@media (min-width: 768px) {
  .y-row { grid-template-columns: 108px minmax(0, 1fr) auto; gap: 16px; }
  .y-date { grid-column: 1; }
  .y-title { grid-column: 2; grid-row: 1; }
  .y-kind { grid-column: 3; grid-row: 1; }
  .fit-wrap thead { display: table-header-group; }
  .fit-wrap thead th { padding: 0 16px 10px 0; color: var(--ink-soft); }
  .fit-wrap tr { display: table-row; padding: 0; border: 0; }
  .fit-wrap tbody th, .fit-wrap td { padding: 14px 16px 14px 0; border-top: 1px solid var(--rule); vertical-align: baseline; }
  .fit-wrap tbody tr:first-child th, .fit-wrap tbody tr:first-child td { border-top: 2px solid var(--ink); }
  .art-fig { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .art-fig-draw { border-bottom: 0; border-right: 1px solid var(--rule); display: flex; align-items: center; }
  .art-fig-legend { padding: 24px; }
  .b-tss { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .b-tss-photo { aspect-ratio: auto; min-height: 340px; }
  .b-tss-body { padding: 32px; }
  .art-read { max-width: var(--read); }
}

/* ===== Desktop ===== */
@media (min-width: 1024px) {
  .b-hero { padding-bottom: 44px; }
  .b-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: end; padding-top: 32px; }
  .g-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
  .g-feature { grid-column: span 8; }
  .g-full { grid-column: 1 / -1; }
  .g-c6 { grid-column: span 6; }
  .g-c4 { grid-column: span 4; }
  .g-c3 { grid-column: span 3; }
  .g-feature .g-link { flex-direction: row; }
  .g-feature .g-img { flex: 1.25 1 0; min-width: 0; aspect-ratio: auto; min-height: 340px; }
  .g-feature .g-body { flex: 1 1 0; padding: 28px; min-width: 0; }
  .y-list { columns: 2; column-gap: 48px; margin-top: 36px; }
  .b-help { padding: 36px 0; }
  .b-help-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; }
  .art-toc ol { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; }
  .b-tss-body { padding: 44px; align-self: center; }
}

/* Guide grid: heading on the left, reading column on the right, flush with the container edge. */
@media (min-width: 1200px) {
  .art-grid, .art-sec { display: grid; grid-template-columns: minmax(0, 1fr) var(--read); column-gap: 64px; }
  .art-hero-grid { align-items: end; }
  .art-hero .art-read { max-width: none; }
  .art-lede { font-size: 20px; line-height: 1.5; }
  .art-photo img { aspect-ratio: 1400 / 520; }
  .art-sec { padding: 44px 0; }
  .art-h2 { grid-column: 1; position: sticky; top: calc(96px + var(--bm-adminbar, 0px)); align-self: start; margin: 0; }
  .art-read { grid-column: 2; max-width: none; font-size: 18px; line-height: 1.65; }
  .art-read-first { grid-row: 1; }
  .art-wide { grid-column: 1 / -1; margin-top: 32px; }
  .art-read-next { margin-top: 32px; }
}
