@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Newsreader:ital,opsz,wght@0,6..72,400;1,6..72,400&display=swap");

:root {
  color-scheme: light;
  --paper: #f2eddf;
  --paper-deep: #e8e0cc;
  --surface: rgba(255, 253, 246, .82);
  --surface-solid: #fffdf6;
  --ink: #17382a;
  --muted: #637267;
  --line: rgba(29, 67, 48, .16);
  --forest: #173e2d;
  --forest-deep: #0a2419;
  --gold: #b08035;
  --gold-light: #d5b373;
  --danger: #8f352d;
  --success: #237050;
  --shadow: 0 22px 70px rgba(26, 52, 39, .1);
  --serif: "Newsreader", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #08130e;
  --paper-deep: #0b1b13;
  --surface: rgba(16, 34, 24, .84);
  --surface-solid: #102319;
  --ink: #eef0df;
  --muted: #a8b3a8;
  --line: rgba(224, 203, 152, .16);
  --forest: #d8c28f;
  --forest-deep: #f2e8cd;
  --gold: #d4af6a;
  --gold-light: #ecd39c;
  --danger: #f0a29a;
  --success: #8fd1ae;
  --shadow: 0 26px 80px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 8%, rgba(183, 137, 62, .16), transparent 31rem),
    radial-gradient(circle at 8% 42%, rgba(55, 111, 75, .1), transparent 27rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.accreditation-atmosphere { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.accreditation-atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .24;
  background-image: linear-gradient(rgba(24, 62, 45, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(24, 62, 45, .055) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
.accreditation-atmosphere span { position: absolute; border: 1px solid rgba(176, 128, 53, .13); border-radius: 50%; }
.accreditation-atmosphere span:nth-child(1) { width: 42rem; height: 42rem; right: -18rem; top: 7rem; }
.accreditation-atmosphere span:nth-child(2) { width: 31rem; height: 31rem; right: -12rem; top: 12.5rem; }
.accreditation-atmosphere span:nth-child(3) { width: 20rem; height: 20rem; right: -6rem; top: 18rem; }

.accreditation-topbar {
  height: 76px;
  padding: 0 clamp(1rem, 4vw, 4.75rem);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.accreditation-brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; }
.accreditation-brand img { width: 124px; max-height: 30px; object-fit: contain; filter: brightness(.28) sepia(.7) hue-rotate(90deg) saturate(.75); }
html[data-theme="dark"] .accreditation-brand img, html[data-theme="dark"] .accreditation-footer img { filter: brightness(0) invert(1) sepia(.22); }
.accreditation-brand span { padding-left: 1rem; border-left: 1px solid var(--line); color: var(--muted); font-size: .73rem; text-transform: uppercase; letter-spacing: .16em; }
.accreditation-topbar nav { display: flex; align-items: center; gap: 1.25rem; }
.accreditation-topbar nav a { color: var(--muted); font-size: .82rem; text-decoration: none; }
.accreditation-topbar nav a:hover { color: var(--ink); }
.accreditation-topbar button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: .58rem .85rem;
  cursor: pointer;
}

.accreditation-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(3rem, 7vw, 7rem) 0 5rem; }
.accreditation-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: end; margin-bottom: clamp(3rem, 7vw, 6rem); }
.accreditation-hero-copy { min-width: 0; }
.eyebrow { margin: 0 0 1rem; color: var(--gold); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .22em; }
.accreditation-hero h1 { max-width: 760px; margin: 0; font: 400 clamp(3.8rem, 8.5vw, 8rem)/.88 var(--serif); letter-spacing: -.045em; }
.accreditation-hero h1 em { color: var(--gold); font-weight: 400; }
.accreditation-hero-copy > p:not(.eyebrow) { max-width: 650px; margin: 1.7rem 0; color: var(--muted); font-size: clamp(1.05rem, 1.8vw, 1.3rem); line-height: 1.65; }
.privacy-promise { max-width: 650px; display: flex; align-items: flex-start; gap: .8rem; border-top: 1px solid var(--line); padding-top: 1.3rem; }
.privacy-promise > span { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-size: .74rem; }
.privacy-promise p { margin: .05rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.privacy-promise strong { color: var(--ink); }

.accreditation-path { border-left: 1px solid var(--line); padding-left: 2.2rem; }
.accreditation-path > p { margin: 0 0 1.5rem; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; }
.accreditation-path ol { list-style: none; padding: 0; margin: 0; }
.accreditation-path li { display: flex; gap: 1rem; align-items: center; padding: .75rem 0; color: var(--muted); font-family: var(--serif); font-size: 1.2rem; transition: color .2s ease; }
.accreditation-path li span { color: var(--gold); font: 500 .66rem var(--sans); letter-spacing: .1em; }
.accreditation-path li.is-current, .accreditation-path li.is-complete { color: var(--ink); }

.launch-notice, .result-card { padding: clamp(2rem, 5vw, 4rem); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.launch-notice h2, .result-card h2 { max-width: 680px; margin: 0 auto 1rem; font: 400 clamp(2.1rem, 5vw, 4rem)/1 var(--serif); }
.launch-notice > p:not(.eyebrow), .result-card > p:not(.eyebrow) { max-width: 650px; margin: 0 auto 1.8rem; color: var(--muted); line-height: 1.7; }

#accreditation-form { display: grid; gap: 1.5rem; }
.form-section { position: relative; padding: clamp(1.5rem, 4vw, 3.4rem); border: 1px solid var(--line); background: var(--surface); box-shadow: 0 10px 45px rgba(26, 52, 39, .045); backdrop-filter: blur(14px); }
.form-section::before { content: ""; position: absolute; left: -1px; top: 2rem; width: 2px; height: 3.5rem; background: var(--gold); }
.section-heading { display: flex; gap: 1.25rem; align-items: center; margin-bottom: 2rem; }
.section-heading > span { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-size: .67rem; font-weight: 600; letter-spacing: .09em; }
.section-heading p { margin: 0 0 .25rem; color: var(--gold); font-size: .68rem; text-transform: uppercase; letter-spacing: .18em; }
.section-heading h2 { margin: 0; font: 400 clamp(2rem, 4vw, 3rem)/1 var(--serif); }
.section-intro, .qualification-footnote { max-width: 800px; color: var(--muted); line-height: 1.65; }

.field-grid, .entity-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.field.wide { grid-column: 1 / -1; }
.field { display: grid; gap: .55rem; align-content: start; }
.field > span, .choice-fieldset legend, .representation-fieldset legend, .criteria-fieldset legend { font-size: .78rem; font-weight: 600; letter-spacing: .035em; }
.field b, .choice-fieldset b, .policy-acceptances b { color: var(--gold); }
.field input, .field select {
  width: 100%;
  min-height: 51px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
  color: var(--ink);
  padding: .8rem .9rem;
  outline: 0;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus, .field select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 17%, transparent); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--danger); }
.field small { color: var(--muted); font-size: .72rem; line-height: 1.45; }
.field-error { color: var(--danger) !important; }

.choice-fieldset, .criteria-fieldset, .representation-fieldset { border: 0; padding: 0; margin: 2rem 0 0; }
.choice-fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.choice-fieldset legend { margin-bottom: .75rem; }
.type-choice, .criterion-card { position: relative; cursor: pointer; }
.type-choice input, .criterion-card input { position: absolute; opacity: 0; pointer-events: none; }
.type-choice > span, .criterion-card > span {
  display: flex;
  height: 100%;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-solid) 64%, transparent);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.type-choice > span { align-items: center; gap: .25rem; flex-direction: column; padding: 1.2rem; text-align: center; }
