/* Investor Developments respondent UI -- Milestone 2 visual-review build.
   Every color/font/spacing value below is a var(--id-*) token from
   design/tokens.css. Nothing here hardcodes a hex value or font name --
   that's the whole point of the token layer (see design/README.md). */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--id-font-body);
  font-weight: var(--id-font-weight-body);
  font-size: var(--id-body-size);
  line-height: var(--id-body-line);
  color: var(--id-color-text-primary);
  background: var(--id-color-page-background);
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: var(--id-font-heading);
  color: var(--id-color-text-primary);
  margin: 0 0 var(--id-space-3) 0;
}

h1 { font-size: var(--id-h1-size); line-height: var(--id-h1-line); font-weight: var(--id-font-weight-heading-primary); }
h2 { font-size: var(--id-h2-size); line-height: var(--id-h2-line); font-weight: var(--id-font-weight-heading-primary); }
h3 { font-size: var(--id-h3-size); line-height: var(--id-h3-line); font-weight: var(--id-font-weight-heading-secondary); }

p { margin: 0 0 var(--id-space-3) 0; }

/* ---------- App shell ---------- */

.app-header {
  background: var(--id-color-surface);
  padding: var(--id-space-4) var(--id-space-4);
  display: flex;
  align-items: center;
}

.app-header__inner {
  max-width: var(--id-max-content-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header__logo {
  height: 48px; /* ~33% larger than the original 36px, for legibility on mobile */
  width: auto;
  display: block;
}

.app-header__confidential {
  font-family: var(--id-font-body);
  font-size: 13px;
  color: var(--id-color-text-secondary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Restrained brand accent at the header/content transition. A single thin
   line -- not a banner, not repeated anywhere else on the page. */
.app-header__accent {
  height: 3px;
  background: var(--id-header-accent-gradient);
}

main {
  max-width: var(--id-max-content-width);
  margin: 0 auto;
  padding: var(--id-space-6) var(--id-space-4) var(--id-space-7);
}

.card {
  background: var(--id-color-surface);
  border-radius: var(--id-radius-lg);
  box-shadow: var(--id-shadow-card);
  padding: var(--id-space-5);
}

@media (max-width: 640px) {
  main { padding: var(--id-space-4) var(--id-space-3) var(--id-space-6); }
  .card { padding: var(--id-space-4); border-radius: var(--id-radius-md); }
  .app-header { padding: var(--id-space-3); }
}

.screen { display: none; }
.screen.is-active { display: block; }

.lede {
  color: var(--id-color-text-secondary);
  margin-bottom: var(--id-space-5);
}

/* Introduction screen's title treatment -- still an <h1> semantically, but
   styled as a restrained uppercase eyebrow rather than a large headline,
   matching the tone of the copy it introduces. */
.eyebrow {
  font-family: var(--id-font-heading);
  font-weight: var(--id-font-weight-heading-secondary);
  font-size: var(--id-h3-size);
  line-height: var(--id-h3-line);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--id-color-institutional);
  margin-bottom: var(--id-space-4);
}

/* ---------- Form fields ---------- */

.field {
  margin-bottom: var(--id-space-4);
}

.field label {
  display: block;
  font-family: var(--id-font-body);
  font-weight: 700;
  font-size: 14px;
  color: var(--id-color-text-primary);
  margin-bottom: var(--id-space-2);
}

.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  font-family: var(--id-font-body);
  font-size: var(--id-body-size);
  color: var(--id-color-text-primary);
  background: var(--id-color-surface);
  border: 1px solid var(--id-color-border);
  border-radius: var(--id-radius-sm);
  padding: 12px var(--id-space-3);
  transition: border-color 120ms ease;
}

.field input[type="text"]:focus,
.field input[type="email"]:focus {
  outline: none;
  border-color: var(--id-color-brand-emphasis);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--id-primary-blue) 15%, transparent);
}

.field-error {
  color: var(--id-color-error);
  font-size: 13px;
  margin-top: var(--id-space-1);
  display: none;
}

.field.has-error input {
  border-color: var(--id-color-error);
}
.field.has-error .field-error {
  display: block;
}

/* ---------- Buttons ---------- */

.button-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--id-space-3);
  margin-top: var(--id-space-5);
}

