/* Styles for inner pages, the symptom checker and the mobile navigation. Extends styles.css. */

[hidden] { display: none !important; }

:root { --danger: #a4262a; --danger-soft: #fbe9e8; --amber: #b7791f; --amber-soft: #fdf3dd; --green-soft: #e6f3ea; --green: #256b43; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --danger-soft: #3a1c1c; --amber-soft: #3a2f16; --green-soft: #1b3326; --green: #8fd3a8; }
}

/* Header: mobile navigation as a scrollable row */
@media (max-width: 900px) {
  .nav { flex-wrap: wrap; padding: 10px 0; }
  .nav nav { order: 3; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav-links { display: flex; gap: 18px; white-space: nowrap; padding: 4px 0 8px; }
  .nav-links a { font-size: .9rem; }
}

/* Page hero for inner pages */
.page-hero { padding: clamp(44px, 6vw, 72px) 0 clamp(32px, 4vw, 48px); background: var(--white); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); margin-bottom: .4em; }
.credential-line { color: var(--teal-2); font-weight: 500; margin-bottom: .9em; }
.crumbs { font-size: .88rem; color: var(--ink-soft); margin-bottom: .5em; }
.crumbs a { color: var(--ink-soft); }
.hero-copy .credential-line { margin-bottom: .6em; }

/* Quick access tiles on the home page */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 28px 0; }
.quick {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink-soft);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.quick:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--teal-2); }
.quick-title { font-family: var(--serif); font-size: 1.2rem; color: var(--teal); font-weight: 600; }
.quick span:last-child { font-size: .95rem; }

/* CV layout */
.cv-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: start; }
.cv-block { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 20px; }
.cv-block h2 { font-size: 1.45rem; margin-top: 4px; }
.cv-block h2 + .cv-list { margin-top: 0; }
.cv-block h2:not(:first-child) { margin-top: 22px; }
.cv-side .cv-block h2 { margin-top: 0; }
.cv-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
.cv-list li { position: relative; padding-left: 20px; color: var(--ink-soft); font-size: .97rem; }
.cv-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--sand); }
.cv-list strong { color: var(--ink); }

/* Cards as links */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card h2 { font-family: var(--serif); font-size: 1.3rem; color: var(--teal); margin-bottom: .4em; }
.card-link { text-decoration: none; color: var(--ink-soft); display: flex; flex-direction: column; }
.card-link p { flex: 1; }
.card-more { color: var(--teal); font-weight: 600; font-size: .95rem; margin-top: 12px; }

