/* ==========================================================================
   Transport terms: /transport/terms/ and the frozen copies at /transport/terms/vN/.
   The pages are written by tools/transport-terms/build_pages.py from
   docs/transport-terms/vN.md, so edit the source and rebuild, not the HTML.

   The look is the approved PDF's (4 Nov 2026): a deep forest cover with orbit
   lines, the short version as light cards on deep forest, pale green reading
   pages, numbered section circles and hanging clause numbers. Every colour is
   a main.css token, so this sheet adds no colour of its own.
   ========================================================================== */

/* main.css gives html AND body overflow-x: hidden. On body that makes a scroll container that
   never scrolls, and a sticky element inside one never sticks, so the contents column would
   scroll away. clip trims the same overflow without being a scroll container. A browser that
   does not know clip keeps hidden, and the contents simply scroll with the page. */
body.tt-page { overflow-x: clip; }

/* ---------- Hero: deep forest in place of charcoal ---------- */
.tt-hero {
  background:
    radial-gradient(70% 80% at 86% 12%, rgba(var(--360-green-400-rgb), 0.14) 0%, transparent 70%),
    var(--360-green-900);
}
/* One left edge for the hero, the short version and the full terms: the site's 760 px hero
   column is too narrow for the contents column beside the clauses. */
.tt-hero .page-hero__content, .tt-short > .container, .tt-doc > .container, .tt-accept > .container { max-width: 1120px; }
.tt-hero .page-hero__headline { max-width: 15ch; }
.tt-hero__orbits {
  position: absolute; z-index: 1; pointer-events: none;
  width: min(74vw, 940px); right: -14%; top: 50%;
  transform: translateY(-44%);
  color: var(--360-green-400);
  opacity: 0.32;
}
.tt-hero__meta {
  margin-top: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  line-height: 1.8;
  color: var(--text-secondary);
}
.tt-hero__note { margin-top: 1rem; max-width: 60ch; color: var(--bone); line-height: 1.6; }
.tt-hero__note a { color: var(--text-link); text-decoration: underline; text-underline-offset: 0.18em; }
.tt-draft {
  display: block;
  width: fit-content;
  margin-bottom: 1.2rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--warning-tint);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--warning-tint);
}
@media (max-width: 760px) {
  .tt-hero__orbits { width: 150vw; right: -70%; top: 34%; opacity: 0.2; }
}

/* ---------- The short version: light cards on deep forest ---------- */
.tt-short { background: var(--360-green-900); border-top: 1px solid var(--border-subtle); }
.tt-short__intro { margin-top: 1rem; max-width: 62ch; color: var(--text-secondary); line-height: 1.6; }
.tt-notice {
  margin-top: 1.8rem;
  padding: 1.1rem 1.3rem;
  max-width: 62rem;
  background: var(--360-green-500);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  color: var(--paper);
  font-weight: 600;
  line-height: 1.55;
}
.tt-notice a { color: var(--paper); text-decoration: underline; text-underline-offset: 0.18em; }
.tt-cards {
  margin: 1.4rem 0 0;
  max-width: 62rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}
.tt-card {
  padding: 1rem 1.15rem 1.05rem;
  background: var(--off-white);
  border-radius: var(--radius-md);
}
.tt-card dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--360-green-600);
}
.tt-card dd { margin: 0.4rem 0 0; color: var(--ink); line-height: 1.5; font-size: 1.02rem; }
.tt-card a { color: var(--360-green-600); text-decoration: underline; text-underline-offset: 0.18em; }
.tt-card--contact { background: transparent; border: 1px solid var(--border-accent); }
.tt-card--contact dt { color: var(--360-green-200); }
.tt-card--contact dd { color: var(--paper); font-size: 1.1rem; overflow-wrap: anywhere; }
.tt-card--contact a { color: var(--paper); }
@media (max-width: 600px) { .tt-card--contact dd { font-size: 1rem; } }
@media (min-width: 720px) {
  .tt-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tt-card--contact { grid-column: 1 / -1; }
}

/* ---------- The full terms: pale green reading ground ---------- */
.tt-doc { background: var(--360-green-50); padding-block: clamp(3rem, 6vw, 5.5rem); color: var(--ink); }
.tt-doc__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.tt-doc__body { max-width: 46rem; }

