/* Brick Auction landing — long-form content pages.
 *
 * Loaded ONLY by the editorial/legal pages (/reverse-auction, /green-paper,
 * /about, /supplier, /terms, /privacy, /price-list, /brick/*) on
 * top of styles.css. It has no overlap with shop.css, so a page loads one or
 * the other, never both — except /brick/<slug> and /price-list, which need
 * shop.css too for the product grid.
 *
 * Everything here is prose furniture: a readable measure, headings, tables,
 * callouts and a table of contents. It deliberately introduces no new colour
 * tokens — every value below resolves through the --brand-*/--surface-* scale
 * already declared in styles.css.
 */

/* ── Document shell ───────────────────────────────────────────────────────
   `.doc` is a narrower measure than --maxw on purpose: 1180px of Persian body
   text is unreadable. 76ch lands around 68-72 characters per line, which is
   the range Persian sets comfortably at this font size. */
.doc {
  padding: 0 var(--pad-x) 72px;
}
.doc__inner {
  max-width: 76ch;
  margin-inline: auto;
}
.doc--wide .doc__inner {
  max-width: none;
}

/* ── Breadcrumb ───────────────────────────────────────────────────────────
   `.crumbs` is ALSO declared in shop.css, for the pages that load it. This copy
   exists so a content page which loads only content.css still gets a
   breadcrumb. The two must stay in lock-step — an earlier version of this
   comment claimed they were identical when the link colour was not, which put
   the breadcrumb on the five /brick/<slug> pages below WCAG AA while the same
   breadcrumb on /products/<id> passed. `--muted-strong` is the AA-passing
   token; do not "simplify" it to `--muted-2`. */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px var(--pad-x) 0;
  font-size: 13px;
  color: var(--muted-strong);
}
.crumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.crumbs [aria-current="page"] {
  color: var(--ink);
}

/* ── Page head ────────────────────────────────────────────────────────── */
.doc__head {
  padding: 28px var(--pad-x) 8px;
}
.doc__head-inner {
  max-width: 76ch;
  margin-inline: auto;
}
.doc__kicker {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-strong);
}
.doc__title {
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.doc__lede {
  margin-top: 14px;
  font-size: clamp(16px, 1.7vw, 18px);
  color: var(--muted);
  line-height: 1.9;
}
/* The freshness stamp. A visible, sentence-form date is what a reader (and a
   retrieval model) actually checks before trusting a price. */
.doc__stamp {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted-strong);
}
.doc__stamp b {
  color: var(--ink);
  font-weight: 600;
}

/* ── Prose ────────────────────────────────────────────────────────────── */
.doc h2 {
  margin: 44px 0 14px;
  font-size: clamp(21px, 2.6vw, 26px);
  font-weight: 700;
  line-height: 1.5;
  scroll-margin-top: 24px;
}
.doc h3 {
  margin: 28px 0 10px;
  font-size: clamp(17px, 2vw, 19px);
  font-weight: 700;
  line-height: 1.6;
  scroll-margin-top: 24px;
}
.doc p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 2;
}
.doc p strong,
.doc li strong {
  color: var(--ink);
  font-weight: 700;
}
.doc a:not(.btn) {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-2);
}
.doc a:not(.btn):hover {
  text-decoration-color: var(--ink);
}

/* Bulleted and numbered lists. `ul` is reset to list-style:none globally, so
   the marker is drawn by hand — on the END side under dir=rtl. */
.doc ul.bullets {
  margin: 0 0 20px;
  display: grid;
  gap: 10px;
}
.doc ul.bullets li {
  position: relative;
  padding-inline-start: 22px;
  color: var(--muted);
  line-height: 1.95;
}
.doc ul.bullets li::before {
  content: "";
  position: absolute;
  inset-inline-start: 4px;
  top: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-accent);
}
.doc ol.steps-list {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 14px;
}
.doc ol.steps-list li {
  position: relative;
  counter-increment: step;
  padding-inline-start: 44px;
  color: var(--muted);
  line-height: 1.95;
}
.doc ol.steps-list li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  /* Persian digits are supplied in the markup for visible counters elsewhere;
     a CSS counter cannot be, so this one uses the Persian numbering system. */
  font-feature-settings: normal;
}
.doc ol.steps-list {
  counter-reset: step;
}
.doc ol.steps-list li::before {
  content: counter(step, persian);
}

