/* ==========================================================================
   Five Domain Assessment
   ------------------------------------------------------------------------
   A dark, quiet instrument. Everything is scoped under .fd so it overrides
   the site's light sections without touching anything else.

   Palette is drawn from the existing token set — --ink deepened to a true
   ground, --paper as the text colour, and --amber as the single accent.
   No new hues introduced; --red is lifted one step so small band labels
   still clear WCAG AA on a dark ground (4.24:1 -> 5.82:1).

   Type pairs the system serif (New York on Apple, Georgia elsewhere) for
   display against the existing system sans for UI. No webfont, so this
   costs nothing to load.
   ========================================================================== */

.fd {
  /* ground + surfaces */
  --fd-ground:      #0d0d0f;
  --fd-surface:     #16161a;
  --fd-surface-hi:  #1d1d22;

  /* lines */
  --fd-line:        rgba(255, 255, 255, 0.08);
  --fd-line-mid:    rgba(255, 255, 255, 0.14);
  --fd-line-strong: rgba(255, 255, 255, 0.22);

  /* text */
  --fd-text:        var(--paper);
  --fd-text-mid:    #b6b6be;
  --fd-text-dim:    #86868b;

  /* the one accent */
  --fd-gold:        var(--amber);
  --fd-gold-soft:   rgba(196, 145, 43, 0.12);
  --fd-gold-line:   rgba(196, 145, 43, 0.40);

  /* band colours, lifted for dark ground */
  --fd-solid:       #4fb283;
  --fd-holding:     #b6b6be;
  --fd-strained:    var(--amber);
  --fd-depleted:    #e0685a;

  --fd-serif: ui-serif, "New York", "Iowan Old Style", Georgia,
              "Times New Roman", serif;

  background: var(--fd-ground);
  color: var(--fd-text);
  min-height: 100vh;
}

/* Override the light-section defaults inherited from .chaos */
.fd.chaos { background: var(--fd-ground); color: var(--fd-text); }
.fd .chaos__sub { color: var(--fd-text-mid); }
.fd .chaos__meta { color: var(--fd-text-dim); }
.fd .eyebrow,
.fd .eyebrow--ink { color: var(--fd-gold); letter-spacing: 0.22em; }

/* ------------------------------------------------------------- display type */

.fd .chaos__title {
  font-family: var(--fd-serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.06;
  color: var(--fd-text);
}

.fd .chaos__intro { padding-block: clamp(5rem, 12vw, 9rem) clamp(4rem, 9vw, 7rem); }
.fd .chaos__quiz  { padding-block: clamp(2rem, 5vw, 3rem) clamp(7rem, 14vw, 10rem); }

/* ---------------------------------------------------------------- chips */

.fd .chaos__chips li {
  background: transparent;
  border: 1px solid var(--fd-line-mid);
  color: var(--fd-text-mid);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  padding: 0.55em 1.15em;
}

/* --------------------------------------------------------------- buttons */

.fd .btn--dark {
  background: var(--fd-gold);
  color: #14140f;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.fd .btn--dark:hover { background: #d5a33c; }
.fd .btn--dark:disabled { background: var(--fd-surface-hi); color: var(--fd-text-dim); opacity: 1; }

.fd .btn--ghost-ink {
  background: transparent;
  color: var(--fd-text-mid);
  box-shadow: inset 0 0 0 1px var(--fd-line-mid);
}
.fd .btn--ghost-ink:hover { box-shadow: inset 0 0 0 1px var(--fd-line-strong); color: var(--fd-text); }
.fd .btn--ghost-ink:disabled { opacity: 0.3; }

/* -------------------------------------------------------------- progress */

.fd .progress {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
  padding: 1.15rem 0 1rem;
  background: linear-gradient(
    to bottom,
    var(--fd-ground) 0%,
    var(--fd-ground) 72%,
    rgba(13, 13, 15, 0) 100%
  );
}

.fd .progress__meta {
  color: var(--fd-text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.fd .progress__track { height: 1px; background: var(--fd-line-mid); border-radius: 0; }
.fd .progress__bar   { background: var(--fd-gold); border-radius: 0; }

/* ---------------------------------------------------- domain title block */

/* Roman numerals earn their place here: the domains run in a fixed order
   and you move through them in sequence, so the numeral carries real
   information rather than decorating the heading. */
.fd .domain__head {
  align-items: baseline;
  gap: 1.1rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--fd-line);
}

.fd__numeral {
  font-family: var(--fd-serif);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--fd-gold);
  letter-spacing: 0.06em;
  flex: 0 0 auto;
}

.fd .domain__name {
  font-family: var(--fd-serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--fd-text);
}

.fd__premise {
  font-family: var(--fd-serif);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-style: italic;
  color: var(--fd-text-mid);
  line-height: 1.5;
  max-width: 50ch;
  margin: 0 0 3rem;
  padding: 0;
  border: 0;
}

/* -------------------------------------------------------------- questions */

.fd__questions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.fd .fd__q {
  background: var(--fd-surface);
  border: 1px solid var(--fd-line);
  border-radius: 14px;
  padding: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.fd .fd__q:hover { border-color: var(--fd-line-mid); }

/* Answered cards settle back; a gold hairline on the left marks them done. */
.fd .fd__q.is-answered {
  background: transparent;
  border-color: var(--fd-line);
  box-shadow: inset 2px 0 0 var(--fd-gold-line);
}

.fd__fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.fd .q__text {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding: 0;
  margin-bottom: 1.35rem;
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--fd-text);
  letter-spacing: -0.005em;
}

.fd__q-num {
  flex: 0 0 auto;
  font-family: var(--fd-serif);
  font-size: 0.9rem;
  color: var(--fd-gold);
  font-variant-numeric: tabular-nums;
  min-width: 1.2em;
}

.fd__q-body { flex: 1 1 auto; }
.fd .fd__q.is-answered .q__text { color: var(--fd-text-dim); }
.fd .fd__q.is-answered .fd__q-num { color: var(--fd-gold-line); }

/* ----------------------------------------------------------------- scales */

.fd .q__scale { display: flex; gap: 0.4rem; }

.fd .q__opt {
  flex: 1 1 0;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 450;
  letter-spacing: 0.01em;
  color: var(--fd-text-mid);
  background: transparent;
  border: 1px solid var(--fd-line-mid);
  border-radius: 10px;
  padding: 0.95em 0.5em;
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease),
              background 0.25s var(--ease);
}

.fd .q__opt:hover {
  border-color: var(--fd-line-strong);
  color: var(--fd-text);
  background: var(--fd-surface-hi);
}

/* Selected reads as gold rather than a heavy fill — the accent is the only
   place colour appears in the question list, so it stays legible at a glance. */
.fd .q__opt.is-selected {
  background: var(--fd-gold-soft);
  border-color: var(--fd-gold);
  color: var(--fd-gold);
  font-weight: 600;
  transform: none;
}

.fd .fd__scale--agreement .q__opt,
.fd .fd__scale--recency .q__opt { font-size: 0.78rem; }

@media (min-width: 621px) and (max-width: 900px) {
  .fd .fd__scale--agreement,
  .fd .fd__scale--recency {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
  }
}

/* -------------------------------------------------------------------- nav */

.fd .quiz__nav {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--fd-line);
}

