/* Shared design system — matches scenario files */
:root {
  --bg:           #f1e7cf;
  --bg-panel:     #fbf5e4;
  --bg-panel-2:   #ffffff;
  --text:         #1c150c;
  --text-2:       #453a2a;
  --text-3:       #7e7260;
  --accent:       #566f58;
  --accent-b:     #3f5340;
  --accent-soft:  rgba(86, 111, 88, 0.14);
  --accent-line:  rgba(86, 111, 88, 0.4);
  --line:         rgba(28, 21, 12, 0.10);
  --line-soft:    rgba(28, 21, 12, 0.05);
  --red:          #a45050;
  --sans:         "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* --serif intentionally aliases --sans. Typography refactor 2026-04-28
     replaced serif + italic with Inter weights for hierarchy. Existing
     `font-family: var(--serif)` rules continue to work and now render Inter. */
  --serif:        "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }
a { color: inherit; }

/* Layout */
.page { max-width: 560px; margin: 0 auto; padding: 16px 20px 80px; }

/* Wider container for pages that benefit from a 2-col desktop layout */
.page-wide { max-width: 560px; }
@media (min-width: 820px) {
  .page-wide { max-width: 860px; padding: 20px 28px 96px; }
}
@media (min-width: 1100px) {
  .page-wide { max-width: 1080px; padding: 24px 32px 120px; }
}

/* Top row: hero text + primary card side-by-side on wide viewports */
.home-top { display: block; }
@media (min-width: 820px) {
  .home-top {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    margin-top: 8px;
  }
  .home-top > .hero     { padding: 8px 0 0; }
  .home-top > .hero p   { max-width: 46ch; }
  .home-top > .section  { margin-top: 0; }
  .home-top .card       { margin-bottom: 0; height: 100%; }
}
@media (min-width: 1100px) {
  .home-top { gap: 48px; }
}

/* Two-card row (practice modes) stacks on mobile, side-by-side on wide */
.home-duo { display: block; }
@media (min-width: 820px) {
  .home-duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .home-duo > .card { margin-bottom: 0; height: 100%; }
}
@media (min-width: 1100px) {
  .home-duo { gap: 24px; }
}

/* Top bar */
.topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 4px 14px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 20px;
}
.topbar-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 12px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.topbar-btn:hover { background: var(--bg-panel-2); border-color: var(--accent-line); }
.topbar-title {
  flex: 1;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.005em;
  color: var(--text);
}
.topbar-spacer { min-width: 36px; }

/* Typography */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; color: var(--text); }
h1 { font-size: 30px; line-height: 1.2; }
h2 { font-size: 24px; line-height: 1.25; margin-bottom: 12px; }
h3 { font-size: 19px; line-height: 1.3; }
p { color: var(--text-2); line-height: 1.55; }

.eyebrow {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.section { margin-top: 28px; }
.section-title { font-family: var(--serif); font-weight: 600; color: var(--text-2); letter-spacing: 0.01em; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; color: var(--accent); }

/* Hero */
.hero { padding: 24px 0 8px; }
.hero h1 { margin-bottom: 10px; }
.hero p { font-size: 18px; color: var(--text-2); }
.hero-howto {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-3);
  font-style: normal; font-weight: 500;
}

/* Cards */
.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 12px;
  transition: border-color 0.15s ease, transform 0.1s ease;
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
}
.card:hover { border-color: var(--accent-line); }
.card:active { transform: scale(0.995); }

.card-accent {
  border-left: 3px solid var(--accent);
}

.card-eyebrow {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.card-title {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.card-desc { font-size: 17.5px; color: var(--text-2); line-height: 1.5; }
.card-footer {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--text-3);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.card-footer .dot { color: var(--text-3); opacity: 0.4; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 99px;
  font-family: var(--sans);
  font-size: 15.5px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.01em;
  text-align: center;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-b); }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary { background: rgba(28, 21, 12, 0.07); color: var(--text-2); }
.btn-secondary:hover { background: rgba(28, 21, 12, 0.12); }
.btn-ghost { background: none; color: var(--text-2); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent-line); background: var(--bg-panel-2); }
.btn-block { display: block; width: 100%; }