.type-choice small { color: var(--muted); }
.type-choice input:checked + span, .criterion-card input:checked + span { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 9%, var(--surface-solid)); }
.type-choice input:focus-visible + span, .criterion-card input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }
.entity-fields { margin-top: 1.2rem; padding: 1.2rem; border: 1px dashed var(--line); }

.criteria-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.criterion-card > span { position: relative; flex-direction: column; gap: .5rem; padding: 1.25rem 3rem 1.25rem 1.25rem; }
.criterion-card > span::after { content: "+"; position: absolute; right: 1.2rem; top: 1.1rem; color: var(--gold); font-size: 1.25rem; }
.criterion-card input:checked + span::after { content: "✓"; }
.criterion-card strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; }
.criterion-card small { color: var(--muted); line-height: 1.5; }
.criterion-card em { color: var(--gold); font: 500 .64rem var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.criterion-card:hover > span { transform: translateY(-2px); }

.certification-summary { margin-bottom: 1.5rem; padding: 1.25rem; border: 1px solid var(--line); background: color-mix(in srgb, var(--gold) 6%, transparent); }
.certification-summary p { margin-bottom: .5rem; }
.certification-summary strong { font: 400 1.18rem/1.5 var(--serif); }
.representation-fieldset > div { margin-top: .8rem; display: grid; gap: .55rem; }
.representation-row, .policy-acceptances label, .mail-consent { display: flex; align-items: flex-start; gap: .8rem; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.representation-row::before { content: "✓"; flex: none; color: var(--gold); }
.policy-acceptances { display: grid; gap: .8rem; margin: 1.5rem 0; padding: 1.25rem; border: 1px solid var(--line); }
input[type="checkbox"] { width: 18px; height: 18px; margin: .15rem 0 0; flex: none; accent-color: var(--gold); }
.signature-field { max-width: 580px; }
.mail-consent { margin: 1.5rem 0; padding: 1.25rem; border: 1px solid var(--line); color: var(--ink); }
.mail-consent span { display: grid; gap: .25rem; }
.mail-consent small { color: var(--muted); }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.compliance-boundary { display: flex; gap: .8rem; padding: 1.1rem; border-left: 2px solid var(--gold); background: color-mix(in srgb, var(--gold) 7%, transparent); }
.compliance-boundary span { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-family: var(--serif); }
.compliance-boundary p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.6; }
.submit-row { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; margin-top: 2rem; }
.submit-row > p { max-width: 430px; color: var(--muted); font-size: .76rem; line-height: 1.5; }

.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 1rem; border: 1px solid var(--forest); border-radius: 2px; padding: .85rem 1.2rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .18s ease, filter .18s ease; }
.button:hover { transform: translateY(-2px); filter: brightness(1.05); }
.button.primary { background: var(--forest); color: var(--paper); }
html[data-theme="dark"] .button.primary { color: #102319; }
.button.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.button[disabled] { cursor: wait; opacity: .65; transform: none; }
.button b { font-size: 1.15rem; }
.form-status { min-height: 1.2rem; color: var(--danger); text-align: right; font-size: .8rem; }
.error-summary { padding: 1.1rem 1.3rem; border: 1px solid color-mix(in srgb, var(--danger) 50%, transparent); background: color-mix(in srgb, var(--danger) 8%, var(--surface-solid)); color: var(--danger); }
.error-summary ul { margin: .6rem 0 0; padding-left: 1.2rem; }

.result-card { margin-top: 2rem; }
.password-setup-card form { display: grid; gap: 1rem; width: min(100%, 520px); margin: 2rem auto 0; text-align: left; }
.password-setup-card .button { justify-self: center; margin-top: .5rem; }
.password-setup-card .form-status { text-align: center; }
.result-mark { width: 70px; height: 70px; margin: 0 auto 1.2rem; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-size: 1.6rem; }
.result-actions { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; }

.accreditation-footer { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 3rem; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .76rem; }
.accreditation-footer img { width: 92px; filter: brightness(.28) sepia(.7) hue-rotate(90deg) saturate(.75); }
.accreditation-footer a { text-decoration: none; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (max-width: 760px) {
  .accreditation-topbar { height: 64px; }
  .accreditation-brand span, .accreditation-topbar nav a { display: none; }
  .accreditation-hero { grid-template-columns: 1fr; gap: 2rem; }
  .accreditation-hero h1 { font-size: clamp(3rem, 16vw, 4.5rem); }
  .accreditation-path { border-left: 0; border-top: 1px solid var(--line); padding: 1.5rem 0 0; }
  .accreditation-path ol { display: grid; grid-template-columns: repeat(4, 1fr); }
  .accreditation-path li { display: grid; gap: .25rem; font: 500 .68rem var(--sans); }
  .field-grid, .entity-fields, .criteria-grid, .choice-fieldset { grid-template-columns: 1fr; }
  .submit-row { align-items: stretch; flex-direction: column; }
  .submit-row .button { width: 100%; }
  .accreditation-footer { align-items: flex-start; flex-direction: column; }
}

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