/* The Trashcanon, Slice 1
   Design tokens taken from the Trashumanism quickstart and ledestroy.com.
   Display face is Chakra Petch standing in for the real squarish book face. */

:root {
  --ink: #141414;
  --paper: #ffffff;
  --rule: #e4e4dc;
  --rule-soft: #ecece6;
  --muted: #57574f;
  --muted-2: #7a7a72;

  --crimson: #d4123f;        /* fills, white text sits on this */
  --crimson-deep: #c4103d;   /* small text on white */
  --crimson-light: #ff5c7a;  /* small text on the dark boxes */
  --lime: #c3d600;
  --cyan: #00aeef;

  --box: #151614;
  --box-rule: #3a3b36;
  --box-ink: #e8e8e0;

  --purple: #6e2c8f;
  --grad-mid: #8c2571;
  --grad-end: #b81e4e;

  --tint: rgba(195, 214, 0, 0.18);

  --display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --body: "Titillium Web", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(20px, 4vw, 44px);
  --rail: 54px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; }
p { margin: 0; }
svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 12px var(--gutter);
  border-bottom: 6px solid #221f26;
  background: var(--paper);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(19px, 3.4vw, 27px);
  letter-spacing: 0.07em;
  color: var(--ink);
  text-decoration: none;
  text-shadow: 3px 0 0 rgba(212, 18, 63, 0.5), -2px 0 0 rgba(0, 174, 239, 0.35);
}

.site-nav { display: flex; gap: 30px; font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: 0.14em; }
.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--crimson-deep);
  text-decoration: none;
}
/* The section this page belongs to, underlined the way the parent site
   underlines it. Not aria-current: that link leaves for ledestroy.com, and the
   generator tab bar below is what holds the current page. */
.site-nav a:hover::after,
.site-nav a.is-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + 10px);
  height: 2px;
  background: currentColor;
}