/* Scenario card (used in list pages) */
.scenario-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 10px;
  transition: border-color 0.15s ease, transform 0.1s ease;
  position: relative;
}
.scenario-card:hover { border-color: var(--accent-line); }
.scenario-card-title { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.scenario-card-skill { font-family: var(--serif); font-size: 16px; font-style: normal; font-weight: 500; color: var(--accent-b); line-height: 1.4; }
.scenario-card-meta {
  display: flex; gap: 10px;
  font-size: 12px; color: var(--text-3);
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* Scenario completion indicator */
.scenario-card-title { padding-right: 26px; }

.scenario-check {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 20px;
  height: 20px;
  color: var(--accent);
  opacity: 0.55;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.scenario-card.is-completed:hover .scenario-check { opacity: 0; }

.scenario-hover-note {
  position: absolute;
  top: 14px;
  right: 14px;
  max-width: 260px;
  padding: 11px 14px 12px;
  background: var(--bg-panel-2);
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(28, 21, 12, 0.08);
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 3;
}
.scenario-card.is-completed:hover .scenario-hover-note {
  opacity: 1;
  transform: translateX(0);
}

.hover-note-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.hover-note-body {
  font-family: var(--serif);
  font-style: normal; font-weight: 500;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.5;
}

@media (hover: none) {
  .scenario-hover-note { display: none; }
}
@media (max-width: 520px) {
  .scenario-hover-note { display: none; }
}

/* Module toggle */
.module-toggle {
  display: flex;
  gap: 8px;
  margin: 16px 0 20px;
  padding: 4px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 99px;
}
.module-toggle button {
  flex: 1;
  padding: 11px 14px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.module-toggle button.active {
  background: var(--accent);
  color: white;
}

/* Onboarding */
.onb-progress {
  height: 3px;
  background: var(--line-soft);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 28px;
}
.onb-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.onb-question {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.3;
  margin: 20px 0 20px;
  letter-spacing: -0.01em;
}

.onb-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.onb-choice {
  padding: 14px 18px;
  background: var(--bg-panel);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.onb-choice:hover { border-color: var(--accent-line); }
.onb-choice.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.onb-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}
.onb-skip {
  font-size: 13px;
  color: var(--text-3);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 6px 8px;
}

/* Quotes / highlights */
.pullquote {
  font-family: var(--serif);
  font-size: 17px;
  font-style: normal; font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  padding: 16px 18px;
  background: var(--bg-panel-2);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  margin: 16px 0;
}

/* Brand mark (StayIn logo) — PNGs have transparent backgrounds */
.brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}
.brand-hero     { margin: 4px auto 18px; max-width: 200px; }
.brand-wordmark { margin: 6px auto 0;    max-width: 110px; }

/* Tagline rendered as real text (not baked into the PNG) for readability */
.brand-tagline {
  text-align: center;
  margin: 4px auto 10px;
  font-family: var(--serif);
  font-size: 13px;
  font-style: normal; font-weight: 500;
  line-height: 1.4;
  color: var(--text-3);
  letter-spacing: 0.01em;
}
.brand-tagline em {
  color: var(--accent-b);
  font-style: normal; font-weight: 500;
  font-weight: 500;
}

/* Tiny spiral mark for topbar corner — aspect ~2.5:1 */
.topbar-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 36px;
  padding: 0 2px;
  opacity: 0.85;
}
.topbar-brand img {
  height: 22px;
  width: auto;
  display: block;
}
[data-theme="light"] .topbar-brand .brand-dark  { display: none; }
[data-theme="dark"]  .topbar-brand .brand-light { display: none; }

.brand img {
  width: 100%;
  height: auto;
  display: block;
}

[data-theme="light"] .brand-dark  { display: none; }
[data-theme="dark"]  .brand-light { display: none; }

/* Spiral of Connection diagram (hand-drawn map) */
.spiral-figure {
  margin: 8px 0 20px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-panel-2);
  border: 1px solid var(--line);
}
.spiral-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.spiral-caption {
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
  padding: 10px 14px 12px;
  font-style: normal; font-weight: 500;
  font-family: var(--serif);
}

/* Responsive */
@media (min-width: 720px) {
  /* Single-column pages get more breathing room on desktop instead of
     sitting in a 560px mobile column with empty space on either side.
     720px keeps cards readable (no stretched text lines) while filling
     the desktop view comfortably. */
  .page { max-width: 720px; padding: 24px 28px 80px; }
  .hero { padding: 40px 0 16px; }
  h1 { font-size: 34px; }
}
@media (min-width: 1100px) {
  .page { max-width: 760px; padding: 28px 36px 96px; }
}
</content>
</invoke>