/* Colour report — form and result. Builds on styles.css tokens. */

.pick {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 1.25rem 1.4rem; margin: 0 0 1.25rem;
}
.pick legend { font-weight: 600; padding: 0 0.4rem; }
.pick-help { font-size: 0.85rem; color: var(--muted); margin: 0.25rem 0 0.9rem; }

.swatch-grid {
  display: grid; gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(2.6rem, 1fr));
}
.swatch {
  aspect-ratio: 1; border-radius: 6px; cursor: pointer;
  border: 2px solid var(--line); padding: 0; position: relative;
}
.swatch:hover { border-color: var(--ink-2); }
.swatch[aria-checked="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}
.swatch[aria-checked="true"]::after {
  content: "✓"; position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,0.65);
}

.custom-row {
  display: flex; align-items: center; gap: 0.6rem; margin-top: 0.9rem;
  font-size: 0.85rem; color: var(--ink-2);
}
.custom-row input[type="color"] {
  width: 3rem; height: 2rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: none; padding: 2px; cursor: pointer;
}

/* --- the report ---------------------------------------------------------- */

#report { margin: 3rem 0 4rem; }

.season-head { text-align: center; margin-bottom: 2rem; }
.season-head .eyebrow { margin-bottom: 0.5rem; }
.season-name { font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: -0.02em; margin: 0 0 0.5rem; }
.season-sub { color: var(--ink-2); max-width: 34em; margin: 0 auto; }

.trait-row {
  display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center;
  margin: 1.25rem 0 0;
}
.trait {
  border: 1px solid var(--line-strong); border-radius: 99px;
  padding: 0.3rem 0.9rem; font-size: 0.82rem; color: var(--ink-2);
  background: var(--surface);
}
.trait b { color: var(--ink); font-weight: 600; }

.pal-block { margin: 2.25rem 0; }
.pal-title { font-weight: 600; margin-bottom: 0.2rem; }
.pal-sub { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }

.pal-grid {
  display: grid; gap: 0.6rem;
  grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr));
}
.pal-chip { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.pal-chip .c { aspect-ratio: 5 / 3.4; }
.pal-chip .n {
  font-size: 0.7rem; color: var(--ink-2); padding: 0.35rem 0.45rem;
  line-height: 1.25; display: block;
}

.caveat-block {
  background: var(--surface-2); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin: 2rem 0;
  font-size: 0.9rem; color: var(--ink-2);
}
.caveat-block p { margin: 0 0 0.6rem; }
.caveat-block p:last-child { margin: 0; }
.caveat-block .caveat-title {
  font-weight: 600; color: var(--ink); font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.6rem;
}

.share-row {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
  justify-content: center; margin-top: 2.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  #report:not([hidden]) { animation: rise 300ms ease both; }
}

/* --- account gate -------------------------------------------------------- */

.auth-gate {
  max-width: 30rem; margin: 0 auto; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.25rem);
}
.auth-gate h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 0.3em; }
.gate-sub { color: var(--ink-2); font-size: 0.94rem; }

.auth-tabs {
  display: flex; gap: 0.4rem; justify-content: center;
  margin: 1.5rem 0 1.25rem;
}
.auth-tab {
  font: inherit; font-size: 0.88rem; cursor: pointer;
  background: none; border: 1px solid var(--line-strong);
  color: var(--ink-2); border-radius: 99px; padding: 0.35rem 0.9rem;
}
.auth-tab.is-on {
  border-color: var(--accent); color: var(--ink);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.auth-form { display: grid; gap: 0.85rem; text-align: left; }
.auth-form .btn { width: 100%; margin-top: 0.35rem; }

/* Field + label pairs. The form previously ran on placeholders alone, which
   look tidy until the box is filled and the person can no longer see what it
   was asking for. */
.auth-field { display: grid; gap: 0.3rem; }
.auth-field > span {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.01em;
}
.auth-hint {
  font-size: 0.78rem; color: var(--muted); margin: 0.1rem 0 0; line-height: 1.45;
}

.auth-consents { display: grid; gap: 0.6rem; margin: 0.4rem 0 0.2rem; }
.auth-consent {
  display: flex; gap: 0.6rem; align-items: flex-start;
  font-size: 0.84rem; color: var(--ink-2); cursor: pointer;
}
.auth-consent input { margin: 0.2rem 0 0; accent-color: var(--accent); flex: none; }

.auth-error { color: #d03b3b; font-size: 0.86rem; min-height: 1.2em; }

.acct-row {
  display: flex; gap: 1.25rem; justify-content: center;
  margin-top: 1.5rem; flex-wrap: wrap;
}
.linkish {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: 0.84rem; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px;
}
.linkish:hover { color: var(--ink-2); }

/* --- the 18+ gate --------------------------------------------------------- */

.auth-age { text-align: left; display: grid; gap: 0.3rem; }
.auth-age-label { font-size: 0.8rem; font-weight: 600; }
/* Doubles as the hint and the readout: it states the rule until a date is
   entered, then confirms the age or refuses. One line either way, so there is
   no permanent gap reserved for a message that is usually absent. */
.auth-age-read {
  font-size: 0.78rem; color: var(--muted); margin: 0.1rem 0 0; line-height: 1.45;
}
.auth-age-read.is-under { color: #d03b3b; font-weight: 600; }

/* --- the style profile ---------------------------------------------------- */

.style-profile {
  margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line);
}
.style-profile h3 { font-size: clamp(1.2rem, 2.6vw, 1.55rem); margin-bottom: 0.3em; }
.style-profile h4 {
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); margin: 1.75rem 0 0.6rem;
}

.sp-form {
  display: grid; gap: 1rem; margin-top: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}
.sp-field { display: flex; flex-direction: column; gap: 0.3rem; }
.sp-label { font-size: 0.84rem; font-weight: 600; }
.sp-field .meta-note { font-size: 0.76rem; margin: 0; }
.sp-field input + input { margin-top: 0.35rem; }

.sp-hobbies {
  grid-column: 1 / -1; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem;
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.sp-hobbies legend {
  font-size: 0.84rem; font-weight: 600; padding: 0 0.4rem;
}
.sp-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  border: 1px solid var(--line-strong); border-radius: 2rem;
  padding: 0.3rem 0.7rem; font-size: 0.83rem; cursor: pointer;
}
.sp-chip:has(input:checked) {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  border-color: var(--accent);
}
.sp-chip:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }

