:root {
  --paper: #efe9dc;
  --paper-deep: #ddd4c3;
  --ink: #171714;
  --muted: #625f58;
  --line: rgba(23, 23, 20, 0.22);
  --red: #a52a27;
  --acid: #d7e75a;
  --blue: #365d76;
  --max: 1240px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Courier New", Courier, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23,23,20,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,23,20,.02) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font-family: var(--sans);
  line-height: 1.5;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  z-index: 20;
}
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
.skip-link { position: absolute; left: -999px; top: 1rem; background: var(--ink); color: var(--paper); padding: .75rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; }

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.35rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.wordmark { text-decoration: none; font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.55rem); font-weight: 700; letter-spacing: -.04em; }
.wordmark span { color: var(--red); }
.site-nav { display: flex; gap: 1.45rem; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.site-nav a, .footer-links a { text-decoration: none; border-bottom: 1px solid transparent; }
.site-nav a:hover, .footer-links a:hover { border-color: currentColor; }
.menu-button { display: none; border: 1px solid var(--ink); background: transparent; padding: .5rem .75rem; }

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 8.5rem) 2rem clamp(3.5rem, 7vw, 7rem);
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
}
.kicker { margin: 0 0 1rem; font: 700 .74rem/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { font: 700 clamp(4rem, 10vw, 9rem)/.84 var(--serif); letter-spacing: -.07em; max-width: 850px; margin: 0 0 2rem; }
.lede { max-width: 720px; font-size: clamp(1.08rem, 2vw, 1.45rem); color: #2f2e2a; margin: 0; }
.hero-actions, .about-actions { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .8rem 1rem; border: 1px solid var(--ink); text-decoration: none; cursor: pointer; background: transparent; font-weight: 700; }
.button.primary { background: var(--ink); color: var(--paper); }
.button:hover { transform: translateY(-1px); }
.text-button { border-color: transparent; border-bottom-color: var(--ink); padding-inline: .2rem; }

.case-card { position: relative; background: #f7f2e7; border: 1px solid var(--ink); box-shadow: 12px 12px 0 rgba(23,23,20,.12); padding: 1.15rem; transform: rotate(1.2deg); }
.case-card-head { display: flex; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: .65rem; font: 700 .75rem var(--mono); }
.status { color: var(--red); }
.case-label { font: 700 .68rem var(--mono); margin: 2rem 0 .45rem; }
.case-value { font: 700 1.8rem/1.05 var(--serif); margin: 0 0 2rem; }
dl { margin: 0; border-top: 1px solid var(--line); }
dl div { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1rem; border-bottom: 1px solid var(--line); padding: .6rem 0; }
dt { font: 700 .7rem var(--mono); text-transform: uppercase; }
dd { margin: 0; font-size: .86rem; }
.stamp { position: absolute; right: -1.1rem; bottom: -1.2rem; border: 3px solid var(--red); color: var(--red); font: 900 .95rem/.95 var(--mono); padding: .55rem; transform: rotate(-8deg); background: rgba(239,233,220,.8); }

.ticker { overflow: hidden; border-block: 1px solid var(--ink); background: var(--acid); }
.ticker-track { display: flex; gap: 1.4rem; width: max-content; padding: .7rem 1rem; font: 700 .73rem var(--mono); letter-spacing: .08em; animation: crawl 30s linear infinite; }
@keyframes crawl { to { transform: translateX(-25%); } }

.section { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 8vw, 7.5rem) 2rem; }
.section-heading { max-width: 780px; margin-bottom: 2.6rem; }
h2 { font: 700 clamp(2.7rem, 6vw, 5.5rem)/.9 var(--serif); letter-spacing: -.055em; margin: 0; }
.split-heading { max-width: none; display: grid; grid-template-columns: 1fr .7fr; gap: 4rem; align-items: end; }
.split-heading > p { margin: 0; color: var(--muted); max-width: 510px; }

.department-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ink); }
.department-card { min-height: 560px; padding: 1.6rem; display: flex; flex-direction: column; border-right: 1px solid var(--ink); position: relative; overflow: hidden; }
.department-card:last-child { border-right: 0; }
.department-card::after { content: ""; position: absolute; width: 160px; height: 160px; border: 1px solid currentColor; border-radius: 50%; right: -70px; top: 35px; opacity: .18; }
.department-card.mysconduct { background: #e8c9c3; }
.department-card.satirium { background: #d7e75a; }
.department-card.archive { background: #d0d9df; }
.department-code { font: 700 .72rem var(--mono); margin-bottom: 5rem; }
.department-card h3 { font: 700 clamp(2.4rem, 4vw, 4.2rem)/.9 var(--serif); letter-spacing: -.05em; margin: 0 0 1.5rem; }
.department-card p { font-size: 1.03rem; }
.department-card ul { padding-left: 1.2rem; margin: 1.5rem 0 3rem; }
.department-card a { margin-top: auto; text-decoration: none; font-weight: 800; border-top: 1px solid currentColor; padding-top: 1rem; display: flex; justify-content: space-between; }

.filter-bar { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--ink); margin-bottom: 0; }
.filter { border: 0; border-right: 1px solid var(--ink); background: transparent; padding: .8rem 1.1rem; cursor: pointer; font: 700 .72rem var(--mono); text-transform: uppercase; }
.filter.active { background: var(--ink); color: var(--paper); }
.entry { display: grid; grid-template-columns: 150px 1fr auto; gap: 2rem; align-items: start; padding: 1.8rem 0; border-bottom: 1px solid var(--line); transition: opacity .2s ease, transform .2s ease; }
.entry[hidden] { display: none; }
.entry-meta { display: flex; flex-direction: column; gap: .35rem; font: 700 .68rem var(--mono); }
.entry-tag { font: 700 .7rem var(--mono); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .5rem; color: var(--red); }
.entry h3 { font: 700 clamp(1.5rem, 3vw, 2.65rem)/1 var(--serif); letter-spacing: -.035em; margin: 0 0 .65rem; }
.entry p:last-child { margin: 0; color: var(--muted); max-width: 720px; }
.entry-arrow { font-size: 1.5rem; }

.method { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(3rem, 9vw, 9rem); border-top: 1px solid var(--ink); }
.method-copy p:last-child { font-size: 1.1rem; color: var(--muted); }
.method-steps { list-style: none; padding: 0; margin: 0; counter-reset: steps; }
.method-steps li { display: grid; grid-template-columns: 70px 1fr; gap: 1.25rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.method-steps li:first-child { border-top: 1px solid var(--line); }
.method-steps span { font: 700 .8rem var(--mono); }
.method-steps h3 { margin: 0 0 .35rem; font: 700 1.5rem var(--serif); }
.method-steps p { margin: 0; color: var(--muted); }

.about { display: grid; grid-template-columns: 1.25fr .75fr; border-top: 1px solid var(--ink); padding-bottom: 8rem; }
.about-panel { padding-right: clamp(2rem, 8vw, 8rem); }
.about-panel > p:last-of-type { max-width: 760px; font-size: 1.12rem; }
.classification { background: var(--ink); color: var(--paper); padding: 1.5rem; min-height: 420px; display: flex; flex-direction: column; justify-content: space-between; font-family: var(--mono); }
.classification span, .classification small { font-size: .72rem; letter-spacing: .12em; }
.classification strong { font-size: clamp(2rem, 4vw, 4rem); line-height: .92; letter-spacing: -.06em; }

.site-footer { max-width: var(--max); margin: 0 auto; border-top: 1px solid var(--ink); padding: 2rem; display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: start; }
.site-footer p { color: var(--muted); margin: .5rem 0 0; }
.footer-links { display: flex; gap: 1rem; font-size: .82rem; text-transform: uppercase; }
.legal { grid-column: 1 / -1; font: .7rem var(--mono); }
.toast { position: fixed; bottom: 1.25rem; left: 50%; transform: translate(-50%, 150%); background: var(--ink); color: var(--paper); padding: .75rem 1rem; z-index: 50; transition: transform .25s ease; font: 700 .75rem var(--mono); }
.toast.show { transform: translate(-50%, 0); }

/* Studio */
.page-studio { --accent: #6b4c8a; }
.studio-index .side-note { --accent: #6b4c8a; }
.studio-card form { display: grid; gap: .75rem; max-width: 560px; }
.studio-card label { font: 700 .72rem var(--mono); text-transform: uppercase; }
.studio-card input { padding: .7rem; border: 1px solid var(--ink); background: transparent; }
.studio-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; }
.studio-frame { margin-top: 1.5rem; }
.studio-frame iframe { width: 100%; height: min(70vh, 520px); border: 1px solid var(--ink); background: #111; }
.studio-frame .button { margin-top: .75rem; }

/* Support */
.page-support { --accent: #365d76; }
.support-index .side-note { --accent: #365d76; }
.sr-only { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.faq-search { width: 100%; max-width: 420px; padding: .7rem; border: 1px solid var(--ink); background: transparent; margin-bottom: 1.2rem; font: inherit; }
.faq-item { border-bottom: 1px solid var(--line); padding: .9rem 0; }
.faq-item summary { font: 700 1.15rem var(--serif); cursor: pointer; }
.faq-item p { margin: .75rem 0 0; color: var(--muted); max-width: 720px; }
.faq-item[hidden] { display: none; }
.support-form { display: grid; gap: 1rem; max-width: 560px; }
.field-row { display: grid; gap: .4rem; }
.field-row label { font: 700 .72rem var(--mono); text-transform: uppercase; }
.field-row input,
.field-row select,
.field-row textarea { padding: .7rem; border: 1px solid var(--ink); background: transparent; font: inherit; }
.support-consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; color: var(--muted); max-width: 560px; margin: .25rem 0; }
.support-consent input { margin-top: .2rem; }
.support-status { min-height: 1.5rem; font: 700 .8rem var(--mono); color: var(--accent); }

/* Floating support widget */
.support-widget { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60; font-family: var(--mono); }
.support-toggle { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 700 1.4rem/1 var(--serif); cursor: pointer; box-shadow: 0 6px 14px rgba(23,23,20,.18); }
.support-menu { position: absolute; right: 0; bottom: 64px; background: var(--paper); border: 1px solid var(--ink); box-shadow: 8px 8px 0 rgba(23,23,20,.12); display: grid; min-width: 180px; overflow: hidden; }
.support-menu a { padding: .85rem 1rem; text-decoration: none; font: 700 .78rem var(--mono); border-bottom: 1px solid var(--line); }
.support-menu a:last-child { border-bottom: 0; }
.support-menu a:hover { background: var(--paper-deep); }

@media (max-width: 900px) {
  .studio-index { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .support-widget { right: 1rem; bottom: 1rem; }
  .support-menu { right: auto; left: 0; }
  .studio-frame iframe { height: 60vh; }
}

/* Interior pages */
.page-hero { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 9vw, 8rem) 2rem 4rem; border-bottom: 1px solid var(--ink); }
.page-hero h1 { max-width: none; }
.page-hero .lede { max-width: 850px; }
.page-index { max-width: var(--max); margin: 0 auto; padding: 2rem; display: grid; grid-template-columns: 260px 1fr; gap: 4rem; }
.side-note { font: .75rem/1.5 var(--mono); border: 1px solid var(--ink); padding: 1rem; height: fit-content; position: sticky; top: 1rem; }
.content-stack { display: grid; gap: 1px; background: var(--ink); border: 1px solid var(--ink); }
.content-card { background: var(--paper); padding: clamp(1.5rem, 4vw, 3rem); display: grid; grid-template-columns: 140px 1fr; gap: 2rem; }
.content-card .num { font: 700 .75rem var(--mono); }
.content-card h2 { font-size: clamp(2rem, 4vw, 4rem); margin-bottom: 1rem; }
.content-card p { max-width: 720px; }
.page-mysconduct { --accent: #a52a27; }
.page-satirium { --accent: #768500; }
.page-archive { --accent: #365d76; }
.page-hero .kicker, .content-card a { color: var(--accent); }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-nav { display: none; grid-column: 1 / -1; flex-direction: column; padding-top: 1rem; }
  .site-nav.open { display: flex; }
  .menu-button { display: block; }
  .hero, .method, .about, .split-heading, .page-index { grid-template-columns: 1fr; }
  .hero { padding-top: 4rem; }
  .case-card { max-width: 500px; }
  .department-grid { grid-template-columns: 1fr; }
  .department-card { min-height: 430px; border-right: 0; border-bottom: 1px solid var(--ink); }
  .department-card:last-child { border-bottom: 0; }
  .side-note { position: static; }
}

@media (max-width: 640px) {
  .site-header, .hero, .section, .page-hero, .page-index, .site-footer { padding-left: 1rem; padding-right: 1rem; }
  h1 { font-size: clamp(3.5rem, 19vw, 6rem); }
  h2 { font-size: clamp(2.6rem, 13vw, 4rem); }
  .entry { grid-template-columns: 1fr auto; gap: 1rem; }
  .entry-meta { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
  .content-card { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
