/* ============================================
   Queensferry vs Edinburgh — Styles
   
   Palette: warm neutrals, dark text, muted 
   green accent. Designed to feel practical 
   and editorial, not flashy.
   ============================================ */

/* ---------- Reset & base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
 /* Queensferry / Forth Bridge palette */
  --bg: #f6f3ef;
  --surface: #ffffff;
  --surface-soft: #f3ece8;

  --border: #ddd3cb;
  --border-strong: #c5b8af;

  --text: #0a0500;
  --text-mid: #4f4f4f;
  --text-light: #6c6661;

  --accent: #713231;
  --accent-hover: #3D1B1D;
  --accent-soft: #efe4e1;

  /* destination result tones */
  --edinburgh: #3D1B1D;
  --edinburgh-soft: #f3e9e8;

  --queensferry: #713231;
  --queensferry-soft: #f8f1ef;

  --split: #8a5a32;
  --split-soft: #f8efe6;

  --shadow-sm: 0 1px 3px rgba(10, 5, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(10, 5, 0, 0.08);

  --radius: 14px;
  --radius-sm: 10px;
  --max-w: 640px;
  --transition: 0.25s ease;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.75), rgba(246,243,239,0.94)),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3 {
  color: var(--text);
  letter-spacing: -0.02em;
}


/* ---------- Screens ---------- */
.screen {
  display: none;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.25rem;
  flex: 1;
}
.screen.active {
  display: block;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Intro screen ---------- */
.intro-inner {
  text-align: center;
  padding-top: 3rem;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.88),
    rgba(255,255,255,0.96)
  );
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem 2.25rem;
  box-shadow: var(--shadow-md);

  display: flex;
  flex-direction: column;
  align-items: center;
}

.intro-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(113, 50, 49, 0.12);
}

.intro-inner h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 750;
  line-height: 1.12;
  margin-bottom: 0.6rem;
  max-width: 12ch;
}

.intro-inner h1 .dim {
  color: var(--text-mid);
  font-weight: 500;
}

.intro-subtitle {
 font-size: clamp(1rem, 2.8vw, 1.2rem);
  color: var(--accent);
  font-weight: 650;
  margin-bottom: 1rem;
  line-height: 1.4;
  text-align: center;
}

.intro-desc {
  color: var(--text-mid);
  font-size: 0.97rem;
  margin-bottom: 2rem;
  max-width: 42ch;
  line-height: 1.7;
  text-align: center;
}
.intro-logo {
  display: block;
  width: clamp(145px, 31vw, 195px);
  height: auto;
  margin: 0 auto 1.9rem;
  opacity: 0.95;
}

/* ---------- Intro actions patch ---------- */
/* ---------- Intro actions patch ---------- */
.intro-inner .btn-primary,
.intro-inner .btn-secondary,
.intro-inner button {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition),
    transform 0.15s ease,
    box-shadow var(--transition);
}

.intro-inner .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.95rem 1.35rem;
  font-size: 0.96rem;
  font-weight: 650;
  box-shadow: 0 8px 18px rgba(61, 27, 29, 0.16);
}

.intro-inner .btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.intro-inner .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--surface);
  color: var(--accent);
  border: 1.5px solid var(--border-strong);
  padding: 0.82rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 650;
}

.intro-inner .btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.resume-prompt {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ---------- Resume prompt ---------- */
.resume-prompt {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.resume-prompt p {
  color: var(--text-light);
  font-size: 0.92rem;
  margin-bottom: 0.95rem;
  line-height: 1.5;
  max-width: 32ch;
}

.resume-prompt .btn-secondary,
.resume-prompt button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.82rem 1.2rem;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
  transition:
    border-color var(--transition),
    background var(--transition),
    transform 0.15s ease;
}

.resume-prompt .btn-secondary:hover,
.resume-prompt button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* ---------- Quiz chrome ---------- */
.quiz-chrome {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.7rem 0.85rem;
  box-shadow: var(--shadow-sm);
}

.progress {
  flex: 1;
  height: 6px;
  background: #e7ddd6;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.step-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  min-width: 38px;
  text-align: right;
}

/* ---------- Question area ---------- */
.question-area,
.result-area {
  animation: fadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.question-text {
  font-size: clamp(1.35rem, 3vw, 1.6rem);
  font-weight: 750;
  margin-bottom: 1.35rem;
  line-height: 1.28;
  color: var(--text);
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--border);
  padding: 1rem 1.05rem;
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text);
  border-radius: 16px;
  cursor: pointer;
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition),
    transform 0.15s ease;
  font-family: inherit;
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
}

.option-btn:hover {
  border-color: rgba(113, 50, 49, 0.4);
  background: #fcf8f6;
  box-shadow: 0 10px 20px rgba(10, 5, 0, 0.05);
  transform: translateY(-1px);
}

.option-btn:active {
  transform: translateY(0);
}

.option-btn.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow:
    0 0 0 1px var(--accent),
    0 10px 22px rgba(61, 27, 29, 0.08);
}

.option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  background: #f4ece8;
  color: var(--accent);
  font-size: 1.05rem;
  flex-shrink: 0;
  text-align: center;
  border: 1px solid #eadcd5;
}

.option-btn.selected .option-icon {
  background: rgba(113, 50, 49, 0.12);
  border-color: rgba(113, 50, 49, 0.2);
}

