:root {
  --overcast: #dde2e3;
  --paper: #f4f6f3;
  --spruce: #17261f;
  --spruce-mid: #2a3a34;
  --steel: #5c6b6c;
  --blaze: #f26a1b;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Archivo", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--overcast);
  color: var(--spruce);
  font: 400 1.0625rem/1.55 var(--body);
}
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1; margin: 0; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blaze); outline-offset: 3px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 10; background: var(--paper); padding: 8px 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 10px var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid var(--overcast);
}
.menu-button {
  justify-self: start; display: flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 8px 0; cursor: pointer;
  font: 500 1rem var(--body); color: inherit;
}
.menu-icon, .menu-icon::before { display: block; width: 22px; height: 2px; background: currentColor; }
.menu-icon { position: relative; top: 4px; }
.menu-icon::before { content: ""; position: absolute; top: -8px; }
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  font: 800 1.6rem/1 var(--display); letter-spacing: 0.01em;
}
.brand img, .ethos-mark { object-fit: contain; mix-blend-mode: multiply; }
.header-actions { justify-self: end; display: flex; gap: 20px; margin: 0; }
.header-action { font-weight: 500; text-underline-offset: 4px; white-space: nowrap; }
.site-nav {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 32px;
  padding: 14px 0 6px; font: 700 1.5rem var(--display);
}
.site-nav[hidden] { display: none; }
.site-nav a { text-decoration: none; }
.site-nav a:hover, .header-action:hover { color: var(--blaze); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  min-height: min(78vh, 720px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--gutter) 40px;
  /* The dark wash on the left keeps the headline readable over the photo */
  background:
    linear-gradient(90deg, rgb(23 38 31 / 0.88), rgb(23 38 31 / 0.55) 45%, rgb(23 38 31 / 0) 80%),
    url("assets/hero.jpg") 70% center / cover no-repeat,
    var(--spruce);
  color: var(--paper);
}
.slides { position: relative; display: grid; }
.slide {
  max-width: 760px;
  background-image: var(--photo, none);
}
.slide[hidden] { display: none; }
.slide h1, .slide h2 {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  max-width: 14ch; text-wrap: balance;
}
.slide p { margin: 18px 0 28px; max-width: 46ch; font-size: 1.15rem; }
.slide.is-active { animation: settle 0.5s ease-out; }
@keyframes settle { from { opacity: 0; transform: translateY(10px); } }

.button {
  display: inline-block; padding: 14px 26px;
  background: var(--blaze); color: var(--spruce);
  font: 600 1rem var(--body); text-decoration: none;
}
.button:hover { background: var(--paper); }
.button-dark { background: var(--spruce); color: var(--paper); }
.button-dark:hover { background: var(--blaze); color: var(--spruce); }

.slide-picker { position: relative; display: flex; gap: 8px; margin-top: 40px; }
.slide-picker button {
  width: 44px; height: 24px; padding: 10px 0; border: 0; cursor: pointer;
  background: var(--paper); background-clip: content-box; opacity: 0.45;
}
.slide-picker button[aria-current="true"] { background-color: var(--blaze); opacity: 1; }

/* Ethos */
.ethos {
  display: grid; grid-template-columns: 1fr minmax(220px, 34%); column-gap: var(--gutter); align-items: center;
  padding: clamp(64px, 10vw, 128px) var(--gutter); background: var(--paper);
}
.ethos-mark { grid-column: 2; grid-row: 1 / span 2; width: 100%; height: auto; }
.ethos h2 { align-self: end; }
.ethos p { align-self: start; }
.ethos h2 { font-size: 1.5rem; color: var(--steel); margin-bottom: 20px; }
.ethos p {
  max-width: 24em;
  font: 700 clamp(1.7rem, 3.6vw, 3rem)/1.12 var(--display);
  text-wrap: pretty;
}

