/*
 * Auditchain Policy Submissions
 *
 * The look of the original Policy page, with every rule confined to the page body (.acp)
 * so the site's header, menus and footer keep their normal styling.
 */

/* ---------- TYPEFACES (served from this site; SIL Open Font License, see assets/fonts) ---------- */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/hanken-grotesk-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- PAGE BACKGROUND (the only rule that touches <body>) ---------- */
body.acp-body {
  background-color: #181232;
  background-image:
    radial-gradient(900px 500px at 85% -5%, rgba(92,229,211,0.07) 0%, transparent 55%),
    radial-gradient(700px 600px at -10% 20%, rgba(92,229,211,0.04) 0%, transparent 50%),
    linear-gradient(180deg, #1a1437 0%, #181232 60%);
  background-attachment: fixed;
}

/* ---------- BASE, CONFINED TO THE PAGE BODY ----------
 * The element rules below use :where(.acp) so they carry exactly the same weight the
 * original page's rules did. That keeps every spacing and size identical to the original,
 * including the places where the theme's own heading and paragraph spacing shows through.
 */
.acp {
  --bg:        #181232;
  --bg-2:      #1a1437;
  --panel:     #1f1942;
  --panel-2:   #221c49;
  --border:    #2a2155;
  --border-2:  #352a66;
  --teal:      #5ce5d3;
  --teal-dim:  #4ac9b8;
  --white:     #ffffff;
  --text:      #c9cee2;
  --text-soft: #b8bdd1;
  --muted:     #8d92ac;
  --faint:     #6a6f8a;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;

  font-family: var(--sans);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
:where(.acp), :where(.acp) * { box-sizing: border-box; margin: 0; padding: 0; }
:where(.acp) a { color: inherit; }

.acp-wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 28px; display: block; }

/* ---------- HERO ---------- */
.acp-hero { padding: 120px 0 40px; }
.acp-eyebrow {
  color: var(--teal); font-size: 12px; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase; margin-bottom: 18px;
}
:where(.acp) h1 {
  font-family: var(--serif);
  color: var(--white); font-weight: 500;
  font-size: clamp(34px, 5.5vw, 52px);
  line-height: 1.08; letter-spacing: -0.5px;
  max-width: 18ch;
}
.acp-lede {
  margin-top: 26px; max-width: 70ch;
  color: var(--text-soft); font-size: 18px; line-height: 1.62;
}
.acp-lede strong, .acp-lede b { color: var(--white); font-weight: 600; }
.acp-lede + .acp-lede { margin-top: 16px; font-size: 16.5px; color: var(--text); }

/* ---------- LEGEND ---------- */
.acp-legend {
  margin-top: 34px; padding: 16px 20px;
  border: 1px solid var(--border); border-radius: 10px;
  background: rgba(34,28,73,0.4);
  display: flex; flex-wrap: wrap; gap: 22px; align-items: center;
  font-size: 13.5px; color: var(--muted);
}
.acp-legend .acp-key { display: inline-flex; align-items: center; gap: 9px; }
.acp-legend .acp-swatch { width: 34px; height: 1px; display: inline-block; position: relative; }
.acp-legend .acp-swatch.solid { background: var(--teal); height: 2px; }
.acp-legend .acp-swatch.ghost { border-bottom: 1.5px dashed var(--border-2); }
.acp-legend .acp-key b { color: var(--text-soft); font-weight: 600; }

/* ---------- TOC ---------- */
.acp-toc { display: flex; flex-wrap: wrap; gap: 10px; padding: 30px 0 8px; }
.acp-toc a {
  text-decoration: none; font-size: 13px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--border); transition: all .18s ease;
}
.acp .acp-toc a:hover { color: var(--teal); border-color: var(--teal-dim); }

/* ---------- REGULATOR SECTION ---------- */
.acp-agency { padding: 52px 0 8px; scroll-margin-top: 84px; }
.acp-agency-head {
  display: flex; align-items: baseline; gap: 16px;
  padding-bottom: 18px; margin-bottom: 30px;
  border-bottom: 1px solid var(--border);
}
.acp-agency-head h2 {
  font-family: var(--serif); font-weight: 600;
  color: var(--white); font-size: 30px; letter-spacing: -0.3px;
}
.acp-agency-head .acp-full { color: var(--muted); font-size: 14px; font-weight: 500; }
.acp-agency-head .acp-count {
  margin-left: auto; color: var(--teal); font-size: 12px;
  font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  white-space: nowrap;
}
.acp-agency > .acp-agency-intro {
  color: var(--text-soft); font-size: 16px; max-width: 74ch;
  margin-bottom: 30px;
}

/* ---------- SUBMISSION CARD ---------- */
.acp-sub {
  border: 1px solid var(--border); border-radius: 14px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  padding: 26px 28px; margin-bottom: 18px;
  transition: border-color .2s ease, transform .2s ease;
  scroll-margin-top: 84px;
}
.acp-sub:hover { border-color: var(--border-2); }
.acp-sub-top {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 8px 14px; margin-bottom: 7px;
}
.acp-sub h3 {
  font-family: var(--serif); color: var(--white);
  font-size: 20px; font-weight: 600; line-height: 1.25;
  letter-spacing: -0.2px;
}
.acp-sub h3 a { color: inherit; text-decoration: none; word-break: normal; overflow-wrap: break-word; }
.acp-sub h3 a:hover { color: var(--teal); text-decoration: none; }
.acp-meta {
  font-size: 12.5px; color: var(--muted); font-weight: 500;
  letter-spacing: 0.3px;
}
.acp-meta .acp-dot { color: var(--border-2); margin: 0 7px; }
.acp-docket {
  display: inline-block; margin-top: 2px;
  font-size: 11.5px; color: var(--teal-dim); font-weight: 600;
  letter-spacing: 0.6px;
}
.acp-sub p.acp-summary {
  color: var(--text); font-size: 15.5px; line-height: 1.62;
  margin: 12px 0 20px; max-width: 80ch;
}

