/* The Archer and The Arrow: layout and components.
   Colours, fonts and dark mode all come from taa-brand.css (load that first).
   This file only uses the brand variables (var(--...)); never type a colour here.
   Small gold text uses --color-link (Deep Gold on light, Bright Gold on dark),
   because plain Arrow Gold is too pale for small text. */

*, *::before, *::after { box-sizing: border-box; }

/* Page edges: at least 16px on a phone. */
body {
  margin: 0;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) 4rem max(16px, env(safe-area-inset-left, 0px));
}

/* Wide enough for the three-way figure; text columns are narrower (.col). */
.page, main { max-width: 54rem; margin-inline: auto; }
.col { max-width: var(--measure); }

/* Hidden visually but still read by screen readers. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Site header and footer ---------- */
.site-header { max-width: 54rem; margin: 0 auto; padding: 1.5rem 0; }
/* Padding keeps clear space around the logo (the guide asks for one capital-T height). */
.site-logo { display: inline-block; padding: 0.75rem 0; }
.site-logo img { height: 76px; width: auto; max-width: 100%; display: block; } /* 76px tall is about 308px wide, above the 160px minimum */

.site-footer {
  max-width: 54rem; margin: 3.5rem auto 0; padding-top: 1.5rem;
  border-top: 1px solid var(--color-rule);
}
.site-footer img { display: block; width: 56px; height: 56px; } /* seal: guide minimum is 48px */

/* ---------- Brand label style: Cinzel, small caps, tracked, gold ---------- */
.label, cite.st, .tag, .draft, .part {
  font-family: var(--font-label);
  font-style: normal;
  font-weight: 500;
  font-size: 0.8rem;            /* about 13px */
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  line-height: 1.4;
}
/* Override the brand file's small gold (Arrow Gold fails 4.5:1 on light). */
.label, cite.st { color: var(--color-link); }

/* ---------- Headings and text ---------- */
h1 { margin: 0 0 0.9rem; text-wrap: balance; }
h2 { margin: 2.8rem 0 0.7rem; text-wrap: balance; }
h3 { margin: 0 0 0.3rem; }
p { margin: 0 0 1.05rem; }
a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.lede { font-size: 1.32rem; line-height: 1.45; margin: 0 0 1rem; }
.byline { font-size: 0.9rem; color: var(--color-muted); margin: 0 0 2.5rem; }

/* Short "draft" banner at the top of the essay page (delete it at launch). */
.draft {
  color: var(--color-muted);
  border: 1px dashed var(--color-muted);
  padding: 0.5rem 0.8rem; margin: 0 0 2.5rem; max-width: var(--measure);
}

/* Quotations */
blockquote {
  margin: 1.3rem 0; padding-left: 1.1rem;
  border-left: 2px solid var(--color-accent);
  font-style: italic;
}
blockquote cite.st { display: block; margin-top: 0.35rem; }
cite.st { white-space: nowrap; }

/* ---------- Claim tags: three kinds, told apart by colour AND border style ---------- */
.tag {
  display: inline-block; padding: 0.12rem 0.5rem; border-radius: 2px;
  font-size: 0.72rem; vertical-align: 0.1em;
}
.tag.arg  { color: var(--color-text);  border: 1px solid var(--color-text); }   /* solid line, ink */
.tag.open { color: var(--color-link);  border: 1px dashed var(--color-link); }  /* dashed line, deep gold */
.tag.test { color: var(--color-muted); border: 2px dotted var(--color-muted); } /* dotted line, slate */
.kind { margin: 0 0 0.5rem; }

/* ---------- Three-way figure ---------- */
.ways { margin: 1.8rem 0 2.2rem; border-top: 1px solid var(--color-rule); }
.way {
  display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 0.5rem 2rem; align-items: center;
  padding: 1.4rem 0; border-bottom: 1px solid var(--color-rule);
}
.way > div { min-width: 0; }
.way p { font-size: 0.98rem; line-height: 1.5; margin: 0 0 0.4rem; }
.way .for { font-size: 0.9rem; color: var(--color-muted); margin: 0; }
.way svg { display: block; width: 100%; height: auto; }
@media (max-width: 640px) {
  .way { grid-template-columns: minmax(0, 1fr); }   /* stack the two columns on a phone */
  .lbl { font-size: 20px; }                          /* keep figure labels readable when scaled down */
}

/* Figure drawing, recoloured through brand variables (light and dark follow automatically) */
.ln      { stroke: var(--color-text);   stroke-width: 2;   fill: none; stroke-linecap: round; stroke-linejoin: round; } /* bow, arrow: ink */
.thin    { stroke: var(--color-muted);  stroke-width: 1.5; fill: none; stroke-linecap: round; }
.aimline { stroke: var(--color-accent); stroke-width: 1.5; stroke-dasharray: 5 6; fill: none; }                          /* aim line: gold */
.trail   { stroke: var(--color-muted);  stroke-width: 3;   fill: none; stroke-linecap: round; }                          /* flight trail: slate / mist */
.head    { fill: var(--color-text); stroke: none; }
.gold    { fill: var(--color-accent); stroke: none; }                                                                    /* target centre, mark on shaft */
.ring    { fill: var(--color-bg); stroke: var(--color-text); stroke-width: 1.5; }
.faded   { opacity: 0.32; }
.lbl     { font-family: var(--font-body); font-size: 14px; fill: var(--color-muted); stroke: none; }

/* ---------- Claims list, objection box, essay footer ---------- */
.claims { margin: 1.4rem 0 0; display: grid; gap: 1.3rem; }
.claims p { margin: 0; }
.article {
  border: 1px solid var(--color-rule); border-left: 3px solid var(--color-accent);
  padding: 1.3rem 1.4rem; margin: 2.6rem 0 0; max-width: var(--measure);
}
.article p:last-child { margin-bottom: 0; }
.part { color: var(--color-muted); margin: 0 0 0.3rem; }

.essay-end {
  margin-top: 3rem; padding-top: 1.2rem; max-width: var(--measure);
  border-top: 1px solid var(--color-rule);
  font-size: 0.92rem; color: var(--color-muted);
}
.essay-end p { margin: 0 0 0.6rem; }

/* ---------- Home page ---------- */
.statement { font-size: 1.32rem; line-height: 1.45; margin: 0.5rem 0 2.5rem; }
.pieces { margin: 0; padding-left: 2.2rem; max-width: var(--measure); }
.pieces li { padding: 0.75rem 0; border-top: 1px solid var(--color-rule); font-size: 1.3rem; font-family: var(--font-heading); }
.pieces li:last-child { border-bottom: 1px solid var(--color-rule); }
.pieces li::marker { font-family: var(--font-label); font-size: 0.8rem; color: var(--color-link); }
.coming { margin-left: 0.6rem; color: var(--color-muted); font-family: var(--font-label); font-size: 0.7rem; letter-spacing: var(--tracking-label); text-transform: uppercase; }