.btn-mailing {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 22px;
  background: var(--crimson);
  color: #fff;
  border: 2px solid var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.btn-mailing:hover { background: #e8194b; }

/* ---------- side rail ---------- */

.rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--rule);
  background: var(--paper);
  z-index: 2;
}
.rail-accent { height: 96px; background: var(--crimson); }
.rail-tab {
  height: 230px;
  background: var(--lime);
  display: grid;
  place-items: center;
  writing-mode: vertical-rl;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.42em;
}
.rail-code {
  flex: 1;
  margin: 34px 12px 0;
  background-image:
    repeating-linear-gradient(180deg, var(--ink) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(180deg, var(--ink) 0 1px, transparent 1px 13px);
}

/* ---------- hero ---------- */

.hero {
  /* The stamp is rotated, and a transform still counts toward scrollable
     overflow even when it looks contained. Without this the page scrolls
     sideways by about 15px on a narrow phone. */
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(28px, 5vw, 44px) var(--gutter);
  color: #fff;
  background-color: var(--grad-mid);
  background-image:
    repeating-linear-gradient(118deg, rgba(0,0,0,0.07) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(34deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 8px),
    linear-gradient(103deg, var(--purple) 0%, var(--grad-mid) 48%, var(--grad-end) 100%);
}
.hero-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.eyebrow { font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: 0.26em; }

.hero h1 {
  font-size: clamp(34px, 11vw, 92px);
  line-height: 0.92;
  letter-spacing: 0.01em;
  color: var(--lime);
  text-shadow: 4px 0 0 var(--cyan), -2px 0 0 rgba(255,255,255,0.55);
}

.lede { font-size: clamp(15px, 1.6vw, 17px); max-width: 62ch; text-wrap: pretty; }

.stamp {
  flex-shrink: 0;
  margin-top: 30px;
  transform: rotate(-6deg);
  border: 3px solid var(--lime);
  box-shadow: 8px 8px 0 rgba(0,0,0,0.45);
  padding: 14px 18px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.stamp-main { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: 0.06em; line-height: 1; color: var(--lime); }
.stamp-sub { font-family: var(--display); font-weight: 600; font-size: 10px; letter-spacing: 0.22em; }

/* ---------- banner ---------- */

.banner { height: 42px; background: var(--lime); overflow: hidden; display: flex; align-items: center; }
.banner span {
  display: block;
  white-space: nowrap;
  transform: skewX(-11deg);
  padding-left: 30px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.1em;
}

/* ---------- query bar ---------- */

.query {
  margin: 26px var(--gutter) 0;
  padding: 18px;
  background: var(--box);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.query-heading {
  border: 2px solid var(--lime);
  border-radius: 6px;
  padding: 8px 0;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--lime);
}
.query-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }

.tab {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--box-rule);
  border-radius: 5px;
  background: transparent;
  color: #8e8e86;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  cursor: pointer;
}
.tab.is-active { background: var(--lime); color: var(--ink); border-color: var(--lime); font-weight: 700; }

/* The tabs are links between three real pages, so they are anchors. Laid out
   as a flex box rather than relying on line height, or the 44px minimum stops
   being a 44px target. */
a.tab {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
a.tab:hover { color: var(--box-ink); border-color: var(--muted-2); }
a.tab.is-active:hover { background: #d4e800; color: var(--ink); border-color: #d4e800; }

.query-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.seed { font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: 0.16em; color: #8e8e86; }

.btn-pull {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 52px;
  padding: 0 26px;
  background: var(--crimson);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
}
.btn-pull:hover { background: #e8194b; }
.btn-pull svg { width: 17px; height: 17px; flex: none; }

/* ---------- dossier ---------- */

.dossier { margin: 24px var(--gutter) 0; }

.filestrip {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 9px 16px;
  background: var(--box);
  color: #fff;
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.16em;
}
.filestrip-source { color: var(--lime); }

.entity {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0 18px;
  border-bottom: 3px solid var(--ink);
}
.entity-id { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.entity h2 { font-size: clamp(34px, 5.4vw, 56px); line-height: 1; letter-spacing: 0.005em; }

.meta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 0; }
.meta-item { display: inline-flex; align-items: center; gap: 8px; }
.meta dt { font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.18em; }
.meta dd { margin: 0; color: var(--muted); }

.label-sm { font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.2em; }
.label-sm--accent { color: var(--crimson-deep); letter-spacing: 0.12em; font-weight: 600; font-size: 13px; }

.cols { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 38px; padding-top: 24px; }
.col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.block { display: flex; flex-direction: column; gap: 12px; }
.block-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--lime); padding-bottom: 7px; }
.block-head h3 { font-size: 15px; letter-spacing: 0.2em; }

.body { font-size: 15px; line-height: 1.55; color: #3c3c36; text-wrap: pretty; }
.slogan { font-family: var(--display); font-weight: 600; font-size: clamp(21px, 2.4vw, 27px); line-height: 1.18; color: var(--crimson); }
.stat-name { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: 0.02em; }

.callout { background: var(--box); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.callout-head { display: flex; align-items: center; gap: 12px; }
.callout-head h3 {
  flex: 1;
  border: 2px solid var(--crimson);
  border-radius: 6px;
  padding: 7px 0;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--crimson-light);
}
.callout p { font-size: 17px; line-height: 1.55; color: var(--box-ink); text-wrap: pretty; }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.tint { background: var(--tint); padding: 14px; display: flex; flex-direction: column; gap: 7px; }

.meter { display: flex; gap: 5px; list-style: none; margin: 0; padding: 0; }
.meter li {
  flex: 1;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  color: #6b6b63;
}
.meter li.is-on { background: var(--crimson-deep); border-color: var(--crimson-deep); color: #fff; }


/* The one number on the personnel card that is a number. */
.stat-big { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.stat-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 42px;
  line-height: 1;
  color: var(--crimson-deep);
}

/* A lock sitting beside a value rather than in a control slot. It is a
   status, so it takes the space a status needs and not a 44px target. */
.lock--inline {
  width: auto;
  height: auto;
  display: inline-grid;
  vertical-align: middle;
  margin-left: 9px;
}
.stat-name { display: flex; align-items: center; flex-wrap: wrap; }

.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rows li { display: flex; gap: 12px; align-items: baseline; padding: 9px 10px; }
.rows li:nth-child(odd) { background: var(--tint); }
.rows .n { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: 0.14em; color: var(--crimson-deep); }

/* ---------- controls ---------- */

.btn-icon {
  width: 44px; height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  color: var(--muted-2);
  cursor: pointer;
  border-radius: 4px;
}
.btn-icon:hover { color: var(--ink); background: var(--rule-soft); }
.btn-icon--bordered { border: 1px solid var(--rule); color: var(--muted); }
.btn-icon--dark { color: #8e8e86; }
.btn-icon--dark:hover { color: #fff; background: rgba(255,255,255,0.08); }
.btn-icon svg { width: 14px; height: 14px; }

.lock {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  color: var(--crimson-deep);
}
.lock svg { width: 14px; height: 14px; }

:where(button, a):focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px var(--gutter) 28px;
}
.footer-mark { display: flex; align-items: center; gap: 14px; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.2em; }
.diamond { width: 26px; height: 26px; background: var(--lime); transform: rotate(45deg); }
.footer-note { font-family: var(--display); font-weight: 600; font-size: 11px; letter-spacing: 0.16em; color: var(--muted-2); }

/* ---------- utility ---------- */

/* Available to a screen reader, invisible to everyone else. Carries the
   status line that says what a pull turned up. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.noscript-note {
  margin: 24px var(--gutter) 0;
  padding: 18px 20px;
  background: var(--box);
  color: var(--box-ink);
  border-radius: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  line-height: 1.5;
}

/* ---------- layout shifts ---------- */

@media (min-width: 1100px) {
  body { padding-left: var(--rail); }
}

@media (max-width: 1099px) {
  .rail { display: none; }
}

@media (max-width: 900px) {
  .cols { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero { flex-direction: column; }
  .stamp { margin-top: 4px; align-self: flex-start; }
  .site-nav { display: none; }
}

/* Phone widths are their own layout, in phone.css. */

@media (prefers-reduced-motion: no-preference) {
  [data-field] { transition: opacity 120ms ease-out; }
  .is-swapping [data-field] { opacity: 0.25; }
}
