/* PsychPathways™ — baseline stylesheet
   Plain CSS3 only, per Specification D v1.2 §2/§6: Bootstrap or any other
   CSS framework is prohibited unless a formal architectural revision
   authorizes it — this file has no such dependency. Responsive,
   accessible-by-default: visible focus states, sufficient contrast,
   readable type scale. */

:root {
  /* Design tokens aligned with drnasirbhat.com's institutional palette
     (Academic Website v1.1, assets/css/tokens.css) so PsychPathways reads
     as part of the same Digital Psychology Ecosystem rather than a visually
     foreign app once linked from the Ecosystem page. Variable *names* below
     are unchanged from the original scaffold (nothing downstream had to be
     rewired) — only the underlying values were brought into alignment. */
  --color-bg: #ffffff;              /* --c-bg */
  --color-text: #10202a;            /* --color-ink-900 */
  --color-muted: #465563;           /* --color-slate-600 / --c-text-muted */
  --color-primary: #0f2e33;         /* --color-primary-900: deep slate-teal brand */
  --color-primary-contrast: #ffffff;
  --color-secondary: #f4f6f6;       /* --color-paper-100 / --c-bg-alt */
  --color-secondary-text: #10202a;
  --color-border: #d5dbdf;          /* --color-line-300 */
  --color-accent: #1f6f43;          /* --color-success-700: progress/match-strength */
  --color-danger: #a12626;          /* --color-error-700 */
  --color-focus: #9a6414;           /* --c-focus: accent-derived, >=3:1 on light surfaces */
  --font-display: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 8px;                    /* matches --radius-md */
  --max-width: 780px;
  --space-1: 0.4rem;
  --space-2: 0.8rem;
  --space-3: 1.4rem;
  --space-4: 2.2rem;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.5;
}

h1, h2, .brand {
  font-family: var(--font-display);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  padding: var(--space-2);
  z-index: 100;
}
.skip-link:focus {
  left: var(--space-2);
  top: var(--space-2);
}

a, button, input, [tabindex] {
  outline-offset: 2px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-focus);
}

.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) var(--space-2);
}
.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
}
.tagline {
  color: var(--color-muted);
  font-size: 0.92rem;
}

.app-root {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-4) var(--space-2);
  min-height: 50vh;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.85rem;
  padding: var(--space-3) var(--space-2);
}
.site-footer p {
  max-width: var(--max-width);
  margin: 0 auto;
}
.ecosystem-link {
  margin-top: var(--space-1) !important;
}
.ecosystem-link a {
  color: var(--color-primary);
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 var(--space-2);
}
h2 {
  font-size: 1.2rem;
  margin: var(--space-3) 0 var(--space-1);
}
h3 {
  font-size: 1rem;
  margin: var(--space-2) 0 var(--space-1);
}

p {
  margin: 0 0 var(--space-2);
}
.note {
  color: var(--color-muted);
  font-size: 0.9rem;
}
.muted {
  color: var(--color-muted);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.btn {
  font: inherit;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 0.65rem 1.1rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}
.btn-secondary {
  background: var(--color-secondary);
  color: var(--color-secondary-text);
  border-color: var(--color-border);
}
.btn-tertiary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-border);
}

.progress {
  background: var(--color-secondary);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  margin-bottom: var(--space-3);
}
.progress-bar {
  background: var(--color-accent);
  height: 100%;
  transition: width 0.2s ease;
}

.question-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}
.question-fieldset legend {
  color: var(--color-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.question-text {
  font-size: 1.1rem;
  font-weight: 600;
}

.options {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
}
.option:hover {
  background: var(--color-secondary);
}
.option input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
}

.career-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}
.match-score {
  font-weight: 700;
  color: var(--color-accent);
}
.regulatory-note {
  font-size: 0.85rem;
  color: var(--color-muted);
  border-top: 1px dashed var(--color-border);
  padding-top: var(--space-2);
}
.holland-summary {
  font-weight: 600;
  color: var(--color-accent);
  margin-top: calc(-1 * var(--space-2));
  margin-bottom: var(--space-3);
}
.holland-note {
  font-size: 0.9rem;
  color: var(--color-muted);
  font-style: italic;
}

.error-screen h1 {
  color: var(--color-danger);
}

.noscript-notice {
  border: 1px solid var(--color-border);
  background: var(--color-secondary);
  padding: var(--space-2);
  border-radius: var(--radius);
}

.storage-warning {
  border: 1px solid #e0c896;
  background: #fff8ec;
  color: #6b4a00;
  padding: var(--space-2);
  border-radius: var(--radius);
}

/* Print/PDF report (Spec D v1.2 §11) — hidden on screen, shown only when
   printing, so print/PDF output is a genuine report export rather than a
   screenshot of the interactive UI. */
.print-only {
  display: none;
}

.print-report h1 {
  font-size: 1.4rem;
}
.print-report h2 {
  font-size: 1.05rem;
  border-bottom: 1px solid #999;
  padding-bottom: 0.2rem;
  margin-top: 1.4rem;
}
.print-report .print-label {
  font-weight: 700;
  margin-top: 0.6rem;
  margin-bottom: 0.2rem;
}
.print-report .print-career {
  margin-top: 1rem;
  padding-top: 0.6rem;
  border-top: 1px dashed #999;
}
table.print-meta {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 0.6rem;
}
table.print-meta th,
table.print-meta td {
  border: 1px solid #ccc;
  padding: 0.3rem 0.5rem;
  text-align: left;
  font-size: 0.85rem;
  vertical-align: top;
  word-break: break-word;
}
table.print-meta th {
  width: 35%;
  background: #f2f2f2;
}

@media (max-width: 480px) {
  :root {
    font-size: 15px;
  }
  .button-row {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
}

@media print {
  /* Only the print-report target is shown — the interactive app (Spec D
     v1.2 §11: "shall not simply print the application's interactive
     results screen") is hidden entirely. */
  .site-header, .site-footer, .button-row, .skip-link, .app-root {
    display: none !important;
  }
  .print-only {
    display: block;
  }
  body {
    color: #000;
  }
}