/* Article pages */
.article { max-width: 780px; margin-inline: auto; }
.article h2 { font-size: 1.7rem; margin-top: 2.2em; scroll-margin-top: 90px; }
.article h2:first-of-type { margin-top: 0; }
.article p { color: var(--ink-soft); }
.info-list { padding-left: 1.2em; color: var(--ink-soft); margin: 0 0 1.2em; }
.info-list li { margin-bottom: .5em; }
.info-list strong { color: var(--ink); }
.toc {
  display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 8px;
}
.toc-title { width: 100%; margin: 0 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); font-weight: 600; }
.toc a { text-decoration: none; background: var(--teal-soft); color: var(--teal); padding: 6px 12px; border-radius: 999px; font-size: .9rem; font-weight: 500; }
.toc a:hover { background: var(--teal); color: #fff; }

/* Health information tiers */
.tiers { display: grid; gap: 14px; margin: 8px 0 2.4em; }
.tier { border-radius: var(--radius); padding: 18px 22px; border-left: 5px solid; background: var(--white); }
.tier h3 { font-size: 1.15rem; margin-bottom: .3em; }
.tier p { margin: 0; color: var(--ink-soft); }
.tier-emergency { border-color: var(--danger); background: var(--danger-soft); }
.tier-emergency h3 { color: var(--danger); }
.tier-today { border-color: #d9822b; background: var(--amber-soft); }
.tier-today h3 { color: var(--amber); }
.tier-soon { border-color: var(--teal-2); }
.tier-soon h3 { color: var(--teal); }
.tier-routine { border-color: var(--green); background: var(--green-soft); }
.tier-routine h3 { color: var(--green); }

/* CTA extras */
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-outline-light { border-color: rgba(255,255,255,.7); color: #fff; background: transparent; }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.92); }
.footer-links { font-size: .9rem; }
.footer-links a { color: var(--teal); }

/* Notice */
.notice {
  background: var(--amber-soft); border: 1px solid #e8c77d; border-radius: 14px; padding: 16px 20px; color: var(--ink); margin-bottom: 28px; font-size: .95rem;
}

/* Symptom checker */
.checker {
  background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow);
}
.progress { height: 8px; background: var(--tint); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.progress-bar { height: 100%; width: 16.66%; background: linear-gradient(90deg, var(--teal-2), var(--teal)); border-radius: 999px; transition: width .3s ease; }
.step-count { font-size: .85rem; color: var(--ink-soft); margin: 0 0 18px; font-weight: 500; }
.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step legend { padding: 0; margin-bottom: 16px; width: 100%; }
.step legend:focus { outline: none; }
.step-title { display: block; font-family: var(--serif); font-size: clamp(1.35rem, 2.6vw, 1.7rem); color: var(--ink); line-height: 1.25; }
.step-hint { display: block; font-size: .92rem; color: var(--ink-soft); margin-top: 6px; }
.field-label { font-weight: 600; margin: 18px 0 8px; color: var(--ink); }
.options { display: grid; gap: 10px; }
.options-inline { grid-template-columns: repeat(3, 1fr); }
.option {
  display: flex; gap: 12px; align-items: center; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--paper);
  transition: border-color .15s ease, background .15s ease;
}
.option:hover { border-color: var(--teal-2); }
.option input { width: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--teal); margin: 0; }
.option span { font-size: .98rem; color: var(--ink); }
.option:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); }
.option-none { border-style: dashed; }
.option:has(input:focus-visible) { outline: 3px solid var(--sand); outline-offset: 2px; }
.form-error { margin: 16px 0 0; color: var(--danger); font-weight: 600; font-size: .95rem; }
.checker-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.checker-nav .btn { min-width: 130px; justify-content: center; }

/* Result */
.result { outline: none; }
.result-card { border-radius: 20px; padding: clamp(22px, 3.5vw, 34px); border: 1px solid var(--line); }
.result-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; margin: 0 0 6px; color: var(--ink-soft); }
.result-title { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .4em; }
.result-body { font-size: 1.02rem; margin-bottom: 1em; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.result-section { margin-top: 22px; }
.result-section h3 { font-size: 1.15rem; margin-bottom: .6em; }
.result-section .info-list { margin-bottom: 0; }
.result-disclaimer { font-size: .9rem; color: var(--ink-soft); margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.result-emergency { background: var(--danger-soft); border-color: var(--danger); }
.result-emergency .result-title { color: var(--danger); }
.result-today { background: var(--amber-soft); border-color: #d9822b; }
.result-today .result-title { color: var(--amber); }
.result-soon { background: var(--teal-soft); border-color: var(--teal-2); }
.result-soon .result-title { color: var(--teal); }
.result-routine { background: var(--green-soft); border-color: var(--green); }
.result-routine .result-title { color: var(--green); }
.result-card .btn-ghost { margin-top: 18px; }

@media (max-width: 900px) {
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .cv-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .quick-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .options-inline { grid-template-columns: 1fr; }
  .checker-nav { flex-direction: column-reverse; }
  .checker-nav .btn { width: 100%; }
  .result-actions .btn { width: 100%; justify-content: center; }
  .cta-actions .btn { width: 100%; justify-content: center; }
  .toc a { font-size: .85rem; }
}