/* Topics */
.topics, .posts { padding: clamp(56px, 8vw, 96px) var(--gutter); }
.topics h2, .posts h2 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: 28px; }
.tile-grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(150px, 17vw, 240px);
}
.tile {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  padding: 20px; text-decoration: none; color: var(--paper);
  background: linear-gradient(to top, rgb(23 38 31 / 0.85), rgb(23 38 31 / 0.15)), var(--photo, none) center / cover, var(--spruce-mid);
}
.tile:nth-child(3n) { background-color: var(--steel); }
/* Tile photos. The second value sets which part of the photo shows. */
.tile-thermal { --photo: url("assets/tiles/thermal.jpg"); background-position: center, center 72%, center; }
.tile-ammunition { --photo: url("assets/tiles/ammunition.jpg"); background-position: center, center 38%, center; }
.tile-optics { --photo: url("assets/tiles/optics.jpg"); background-position: center, 45% 30%, center; }
.tile-suppressors { --photo: url("assets/tiles/suppressors.jpg"); background-position: center, center 92%, center; }
.tile-tripods { --photo: url("assets/tiles/tripods.jpg"); background-position: center, center 42%, center; }
/* Cropped so the rifle sits above the title; anchored top-left of centre to keep the action and optic in view */
.tile-rifles { --photo: url("assets/tiles/rifles.jpg"); background-position: center, 35% top, center; }
.tile-lead { grid-column: span 2; grid-row: span 2; }
.tile-wide { grid-column: span 2; }
.tile-name { font: 800 clamp(1.4rem, 2.2vw, 2rem)/1 var(--display); }
.tile-lead .tile-name { font-size: clamp(2.4rem, 5vw, 4.25rem); }
.tile-go { font-size: 0.95rem; }
a.tile .tile-go { text-decoration: underline; text-underline-offset: 4px; }
a.tile:hover .tile-go { color: var(--blaze); }

/* Posts */
.posts { background: var(--paper); }
.post-list { list-style: none; margin: 0 0 24px; padding: 0; }
.post-list li {
  display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: center;
  padding: 18px 0; border-top: 1px solid var(--overcast);
}
.post-list li:last-child { border-bottom: 1px solid var(--overcast); }
/* Every thumbnail is the same 3:2 landscape tile, whatever shape the photo is */
.post-thumb { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--overcast); }
.post-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-text { display: grid; gap: 6px; }
.post-list time, .post-list span { color: var(--steel); font-size: 0.95rem; }
.post-text a { font: 700 clamp(1.4rem, 2.4vw, 1.9rem)/1.1 var(--display); text-decoration: none; }
.post-list a:hover { color: var(--blaze); }

.posts-note { max-width: 46ch; font-size: 1.15rem; }

/* Contact strip */
.contact {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  padding: clamp(48px, 7vw, 80px) var(--gutter);
  background: var(--spruce); color: var(--paper);
}
.contact h3 { font-size: 1.8rem; margin-bottom: 10px; }
.contact p { max-width: 34ch; color: var(--overcast); }
.contact a { color: var(--blaze); text-underline-offset: 4px; }

/* Footer */
.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px;
  padding: 32px var(--gutter);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.site-footer nav a { text-underline-offset: 4px; }
.site-footer p { color: var(--steel); font-size: 0.95rem; }