.sp-form .auth-error, .sp-form .btn { grid-column: 1 / -1; }

/* --- the wardrobe split --------------------------------------------------- */

.sp-out { margin-top: 1rem; }
.sp-bars { display: flex; flex-direction: column; gap: 0.5rem; }
.sp-bar {
  display: grid; grid-template-columns: 8.5rem 1fr 3rem;
  align-items: center; gap: 0.6rem;
}
.sp-bar-name { font-size: 0.86rem; }
.sp-bar-track {
  height: 0.55rem; border-radius: 1rem; overflow: hidden;
  background: color-mix(in srgb, var(--ink) 8%, var(--surface));
}
.sp-bar-fill { display: block; height: 100%; background: var(--accent); }
.sp-bar-pct {
  font-size: 0.8rem; color: var(--ink-2); text-align: right;
  font-variant-numeric: tabular-nums;
}
.sp-because {
  grid-column: 1 / -1; font-size: 0.8rem; color: var(--muted);
  margin: 0 0 0.35rem; padding-left: 9.1rem; line-height: 1.5;
}

.sp-list { margin: 0; padding-left: 1.1rem; }
.sp-list li { font-size: 0.88rem; margin-bottom: 0.4rem; line-height: 1.55; }

/* The honesty block. Deliberately not styled as a warning — it is not a
   failure, it is the engine saying what it was not told. */
.sp-unknowns li { color: var(--muted); }

@media (max-width: 34rem) {
  .sp-bar { grid-template-columns: 1fr 3rem; }
  .sp-bar-name { grid-column: 1 / -1; }
  .sp-bar-track { grid-column: 1; }
  .sp-because { padding-left: 0; }
}

.sp-self-describe { margin-top: 0.4rem; }

/* --- the dashboard --------------------------------------------------------- */

.dash-card {
  display: block; margin-top: 2.5rem; padding: 1.25rem 1.4rem;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border: 1px solid var(--accent); border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
}
.dash-card b { display: block; margin-bottom: 0.25rem; }
.dash-card span { font-size: 0.88rem; color: var(--ink-2); }
.dash-card:hover { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }

.dash-head-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; margin: 2rem 0 1.25rem;
}
.dash-head-row h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin: 0 0 0.2rem; }

.dash-meter {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 2rem;
}
.dash-meter-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.dash-chip {
  font-size: 0.78rem; border: 1px solid var(--line-strong);
  border-radius: 2rem; padding: 0.22rem 0.7rem; color: var(--muted);
}
.dash-chip.is-done {
  color: var(--ink); border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.dash-readings h3 { font-size: clamp(1.1rem, 2.4vw, 1.4rem); margin-bottom: 0.75rem; }
.dash-reading-grid {
  display: grid; gap: 1rem; margin: 0.5rem 0 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
}
.dash-reading {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.9rem 1rem;
  display: grid; gap: 0.35rem;
}
.dash-palette { display: flex; gap: 3px; margin: 0.25rem 0; }
.dash-swatch {
  flex: 1; aspect-ratio: 1; border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}

.sp-measure { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.sp-measure > legend, .sp-measure > .auth-hint { grid-column: 1 / -1; }
.sp-measure .auth-hint { margin: 0; }
.sp-silhouette { font-size: 1rem; margin: 0 0 0.75rem; }
