/* Facial Diagnosis self-report checklist + results. Reuses the .rules-* shell (rules.css) for
   the page frame (hero, cards, status pills) and adds only the checklist/results-specific
   styling here, following the same --rules-* variables rules.css defines. */

.fd-disclaimer {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid var(--rules-line);
  border-left: 3px solid var(--rules-gold);
  border-radius: 0 10px 10px 0;
  background: var(--rules-panel);
  color: var(--rules-muted);
  font-size: 12px;
  line-height: 1.5;
}
.fd-disclaimer b {
  color: var(--rules-text);
}
.fd-content {
  display: grid;
  gap: 14px;
}

/* Original face-region diagrams (drawn in JS, not derived from any of Card's photos) — a
   full labelled map at the top of the page, and a small highlight icon per section heading. */
.fd-face-outline {
  fill: var(--rules-panel-2);
  stroke: var(--rules-line-strong);
  stroke-width: 2.5;
}
.fd-face-outline-active {
  fill: color-mix(in srgb, var(--rules-panel-2) 60%, var(--rules-gold) 40%);
  stroke: var(--rules-gold);
}
.fd-face-ear {
  fill: var(--rules-panel-2);
  stroke: var(--rules-line-strong);
  stroke-width: 2.5;
}
.fd-face-hairline {
  fill: none;
  stroke: var(--rules-line-strong);
  stroke-width: 3;
  stroke-linecap: round;
}
.fd-face-hairline-active,
.fd-face-hairline-marked {
  stroke: var(--rules-gold);
  stroke-width: 5;
}
.fd-face-spot {
  fill: none;
}
.fd-face-spot-active {
  fill: color-mix(in srgb, var(--rules-gold) 55%, transparent);
  stroke: var(--rules-gold);
  stroke-width: 1.5;
}
.fd-face-spot-marked {
  fill: color-mix(in srgb, var(--rules-gold) 16%, transparent);
  stroke: color-mix(in srgb, var(--rules-gold) 55%, transparent);
  stroke-width: 1;
}
.fd-face-badge circle {
  fill: var(--rules-gold);
  stroke: var(--rules-panel);
  stroke-width: 1.5;
}
.fd-face-badge text {
  fill: #1a1408;
  font-size: 13px;
  font-weight: 800;
  text-anchor: middle;
}
.fd-face-leader {
  stroke: color-mix(in srgb, var(--rules-gold) 55%, transparent);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}
.fd-face-anchor {
  fill: var(--rules-gold);
}
.fd-face-icon {
  flex: none;
  display: block;
}
.fd-map-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.fd-map-wrap .fd-face-map {
  flex: none;
  width: min(100%, 380px);
  height: auto;
  aspect-ratio: 340 / 400;
}

/* Photo-based region map: a generic 3D reference-head render with numbered call-outs and
   arrows, laid out in two columns either side of the image (a standard textbook-diagram
   layout), rather than the schematic ring used by the small per-heading icons. */
.fd-photo-map {
  flex: none;
  width: min(100%, 420px);
  height: auto;
  margin: 0 auto;
}
@media (max-width: 700px) {
  .fd-photo-map {
    width: min(90vw, 330px);
  }
}
.fd-photo-image {
  filter: brightness(0.95) contrast(1.05);
}
/* Fixed, non-themed colours (not var(--rules-gold), which turns a muted brownish shade in the
   light theme — nearly invisible against this grey photo). The photo's own brightness doesn't
   change with the site theme, so these call-outs shouldn't either: a bright, saturated yellow
   with a solid dark "halo" behind every line and dot, the same convention used for high-visibility
   diagram/wayfinding markings, so it reads clearly against skin, hair, or the theme's own
   background in the margins on either side. */