/* ── Table of contents ────────────────────────────────────────────────── */
.toc {
  margin: 26px 0 8px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-1);
}
.toc__title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.toc ul {
  display: grid;
  gap: 8px;
}
.toc a {
  font-size: 14.5px;
  color: var(--muted);
  text-decoration: none;
}
.toc a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ── Callout ──────────────────────────────────────────────────────────── */
.callout {
  margin: 22px 0;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.callout--accent {
  background: rgba(182, 83, 60, 0.06);
  border-color: rgba(182, 83, 60, 0.22);
}
.callout__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.callout p:last-child {
  margin-bottom: 0;
}

/* ── Tables ───────────────────────────────────────────────────────────────
   Wide tables must scroll inside their own box; the page body never scrolls
   sideways. The wrapper carries the scroll and the focus ring so a keyboard
   user can reach it. */
.table-wrap {
  margin: 22px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.table-wrap:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.doc table,
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 560px;
}
.table-wrap th,
.table-wrap td {
  padding: 12px 14px;
  text-align: start;
  border-bottom: 1px solid var(--line);
}
.table-wrap thead th {
  background: var(--surface-2);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.table-wrap tbody tr:last-child td {
  border-bottom: 0;
}
.table-wrap td {
  color: var(--muted);
}
.table-wrap td b {
  color: var(--ink);
}
/* Category separator rows inside a long price table. Declared HERE, not in
   shop.css: /price-list loads content.css only, so the rule was dead where it
   was needed and absent where it was loaded. */
.table-wrap .pricerow--head th {
  background: var(--surface-3);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.table-wrap caption {
  caption-side: bottom;
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--muted-strong);
  text-align: start;
}

/* ── Two-column comparison ────────────────────────────────────────────── */
.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}
.compare__col {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-1);
}
.compare__title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.compare p {
  margin-bottom: 10px;
  font-size: 14.5px;
}

/* ── Fact grid (the citable numbers) ──────────────────────────────────── */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.fact {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-1);
}
.fact__value {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.4;
}
.fact__label {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--muted-strong);
  line-height: 1.7;
}

/* ── FAQ (reuses the home page accordion, narrower) ───────────────────── */
.doc .faq-item {
  margin-bottom: 10px;
}

/* ── Related links / next steps ───────────────────────────────────────── */
.linkcards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 24px 0 8px;
}
.linkcard {
  display: block;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
  text-decoration: none !important;
}
.linkcard:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}
.linkcard__title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}
.linkcard__text {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--muted-strong);
  line-height: 1.8;
}

/* ── End-of-page CTA ──────────────────────────────────────────────────── */
.doc__cta {
  margin-top: 40px;
  padding: 28px 24px;
  border-radius: 20px;
  background: var(--ink);
  color: #fff;
  text-align: center;
}
.doc__cta h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(19px, 2.4vw, 24px);
}
.doc__cta p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.78);
}
.doc__cta .btn + .btn {
  margin-inline-start: 10px;
}

/* ── 404 ──────────────────────────────────────────────────────────────── */
.notfound {
  padding: clamp(56px, 10vw, 120px) var(--pad-x);
  text-align: center;
}
.notfound__code {
  font-size: clamp(56px, 12vw, 104px);
  font-weight: 800;
  line-height: 1;
  color: var(--line-2);
  letter-spacing: 0.02em;
}
.notfound__title {
  margin-top: 14px;
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 800;
  color: var(--ink);
}
.notfound__text {
  margin: 12px auto 26px;
  max-width: 46ch;
  color: var(--muted);
}
.notfound__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .compare {
    grid-template-columns: 1fr;
  }
  .doc {
    padding-bottom: 56px;
  }
  .doc__cta .btn + .btn {
    margin-inline-start: 0;
    margin-top: 10px;
  }
}