.tt-toc__box {
  background: var(--off-white);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.1rem;
}
.tt-toc__box > summary {
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--360-green-600);
}
.tt-toc__box > summary::-webkit-details-marker { display: none; }
.tt-toc__box > summary::after { content: "+"; font-size: 1.1rem; letter-spacing: 0; }
.tt-toc__box[open] > summary::after { content: "\2212"; }
.tt-toc__list { margin: 0.7rem 0 0; padding: 0; list-style: none; }
.tt-toc__list a {
  display: grid; grid-template-columns: 2rem minmax(0, 1fr);
  padding: 0.38rem 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.35;
  text-decoration: none;
}
.tt-toc__list a:hover, .tt-toc__list a:focus-visible { text-decoration: underline; text-underline-offset: 0.18em; }
.tt-toc__list span { color: var(--360-green-500); font-variant-numeric: tabular-nums; font-weight: 600; }
.tt-toc__pdf { margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid var(--border-subtle); font-size: 0.92rem; }
.tt-toc__pdf a { color: var(--text-link); text-decoration: underline; text-underline-offset: 0.18em; }

@media (min-width: 1024px) {
  .tt-doc__grid { grid-template-columns: 16.5rem minmax(0, 1fr); gap: 4.5rem; }
  .tt-doc__body { grid-column: 2; }
  /* The nav scrolls away above 860 px (main.css), so the contents can sit near the top. */
  .tt-toc { position: sticky; top: 2rem; align-self: start; max-height: calc(100vh - 4rem); overflow-y: auto; }
  .tt-toc__box { background: none; border: 0; padding: 0; }
  .tt-toc__box > summary { pointer-events: none; }
  .tt-toc__box > summary::after { content: none; }
  .tt-toc__list a { font-size: 0.9rem; padding: 0.3rem 0; }
}

/* Sections and clauses */
.tt-sec + .tt-sec { margin-top: 2.6rem; padding-top: 2.4rem; border-top: 1px solid var(--border-subtle); }
.tt-sec__title {
  display: flex; align-items: center; gap: 0.9rem;
  margin-bottom: 1.1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--deep-forest);
  text-wrap: balance;
}
.tt-sec__num {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border: 1.5px solid var(--360-green-500);
  border-radius: 50%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--360-green-500);
  font-variant-numeric: tabular-nums;
}
.tt-clause {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  padding-block: 0.5rem;
}
.tt-clause__num {
  padding-top: 0.08em;
  font-weight: 600;
  color: var(--360-green-500);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  line-height: 1.7;
}
.tt-clause__num:hover, .tt-clause__num:focus-visible { text-decoration: underline; text-underline-offset: 0.18em; }
.tt-clause__body p { color: var(--ink); font-size: 1.05rem; line-height: 1.7; }
.tt-clause__body p + p, .tt-clause__body ul + p { margin-top: 0.75rem; }
.tt-clause__body ul { margin: 0.6rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.45rem; }
.tt-clause__body li { position: relative; padding-left: 1.25rem; color: var(--ink); font-size: 1.05rem; line-height: 1.6; }
.tt-clause__body li::before {
  content: ""; position: absolute; left: 0.2rem; top: 0.68em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--360-green-500);
}
.tt-clause__body a, .tt-sec a:not(.tt-clause__num) {
  color: var(--text-link);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--link-underline);
}
.tt-clause__body a:hover { text-decoration-color: currentColor; }
.tt-clause:target .tt-clause__body { background: var(--360-green-100); box-shadow: 0 0 0 0.45rem var(--360-green-100); border-radius: 2px; }
@media (max-width: 600px) {
  .tt-clause { grid-template-columns: 2.9rem minmax(0, 1fr); }
  .tt-clause__body p, .tt-clause__body li { font-size: 1rem; }
  .tt-sec__num { width: 2.2rem; height: 2.2rem; font-size: 0.82rem; }
}

/* ---------- Closing: accepting the terms, on the white plane ---------- */
.tt-accept p.body-copy { max-width: 60ch; margin-top: 1rem; color: var(--slate); }
.tt-accept .body-copy a { color: var(--text-link); text-decoration: underline; text-underline-offset: 0.18em; }
.tt-accept__actions { margin-top: 2rem; display: flex; gap: 1rem 1.6rem; flex-wrap: wrap; align-items: center; }
.tt-versions { margin-top: 1.6rem; font-size: 0.92rem; color: var(--slate); }

.tt-btn-icon { width: 1rem; height: 1rem; flex-shrink: 0; }