/* ---------- Result screen ---------- */
.result-area {
  animation: fadeUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Confidence line */
.confidence-line {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

/* Result header card */
.result-header {
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.result-header.edinburgh {
  background: var(--edinburgh-soft);
  border: 1px solid #c9d8f0;
}
.result-header.edinburgh .confidence-line { color: var(--edinburgh); }
.result-header.edinburgh .result-title { color: var(--edinburgh); }

.result-header.queensferry {
  background: var(--queensferry-soft);
  border: 1px solid #b8dcc8;
}
.result-header.queensferry .confidence-line { color: var(--queensferry); }
.result-header.queensferry .result-title { color: var(--queensferry); }

.result-header.split {
  background: var(--split-soft);
  border: 1px solid #e2d4a8;
}
.result-header.split .confidence-line { color: var(--split); }
.result-header.split .result-title { color: var(--split); }

.result-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}
.result-rec {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.6;
}

/* Result sections */
/* ---------- Result sections ---------- */
.result-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.4rem 1.35rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.result-section h3 {
  font-size: 0.98rem;
  font-weight: 750;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
}

.result-section h3 .sec-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  background: #f4ece8;
  border: 1px solid #eadcd5;
  color: var(--accent);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.result-section ul,
.result-section ol {
  margin: 0;
}

.result-section ul {
  list-style: none;
  padding: 0;
}

.result-section ul li {
  padding: 0.45rem 0;
  padding-left: 1.35rem;
  position: relative;
  font-size: 0.92rem;
  color: var(--text-mid);
  line-height: 1.6;
}

.result-section ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
}

.result-section p {
  font-size: 0.93rem;
  color: var(--text-mid);
  line-height: 1.65;
}

.result-section ol {
  padding-left: 1.2rem;
}

.result-section ol li {
  padding: 0.4rem 0;
  font-size: 0.92rem;
  color: var(--text-mid);
  line-height: 1.6;
}

/* Reality check callout */
/* Local reality check */
.reality-check {
  background: #faf4ef;
  border: 1px solid #ead9cb;
  border-left: 4px solid var(--accent);
}

.reality-check h3 .sec-icon {
  background: rgba(113, 50, 49, 0.08);
}
.result-links li a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.5;
}

.result-links li a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* Restart area */
/* ---------- Result actions ---------- */
.result-actions {
  padding: 1.75rem 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.result-actions .btn-primary,
.result-actions .btn-secondary,
.result-actions button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform 0.15s ease,
    box-shadow var(--transition);
}

.result-actions .btn-primary,
.result-actions button:first-child {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.85rem 1.3rem;
  box-shadow: 0 8px 18px rgba(61, 27, 29, 0.14);
}

.result-actions .btn-primary:hover,
.result-actions button:first-child:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.result-actions .btn-secondary,
.result-actions button:last-child {
  background: var(--surface);
  color: var(--accent);
  border: 1.5px solid var(--border-strong);
  padding: 0.82rem 1.15rem;
}

.result-actions .btn-secondary:hover,
.result-actions button:last-child:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* ---------- Footer ---------- */
#site-footer {
  text-align: center;
  padding: 2rem 1.25rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
#site-footer p {
  font-size: 0.8rem;
  color: var(--text-light);
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer-note {
  margin-top: 0.25rem;
  font-size: 0.75rem !important;
  opacity: 0.7;
}

/* ---------- Responsive ---------- */
@media (max-width: 479px) {
  .screen {
    padding: 1.35rem 1rem;
  }

  .intro-inner {
    padding: 2rem 1.1rem;
    border-radius: 18px;
  }

  .intro-inner h1 {
    max-width: 9ch;
  }

  .quiz-chrome {
    padding: 0.65rem 0.75rem;
    margin-bottom: 1.5rem;
  }

  .question-text {
    margin-bottom: 1.15rem;
  }

  .option-btn {
    padding: 0.95rem 0.95rem;
    border-radius: 14px;
    min-height: 58px;
  }

  .option-icon {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 1rem;
  }

  .result-header {
    padding: 1.4rem 1.1rem;
    border-radius: 18px;
  }

  .result-title {
    font-size: 1.35rem;
  }

  .result-section {
    padding: 1.15rem 1rem;
    border-radius: 16px;
  }

  .result-actions .btn-primary,
  .result-actions .btn-secondary,
  .result-actions button {
    width: 100%;
    max-width: 280px;
    min-height: 48px;
  }

  .resume-prompt .btn-secondary,
  .resume-prompt button {
    width: 100%;
    max-width: 260px;
  }

  #site-footer {
    padding: 1.5rem 1rem;
  }
}
/*Embed mode*/
body.embed-mode {
  min-height: auto;
  display: block;
}

body.embed-mode #site-footer {
  display: none;
}

body.embed-mode .screen {
  padding-bottom: 1rem;
}
/*End Embed mode*/

@media (min-width: 480px) {
  .screen {
    padding: 2.5rem 2rem;
  }

  .intro-inner {
    padding: 2.5rem 2.25rem;
  }

  .option-btn {
    padding: 1.05rem 1.2rem;
  }
}

@media (min-width: 700px) {
  .intro-inner {
    padding: 2.75rem 2.5rem;
  }
}

/* ---------- Focus / accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button:focus:not(:focus-visible) {
  outline: none;
} outline: none;
}