/* --------------------------------------------------------------- purchase */

.fd__includes {
  list-style: none;
  margin: 3rem auto 0;
  padding: 0;
  max-width: 480px;
  text-align: left;
  display: grid;
  gap: 0;
}

.fd__includes li {
  position: relative;
  padding: 1rem 0 1rem 1.9rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--fd-text-mid);
  border-bottom: 1px solid var(--fd-line);
}
.fd__includes li:first-child { border-top: 1px solid var(--fd-line); }

.fd__includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.5em;
  width: 10px;
  height: 1px;
  background: var(--fd-gold);
}

/* ------------------------------------------------------------------ brand */

/* The lockup carries the intro and nothing else — one confident placement
   rather than a logo on every screen. */
.fd__logo {
  display: block;
  height: clamp(72px, 9vw, 104px);
  width: auto;
  margin: 0 auto 2.6rem;
  opacity: 0.96;
}

/* The mark alone does the work everywhere else: small enough to read as a
   maker's stamp rather than branding, and it sits on the same baseline as
   the label beside it. */
.fd__mark {
  height: 15px;
  width: auto;
  display: inline-block;
  vertical-align: -2px;
  opacity: 0.55;
  transition: opacity 0.4s var(--ease);
}

.fd__progress-id {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.fd .progress:hover .fd__mark { opacity: 0.8; }

/* On the results view the mark reads as a seal on a finished document. */
.fd__mark--seal {
  height: 34px;
  display: block;
  margin: 0 0 1.6rem;
  opacity: 0.85;
}

@media (max-width: 620px) {
  .fd__logo { height: 64px; margin-bottom: 2rem; }
  .fd__mark--seal { height: 28px; }
}

@media print {
  .fd__logo, .fd__mark { filter: brightness(0); opacity: 1; }
}

/* ------------------------------------------------ signature: the rails */

.fd__rails { position: relative; margin: 3.5rem 0 1rem; padding-top: 2.2rem; }

.fd__constraint {
  position: absolute;
  top: 0;
  bottom: 0.5rem;
  width: 1px;
  background: var(--fd-depleted);
  opacity: 0.6;
  pointer-events: none;
  transition: left 0.8s var(--ease);
}

.fd__constraint-label {
  position: absolute;
  top: 0;
  left: 0.6rem;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fd-depleted);
}

.fd__rail { margin-bottom: 1.9rem; }
.fd__rail:last-child { margin-bottom: 0; }

.fd__rail-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.55rem;
}

.fd__rail-name {
  font-family: var(--fd-serif);
  font-size: 1.15rem;
  color: var(--fd-text);
  letter-spacing: 0;
}

