/* My Independent Parents app. Design tokens copied from Claude Design
   ("First-Step Finder Design System": tokens/colors, typography, spacing, effects, base).
   Components carry their own styles (src/client/design); this file holds the tokens and
   the few page-level rules. Fonts load in index.html. */

:root {
  /* Base — pulled from the MIP logo */
  --navy-900: #0A222E;   /* logo background */
  --navy-800: #13303F;
  --navy-700: #1F4255;
  --blue-700: #1F4C82;
  --blue-600: #2A5E9E;   /* Dad's jacket */
  --blue-500: #4A7DBD;
  --blue-100: #E4EDF7;
  --sky-300: #A9CCEA;    /* sky rays */
  --sky-100: #EAF3FA;
  --meadow-700: #2F6A3F;
  --meadow-600: #3C7F4E; /* hills */
  --meadow-100: #E5F0E3;
  --clay-700: #84501F;
  --clay-600: #9C6230;   /* hats */
  --clay-100: #F6EADD;
  --rose-700: #9E2F3D;
  --rose-600: #B83A4A;   /* Mom's bow */
  --rose-100: #FBE9EA;
  --gold-500: #E2A93B;
  --gold-100: #FBF0D9;

  /* Warm neutrals */
  --cream-50: #FBF8F3;
  --cream-100: #F5EFE6;
  --cream-200: #EAE2D5;
  --cream-300: #D9CEBD;
  --white: #FFFFFF;
  --ink-900: #17242E;
  --ink-700: #3A4853;
  --ink-500: #5F6B74;
  --ink-400: #85909A;

  /* Semantic */
  --bg-page: var(--cream-50);
  --bg-subtle: var(--cream-100);
  --bg-inverse: var(--navy-900);
  --surface-card: var(--white);
  --surface-raised: var(--white);
  --surface-selected: var(--blue-100);
  --border-default: var(--cream-200);
  --border-strong: var(--cream-300);
  --border-selected: var(--blue-600);
  --text-strong: var(--ink-900);
  --text-body: var(--ink-700);
  --text-muted: var(--ink-500);
  --text-inverse: var(--cream-50);
  --text-link: var(--blue-700);
  --action-primary: var(--blue-600);
  --action-primary-hover: var(--blue-700);
  --action-on-primary: var(--white);
  --action-plus: var(--navy-900);
  --focus-ring: var(--gold-500);
  --priority: var(--clay-600);
  --priority-bg: var(--clay-100);
  --success: var(--meadow-600);
  --success-bg: var(--meadow-100);
  --urgent: var(--rose-700);
  --urgent-bg: var(--rose-100);
  --info-bg: var(--sky-100);

  /* Typography */
  --font-display: "Figtree", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Figtree", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-caps: "Oswald", "Arial Narrow", sans-serif;
  --text-xs: 15px;   /* legal, captions only */
  --text-sm: 16px;
  --text-md: 18px;   /* body */
  --text-lg: 20px;   /* lead, option labels */
  --text-xl: 24px;
  --text-2xl: 28px;  /* question title (mobile) */
  --text-3xl: 34px;  /* page title (mobile) */
  --text-4xl: 44px;
  --text-5xl: 56px;
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-body: 1.55;
  --tracking-caps: 0.14em;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --tap-min: 56px;        /* every tappable row/button */
  --content-max: 560px;   /* quiz + result column */
  --page-gutter: 20px;

  /* Effects */
  --shadow-card: 0 1px 2px rgba(23,36,46,.06), 0 4px 14px rgba(23,36,46,.06);
  --shadow-raised: 0 2px 4px rgba(23,36,46,.08), 0 12px 32px rgba(23,36,46,.10);
  --shadow-focus: 0 0 0 3px var(--cream-50), 0 0 0 6px var(--gold-500);
  --ease-calm: cubic-bezier(.25,.8,.3,1);
  --dur-fast: 140ms;
  --dur-base: 240ms;
  --dur-slow: 420ms;
}

/* Base */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg-page); color: var(--text-body); font-family: var(--font-body); font-size: var(--text-md); line-height: var(--leading-body); -webkit-font-smoothing: antialiased; }
a { color: var(--text-link); text-underline-offset: 3px; }
a:hover { color: var(--navy-900); }
:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* App layout */
*, *::before, *::after { box-sizing: border-box; }
button, input { font: inherit; }
h1:focus { outline: none; box-shadow: none; }
.screen { max-width: var(--content-max); margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.link-button { background: none; border: 0; padding: 10px 8px; min-height: 44px; font-family: var(--font-body); font-size: var(--text-sm); color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { color: var(--text-strong); }
.consent input:focus-visible { box-shadow: var(--shadow-focus); }
.legal-footer { margin: 12px 0 0; text-align: center; font-size: var(--text-xs); color: var(--text-muted); }
.legal-footer a { color: var(--text-muted); }

/* The Plus plan: two columns on wide screens, one on phones */
.plus-main { max-width: 1120px; margin: 0 auto; padding: 28px var(--page-gutter) 40px; display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.plus-col-main { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.plus-col-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.only-desktop { display: none; }
@media (min-width: 920px) { .only-desktop { display: block; } .only-mobile { display: none; } }
details.guide { border-top: 1px solid var(--border-default); padding-top: 14px; }
details.guide > summary { cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); color: var(--text-strong); min-height: 44px; display: flex; align-items: center; }
.summary-sheet h4 { margin: 18px 0 8px; font-family: var(--font-caps); font-weight: 500; font-size: 14px; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-muted); }
.summary-sheet dl { margin: 0; display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 6px 14px; font-size: 16px; }
.summary-sheet dt { font-weight: 600; color: var(--text-strong); }
.summary-sheet dd { margin: 0; }
.blank { flex: 1; display: inline-block; min-width: 120px; border-bottom: 1px solid var(--ink-400); }
table.log { width: 100%; border-collapse: collapse; font-size: 15px; }
table.log th, table.log td { border: 1px solid var(--cream-300); padding: 6px 8px; text-align: left; height: 34px; }

/* "Link copied" message */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: var(--radius-pill); background: var(--navy-900); color: var(--cream-50); font-size: var(--text-sm); box-shadow: var(--shadow-raised); opacity: 0; visibility: hidden; transition: opacity var(--dur-base) var(--ease-calm), transform var(--dur-base) var(--ease-calm), visibility var(--dur-base); z-index: 10; }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.print-only { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media print {
  body { background: #fff; font-size: 12pt; }
  .no-print, .toast { display: none !important; }
  .print-only { display: block !important; }
  .screen { max-width: none; min-height: 0; }
  .plus-main { display: block; padding: 0; }
  .plus-col-main > *, .plus-col-side > * { margin-bottom: 14px; }
  section, article { box-shadow: none !important; break-inside: avoid-page; }
  details.guide > summary { list-style: none; }
  a[href^="tel"] { text-decoration: none; }
  /* Printing just the doctor-visit summary */
  body.print-one .plus > *:not(.plus-main), body.print-one .plus-col-side, body.print-one .plus-col-main > *:not(.print-target) { display: none !important; }
}