.btn {
  font-family: var(--id-font-body);
  font-weight: 700;
  font-size: var(--id-body-size);
  border-radius: var(--id-radius-sm);
  padding: 13px var(--id-space-5);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, opacity 120ms ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--id-color-institutional);
  color: var(--id-color-text-on-dark);
}
.btn-primary:not(:disabled):hover {
  filter: brightness(0.88); /* a hover shade of --id-color-institutional, not a new palette color */
}

/* Clearly secondary to .btn-primary (no fill, lighter weight visually via
   the transparent background) but readable at a glance when enabled --
   not just a faint hint of a button. Disabled state (opacity 0.45, above)
   is what actually communicates "not available right now," e.g. Back on
   the first question. */
.btn-secondary {
  background: transparent;
  color: var(--id-color-text-primary);
  border-color: var(--id-slate-gray);
}
.btn-secondary:not(:disabled):hover {
  background: var(--id-color-surface-muted);
  border-color: var(--id-color-institutional);
}

@media (max-width: 640px) {
  .button-row { flex-direction: column-reverse; align-items: stretch; }
  .btn { width: 100%; text-align: center; }
}

/* ---------- Consent ---------- */

.consent-text {
  background: var(--id-color-surface-muted);
  border: 1px solid var(--id-color-border);
  border-radius: var(--id-radius-md);
  padding: var(--id-space-4);
  /* Deliberately no max-height/overflow -- the full consent text is always
     visible; the page grows to fit it rather than cropping or scrolling. */
  color: var(--id-color-text-secondary);
  font-size: 15px;
  margin-bottom: var(--id-space-4);
}

.consent-text p:last-child { margin-bottom: 0; }

/* Introduction & Consent 3.0: the linked Assessment & Privacy Notice and
   its accessible new-tab hint. The link itself uses ordinary link
   styling (inherited); the hint is deliberately small/muted so it reads
   as a secondary annotation, not competing with the link text itself. */
#notice-link { font-weight: 600; }
.notice-link__hint {
  font-size: 12px; color: var(--id-color-text-secondary); margin-left: 4px;
}

.consent-checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--id-space-3);
  cursor: pointer;
}

.consent-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--id-color-institutional);
  flex-shrink: 0;
}

.consent-checkbox span {
  font-size: var(--id-body-size);
  color: var(--id-color-text-primary);
}

/* ---------- Progress ---------- */

.progress {
  margin-bottom: var(--id-space-5);
}

.progress__label {
  font-size: 13px;
  color: var(--id-color-text-secondary);
  margin-bottom: var(--id-space-2);
  font-family: var(--id-font-body);
}

.progress__track {
  height: 6px;
  border-radius: 999px;
  background: var(--id-color-border);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  background: var(--id-color-brand-emphasis);
  border-radius: 999px;
  transition: width 200ms ease;
}

.progress__reassurance {
  margin: var(--id-space-2) 0 0 0;
  font-size: 13px;
  color: var(--id-color-text-secondary);
}

/* ---------- Question / answer cards ---------- */

.question-text {
  margin-bottom: var(--id-space-5);
}

.answer-list {
  display: flex;
  flex-direction: column;
  gap: var(--id-space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.answer-card {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--id-font-body);
  font-size: var(--id-body-size);
  color: var(--id-color-text-primary);
  background: var(--id-answer-card-default-bg);
  border: 2px solid var(--id-answer-card-default-border);
  border-radius: var(--id-radius-md);
  padding: var(--id-space-4);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

/* All three states below are visually equivalent in structure -- only the
   selected state differs, and identically regardless of which of the three
   options is chosen. No color/weight/icon distinguishes one unselected
   option from another. */
.answer-card:hover {
  box-shadow: var(--id-shadow-elevated);
}

.answer-card:focus-visible {
  outline: 2px solid var(--id-color-brand-emphasis);
  outline-offset: 2px;
}

.answer-card.is-selected {
  border-color: var(--id-answer-card-selected-border);
  background: var(--id-answer-card-selected-bg);
}

.answer-card__radio {
  display: inline-flex;
  align-items: center;
  gap: var(--id-space-3);
}

.answer-card__dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--id-slate-gray);
  flex-shrink: 0;
  position: relative;
}

.answer-card.is-selected .answer-card__dot {
  border-color: var(--id-accent-gold);
}

.answer-card.is-selected .answer-card__dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--id-accent-gold);
}

/* ---------- Footer ---------- */

.app-footer {
  text-align: center;
  color: var(--id-color-text-secondary);
  font-size: 12px;
  padding: var(--id-space-5) var(--id-space-3) var(--id-space-6);
}