.fd__rail-score {
  font-family: var(--fd-serif);
  font-size: 1.6rem;
  color: var(--fd-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.fd__rail-track {
  height: 3px;
  background: var(--fd-line);
  border-radius: 0;
  overflow: hidden;
}

.fd__rail-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 0;
  transition: width 1s var(--ease);
}

.fd__rail-band {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* -------------------------------------------------------------- callouts */

.fd__callouts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 3.2rem 0 2.4rem;
  border-top: 1px solid var(--fd-line);
  border-bottom: 1px solid var(--fd-line);
}

.fd__callout {
  padding: 1.6rem 1.4rem;
  display: grid;
  gap: 0.45rem;
  align-content: start;
  border-right: 1px solid var(--fd-line);
}
.fd__callout:last-child { border-right: 0; }

.fd__callout-label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fd-text-dim);
}

.fd__callout--priority .fd__callout-label { color: var(--fd-depleted); }
.fd__callout--anchor   .fd__callout-label { color: var(--fd-solid); }

.fd__callout-value {
  font-family: var(--fd-serif);
  font-size: 1.35rem;
  color: var(--fd-text);
  line-height: 1.15;
}

.fd__callout-note {
  font-size: 0.82rem;
  color: var(--fd-text-dim);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.fd__note {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--fd-text-mid);
  max-width: 56ch;
  padding: 1.5rem 0 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--fd-line);
  border-radius: 0;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 620px) {
  .fd__callouts {
    grid-template-columns: 1fr;
    border-bottom: 0;
  }
  .fd__callout { border-right: 0; border-bottom: 1px solid var(--fd-line); }

  .fd .q__scale {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }
  .fd .q__scale .q__opt:last-child { grid-column: 1 / -1; }
  .fd .q__opt { font-size: 0.86rem; padding: 1em 0.5em; }
  .fd .fd__scale--agreement .q__opt,
  .fd .fd__scale--recency .q__opt { font-size: 0.82rem; }

  .fd__constraint-label { font-size: 0.6rem; }
  .fd__premise { margin-bottom: 2.2rem; }
}

/* ------------------------------------------------------ a11y / motion */

.fd .q__opt:focus-visible,
.fd .btn:focus-visible {
  outline: 2px solid var(--fd-gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .fd__rail-fill,
  .fd__constraint,
  .fd .progress__bar,
  .fd .fd__q { transition: none; }
}

@media print {
  .fd, .fd.chaos { background: #fff; color: #1d1d1f; }
  .fd__rails { break-inside: avoid; }
  .fd__rail-fill { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* =============================================================================
   SITE INTEGRATION
   Added when this stylesheet was brought into ianamanofficial.com. The rules
   above were authored against a standalone preview page with no site chrome;
   these adapt them to the real page, which has a fixed 52px header.
============================================================================= */

/* The quiz's own top padding (2–3rem) is shorter than the fixed nav, so the
   progress bar would sit underneath it at scroll position 0. */
.fd .chaos__quiz { padding-top: calc(52px + clamp(2rem, 5vw, 3rem)); }

/* Anchored scrolls inside the quiz (easing to the next question, and to the
   nav buttons when a domain completes) must clear the fixed header too. */
.fd .fd__q,
.fd .quiz__nav { scroll-margin-top: calc(52px + 1rem); }

/* The progress bar is sticky at top:0 above, which parks it behind the fixed
   header (and beneath it in stacking order — nav is z-index 100 to its 5).
   Pinning it below the header keeps both readable. */
.fd .progress { top: 52px; }

/* Local-preview export block (assessment.js → devExport). Gated to localhost
   in JS; these styles are inert on the live site. */
.fd__dev {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding: 1.6rem 1.8rem;
  border: 1px dashed var(--fd-line-mid);
  border-radius: 10px;
  background: var(--fd-surface);
}
.fd__dev-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--fd-gold); margin: 0 0 0.5rem;
}
.fd__dev-note { font-size: 0.92rem; color: var(--fd-text-dim); margin: 0 0 1.1rem; max-width: 52ch; }
.fd__dev-btn { font-size: 0.9rem; }

/* ---------------------------------------------------- purchase / email gate */

.fd__cta-wrap { display: flex; flex-direction: column; align-items: center; }

.fd__buy { width: min(560px, 100%); margin: 0 auto; }

.fd__buy-label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fd-text-dim);
  margin-bottom: 0.9rem;
}

.fd__buy-row { display: flex; gap: 0.6rem; }

.fd__buy input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: inherit;
  font-size: 1.0625rem;
  color: var(--fd-text);
  background: var(--fd-surface);
  border: 1px solid var(--fd-line-mid);
  border-radius: 980px;
  padding: 0.92em 1.4em;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.fd__buy input::placeholder { color: var(--fd-text-dim); }
.fd__buy input:focus {
  outline: none;
  border-color: var(--fd-gold-line);
  background: var(--fd-surface-hi);
}
.fd__buy.is-error input { border-color: var(--fd-depleted); }

.fd__buy .btn { flex: 0 0 auto; }

.fd__buy-note {
  font-size: 0.85rem;
  color: var(--fd-text-dim);
  margin: 0.9rem 0 0;
}

/* The e-mail field and a full-price button can't share a line on a phone. */
@media (max-width: 620px) {
  .fd__buy-row { flex-direction: column; }
  .fd__buy .btn { width: 100%; }
}