.fd-photo-arrow-halo {
  stroke: #14110a;
  stroke-width: 6;
  opacity: 0.95;
}
.fd-photo-arrow {
  stroke: #ffcc00;
  stroke-width: 2.75;
}
.fd-photo-arrowhead-halo {
  fill: #14110a;
}
.fd-photo-arrowhead {
  fill: #ffcc00;
}
.fd-photo-anchor-dot {
  fill: #ffcc00;
  stroke: #14110a;
  stroke-width: 2;
}
.fd-photo-badge circle {
  fill: #ffcc00;
  stroke: #14110a;
  stroke-width: 2.5;
}
.fd-photo-badge text {
  fill: #14110a;
  font-size: 18px;
  font-weight: 800;
  text-anchor: middle;
  font-family: inherit;
}
.fd-map-legend {
  width: 100%;
  max-width: 640px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--rules-text);
}
.fd-map-legend li {
  display: flex;
  align-items: center;
  gap: 7px;
}
.fd-map-legend-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background: var(--rules-gold);
  color: #1a1408;
  font-weight: 800;
  font-size: 10px;
}
.fd-map-note {
  margin: 14px 0 0;
  color: var(--rules-muted);
  font-size: 11px;
  line-height: 1.5;
}
@media (max-width: 700px) {
  .fd-map-wrap {
    gap: 14px;
  }
  .fd-map-wrap .fd-face-map {
    width: 120px;
    height: 144px;
  }
  .fd-map-legend {
    grid-template-columns: 1fr 1fr;
    font-size: 11px;
  }
}

.fd-checklist {
  display: grid;
  gap: 18px;
}
.fd-region-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--rules-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fd-region-list {
  display: grid;
  gap: 6px;
}
.fd-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--rules-line);
  border-radius: 8px;
  background: var(--rules-panel-2);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.fd-entry:hover {
  border-color: var(--rules-line-strong);
}
.fd-entry input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--rules-gold);
}
/* Small "where to look" thumbnail — a zoomed crop of the same generic 3D reference head used in
   the facial region map above, not a photographed example of the sign itself (see the page's
   own reasoning on why not to depict real people this way). background-image/-size/-position are
   set inline per entry (js/facial-diagnosis-page.js), since each needs a different crop. */
.fd-entry-thumb {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 7px;
  border: 1px solid var(--rules-line-strong);
  background-color: var(--rules-bg);
  background-repeat: no-repeat;
}
.fd-entry-text {
  display: grid;
  gap: 3px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--rules-text);
}
.fd-entry-quality {
  color: var(--rules-text);
}
.fd-entry-note {
  font-size: 11px;
  color: var(--rules-muted);
}
.fd-entry-note::before {
  content: "— ";
}
/* Salt names stay hidden in the checklist so ticking a sign isn't led by the answer;
   [hidden] is enough (matches native behaviour) but stated explicitly for clarity. */
.fd-entry-salts[hidden] {
  display: none;
}

.fd-reset-btn {
  font-size: 11px;
  padding: 6px 10px;
  border: 1px solid var(--rules-line);
  border-radius: 7px;
  background: var(--rules-panel-2);
  color: var(--rules-text);
  font-weight: 700;
  cursor: pointer;
}
.fd-reset-btn:hover {
  border-color: var(--rules-line-strong);
}

.fd-results-empty {
  margin: 4px 0;
  color: var(--rules-muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.fd-results-list {
  display: grid;
  gap: 10px;
}
.fd-result-row {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--rules-line);
  border-radius: 10px;
  background: var(--rules-panel-2);
}
.fd-result-rank {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--rules-panel) 70%, var(--rules-gold) 30%);
  color: var(--rules-text);
  font-weight: 800;
  font-size: 12px;
}
.fd-result-body {
  flex: 1;
  min-width: 0;
}
.fd-result-salt {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 800;
  font-size: 14px;
  color: var(--rules-text);
}
.fd-result-count {
  font-weight: 500;
  font-size: 11px;
  color: var(--rules-muted);
}
.fd-result-signs {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--rules-muted);
}

@media (max-width: 700px) {
  .fd-entry {
    padding: 8px 9px;
  }
  .fd-result-row {
    padding: 10px;
    gap: 9px;
  }
}
