/* The HARI Treaty page (/hari-treaty/).
   The page loads css/brand.css, so every token below is defined on it; each var() still carries
   the fallback it would need on a page that did not (scripts/check-css-tokens.py). Layout follows
   the After Control page, the other named destination in the primary bar: one reading column,
   figures at the column's width, phones co-equal at 390 px. Colours come from the brand's
   accessible text tokens (--gold-text and --green-text clear 4.5:1 on every paper surface).
   The page animates nothing, so it needs no reduced-motion rule. */

.ht-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 36px 24px 64px;
  overflow-wrap: break-word;
  color: var(--ink, #1c1c19);
}

.ht-eyebrow {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-text, #7a5a0e);
  margin: 0 0 8px;
}

.ht-main h1 {
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.12;
  margin: 0 0 12px;
  color: var(--ink, #1c1c19);
}

.ht-main p.ht-lede {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.1rem;
  line-height: 1.7;
  color: #3d3d36;
  max-width: 62ch;
  margin: 0 0 1.1rem;
}

.ht-main p,
.ht-main li {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: .97rem;
  line-height: 1.72;
  color: #3b3b34;
}

.ht-main p {
  max-width: 66ch;
  margin: 0 0 .9rem;
}

.ht-main a {
  color: var(--accent-link, #2c5f78);
  text-underline-offset: .15em;
}

.ht-main a:hover {
  color: var(--accent-link-hover, #1d4459);
}

.ht-main a:focus-visible {
  outline: 2px solid var(--gold, #b07d1f);
  outline-offset: 2px;
  border-radius: 3px;
}

.ht-main h2 {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.36rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink, #1c1c19);
  margin: 2.6rem 0 .7rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--hairline, #e7e5e0);
  scroll-margin-top: 5.5rem;
}

.ht-main h3 {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.3;
  color: #2b2b24;
  margin: 1.5rem 0 .5rem;
}

/* the three status cards under the lede: what it is, what it is not, what comes next */
.ht-status {
  display: grid;
  grid-template-columns: 1fr;
  gap: .8rem;
  margin: 1.2rem 0 1.4rem;
}

@media (min-width: 860px) {
  .ht-status {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.ht-card {
  border: 1px solid var(--border, #d9d3c4);
  border-left: 3px solid var(--gold, #b07d1f);
  border-radius: var(--radius-sm, 7px);
  background: var(--paper-card, #ffffff);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(28, 28, 25, .06));
  padding: .85rem 1rem;
}

.ht-card.ht-card-not {
  border-left-color: #9b3b2a;
}

.ht-card.ht-card-next {
  border-left-color: var(--green, #2d7a55);
}

.ht-k {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #5d5d52;
  margin: 0 0 .35rem;
}

.ht-main .ht-card p {
  font-size: .88rem;
  line-height: 1.6;
  margin: 0;
}

/* the one sentence the page stands on */
.ht-main p.ht-line {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.6;
  color: #2b2b24;
  max-width: 62ch;
  margin: 1.4rem 0 1.6rem;
  padding-left: .9rem;
  border-left: 3px solid var(--green, #2d7a55);
}

/* quotations from the book and the registration: marked, credited, and set apart */
.ht-quote {
  margin: 1rem 0 1.2rem;
  padding: .9rem 1.1rem;
  border-left: 3px solid var(--gold, #b07d1f);
  border-radius: 0 var(--radius-sm, 7px) var(--radius-sm, 7px) 0;
  background: var(--gold-bg, rgba(196, 140, 46, .1));
  max-width: 66ch;
}

.ht-main .ht-quote p {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1rem;
  line-height: 1.65;
  color: #2b2b24;
  margin: 0 0 .45rem;
}

.ht-quote cite {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: .72rem;
  font-style: normal;
  letter-spacing: .02em;
  color: #5b5647;
}

/* the book's title inside a credit stays on the credit's line (a reader's finding, 27 September 2026) */
.ht-quote cite cite {
  display: inline;
  font-style: italic;
}

/* the six articles */
.ht-articles {
  list-style: none;
  margin: .6rem 0 1rem;
  padding: 0;
  max-width: 68ch;
}

.ht-main .ht-articles li {
  margin: 0 0 .7rem;
  padding: .7rem .9rem;
  border: 1px solid var(--border, #d9d3c4);
  border-radius: var(--radius-sm, 7px);
  background: var(--paper-card, #ffffff);
}

.ht-art {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-text, #7a5a0e);
  margin: 0 0 .2rem;
}

.ht-main p.ht-note {
  font-size: .86rem;
  line-height: 1.62;
  color: #55604f;
  max-width: 68ch;
}

.ht-mechs {
  list-style: none;
  margin: .6rem 0 1rem;
  padding: 0;
}

.ht-main .ht-mechs li {
  margin: 0 0 .8rem;
  padding-left: .9rem;
  border-left: 2px solid var(--gold-border, rgba(191, 140, 64, .35));
  max-width: 66ch;
}

.ht-mechs strong {
  color: #2b2b24;
}

/* figures: legible at every width. Up to 1099 px the phone twin serves, drawn 360 units wide so a unit prints at
   about a pixel on a phone, and shown no wider than 480 px, so its type prints at 10 to 13 px on a tablet. From 1100 px
   the desktop artwork, drawn 1240 wide, leaves the reading column for up to 1240 px, so its type prints near the size
   it is drawn; held to the column's 772 px it printed at 0.62 of it, body text near 7 px (a read of the page at 1440 px,
   27 September 2026). The caption stays on the column. */
.ht-fig {
  margin: 1.4rem 0 1.8rem;
}

.ht-fig img {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  margin-inline: auto;
  border: 1px solid var(--border, #d9d3c4);
  border-radius: var(--radius, 10px);
  background: #fbfaf5;
}

@media (min-width: 1100px) {
  .ht-fig {
    --fig-w: min(1240px, calc(100vw - 64px));
    width: var(--fig-w);
    margin-left: calc((100% - var(--fig-w)) / 2);
  }

  .ht-fig img {
    max-width: none;
  }
}

.ht-fig figcaption {
  font-family: 'IBM Plex Mono', Menlo, ui-monospace, Consolas, 'Liberation Mono', monospace;
  font-size: .74rem;
  line-height: 1.55;
  color: #5b5647;
  margin-top: .55rem;
  max-width: 480px;
  margin-inline: auto;
}

/* from 1100 px the caption returns to the reading column, after the rule above so it wins (a reader's finding) */
@media (min-width: 1100px) {
  .ht-fig figcaption {
    max-width: 72ch;
    margin-left: calc((var(--fig-w) - 772px) / 2);
    margin-right: auto;
  }
}

/* the evidence table: a table on wide screens, one card per row on phones */
.ht-table {
  width: 100%;
  border-collapse: collapse;
  margin: .8rem 0 1rem;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: .86rem;
  line-height: 1.5;
}

.ht-table th,
.ht-table td {
  text-align: left;
  vertical-align: top;
  padding: .6rem .55rem;
  border-bottom: 1px solid var(--hairline, #e7e5e0);
  color: #3b3b34;
}

.ht-table th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #5d5d52;
  border-bottom: 1px solid var(--border-strong, #c9c1ae);
}

.ht-table td:first-child {
  font-weight: 600;
  color: #2b2b24;
}

.ht-table .ht-standing {
  color: #55604f;
}

@media (max-width: 720px) {
  .ht-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .ht-table,
  .ht-table tbody,
  .ht-table tr,
  .ht-table td {
    display: block;
    width: 100%;
  }

  .ht-table tr {
    margin: 0 0 .8rem;
    padding: .6rem .8rem;
    border: 1px solid var(--border, #d9d3c4);
    border-radius: var(--radius-sm, 7px);
    background: var(--paper-card, #ffffff);
  }

  .ht-table td {
    border: 0;
    padding: .2rem 0;
  }

  .ht-table td::before {
    content: attr(data-label);
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: .64rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #6b6b60;
  }
}

/* the dated record */
.ht-record {
  margin: .6rem 0 1rem;
  padding: 0;
  max-width: 68ch;
}

.ht-record dt {
  font-family: 'IBM Plex Mono', monospace;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--gold-text, #7a5a0e);
  margin: .8rem 0 .15rem;
}

.ht-record dd {
  margin: 0;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: .93rem;
  line-height: 1.65;
  color: #3b3b34;
}

/* read on */
.ht-read {
  list-style: none;
  margin: .6rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: .45rem;
}

@media (min-width: 640px) {
  .ht-read {
    grid-template-columns: 1fr 1fr;
  }
}

.ht-main .ht-read a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .5rem .8rem;
  border: 1px solid var(--border, #d9d3c4);
  border-radius: var(--radius-sm, 7px);
  background: var(--paper-card, #ffffff);
  text-decoration: none;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: .9rem;
}

.ht-main .ht-read a:hover {
  border-color: var(--gold, #b07d1f);
}

@media (max-width: 640px) {
  .ht-main {
    padding: 24px 16px 48px;
  }
}

/* The Eden Mark seal beside its heading (27 September 2026): the author's tree-and-chip logo in a gold ring.
   It sits in the heading's own row, so no float can collide with a figure below; smaller on a phone. */
.ht-main h2.ht-has-seal { display: flex; align-items: center; gap: .85rem; }
.ht-main h2.ht-has-seal .ht-seal { flex: 0 0 72px; width: 72px; height: 72px; }
@media (max-width: 480px) {
  .ht-main h2.ht-has-seal .ht-seal { flex-basis: 56px; width: 56px; height: 56px; }
}
