/**
 * 100x Life Planning System - Layout Styles
 * Header, container, grid systems, and structural elements
 */

/* ===== LOGIN SCREEN ===== */
.login-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Transparent so the body's topography texture shows through. The brand
     "navy" vars are near-black (#000/#131313), so the old gradient rendered as
     a flat black box. */
  background: transparent;
  padding: 2rem;
}

.login-container {
  background: var(--bg-primary);
  border-radius: var(--radius-lg, 12px);
  padding: 3rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  margin-bottom: 1.5rem;
}

.login-logo-img {
  height: 128px;
  width: auto;
}

.login-title {
  font-family: var(--font-heading);
  font-size: calc(1.75rem + var(--text-bump));
  color: var(--navy-primary);
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: calc(1rem + var(--text-bump));
  margin: 0 0 2rem 0;
}

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

.login-options .google-signin-btn {
  width: 100%;
  justify-content: center;
  padding: 0.875rem 1.25rem;
  font-size: calc(1rem + var(--text-bump));
}

.login-options .signin-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: calc(0.85rem + var(--text-bump));
  margin: 0.5rem 0;
}

.login-options .signin-divider::before,
.login-options .signin-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light, #e5e5e5);
}

.login-options .email-signin-form {
  text-align: left;
}

.login-options .email-input-group {
  display: flex;
  gap: 0.5rem;
}

.login-options .email-signin-input {
  flex: 1;
  min-width: 0; /* let the field shrink inside the flex row so the input+button stay within the card (equal L/R margins) */
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light, #e5e5e5);
  border-radius: var(--radius-md, 6px);
  font-size: calc(1rem + var(--text-bump));
  background: var(--bg-primary);
  color: var(--text-dark);
}

.login-options .email-signin-input:focus {
  border-color: var(--teal-accent);
  box-shadow: var(--focus-ring);
}

.login-options .email-signin-btn {
  white-space: nowrap;
  padding: 0.75rem 1rem;
}

.login-options .email-signin-hint {
  font-size: calc(0.8rem + var(--text-bump));
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: center;
}

.login-options .email-sent-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  background: rgba(74, 155, 181, 0.08);
  border-radius: var(--radius-md, 6px);
  text-align: center;
}

.login-options .email-sent-message i {
  font-size: calc(2.5rem + var(--text-bump));
  color: var(--teal-ink);
}

.login-options .email-sent-message p {
  margin: 0;
  font-weight: 500;
  color: var(--text-dark);
  font-size: calc(1rem + var(--text-bump));
}

.login-options .email-sent-address {
  font-size: calc(0.85rem + var(--text-bump));
  color: var(--text-muted);
}

.login-error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(220, 53, 69, 0.1);
  border-radius: var(--radius-md, 6px);
  color: #dc3545;
  font-size: calc(0.9rem + var(--text-bump));
}

.login-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light, #e5e5e5);
  font-size: calc(0.8rem + var(--text-bump));
  color: var(--text-muted);
}

.login-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.login-footer a:hover {
  color: var(--teal-ink);
}

.login-footer .separator {
  margin: 0 0.5rem;
}

/* Dark mode adjustments for login screen */
[data-theme="dark"] .login-container {
  background: var(--bg-primary);
}

[data-theme="dark"] .login-title {
  color: var(--text-dark);
}

[data-theme="dark"] .login-options .email-signin-input {
  background: var(--bg-secondary);
  border-color: var(--border-medium);
  color: #e8ecf4;
}

[data-theme="dark"] .login-options .email-sent-message {
  background: rgba(91, 184, 212, 0.15);
}

[data-theme="dark"] .login-options .email-sent-message p {
  color: #e8ecf4;
}

[data-theme="dark"] .login-footer {
  border-top-color: var(--border-medium);
}