@media (max-width: 800px) {
  .menu-label { display: none; }
  .header-contact { display: none; }
  .site-header { gap: 8px; }
  .site-header .brand { font-size: 1.25rem; gap: 6px; }
  .site-header .brand img { width: 40px; height: 40px; }
  .ethos { grid-template-columns: 1fr; }
  .ethos-mark { grid-column: 1; grid-row: auto; max-width: 260px; margin-bottom: 32px; }
  .hero {
    min-height: 620px; padding-top: 80px;
    /* On phones the photo fills the top and fades into solid colour behind the text */
    background:
      linear-gradient(0deg, var(--spruce) 0, var(--spruce) 44%, rgb(23 38 31 / 0) 66%),
      url("assets/hero.jpg") 80% top / auto 66% no-repeat,
      var(--spruce);
  }

  .tile-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .post-list li { grid-template-columns: 120px 1fr; gap: 14px; }
  .contact { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide.is-active { animation: none; }
}

/* Review pages */
.review { background: var(--paper); padding: clamp(40px, 7vw, 88px) var(--gutter); }
.review-head, .review-body, .review-back { max-width: 44rem; margin-inline: auto; }
.review-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; color: var(--steel); font-size: 0.95rem; margin-bottom: 16px; }
.review-meta a { text-underline-offset: 4px; }
.review h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); text-wrap: balance; }
.review-lede { margin-top: 20px; font-size: 1.3rem; line-height: 1.4; }
.disclosure { margin-top: 24px; padding: 14px 18px; background: var(--overcast); font-size: 0.95rem; }
.review-body h2 { font-size: 2rem; margin: 48px 0 12px; }
.review-body p + p { margin-top: 14px; }
.review-body a { text-underline-offset: 3px; }
.review-body a:hover { color: var(--blaze); }
.specs { width: 100%; margin-top: 20px; border-collapse: collapse; font-size: 1rem; }
.specs caption { text-align: left; color: var(--steel); font-size: 0.9rem; padding-bottom: 8px; }
.specs th, .specs td { text-align: left; padding: 10px 0; border-top: 1px solid var(--overcast); }
.specs th { width: 40%; font-weight: 600; }
.review-photo { margin: 0; }
.review-photo img { display: block; width: 100%; height: auto; }
.review-photo figcaption { margin-top: 8px; color: var(--steel); font-size: 0.9rem; }
.review-photo-lead { max-width: 60rem; margin: 40px auto 0; }
.review-photo-tall { max-width: 26rem; margin-top: 32px; }
.review-video { margin: 24px 0; }
.review-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: var(--spruce); }
.review-video-short { max-width: 20rem; }
.review-video-short iframe { aspect-ratio: 9 / 16; }
.review-video figcaption { margin-top: 8px; color: var(--steel); font-size: 0.9rem; }
.review-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.review-shots figure { margin: 0; }
.review-shots img { display: block; width: 100%; height: auto; }
.review-shots figcaption { margin-top: 8px; color: var(--steel); font-size: 0.9rem; }
@media (max-width: 560px) { .review-shots { grid-template-columns: 1fr; max-width: 20rem; } }
.review-back { margin-top: 56px; }
.review-back a { font-weight: 600; text-underline-offset: 4px; }