/* ---------- LINKS ---------- */
.acp-links { display: flex; flex-wrap: wrap; gap: 12px; }
.acp-lnk {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; letter-spacing: 0.3px;
  text-decoration: none; padding: 9px 16px; border-radius: 8px;
  transition: all .18s ease;
}
.acp a.acp-lnk:hover { text-decoration: none; }
.acp-lnk svg { width: 14px; height: 14px; flex: none; }
.acp-lnk.primary { background: var(--teal); color: #0e0b22; }
.acp-lnk.primary:hover { background: var(--teal-dim); color: #0e0b22; transform: translateY(-1px); }
.acp-lnk.ghost {
  background: transparent; color: var(--text-soft);
  border: 1px solid var(--border-2);
}
.acp-lnk.ghost:hover { border-color: var(--teal-dim); color: var(--teal); }

/* inline links inside prose */
.acp-lede a, .acp-agency-intro a, .acp-summary a, .acp-facts a {
  color: var(--teal-dim); text-decoration: underline; text-underline-offset: 2px;
  word-break: normal; overflow-wrap: break-word;
}
.acp-lede a:hover, .acp-agency-intro a:hover, .acp-summary a:hover, .acp-facts a:hover { color: var(--teal); }

/* ---------- A FILING'S OWN PAGE ---------- */
.acp-single .acp-hero { padding-bottom: 28px; }
.acp-single .acp-hero h1 { font-size: clamp(28px, 4.2vw, 42px); line-height: 1.14; max-width: 30ch; }
.acp-related ul { list-style: none; }
.acp-crumbs {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 13px; font-weight: 600; letter-spacing: 0.4px;
  color: var(--muted); margin-bottom: 22px;
}
.acp-crumbs a { text-decoration: none; color: var(--text-soft); word-break: normal; }
.acp-crumbs a:hover { color: var(--teal); text-decoration: none; }
.acp-facts {
  display: grid; grid-template-columns: minmax(120px, max-content) 1fr;
  gap: 12px 26px; padding-bottom: 22px; margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.acp-facts dt {
  font-size: 11.5px; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--muted); padding-top: 3px;
}
.acp-facts dd { font-size: 15.5px; color: var(--text); }
.acp-detail .acp-detail-heading {
  font-family: var(--serif); color: var(--white);
  font-size: 20px; font-weight: 600; letter-spacing: -0.2px; line-height: 1.25;
}
.acp-related { padding: 34px 0 6px; }
.acp-related h2 {
  font-family: var(--serif); color: var(--white);
  font-size: 22px; font-weight: 600; letter-spacing: -0.2px;
  padding-bottom: 14px; margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.acp-related li {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 4px 18px; padding: 13px 0; border-bottom: 1px solid var(--border);
}
.acp-related li a { color: var(--text-soft); text-decoration: none; font-weight: 500; word-break: normal; overflow-wrap: break-word; }
.acp-related li a:hover { color: var(--teal); text-decoration: none; }
.acp-related time { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.acp-back { padding: 30px 0 10px; font-size: 13.5px; font-weight: 600; letter-spacing: 0.3px; }
.acp-back a { color: var(--text-soft); text-decoration: none; word-break: normal; }
.acp-back a:hover { color: var(--teal); text-decoration: none; }
.acp-empty { padding: 40px 0; color: var(--muted); }
.acp-single .acp-main { padding-bottom: 30px; }

/* ---------- PREVIEW NOTE (signed-in editors only) ---------- */
.acp-preview-note {
  margin-bottom: 26px; padding: 12px 16px; border-radius: 8px;
  border: 1px solid #e8a13a; background: rgba(232,161,58,0.1);
  color: #f1d3a2; font-size: 13.5px;
}
.acp-preview-note a { color: #ffd591; text-decoration: underline; }

/* ---------- LOAD ANIMATION ---------- */
.acp-reveal { opacity: 0; transform: translateY(14px); animation: acp-rise .6s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes acp-rise { to { opacity: 1; transform: none; } }
.acp-hero .acp-eyebrow { animation-delay: .02s; }
.acp-hero h1 { animation-delay: .08s; }
.acp-hero .acp-lede { animation-delay: .16s; }
.acp-hero .acp-lede.two { animation-delay: .22s; }
.acp-hero .acp-legend { animation-delay: .30s; }

@media (max-width: 620px) {
  .acp-wrap { padding: 0 20px; }
  .acp-agency-head { flex-wrap: wrap; }
  .acp-agency-head .acp-count { margin-left: 0; width: 100%; }
  .acp-sub { padding: 22px 20px; }
  .acp-links { gap: 10px; }
  .acp-lnk { width: 100%; justify-content: center; }
  .acp-facts { grid-template-columns: 1fr; gap: 2px 0; }
  .acp-facts dd { padding-bottom: 12px; }
}

@media print {
  body.acp-body { background: #fff; }
  .acp { color: #111; }
  .acp h1, .acp-agency-head h2, .acp-sub h3 { color: #000; }
  .acp-sub { background: none; border-color: #bbb; break-inside: avoid; }
  .acp-reveal { opacity: 1; transform: none; animation: none; }
}