/* Responsive login screen */
@media (max-width: 480px) {
  .login-container {
    padding: 2rem 1.5rem;
  }

  .login-title {
    font-size: calc(1.5rem + var(--text-bump));
  }

  .login-options .email-input-group {
    flex-direction: column;
  }

  .login-options .email-signin-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===== HEADER =====
   Transcribed from docs/design-reference/extracted/state-complete-hub.html.
   The header surface is --surface-header (#222222 charcoal), NOT brand navy —
   an earlier pass changed it to navy; the reference is authoritative. */
.header {
  background: var(--surface-header);
  padding: 0.7rem var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--teal-accent);
  box-shadow: var(--shadow-md);
  position: relative;
  /* Above the sticky module nav (z-index 100): the header owns a stacking
     context, so the account dropdown hanging out of it can only ever paint
     as high as the header itself. */
  z-index: 101;
  flex-shrink: 0;
}

/* Hub only: with no journey bar there, the black header is the page's
   sticky chrome. Module pages keep the header scrolling away in favor of
   the sticky condensed journey band (.app-chrome). */
.header--sticky {
  position: sticky;
  top: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* The logo links home to the Hub. Flex kills the inline-image baseline gap
   so the link's focus ring hugs the mark; the global :focus-visible ring
   (base.css) draws on it like any other control. */
.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo-icon {
  height: 36px;
  width: auto;
  border-radius: 0;
  object-fit: contain;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: calc(1.4rem + var(--text-bump));
  font-weight: var(--weight-heading);
  color: #ffffff; /* Always white, not theme-dependent */
  letter-spacing: var(--tracking-ui);
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Share and Modules — the two bordered controls in the header, each with a
   visible uppercase font-ui label. Modules joined the treatment on 2026-08-12
   (owner): as the tray's opener it's a primary destination, and the label
   supersedes the earlier brighter-white icon treatment. */
.header-share-btn,
.header-modules-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0.5rem 0.8rem;
  margin-right: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #ffffff;
  font-family: var(--font-ui);
  font-size: var(--size-ui-sm);
  text-transform: uppercase;
  letter-spacing: var(--tracking-ui);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.header-share-btn:hover,
.header-share-btn:focus-visible,
.header-modules-btn:hover,
.header-modules-btn:focus-visible {
  color: #ffffff; /* beats the global a:hover, which goes near-black */
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
}

/* Everything else on the right is a borderless icon button at 70% white.
   Some are <button>s that open drawers, one (the Notebook) is an <a> to a
   real page — text-decoration:none keeps the two indistinguishable. */
.header-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--size-ui);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.header-icon-btn:hover,
.header-icon-btn:focus-visible {
  color: #ffffff;
}

/* ── Dock-style label chips ──────────────────────────────────────────────
   Every icon-only control in the header names itself in a small chip hanging
   below the bar, macOS-dock style but in the house squared look (the dock
   shows labels above; ours hang below because the bar is at the top). The
   names live in data-label; aria-label still carries them for touch and
   assistive tech, so the chip is never the only affordance. Opening waits
   out the --hover-intent delay — same idiom as the journey rail popover
   (components/journey-nav.css) — so sweeping the pointer or Tab across the
   row doesn't ripple chips; closing is immediate. CSS-only: nothing to
   leak on disconnect. Share and Modules carry visible labels instead and
   have no data-label. */
.header-actions [data-label] {
  position: relative;
}

/* Offsets clear the header itself: the buttons sit 0.7rem + 3px (≈14px)
   above the bar's bottom edge, so the caret starts at +11px to notch the
   teal border and the chip hangs just below the bar. */
.header-actions [data-label]::after {
  content: attr(data-label);
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  padding: 0.35rem 0.6rem;
  background: var(--surface-header);
  color: #ffffff;
  font-family: var(--font-ui);
  font-size: var(--size-ui-sm);
  font-weight: 400;
  letter-spacing: var(--tracking-ui);
  line-height: 1;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--motion-quick) var(--ease-out), visibility 0s linear var(--motion-quick);
}

/* The caret pointing back up at the control. */
.header-actions [data-label]::before {
  content: '';
  position: absolute;
  top: calc(100% + 11px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  border: 5px solid transparent;
  border-top-width: 0;
  border-bottom-color: var(--surface-header);
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--motion-quick) var(--ease-out), visibility 0s linear var(--motion-quick);
}

/* Hover opens only where hover is real (never on iPad/touch, where the chip
   would stick after a tap); keyboard focus opens it anywhere. Both wait out
   the hover-intent delay. */
@media (hover: hover) {
  .header-actions [data-label]:hover::after,
  .header-actions [data-label]:hover::before {
    visibility: visible;
    opacity: 1;
    transition: opacity var(--motion-quick) var(--ease-out) var(--hover-intent), visibility 0s linear var(--hover-intent);
  }
}

.header-actions [data-label]:focus-visible::after,
.header-actions [data-label]:focus-visible::before {
  visibility: visible;
  opacity: 1;
  transition: opacity var(--motion-quick) var(--ease-out) var(--hover-intent), visibility 0s linear var(--hover-intent);
}

/* The avatar is the last control in the bar: a centered "Account" chip can
   clip at the viewport edge on tighter headers, so it right-aligns under
   its control instead, caret still centered on the avatar. */
.header-actions .account-menu-toggle[data-label]::after {
  left: auto;
  right: 0;
  transform: none;
}

/* "Something new" marker on the Activity button. */
.header-icon-dot {
  position: absolute;
  top: 7px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-accent);
}

/* The parking-lot count badge sits inside the 38px tap target rather than
   hanging off its corner (which, on a borderless button, read as a stray dot). */
.header-icon-btn .parking-lot-badge {
  top: 3px;
  right: 2px;
}

/* ===== MODULE NAVIGATION =====
   The hover-expand module icon strip that used to live here is GONE
   (2026-08-11): navigation is journey-first, the top row is the journey, and
   the modules moved to the right-side tray. The bar the modules take back
   once the journey is complete, its always-open labels, and everything else
   in the new band live in components/journey-nav.css. What remains here is
   the three status markers, which shared/_module_nav_badge still renders into
   that bar. */

/* Horizontal strips that scroll on touch without showing a scrollbar. */
.tapscroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tapscroll::-webkit-scrollbar {
  display: none;
}

.module-nav-check {
  font-size: calc(9px + var(--text-bump));
  color: var(--teal-ink);
}

.module-nav-count {
  font-family: var(--font-body);
  font-size: calc(9px + var(--text-bump));
  color: var(--text-muted);
}