/* Comments */
.comments { max-width: 44rem; margin: 72px auto 0; padding-top: 40px; border-top: 1px solid var(--overcast); }
.comments h2 { font-size: 2rem; margin-bottom: 16px; }
.comment-empty { color: var(--steel); }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { padding: 18px 0; border-top: 1px solid var(--overcast); }
.comment-list li:first-child { border-top: 0; }
.comment-head { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; }
.comment-head time, .comment-head span { color: var(--steel); font-size: 0.9rem; }
.comment-body { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form { display: grid; gap: 8px; margin-top: 32px; }
.comment-form h3 { font-size: 1.5rem; margin-bottom: 4px; }
.comment-form label { font-weight: 600; margin-top: 8px; }
.comment-form input, .comment-form textarea {
  width: 100%; padding: 12px; border: 1px solid var(--steel); border-radius: 0;
  background: #fff; color: var(--spruce); font: inherit;
}
.comment-form .button { justify-self: start; margin-top: 12px; border: 0; cursor: pointer; }
.comment-form .button:disabled { opacity: 0.6; cursor: default; }
.comment-trap { position: absolute; left: -9999px; }
.comment-field { display: grid; gap: 8px; }
.comment-field[hidden], .comment-form[hidden] { display: none; }
.comment-member { padding: 1px 8px; background: var(--spruce); color: var(--paper); font-size: 0.8rem; }
.comment-delete { margin-top: 8px; padding: 0; border: 0; background: none; color: var(--steel); font: inherit; font-size: 0.9rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.comment-delete:hover { color: var(--blaze); }
.account { margin-top: 32px; padding: 20px; background: var(--overcast); }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.account-actions .button { padding: 8px 16px; border: 0; cursor: pointer; }
.account .comment-form { margin-top: 20px; }
.account-hint { color: var(--steel); font-size: 0.9rem; }
.comment-status { min-height: 1.5em; color: var(--steel); }
.moderate h1 { font-size: 2.5rem; margin-bottom: 16px; }
.moderate .comment-list .button { margin-top: 12px; border: 0; cursor: pointer; padding: 8px 16px; }

/* Account page */
.account-page h1 { font-size: clamp(2.4rem, 6vw, 3.5rem); margin-bottom: 16px; }
.account-page h2 { margin-top: 56px; }
.account-page .comment-form { max-width: 26rem; margin-top: 16px; }
.account-actions .button[hidden], .button[hidden] { display: none; }
.account-switch { margin-top: 24px; }
.link-button { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { color: var(--blaze); }
.mfa-qr { display: block; margin: 16px 0; border: 1px solid var(--overcast); }
.mfa-key { font-size: 1.05rem; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.mfa-codes { list-style: none; display: grid; grid-template-columns: repeat(2, max-content); gap: 8px 32px; margin: 16px 0 24px; padding: 16px 20px; background: var(--overcast); font-size: 1.1rem; }
.account-forgot { margin-top: 16px; }
.account-forgot summary { cursor: pointer; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.account-forgot p { margin-top: 8px; max-width: 40ch; }
.comment-form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.comment-form .check input { width: auto; margin-top: 4px; }
.moderate h2 { font-size: 1.8rem; margin: 40px 0 12px; }

/* Privacy and terms */
.legal h1 { font-size: clamp(2.4rem, 6vw, 3.5rem); }
.legal-date { margin: 8px 0 24px; color: var(--steel); font-size: 0.95rem; }
.legal h3 { font-size: 1.4rem; margin: 28px 0 8px; }
.legal ul { margin: 12px 0; padding-left: 1.25em; }
.legal li + li { margin-top: 6px; }
.legal p + ul, .legal ul + p { margin-top: 12px; }

/* Member discounts and admin */
.discount-filter select { width: 100%; padding: 12px; border: 1px solid var(--steel); border-radius: 0; background: #fff; color: var(--spruce); font: inherit; }
.discount-list { list-style: none; margin: 24px 0 0; padding: 0; }
.discount-list li { padding: 20px 0; border-top: 1px solid var(--overcast); }
.discount-list h3 { font-size: 1.5rem; margin-bottom: 6px; }
.admin-page .review-body { max-width: 60rem; }
.admin-page h3 { font-size: 1.3rem; margin: 32px 0 4px; }
.admin-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 16px 24px; margin: 20px 0 0; }
.admin-totals > div { display: flex; flex-direction: column-reverse; }
.admin-totals dt { color: var(--steel); font-size: 0.95rem; }
.admin-totals dd { margin: 0; font: 800 2.2rem/1.1 var(--display); }
.admin-scroll { overflow-x: auto; }
.admin-members { min-width: 46rem; }
.admin-members th, .admin-members td { padding-right: 16px; vertical-align: top; width: auto; }
.admin-page .specs thead th { font-weight: 600; color: var(--steel); font-size: 0.9rem; border-top: 0; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.admin-actions .link-button { font-weight: 500; font-size: 0.95rem; }

/* Replies, mentions and notifications */
.comment-actions { display: flex; gap: 16px; margin: 0; }
.comment-actions .comment-delete { margin-top: 8px; }
.comment-replies { margin: 12px 0 0 24px; padding-left: 16px; border-left: 2px solid var(--overcast); }
.comment-replies li:first-child { padding-top: 6px; }
.comment-mention { font-weight: 600; }
.comment-target { background: var(--overcast); padding-left: 12px; padding-right: 12px; }
.reply-form { margin-top: 12px; }
.reply-form .link-button { justify-self: start; }
.admin-page .comment-list form { margin-top: 12px; max-width: none; }
.account-forgot .comment-form { margin-top: 8px; }
.account-forgot .comment-form[hidden], .account-forgot[hidden] { display: none; }
.account-page h3 { font-size: 1.4rem; margin: 28px 0 6px; }

/* Admin charts */
:root { --chart-series: #12805c; --chart-grid: #dde2e3; }
.range-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 12px; }
.range-filter button { padding: 8px 14px; border: 1px solid var(--steel); background: none; color: var(--spruce); font: 500 0.95rem var(--body); cursor: pointer; }
.range-filter button[aria-pressed="true"] { background: var(--spruce); border-color: var(--spruce); color: var(--paper); }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 32px 40px; margin-top: 32px; }
.chart { margin: 0; }
.chart figcaption span { color: var(--steel); font-size: 0.9rem; }
.chart-plot { position: relative; margin-top: 8px; }
.chart-plot svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart-grid-line { stroke: var(--chart-grid); stroke-width: 1; }
.chart-axis { fill: var(--steel); font: 400 12px var(--body); }
.chart-line { fill: none; stroke: var(--chart-series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: var(--chart-series); opacity: 0.1; }
.chart-dot { fill: var(--chart-series); stroke: var(--paper); stroke-width: 2; }
.chart-cross { stroke: var(--steel); stroke-width: 1; }
.chart-tip { position: absolute; transform: translate(-50%, -100%); display: grid; padding: 6px 10px; background: var(--spruce); color: var(--paper); font-size: 0.85rem; line-height: 1.25; text-align: center; white-space: nowrap; pointer-events: none; }
.chart-tip[hidden] { display: none; }
.chart-tip strong { font-size: 1.05rem; }
.chart-table { margin-top: 20px; }
.chart-table summary { cursor: pointer; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Admin tools */
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 12px 0; border-bottom: 1px solid var(--overcast); }
.admin-nav a { font-weight: 500; text-underline-offset: 4px; }
.admin-page h2, .admin-page h3 { scroll-margin-top: 90px; }
.admin-tools { display: flex; flex-wrap: wrap; gap: 12px 20px; margin: 12px 0; }
.admin-tools > div { display: grid; gap: 4px; flex: 1 1 14rem; max-width: 22rem; }
.admin-tools label { font-weight: 600; font-size: 0.95rem; }
.admin-tools input, .admin-tools select, .comment-form input[type="date"] { width: 100%; padding: 10px; border: 1px solid var(--steel); border-radius: 0; background: #fff; color: var(--spruce); font: inherit; }
.admin-page .admin-form { max-width: 30rem; }
.admin-page .account-actions { margin-top: 12px; }

/* Reviews written in the admin editor */
.review-photo-wide { margin-top: 32px; }
article.review .review-body h3 { font-size: 1.5rem; margin: 36px 0 10px; }
article.review .review-body ul { margin: 14px 0 0; padding-left: 1.2em; }
article.review .review-body li + li { margin-top: 8px; }
article.review .review-body ul + p { margin-top: 14px; }
.post-draft-notice { max-width: 44rem; margin: 0 auto 24px; }

/* Admin post editor */
.post-editor { max-width: 44rem; margin-top: 32px; padding-top: 24px; border-top: 2px solid var(--spruce); }
.post-editor[hidden], .post-preview[hidden] { display: none; }
.post-editor h4 { font: 800 1.35rem/1 var(--display); margin: 28px 0 0; }
.post-editor select { width: 100%; padding: 10px; border: 1px solid var(--steel); border-radius: 0; background: #fff; color: var(--spruce); font: inherit; }
.post-state { color: var(--steel); }
.post-block { display: grid; gap: 8px; margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--steel); background: #fff; min-width: 0; }
.post-block legend { padding: 0 6px; font-weight: 600; }
.post-block-heading, .post-block-subheading { border-left: 4px solid var(--spruce); }
.post-block-callout { background: var(--overcast); }
.post-block label { margin-top: 0; }
.post-block-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 20px; font-size: 0.95rem; }
.post-block-tools .link-button:disabled { opacity: 0.35; cursor: default; }
.post-photo { display: grid; gap: 6px; padding: 8px 0; }
.post-photo img { display: block; width: auto; max-width: min(100%, 260px); height: auto; }
.post-photo .link-button { justify-self: start; }
.post-photo-pick { position: relative; justify-self: start; padding: 8px 16px; cursor: pointer; }
.post-photo-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.post-photo-pick:focus-within { outline: 3px solid var(--blaze); outline-offset: 3px; }
.post-add { display: flex; flex-wrap: wrap; gap: 8px; }
.post-add button { padding: 8px 12px; border: 1px solid var(--spruce); background: #fff; color: var(--spruce); font: 500 0.95rem var(--body); cursor: pointer; }
.post-add button:hover { background: var(--blaze); }
.post-more { margin-top: 16px; }
.post-more summary { cursor: pointer; font-weight: 600; }
.post-more label { display: block; font-weight: 400; margin: 8px 0; }
.post-more textarea { width: 100%; }
.post-actions { margin-top: 24px; }
.post-actions .button { padding: 10px 18px; }
.post-preview { margin-top: 40px; border: 2px dashed var(--steel); }
.post-preview-label { padding: 8px 16px; background: var(--steel); color: var(--paper); font-weight: 600; }
.post-preview .review { padding: 32px 16px; }

/* Post editor: the fixed start of the address sits in front of the part you type */
.address-row { display: flex; align-items: stretch; border: 1px solid var(--steel); background: #fff; }
.address-row span { display: flex; align-items: center; padding: 0 10px; background: var(--overcast); color: var(--steel); font-size: 0.95rem; white-space: nowrap; }
.address-row input { flex: 1; min-width: 6rem; border: 0; }
@media (max-width: 560px) { .address-row { flex-direction: column; } .address-row span { padding: 8px 10px; white-space: normal; overflow-wrap: anywhere; } }

/* Topic pages */
.topic-page { background: var(--paper); padding: clamp(40px, 7vw, 88px) var(--gutter); min-height: 60vh; }
.topic-page > * { max-width: 60rem; margin-inline: auto; }
.topic-page h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); margin-bottom: 24px; }
.topic-tools { margin-bottom: 8px; }
.topic-list { margin-top: 12px; }
.topic-list li { align-items: start; }
.topic-list .post-text p { max-width: 60ch; }

/* Site search on the home page, and its results page */
.topics-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 28px; }
.topics .topics-head h2 { margin-bottom: 0; }
.site-search { display: grid; gap: 4px; width: min(100%, 22rem); }
.site-search label { font-weight: 600; font-size: 0.9rem; }
.site-search-row { display: flex; }
.site-search input { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid var(--steel); border-right: 0; border-radius: 0; background: #fff; color: var(--spruce); font: inherit; }
.site-search .button { padding: 9px 16px; border: 0; cursor: pointer; }
.topic-page h2 { font-size: 1.8rem; margin: 40px auto 4px; }
.topic-list .page-result { grid-template-columns: 1fr; }

/* Search in the header */
.header-actions { align-items: center; }
.header-search { display: flex; align-items: center; padding: 4px; }
.header-search[aria-expanded="true"] { color: var(--blaze); }
.header-search-form { grid-column: 1 / -1; display: grid; gap: 4px; justify-self: end; width: min(100%, 26rem); padding: 12px 0 6px; }
.header-search-form[hidden] { display: none; }
.header-search-form label { font-weight: 600; font-size: 0.9rem; }
.header-search-form input { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid var(--steel); border-right: 0; border-radius: 0; background: #fff; color: var(--spruce); font: inherit; }
.header-search-form .button { padding: 9px 16px; border: 0; cursor: pointer; }
@media (max-width: 800px) { .header-actions { gap: 12px; } }

/* Thermal ratings */
:root { --series-0: #0f7a5a; --series-1: #e0651a; --series-2: #4a55c9; }
.thermals-page .review-body { max-width: 68rem; }
.thermals-page .thermal-form { max-width: none; }
.thermal-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 20px; margin: 12px 0; }
.thermal-tools > div { display: grid; gap: 4px; }
.thermal-tools label { font-weight: 600; font-size: 0.95rem; }
.thermals-page select { width: 100%; padding: 10px; border: 1px solid var(--steel); border-radius: 0; background: #fff; color: var(--spruce); font: inherit; }
.thermals-page figcaption select { width: auto; padding: 4px 8px; }
.thermal-master { min-width: 62rem; }
.thermal-master td { white-space: nowrap; }
.thermal-form fieldset { min-width: 0; margin: 20px 0 0; padding: 4px 20px 20px; border: 1px solid var(--overcast); }
.thermal-form legend { padding: 0 8px; font: 800 1.4rem/1.2 var(--display); }
.thermal-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 4px 20px; }
.thermal-fields > div { display: grid; gap: 4px; align-content: start; }
.thermal-form input:disabled { background: var(--overcast); }
.thermal-category { padding-top: 12px; border-top: 1px solid var(--overcast); margin-top: 20px; }
.thermal-category h3 { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 0; font-size: 1.3rem; }
.thermal-score { font: 600 1rem/1.6 var(--body); color: var(--steel); }
.thermal-result { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 16px 32px; align-items: center; margin-top: 24px; padding: 20px; background: var(--overcast); }
.thermal-totals { display: grid; gap: 12px; margin: 0; }
.thermal-totals > div { display: flex; flex-direction: column-reverse; }
.thermal-totals dt { color: var(--steel); font-size: 0.95rem; }
.thermal-totals dd { margin: 0; font: 800 1.6rem/1.1 var(--display); }
.thermal-preview { max-width: 26rem; margin-top: 0; }
.spider-ring { fill: none; stroke: var(--chart-grid); stroke-width: 1; }
.thermal-result .spider-ring, .thermal-result .chart-grid-line { stroke: #c3cbcc; }
.spider-label { font-weight: 600; }
.spider-shape { fill-opacity: 0.12; stroke-width: 2; stroke-linejoin: round; }
.spider-dot { stroke: var(--paper); stroke-width: 2; }
.spider-dot.is-empty { fill: var(--paper); stroke-width: 2; }
.series-0 { fill: var(--series-0); stroke: var(--series-0); }
.series-1 { fill: var(--series-1); stroke: var(--series-1); }
.series-2 { fill: var(--series-2); stroke: var(--series-2); }
/* Each compared scope also has its own line style, so the shapes can be told apart without colour */
.spider-shape.series-1 { stroke-dasharray: 7 4; }
.spider-shape.series-2 { stroke-dasharray: 2 4; stroke-linecap: round; }
.spider-dot.series-0, .spider-dot.series-1, .spider-dot.series-2 { stroke: var(--paper); }
.spider-dot.is-empty.series-0 { stroke: var(--series-0); }
.spider-dot.is-empty.series-1 { stroke: var(--series-1); }
.spider-dot.is-empty.series-2 { stroke: var(--series-2); }
.chart-hit { fill: transparent; stroke: none; }
.thermal-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 0.95rem; }
.thermal-legend li { display: flex; align-items: center; gap: 8px; }
.thermal-key { width: 22px; height: 0; border-top: 3px solid; }
.thermal-key.series-0 { border-top-color: var(--series-0); }
.thermal-key.series-1 { border-top-color: var(--series-1); border-top-style: dashed; }
.thermal-key.series-2 { border-top-color: var(--series-2); border-top-style: dotted; }
.thermal-tier-line { stroke: var(--steel); stroke-width: 1; stroke-dasharray: 2 4; }
.thermal-point-label { fill: var(--spruce); font: 500 12px var(--body); }
.thermal-bar { fill: var(--chart-series); }
.thermal-link { grid-column: 1 / -1; max-width: 34rem; }
.thermal-link select { margin-top: 4px; }
.thermal-rating { margin-top: 56px; }
.thermal-overall { font-size: 1.1rem; }
.thermal-overall strong { font: 800 2.6rem/1 var(--display); margin-right: 4px; }
.thermal-public-chart { max-width: 30rem; margin: 16px auto 0; }
.thermal-scores th { width: 30%; }
.thermal-scores td:nth-child(2) { width: 3.5rem; }
.method-scale th { width: 4rem; }
.thermal-rating .account-hint a { color: inherit; font-weight: 600; }
.thermal-trend { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-dasharray: 6 4; }

/* Analytics consent banner */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 34rem; margin-inline: auto;
  display: grid; gap: 12px; padding: 16px 20px; background: var(--spruce); color: var(--paper);
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.3);
}
.consent p { margin: 0; }
.consent a { color: inherit; text-underline-offset: 3px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.consent .button { padding: 8px 20px; border: 0; cursor: pointer; }
.consent .button-quiet { background: none; color: var(--paper); box-shadow: inset 0 0 0 1px var(--paper); }
.consent .button-quiet:hover { background: var(--paper); color: var(--spruce); }
