/* Medical Terminology - Decoded — palette derived from app icon:
   royal blue #1456CE, deep blue #0D3E9C, sky blue #5AA2EE, card white, red cross #EF5350 */
:root {
  --blue: #1456CE;
  --blue-deep: #0D3E9C;
  --blue-ink: #0A2B66;
  --sky: #5AA2EE;
  --sky-soft: #E3EEFB;
  --red: #D93A3A;
  --red-soft: #FDEBEB;
  --bg: #FFFFFF;
  --bg-alt: #F3F7FD;
  --text: #1B2A44;
  --muted: #4A5B77;
  --card: #FFFFFF;
  --border: #D7E3F4;
  --shadow: 0 10px 30px rgba(13, 62, 156, 0.12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --blue: #4C86E8;
    --blue-deep: #7FB0F4;
    --blue-ink: #DCE9FB;
    --sky: #6FADF2;
    --sky-soft: #12233F;
    --red: #F07575;
    --red-soft: #3A1A1E;
    --bg: #0B1526;
    --bg-alt: #101E36;
    --text: #E4ECF8;
    --muted: #A6B7D2;
    --card: #16264226;
    --border: #24406B;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
  border-radius: 4px;
}
h1, h2, h3 { line-height: 1.2; color: var(--blue-ink); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin-top: 0; }
h3 { font-size: 1.1rem; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--blue); color: #fff; padding: .6rem 1rem; z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.site-header nav {
  max-width: 1100px; margin: 0 auto; padding: .6rem 1.25rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: .55rem;
  font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--blue-ink);
  margin-right: auto;
}
.brand img { border-radius: 8px; }
.nav-links {
  display: flex; gap: 1.1rem; list-style: none; margin: 0; padding: 0;
  align-items: center; flex-wrap: wrap;
}
.nav-links a { text-decoration: none; color: var(--text); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--blue); }
.nav-cta {
  background: var(--blue); color: #fff !important;
  padding: .45rem .95rem; border-radius: 999px;
}
.nav-cta:hover { background: var(--blue-deep); color: #fff !important; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--blue-ink);
  margin: 5px 0; border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero {
  max-width: 1100px; margin: 0 auto; padding: 3.5rem 1.25rem 3rem;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center;
}
.eyebrow {
  color: var(--red); font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; font-size: .8rem; margin: 0 0 .75rem;
}
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin: 0 0 1rem; }
.lede { font-size: 1.12rem; color: var(--muted); margin: 0 0 1.5rem; }
.cta-row { display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; }
.price-note { color: var(--muted); font-size: .9rem; margin: 0; }
.store-badge {
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--blue-ink); color: #fff; text-decoration: none;
  padding: .55rem 1.3rem .6rem 1rem; border-radius: 12px;
  border: 1px solid transparent; transition: transform .15s ease, background .15s ease;
}
@media (prefers-color-scheme: dark) {
  .store-badge { background: #fff; color: #0A2B66; }
}
.store-badge:hover { transform: translateY(-2px); }
.badge-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.badge-text small { font-size: .68rem; opacity: .85; }
.badge-text strong { font-size: 1.15rem; }
.trust-row {
  display: flex; flex-wrap: wrap; gap: .5rem; list-style: none;
  padding: 0; margin: 1.5rem 0 0;
}
.trust-row li {
  background: var(--sky-soft); color: var(--blue-ink);
  border: 1px solid var(--border);
  padding: .3rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
}

/* Hero visual — text mock of a term breakdown (no screenshots available) */
.hero-visual { position: relative; min-height: 320px; }
.decode-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: var(--shadow); padding: 1.8rem 1.5rem; text-align: center;
  position: relative; z-index: 2;
}
.dc-term { font-size: 2rem; font-weight: 800; color: var(--blue-ink); margin: 0 0 1.1rem; letter-spacing: .01em; }
.dc-parts { display: flex; justify-content: center; align-items: stretch; gap: .6rem; flex-wrap: wrap; }
.dc-part {
  display: flex; flex-direction: column; gap: .15rem;
  padding: .55rem .9rem; border-radius: 12px; font-weight: 700; font-size: 1.05rem;
}
.dc-part em { font-style: normal; font-weight: 500; font-size: .78rem; opacity: .85; }
.dc-root { background: var(--sky-soft); color: var(--blue); border: 1px solid var(--sky); }
.dc-suffix { background: var(--red-soft); color: var(--red); border: 1px solid var(--red); }
.dc-plus { align-self: center; font-weight: 700; color: var(--muted); }
.dc-meaning { margin: 1.1rem 0 0; color: var(--muted); font-weight: 600; }
.decode-chip {
  position: absolute; background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: .35rem .85rem; font-size: .82rem; font-weight: 600;
  color: var(--muted); box-shadow: var(--shadow); z-index: 1;
}
.chip-1 { top: -1.2rem; left: 5%; }
.chip-2 { bottom: -1rem; right: 0; }
.chip-3 { bottom: 18%; left: -1.5rem; }