/* ===== COMPACT HEADER FOR SHORT VIEWPORTS (chromebooks, squished laptops) =====
   Height-gated so big desktops keep the roomier chrome; width-gated so phones
   and tablets stay on the max-width: 768px rules below (a landscape phone
   matches both height and width otherwise). Spec 2026-07-06. The icons stay —
   they are the nav's primary affordance in the redesign, not decoration. */
@media (max-height: 800px) and (min-width: 769px) {
  .header {
    padding: 0.5rem var(--pad-x);
  }

  .logo-icon {
    height: 28px;
  }

  .module-bar-btn {
    padding: 0.375rem 0.6rem;
  }
}


/* Main content area */
#main-content {
  position: relative;
  z-index: 1;
}

/* Module containers */
.module-container {
  position: relative;
  min-height: calc(100dvh - 200px);
}

/* Centered module headers (no back button) */
[class*="-header"].centered {
  justify-content: center;
  text-align: center;
}

[class*="-header"].centered [class*="-title"] {
  text-align: center;
}

/* Hide roadmap sections when other modules active */
.overview-container,
.interview-container,
.action-interview-container {
  /* These are the roadmap module containers */
}

/* ===== MODULE STUB (2026-08-10) =====
   Shared placeholder shell for nav sections whose real page hasn't landed
   yet (Assessments, Action Plan — see docs/superpowers/specs/2026-08-09-
   100x-roadmap-visual-redesign-design.md Phase 1/3). Exercises the new
   redesign tokens (--type-*, --radius-panel, --brand-navy) so a later phase
   replacing this with real content isn't the first thing to use them. */
.module-stub {
  max-width: 640px;
  margin: var(--spacing-xl) auto;
  padding: var(--spacing-xl);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.module-stub-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--teal-light);
  color: var(--brand-navy);
  font-size: var(--type-display);
}

.module-stub h1 {
  font-size: var(--type-display);
  margin-bottom: var(--spacing-sm);
}