/* Sections */
.section { max-width: 1100px; margin: 0 auto; padding: 3.5rem 1.25rem; }
.section.alt {
  max-width: none;
  background: var(--bg-alt);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.section.alt > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section.alt > h2, .section.alt > .section-lede { padding: 0; }
.section-lede { color: var(--muted); font-size: 1.05rem; max-width: 46rem; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.5rem; }
.cols.three { grid-template-columns: repeat(3, 1fr); }
.col {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.4rem 1.5rem;
}
.col h3 { margin-top: 0; }
.col.problem { border-top: 4px solid var(--red); }
.col.solution { border-top: 4px solid var(--blue); }

.feature-grid {
  list-style: none; padding: 0; margin: 1.75rem 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.feature-grid li {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.3rem 1.4rem;
}
.feature-grid h3 { margin: 0 0 .5rem; color: var(--blue); }
.feature-grid p { margin: 0; color: var(--muted); font-size: .95rem; }

.modes { list-style: none; counter-reset: mode; padding: 0; margin: 1.75rem auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.modes li {
  counter-increment: mode; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.4rem 1.4rem 1.2rem; position: relative;
}
.modes li::before {
  content: counter(mode);
  position: absolute; top: -0.9rem; left: 1.2rem;
  background: var(--blue); color: #fff; font-weight: 800;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: grid; place-items: center; font-size: .95rem;
}
.modes h3 { margin: .4rem 0 .5rem; }
.modes p { margin: 0; color: var(--muted); font-size: .95rem; }

.pricing-note {
  margin-top: 2rem; background: var(--sky-soft); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.3rem 1.5rem;
}
.pricing-note h3 { margin: 0 0 .5rem; }
.pricing-note p { margin: 0; }

/* FAQ */
.faq-list { max-width: 46rem; }
.faq-list details {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  margin-bottom: .75rem; overflow: hidden;
}
.faq-list summary {
  cursor: pointer; font-weight: 600; padding: .95rem 1.2rem;
  list-style: none; position: relative; padding-right: 2.6rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 1.1rem; top: 50%;
  transform: translateY(-50%); font-size: 1.3rem; color: var(--blue); font-weight: 700;
}
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list details p { margin: 0; padding: 0 1.2rem 1.1rem; color: var(--muted); }

/* Final CTA */
.cta-final { text-align: center; }
.cta-final p { color: var(--muted); margin-bottom: 1.5rem; }
.cta-final .store-badge { margin: 0 auto; }

/* Footer */
.site-footer { background: var(--blue-ink); color: #D9E5F7; padding: 2.5rem 1.25rem 1.5rem; }
@media (prefers-color-scheme: dark) { .site-footer { background: #060D1A; } }
.footer-cols {
  max-width: 1100px; margin: 0 auto; display: grid;
  grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem;
}
.footer-brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; color: #fff; margin-top: 0; }
.footer-brand img { border-radius: 6px; }
.footer-h { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: #9FBCE8; margin: 0 0 .6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: #D9E5F7; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-fine {
  max-width: 1100px; margin: 2rem auto 0; font-size: .82rem; color: #9FBCE8;
  border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.2rem;
}

/* Guide pages */
.breadcrumb { max-width: 46rem; margin: 1.5rem auto 0; padding: 0 1.25rem; font-size: .88rem; color: var(--muted); }
.breadcrumb ol { list-style: none; display: flex; gap: .4rem; flex-wrap: wrap; padding: 0; margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: var(--border); }
.guide {
  max-width: 46rem; margin: 0 auto; padding: 1.5rem 1.25rem 3.5rem;
}
.guide h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.guide .byline { color: var(--muted); font-size: .9rem; margin-bottom: 2rem; }
.guide h2 { margin-top: 2.4rem; font-size: 1.45rem; }
.guide h3 { margin-top: 1.6rem; }
.guide table { border-collapse: collapse; width: 100%; margin: 1.2rem 0; font-size: .95rem; }
.guide th, .guide td { border: 1px solid var(--border); padding: .5rem .75rem; text-align: left; }
.guide th { background: var(--sky-soft); color: var(--blue-ink); }
.guide .callout {
  background: var(--sky-soft); border-left: 4px solid var(--blue);
  border-radius: 0 12px 12px 0; padding: 1rem 1.25rem; margin: 1.5rem 0;
}
.guide .callout.warn { background: var(--red-soft); border-left-color: var(--red); }
.guide .app-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.4rem 1.5rem; margin: 2rem 0;
}
.guide .app-box h2 { margin-top: 0; font-size: 1.2rem; }
.guide-nav { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem 3rem; }
.guide-nav h2 { font-size: 1.1rem; }
.guide-nav ul { padding-left: 1.2rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .hero-visual { min-height: 0; margin-top: 1.5rem; }
  .chip-3 { left: 0; }
  .cols, .cols.three, .feature-grid, .modes { grid-template-columns: 1fr 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .cols, .cols.three, .feature-grid, .modes { grid-template-columns: 1fr; }
  .modes { gap: 1.6rem; }
  .footer-cols { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; width: 100%; flex-direction: column; align-items: flex-start;
    gap: .35rem; padding: .5rem 0 .75rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: .4rem 0; font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .store-badge, .nav-toggle span { transition: none; }
}