.module-stub-lede {
  font-family: var(--font-ui);
  font-size: var(--type-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: var(--spacing-md);
}

.module-stub p {
  color: var(--text-dark);
  font-size: var(--type-body);
}

.module-stub .btn {
  margin-top: var(--spacing-md);
}

[data-theme="dark"] .module-stub-icon {
  color: var(--teal-ink);
}

/* Dark theme adjustments */
[data-theme="dark"] .journey-bar,
[data-theme="dark"] .module-bar {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .journey-hub-pill:hover {
  /* The light-theme hover tint is a white wash, which is invisible on a dark
     strip — use the raised surface instead. */
  background: var(--bg-tertiary);
}

/* The header's dark-theme color comes from --surface-header (see
   variables.css), not a per-selector override. */

/* Footer text colors are already light, no dark mode override needed */

/* ===== MAIN CONTAINER ===== */
.container {
  max-width: var(--width-app);
  margin: 0 auto;
  padding: var(--spacing-md) var(--pad-x);
}

/* ===== OVERVIEW MODE ===== */
.overview-container {
  position: relative;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
  overflow: hidden; /* Clip the SVG here instead of on container */
}

.hero-background .hero-path {
  width: 100%;
  height: 100%;
}

.hero-background .hero-x {
  position: absolute;
  right: 5%;
  top: 85px;
}

/* Floating particles background */
.floaters-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.floaters-container::before,
.floaters-container::after {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(74, 155, 181, 0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(74, 155, 181, 0.2), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(74, 155, 181, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 130px 80px, rgba(26, 43, 74, 0.3), transparent),
    radial-gradient(2px 2px at 160px 120px, rgba(74, 155, 181, 0.25), transparent),
    radial-gradient(1px 1px at 200px 50px, rgba(26, 43, 74, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 250px 150px, rgba(74, 155, 181, 0.2), transparent),
    radial-gradient(2px 2px at 300px 90px, rgba(74, 155, 181, 0.3), transparent),
    radial-gradient(1px 1px at 350px 180px, rgba(26, 43, 74, 0.25), transparent),
    radial-gradient(1.5px 1.5px at 400px 60px, rgba(74, 155, 181, 0.35), transparent),
    radial-gradient(2px 2px at 450px 130px, rgba(74, 155, 181, 0.2), transparent),
    radial-gradient(1px 1px at 500px 200px, rgba(26, 43, 74, 0.3), transparent),
    radial-gradient(2px 2px at 550px 40px, rgba(74, 155, 181, 0.25), transparent),
    radial-gradient(1.5px 1.5px at 600px 170px, rgba(74, 155, 181, 0.3), transparent);
  background-size: 650px 650px;
  animation: float 120s linear infinite;
}

.floaters-container::after {
  background-image:
    radial-gradient(1.5px 1.5px at 80px 100px, rgba(74, 155, 181, 0.25), transparent),
    radial-gradient(2px 2px at 120px 180px, rgba(26, 43, 74, 0.3), transparent),
    radial-gradient(1px 1px at 180px 60px, rgba(74, 155, 181, 0.35), transparent),
    radial-gradient(2px 2px at 220px 140px, rgba(74, 155, 181, 0.2), transparent),
    radial-gradient(1.5px 1.5px at 280px 200px, rgba(26, 43, 74, 0.25), transparent),
    radial-gradient(1px 1px at 340px 80px, rgba(74, 155, 181, 0.3), transparent),
    radial-gradient(2px 2px at 380px 160px, rgba(74, 155, 181, 0.2), transparent),
    radial-gradient(1.5px 1.5px at 440px 40px, rgba(26, 43, 74, 0.35), transparent),
    radial-gradient(1px 1px at 500px 120px, rgba(74, 155, 181, 0.25), transparent),
    radial-gradient(2px 2px at 560px 190px, rgba(74, 155, 181, 0.3), transparent);
  background-size: 580px 580px;
  animation: float 100s linear infinite reverse;
  animation-delay: -30s;
}

@keyframes float {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0.6;
  }
  25% {
    opacity: 0.8;
  }
  50% {
    transform: translateY(-25%) translateX(-10%);
    opacity: 0.5;
  }
  75% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-50%) translateX(-20%);
    opacity: 0.6;
  }
}

.overview-header {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.overview-header h1 {
  font-family: var(--font-heading);
  font-size: calc(2.25rem + var(--text-bump));
  color: var(--navy-primary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.overview-header p {
  color: var(--text-secondary);
  font-size: calc(1.1rem + var(--text-bump));
}

.overview-header .progress-bar {
  margin: 1.5rem auto;
  max-width: 400px;
}

/* ===== AI SUGGESTION ===== */
/* Squared off and shadowed to match the redesign's card treatment (see
   modules/module-page.css); the page column owns the spacing between blocks,
   so the card carries no bottom margin of its own. */
.ai-suggestion {
  background: var(--bg-primary);
  border: none;
  border-left: 4px solid var(--teal-accent);
  border-radius: 0;
  padding: 1.25rem var(--card-x);
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-md);
}

.ai-icon {
  width: 44px;
  height: 44px;
  background: var(--teal-light);
  color: var(--teal-ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-suggestion-content {
  flex: 1;
}

.ai-suggestion-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--navy-primary);
}

.ai-suggestion-text {
  color: var(--text-secondary);
  font-size: calc(0.9rem + var(--text-bump));
}

.ai-suggestion .btn {
  flex-shrink: 0;
}

/* ===== ROADMAP GRID ===== */
.roadmap-grid {
  display: grid;
  gap: 1rem;
}

.section-label {
  font-family: var(--font-heading);
  font-size: calc(0.75rem + var(--text-bump));
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--navy-primary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.foundation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: var(--spacing-xl);
  padding: 15px; /* Allow space for glow effect */
  margin: -15px; /* Compensate for padding */
  margin-bottom: calc(var(--spacing-xl) - 15px);
}

/* ===== ACTION PLANNING GRID ===== */
.action-section {
  margin-top: var(--spacing-xl);
}

/* #actionGrid sits in the .roadmap-grid CSS grid; without min-width:0 it would
   expand its track to the action grid's intrinsic (wide) min-content and push
   the page. Letting it shrink lets the inner .action-grid cap + scroll. */
#actionGrid {
  min-width: 0;
}

.action-grid {
  display: grid;
  grid-template-columns: 180px repeat(5, 1fr);
  gap: 2px;
  background: var(--border-light);
  /* Square, as the capture draws it (module-action-plan.html). */
  border-radius: 0;
  /* The grid is intrinsically wide (label column + ≥5 area columns); it is its
     OWN horizontal scroll container so it never overflows the page. Making the
     grid (not a wrapper) the scroll container is what lets the first column
     stick across the whole scroll. max-width caps the box to its container so
     the wide tracks scroll instead of expanding the page; min-width:0 lets it
     shrink below its intrinsic content width. On desktop it fits → no scrollbar. */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
}

/* Keep the row-label column (and the corner) pinned while the area columns
   scroll horizontally. Inert on desktop, where the grid fits and never scrolls. */
.action-header--corner,
.action-row-label {
  position: sticky;
  left: 0;
  z-index: 5;
}

.action-header {
  background: var(--surface-inverse);
  padding: 0.6rem 0.7rem;
  font-family: var(--font-body);
  font-size: calc(15px * var(--text-scale));
  font-weight: 400;
  text-align: left;
  display: flex;
  align-items: center;
  color: var(--text-on-accent);
  border-bottom: 2px solid var(--teal-accent);
}

.action-row-label {
  background: var(--surface-inverse);
  color: var(--text-on-accent);
  padding: 0.6rem 0.7rem;
  font-family: var(--font-body);
  font-size: calc(14px * var(--text-scale));
  font-weight: 400;
  display: flex;
  /* The label now sits over its p. 51 line, so the column stacks and centres
     the pair rather than centring one line. */
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
}

/* What the Member Guide asks this row for (RoadmapGuidance), under the row's
   name. Quiet: it is a reminder, not a heading. Opacity rather than a colour
   so it holds on both the light and the dark inverse surface. */
.action-row-hint {
  font-size: calc(11.5px * var(--text-scale));
  line-height: 1.4;
  opacity: 0.72;
}

.action-cell {
  background: var(--bg-primary);
  padding: 0.7rem 0.8rem;
  font-family: var(--font-body);
  font-size: calc(14px * var(--text-scale));
  line-height: 1.55;
  color: var(--text-muted);
  font-style: italic;
  min-height: 70px;
  transition: all var(--transition-fast);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.4rem;
}

.action-cell:hover {
  background: var(--bg-tertiary);
}

.action-cell-text {
  flex: 1 1 auto;
}

/* Two explicit per-cell actions: Plan with AI + Edit. */
.action-cell-actions {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.action-cell-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.45rem;
  border-radius: 5px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: calc(13px * var(--text-scale));
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.action-cell-btn i {
  font-size: 0.9em;
}

.action-cell-btn--ai {
  background: var(--teal-light, #e8f4f8);
  color: var(--teal-ink);
  border-color: rgba(74, 155, 181, 0.25);
}

.action-cell-btn--ai:hover,
.action-cell-btn--ai:focus-visible {
  background: var(--teal-fill);
  color: #fff;
}

.action-cell-btn--edit {
  background: transparent;
  color: var(--text-secondary, #4a5568);
  border-color: var(--border-light, rgba(0, 0, 0, 0.12));
}

.action-cell-btn--edit:hover,
.action-cell-btn--edit:focus-visible {
  background: var(--bg-secondary, #f1f4f8);
  color: var(--text-dark, #1a2b4a);
  border-color: var(--text-muted, #718096);
}

.action-cell.has-manual-edit::after {
  content: "";
  position: absolute;
  bottom: 4px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold, #d4a55c);
  opacity: 0.7;
}

.action-cell.has-content {
  color: var(--text-dark);
  font-style: normal;
}

.action-cell.active-cell {
  border: 2px solid var(--teal-accent);
  box-shadow: 0 0 10px rgba(74, 155, 181, 0.2);
}

/* ===== ACTION AREA COLUMN HEADER ===== */
.action-header--area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.5rem 0.5rem 0.35rem;
  text-align: left;
  cursor: grab;
  user-select: none;
  position: relative;
}

.action-header--area:active {
  cursor: grabbing;
}

/* A button, since 2026-08-11: the arrow keys reorder a column, so this has to
   be reachable by keyboard and comfortable under a thumb. It stays visible at
   a quiet opacity rather than appearing on hover — there is no hover on a
   tablet, and half the membership reads this on one. */
.action-header-drag-handle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0;
  cursor: grab;
  color: var(--text-light);
  opacity: 0.55;
  font-size: calc(1rem + var(--text-bump));
  line-height: 1;
  transition: opacity var(--transition-fast);
  /* The glyph is small; the target is not. The header row is shorter than
     44px, so the hit area is grown outwards with a pseudo-element instead of
     by padding, which would push the row open. */
  position: relative;
}

.action-header-drag-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}

.action-header-drag-handle:active {
  cursor: grabbing;
}

.action-header--area:hover .action-header-drag-handle,
.action-header-drag-handle:focus-visible {
  opacity: 1;
}

.action-header--dragging {
  opacity: 0.5;
}

.action-header--drag-over {
  outline: 2px dashed var(--teal-accent);
  outline-offset: -2px;
}

.action-header-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.action-header-name-btn {
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0;
  display: inline-block;
}

.action-header-name-btn:hover,
.action-header-name-btn:focus-visible {
  /* Keep the light header text legible — the global a:hover turns links navy,
     which vanishes against the dark header. */
  color: var(--text-light);
  text-decoration: underline;
}

.action-header-menu-btn {
  background: transparent;
  border: none;
  color: var(--text-light);
  opacity: 0.7;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
  border-radius: 4px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-fast), background var(--transition-fast);
}

.action-header-menu-btn:hover,
.action-header-menu-btn:focus-visible {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

/* +Add action area column header (empty slot) */
.action-header--add {
  background: var(--bg-secondary, #f8f9fa);
  color: var(--teal-ink);
  border-bottom: 2px dashed var(--teal-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.action-add-area-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  height: 100%;
  padding: 0.75rem;
  background: transparent;
  border: none;
  color: var(--teal-ink);
  font-weight: 600;
  font-size: calc(0.8rem + var(--text-bump));
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-add-area-btn:hover,
.action-add-area-btn:focus-visible {
  background: var(--teal-light, #e8f4f8);
}

.action-add-area-btn i {
  font-size: calc(1rem + var(--text-bump));
}

.action-header--empty {
  background: var(--bg-secondary, #f8f9fa);
  color: var(--text-muted);
  border-bottom: 1px dashed var(--border-light);
}

.action-header--corner {
  /* --navy-primary is a TEXT token (inverts to near-white in dark theme),
     which lit this corner up white on the dark grid. --surface-inverse is the
     same #131313 in light theme and stays a dark surface in dark. */
  background: var(--surface-inverse);
}

.action-cell--empty,
.action-cell--placeholder {
  background: var(--bg-primary, #fff);
  cursor: default;
  color: var(--text-muted);
  /* Inset dashed outline lives inside the cell so the grid's 2px gap stays clean */
  box-shadow: inset 0 0 0 1px transparent;
  outline: 1px dashed rgba(0, 0, 0, 0.15);
  outline-offset: -6px;
}

.action-cell--placeholder {
  min-height: 70px;
}

/* Popover menu for area rename/archive — absolutely positioned so it overlays
   the grid instead of taking flow space and growing the header. */
.action-area-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0.35rem;
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border-light, rgba(0, 0, 0, 0.1));
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  padding: 0.25rem;
  z-index: 1200;
  min-width: 160px;
  display: flex;
  flex-direction: column;
}

/* The class' display:flex outranks the UA [hidden] rule (same specificity,
   declared later), so restore hidden semantics explicitly. */
.action-area-menu[hidden] {
  display: none;
}

.action-area-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-dark, #1a2b4a);
  font-size: calc(0.875rem + var(--text-bump));
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.action-area-menu-item:hover,
.action-area-menu-item:focus-visible {
  background: var(--teal-light, #e8f4f8);
}

/* Status bar below action grid */
.action-grid-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0.25rem;
  font-size: calc(0.85rem + var(--text-bump));
  color: var(--text-secondary, #4a5568);
}

.action-grid-status-count {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.action-grid-status-count--cap {
  color: var(--gold, #d4a55c);
  font-weight: 500;
}

.btn-link-archived {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: var(--teal-ink);
  font-size: calc(0.85rem + var(--text-bump));
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
}

.btn-link-archived:hover,
.btn-link-archived:focus-visible {
  background: var(--teal-light, #e8f4f8);
}

/* Archived areas modal contents */
.archived-areas-modal {
  max-width: 560px;
}

/* The shared .interview-modal-body carries no padding (interview panels supply
   their own); the archived list sits directly in it, so pad it here. */
.archived-areas-modal .interview-modal-body {
  padding: 0.5rem 1.5rem 1.5rem;
  overflow-y: auto;
}

.archived-areas-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 0 1rem;
  max-height: 60vh;
  overflow-y: auto;
}

.archived-area-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary, #f8f9fa);
  border-radius: 6px;
}

.archived-area-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.archived-restore-blocked {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  color: var(--text-muted, #718096);
  font-size: calc(0.8rem + var(--text-bump));
  font-style: italic;
}

.archived-area-view {
  font-size: calc(0.85rem + var(--text-bump));
}

.archived-area-view > summary {
  cursor: pointer;
  color: var(--teal-ink);
  width: fit-content;
  list-style-position: inside;
}

.archived-area-view > summary:hover {
  text-decoration: underline;
}

.archived-area-plan {
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.75rem;
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border-light, rgba(0, 0, 0, 0.08));
  border-radius: 6px;
}

.archived-area-plan dt {
  font-weight: 600;
  color: var(--text-dark, #1a2b4a);
  margin-top: 0.5rem;
}

.archived-area-plan dt:first-child {
  margin-top: 0;
}

.archived-area-plan dd {
  margin: 0.15rem 0 0;
  color: var(--text-secondary, #4a5568);
  white-space: pre-wrap;
}

.archived-area-plan dd.is-empty {
  color: var(--text-muted, #718096);
  font-style: italic;
}

.archived-areas-cap-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.6rem 0.85rem;
  background: var(--teal-light, #e8f4f8);
  border-radius: 6px;
  color: var(--text-secondary, #4a5568);
  font-size: calc(0.85rem + var(--text-bump));
}

.archived-area-meta {
  min-width: 0;
  flex: 1 1 auto;
}

.archived-area-name {
  font-weight: 600;
  color: var(--text-dark, #1a2b4a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archived-area-date {
  font-size: calc(0.8rem + var(--text-bump));
  color: var(--text-muted, #718096);
}

.archived-areas-empty {
  color: var(--text-muted, #718096);
  font-style: italic;
  margin: 1rem 0;
}

.archived-areas-note {
  margin: 0.5rem 0 0;
  color: var(--text-muted, #718096);
  font-size: calc(0.85rem + var(--text-bump));
}

/* ===== INTERVIEW MODE ===== */
.interview-container {
  display: none;
  max-width: 800px;
  margin: 0 auto;
}

.interview-container.active {
  display: block;
}

.interview-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--spacing-xl);
}

.back-btn {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  color: var(--navy-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: calc(1.25rem + var(--text-bump));
}

.back-btn:hover {
  border-color: var(--navy-primary);
  background: var(--bg-tertiary);
}

.interview-title {
  flex: 1;
}

.interview-title h2 {
  font-family: var(--font-heading);
  font-size: calc(1.5rem + var(--text-bump));
  color: var(--navy-primary);
  font-weight: 600;
}

.interview-title p {
  color: var(--text-secondary);
  font-size: calc(0.9rem + var(--text-bump));
}

.interview-actions {
  display: flex;
  gap: 1rem;
  margin-top: var(--spacing-lg);
  justify-content: flex-end;
}

/* ===== ACTION INTERVIEW MODE ===== */
.action-interview-container {
  display: none;
  max-width: 900px;
  margin: 0 auto;
}

.action-interview-container.active {
  display: block;
}

.action-context {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--navy-primary);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.action-context-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.action-context-icon {
  width: 36px;
  height: 36px;
  background: var(--surface-inverse);
  color: var(--text-on-accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-context-title {
  font-family: var(--font-heading);
  font-size: calc(1rem + var(--text-bump));
  color: var(--navy-primary);
  font-weight: 600;
}

.action-context-content {
  color: var(--text-secondary);
  font-size: calc(0.9rem + var(--text-bump));
  line-height: 1.5;
  padding-left: 2.75rem;
}

.action-nav {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.action-nav-btn {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: calc(0.75rem + var(--text-bump));
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.action-nav-btn:hover {
  border-color: var(--navy-primary);
  color: var(--navy-primary);
}

.action-nav-btn.active {
  background: var(--surface-inverse);
  border-color: var(--navy-primary);
  color: var(--text-on-accent);
}

.action-nav-btn.completed {
  border-color: var(--teal-accent);
  color: var(--teal-ink);
}

/* ===== MODE TOGGLE ===== */
.mode-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mode-toggle-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-muted);
  font-size: calc(0.85rem + var(--text-bump));
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mode-toggle-btn:hover {
  border-color: var(--navy-primary);
}

.mode-toggle-btn.active {
  background: var(--surface-inverse);
  border-color: var(--navy-primary);
  color: var(--text-on-accent);
}

/* AI Mode Toggle */
.ai-mode-toggle {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.ai-mode-label {
  font-size: calc(0.85rem + var(--text-bump));
  color: var(--text-secondary);
}

.toggle-switch {
  position: relative;
  width: 140px;
  height: 36px;
  background: var(--bg-tertiary);
  border-radius: 18px;
  padding: 3px;
  cursor: pointer;
  border: 1px solid var(--border-light);
}

.toggle-switch-inner {
  display: flex;
  height: 100%;
}

.toggle-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(0.75rem + var(--text-bump));
  font-weight: 500;
  color: var(--text-muted);
  z-index: 1;
  transition: color var(--transition-fast);
  gap: 0.25rem;
}

.toggle-option.active {
  color: var(--text-light);
}

.toggle-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: var(--navy-primary);
  border-radius: 15px;
  transition: transform var(--transition-fast);
}

.toggle-switch.ai-off .toggle-slider {
  transform: translateX(100%);
}

.toggle-switch.ai-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.toggle-switch.ai-disabled .toggle-option:first-child {
  opacity: 0.5;
}

.ai-mode-description {
  font-size: calc(0.8rem + var(--text-bump));
  color: var(--text-muted);
  font-style: italic;
}

/* ===== VIEW TOGGLE ===== */
.view-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: var(--spacing-lg);
}

.toggle-group {
  display: flex;
  background: var(--navy-medium);
  border-radius: var(--radius-md);
  padding: 4px;
}

.toggle-btn {
  padding: 0.5rem 1.25rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.toggle-btn:hover {
  color: var(--text-light);
}

.toggle-btn.active {
  background: var(--teal-fill);
  color: var(--text-on-accent);
}

/* App shell: full-height flex column so the footer's `margin-top: auto` pins it
   to the bottom of the viewport on short pages instead of trailing the content. */
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* The shell's middle band: the guide rail docked left (when the page carries
   one) beside the page content, per the redesign reference's step-view and
   module captures. Growing this band is what pins the footer to the bottom. */
.app-body {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
}

.app-body > #main-content {
  flex: 1;
  min-width: 0;
}

/* ===== FOOTER =====
   The prototype captures contain no footer element at all — its shell ends at
   the scrolling content area. The token block, however, defines
   --surface-footer (#0f1a2e), so the footer keeps its place in the app and
   takes its surface, gutter (--pad-x) and width (--width-app) from the same
   token system as the rest of the shell. */
.app-footer {
  background: var(--surface-footer); /* Always dark navy, not theme-dependent */
  padding: 1.25rem var(--pad-x);
  margin-top: auto;
  position: relative;
  z-index: 10;
}

.footer-content {
  max-width: var(--width-app);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.6);
  font-size: calc(0.85rem + var(--text-bump));
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: calc(0.85rem + var(--text-bump));
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--teal-ink);
}

.footer-links .separator {
  color: rgba(255, 255, 255, 0.3);
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 768px) {
  /* Header. Horizontal padding comes from --pad-x, which already steps down
     at this width (see variables.css). */
  .logo-text {
    font-size: calc(1.1rem + var(--text-bump));
  }

  .logo-icon {
    height: 32px;
    width: auto;
  }

  .header-actions {
    gap: 0.5rem;
  }

  /* Share and Modules collapse to their icons — the labels are the first
     thing to go when the bar runs out of room. (The label text stays in the
     DOM at font-size 0, so each button's accessible name survives.) */
  .header-share-btn,
  .header-modules-btn {
    padding: 0.5rem;
    gap: 0;
    font-size: 0;
    margin-right: 0;
  }

  .header-share-btn i,
  .header-modules-btn i {
    font-size: calc(1.1rem + var(--text-bump));
  }

  /* Narrow phones: seven header controls must fit beside the logo without
     pushing the avatar off the right edge (at 390px the account menu was
     clipped to ~9px and every page scrolled sideways). Tighter gaps and
     slightly narrower hit targets; heights keep the full tap size. */
  @media (max-width: 480px) {
    .header {
      padding: 0.7rem 0.6rem;
    }

    .logo {
      gap: 0.5rem;
    }

    .logo-icon {
      height: 28px;
    }

    .header-actions {
      gap: 0.15rem;
    }

    .header-icon-btn {
      min-width: 34px;
    }

    .header-share-btn,
    .header-modules-btn {
      min-width: 34px;
      padding: 0.4rem;
    }
  }

  /* Module bar scroll indicator (journey-complete state only). */
  .module-bar {
    position: relative;
  }

  .module-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, var(--bg-secondary) 80%);
    pointer-events: none;
    z-index: 1;
  }

  .module-bar-inner {
    padding: 0 0.75rem;
    gap: 0.35rem; /* breathing room between the horizontally-scrolling tabs */
  }

  .module-bar-btn {
    padding: 0.5rem 0.75rem;
    font-size: calc(0.75rem + var(--text-bump));
  }

  .module-bar-btn i {
    font-size: calc(0.95rem + var(--text-bump));
  }

  /* Main container - reduced padding */
  .container {
    padding: 0.75rem;
  }

  /* The foundation grid's negative-margin glow gutter overflows narrow screens;
     drop the horizontal bleed on mobile (keeps the vertical spacing). */
  .foundation-grid {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  /* Hero section */
  .hero-title {
    font-size: calc(1.75rem + var(--text-bump));
  }

  .hero-subtitle {
    font-size: calc(1rem + var(--text-bump));
  }

  /* Progress text */
  .progress-summary {
    font-size: calc(0.9rem + var(--text-bump));
  }

  /* AI Suggestion box */
  .ai-suggestion {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .ai-suggestion .btn {
    width: 100%;
    justify-content: center;
  }

  /* Footer — horizontal gutter still comes from --pad-x. */
  .app-footer {
    padding: 1rem var(--pad-x);
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: calc(1rem + var(--text-bump));
  }

  .logo-icon {
    height: 28px;
    width: auto;
  }

  .logo {
    gap: 0.5rem;
  }

  .hero-title {
    font-size: calc(1.5rem + var(--text-bump));
  }
}

/* AI Mode Toggle - Mobile */
@media (max-width: 768px) {
  .ai-mode-toggle {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .ai-mode-label {
    display: none;
  }

  .toggle-switch {
    width: 100%;
    height: 40px;
  }

  .toggle-option {
    font-size: calc(0.85rem + var(--text-bump));
  }

  .ai-mode-description {
    text-align: center;
    font-size: calc(0.75rem + var(--text-bump));
  }

  /* Interview action buttons */
  .interview-actions {
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .interview-actions .btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: calc(0.85rem + var(--text-bump));
    justify-content: center;
    white-space: nowrap;
  }

  /* Guided nav buttons */
  .guided-nav {
    gap: 0.5rem;
  }

  .guided-nav .btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: calc(0.85rem + var(--text-bump));
    justify-content: center;
    white-space: nowrap;
  }

  /* Show short text, hide long text on mobile */
  .btn-text-long {
    display: none;
  }

  .btn-text-short {
    display: inline;
  }
}

/* Redirect notices/alerts (shared/_flash) — the signed-in chrome's one flash
   surface. Sits at the top of the content column, above the page header. */
.app-flash {
  margin: 1rem 0 0;
}

.app-flash .alert {
  margin-bottom: 0.75rem;
  /* Flash slides in with the page (motion & polish spec §9); dismissal stays
     the member's own act via the close button. */
  animation: motion-rise var(--motion-enter) var(--ease-out);
}

/* House voice, not Bootstrap's pastel defaults: a white card with a teal
   (notice) or danger (alert) edge, matching the app's card grammar. */
.app-flash .alert-success,
.app-flash .alert-danger {
  background: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-left-width: 4px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(19, 19, 19, 0.06);
  font-family: var(--font-body);
  font-size: calc(15px * var(--text-scale));
}
.app-flash .alert-success { border-left-color: var(--teal-accent); }
.app-flash .alert-danger { border-left-color: var(--status-danger); }

/* The progressive action plan's post-save suggestion card
   (shared/_action_suggestion): the same house card grammar as a notice —
   white, teal edge — with an inline Add button before the dismiss X. */
.app-flash .app-action-suggestion {
  background: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--teal-accent);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(19, 19, 19, 0.06);
  font-family: var(--font-body);
  font-size: calc(15px * var(--text-scale));
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.app-action-suggestion-icon {
  color: var(--teal-accent);
}

.app-action-suggestion-text {
  flex: 1;
}

.app-flash .app-action-suggestion .app-action-suggestion-form {
  display: inline-flex;
  margin: 0;
}

/* The mission-save variant: weightier (edge, padding, size) because it opens
   the three-source builder rather than adding one area. */
.app-flash .app-action-suggestion--builder {
  border-left-width: 6px;
  padding-top: 1rem;
  padding-bottom: 1rem;
  font-size: calc(16px * var(--text-scale));
}

