/* EVALRI 2026. Shared palette and typography with the Sleep-EVAL visual refresh. */
:root {
  --ink: #18324a;
  --text: #243746;
  --muted: #627487;
  --burgundy: #7a2434;
  --burgundy-dark: #5f1b28;
  --gold: #c7a45b;
  --blue: #2f5f87;
  --teal: #2f7e82;
  --bg: #f5f7fa;
  --line: #dce4eb;
  --soft: #edf3f7;
  --shadow: 0 14px 36px rgba(29, 54, 77, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.62; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--burgundy); }
button, input { font: inherit; }
button, summary { cursor: pointer; }
button { color: inherit; }
img { max-width: 100%; height: auto; }
h1,h2,h3 { color: var(--ink); line-height: 1.2; }
h2 { font-size: 32px; letter-spacing: -.025em; margin: 0 0 20px; }
h3 { font-size: 21px; margin: 0 0 10px; }
p { margin: 0 0 20px; }
p:last-child { margin-bottom: 0; }
small { font-size: .75em; }
[hidden] { display: none !important; }
details:not([open]) > div { display: none; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 5px; border-radius: 3px; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: #fff; padding: 12px 22px; color: var(--ink); }
.skip-link:focus { top: 16px; }

/* Masthead mirrors Sleep-EVAL's burgundy, gold and blue identity. */
.masthead { background: linear-gradient(118deg, #5f1b28 0%, #7a2434 46%, #274f70 100%); color: #fff; }
.masthead-inner { max-width: 1320px; min-height: 132px; padding: 20px 32px; margin: auto; display: flex; gap: 28px; align-items: center; }
.logo-tile { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 132px; height: 94px; padding: 10px; background: transparent; border-radius: 12px; box-shadow: none; }
.logo-tile img { width: 112px; height: auto; }
.brand { flex: 1; min-width: 0; }
.wordmark { display: flex; align-items: baseline; flex-wrap: wrap; gap: 15px; font-family: Georgia, "Times New Roman", serif; font-size: 40px; font-weight: 700; letter-spacing: .035em; color: #fff; text-decoration: none; line-height: 1.15; }
.wordmark:hover { color: #fff; }
.wordmark span { color: #f2dca9; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; font-weight: 600; letter-spacing: .16em; }
.brand p { color: rgba(255,255,255,.9); font-size: 15px; line-height: 1.45; margin: 9px 0 0; }
.masthead-links { display: grid; gap: 4px; text-align: right; font-size: 13px; line-height: 1.45; }
.masthead-links a { color: #fff; text-decoration: none; }
.masthead-links a:hover { text-decoration: underline; }
.masthead-links span { color: rgba(255,255,255,.78); }

.site-nav { background: #162f46; }
.nav-inner { max-width: 1280px; margin: auto; padding: 0 24px; }
.nav-list { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; align-items: stretch; }
.nav-list > li { position: relative; }
.nav-list > li:last-child { margin-left: auto; }
.nav-list > li > a, .nav-dropdown > summary { color: rgba(255,255,255,.9); padding: 14px 15px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; text-decoration: none; line-height: 1.5; list-style: none; white-space: nowrap; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-list > li > a:hover, .nav-dropdown > summary:hover, .nav-list [aria-current="page"], .nav-list > .is-active > details > summary, .nav-dropdown[open] > summary { color: #fff; background: rgba(255,255,255,.10); }
.nav-dropdown > summary span { font-size: 17px; line-height: 1; transition: transform .18s; }
.nav-dropdown[open] > summary span { transform: rotate(180deg); }
.dropdown-panel { position: absolute; top: 100%; left: 0; background: #fff; min-width: 240px; border-radius: 0 0 8px 8px; padding: 8px; box-shadow: 0 12px 30px rgba(18,42,62,.18); z-index: 30; }
.nav-list > li:last-child .dropdown-panel { left: auto; right: 0; }
.dropdown-panel a { display: block; font-size: 14px; font-weight: 550; padding: 9px 12px; text-decoration: none; border-radius: 5px; color: var(--text); }
.dropdown-panel a:hover, .dropdown-panel a[aria-current="page"] { background: var(--soft); color: var(--burgundy); }
.menu-toggle { display: none; }

.hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: linear-gradient(135deg,#183850 0%,#234f68 52%,#7a2434 100%); padding: 64px 28px 68px; }
.hero::after { content: ""; position: absolute; right: -140px; top: -180px; width: 520px; height: 520px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.035),0 0 0 140px rgba(255,255,255,.02); z-index: -1; pointer-events: none; }
.hero-inner { max-width: 1104px; margin: auto; }
.eyebrow { font-size: 12px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; color: var(--burgundy); margin-bottom: 15px; }
.hero .eyebrow { color: #f0d79b; }
.hero h1 { color: #fff; margin: 0 0 22px; font-size: clamp(38px,4.5vw,62px); font-weight: 750; letter-spacing: -.035em; line-height: 1.06; max-width: 940px; }
.hero h1 span { color: #f1dca9; }
.hero p { max-width: 850px; color: rgba(255,255,255,.9); font-size: 20px; line-height: 1.55; margin: 0 0 28px; }
.hero-compact { padding: 43px 28px 45px; }
.hero-compact h1 { font-size: clamp(32px,4vw,46px); }
.hero-compact p { font-size: 18px; margin-bottom: 0; }
.hero-compact .actions { margin-top: 24px; }
.section { max-width: 1160px; margin: auto; padding: 48px 28px; }
.section > p { max-width: 1020px; font-size: 18px; line-height: 1.65; }
.section + .section { border-top: 1px solid var(--line); }
.section.prose { max-width: 1050px; }
.section.prose > p { max-width: 930px; }
.closing-section { margin-bottom: 20px; }
.grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin-top: 28px; }
.card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 14px; padding: 25px; box-shadow: 0 8px 24px rgba(28,55,78,.06); display: flex; flex-direction: column; }
.label { display: block; color: var(--burgundy); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.card p { color: var(--muted); line-height: 1.6; margin-bottom: 0; font-size: 16px; }
.card p a { overflow-wrap: anywhere; }
.text-link { margin-top: auto; padding-top: 20px; font-size: 14px; font-weight: 700; text-decoration: none; }
.text-link span { margin-left: 5px; }
.grid + p { margin-top: 25px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button { display: inline-block; font-size: 14px; font-weight: 700; line-height: 1.5; padding: 11px 18px; text-decoration: none; border-radius: 8px; border: 1px solid var(--line); }
.button.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.button.secondary { background: #fff; color: var(--ink); }
.button:hover { box-shadow: 0 4px 12px rgba(29,54,77,.15); }
.hero .button.primary { background: #fff; color: var(--ink); border-color: #fff; }
.hero .button.secondary { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }

.architecture { margin-top: 28px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.architecture-heading { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: center; padding: 20px 24px; background: var(--ink); color: #fff; }
.architecture-heading strong { font-size: 24px; letter-spacing: -.02em; white-space: nowrap; }
.architecture-heading span { color: #f1dca9; font-size: 14px; }
.architecture-flow { display: grid; grid-template-columns: 1fr 34px 1.15fr 34px 1fr; gap: 10px; padding: 26px 24px; align-items: stretch; }
.node { padding: 19px; border: 1px solid var(--line); background: #f8fafc; border-radius: 10px; }
.node h3 { font-size: 22px; margin-bottom: 13px; }
.node p { font-size: 14px; line-height: 1.65; margin-bottom: 14px; }
.node .node-note { color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-top: 13px; margin-bottom: 0; }
.node-engine { background: var(--soft); border-top: 4px solid var(--gold); padding-top: 16px; }
.flow-arrow { display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--burgundy); font-weight: 700; }
.feedback { border-top: 1px solid var(--line); border-left: 4px solid var(--gold); background: #edf3f7; padding: 19px 24px; font-size: 15px; }
.timeline { padding: 0; margin: 30px 0 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 160px 1fr; gap: 30px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline li > span { color: var(--burgundy); font-size: 14px; font-weight: 750; position: relative; padding-left: 20px; }
.timeline li > span::before { content: ""; position: absolute; left: 0; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.timeline h3 { font-size: 20px; margin: 0 0 8px; }
.timeline p { color: var(--muted); }

.faq-list { margin-top: 26px; }
.faq { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; }
.faq > summary { position: relative; padding: 21px 50px 21px 22px; list-style: none; color: var(--ink); font-size: 18px; font-weight: 650; line-height: 1.4; }
.faq > summary::-webkit-details-marker { display: none; }
.faq > summary::after { content: "+"; position: absolute; right: 22px; top: 19px; color: var(--burgundy); font-size: 24px; }
.faq[open] > summary::after { content: "−"; }
.faq > div { padding: 0 22px 24px; max-width: 1020px; }
.faq[open] > summary { padding-bottom: 15px; }
.publication-search { margin: 28px 0; padding: 22px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.publication-search label { display: block; font-weight: 650; color: var(--ink); margin-bottom: 8px; }
.publication-search input { width: 100%; padding: 11px 15px; border: 1px solid #a4b3bf; border-radius: 6px; color: var(--text); background: #fff; }
.publication-search p { font-size: 13px; color: var(--muted); margin: 9px 0 0; }
.publication { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; margin-bottom: 20px; box-shadow: 0 8px 24px rgba(28,55,78,.04); }
.publication h2 { font-size: 24px; line-height: 1.35; margin-bottom: 14px; }
.publication h2 a { color: var(--ink); text-decoration: none; }
.publication h2 a:hover { color: var(--burgundy); text-decoration: underline; }
.citation { color: var(--muted); font-size: 14px; }
.publication details { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.publication summary { color: var(--blue); font-size: 14px; font-weight: 700; }
.abstract { margin-top: 20px; font-size: 16px; line-height: 1.75; }
.publication-actions { margin-top: 19px; font-size: 14px; font-weight: 700; }
.legal table { border-collapse: collapse; font-size: 15px; width: 100%; margin: 20px 0; }
.legal th,.legal td { padding: 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal h4 { color: var(--ink); font-size: 19px; margin: 30px 0 12px; }
.legal p { font-size: 16px; }
.legal li { margin-bottom: 8px; }
.table-scroll { max-width: 100%; overflow-x: auto; }

.site-footer { margin-top: 26px; background: #162f46; color: #d4dfe7; }
.footer-inner { display: grid; grid-template-columns: 1.15fr 1.1fr .75fr; gap: 45px; max-width: 1160px; padding: 48px 28px 24px; margin: auto; }
.site-footer h2 { color: #fff; font-size: 17px; letter-spacing: .02em; margin: 0 0 18px; }
.site-footer p { font-size: 14px; color: #d4dfe7; line-height: 1.65; }
.site-footer a { color: #e9f0f4; }
.site-footer a:hover { color: #f1dca9; }
.footer-publications,.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-publications li { margin-bottom: 17px; }
.footer-publications a { font-size: 13px; line-height: 1.5; text-decoration: none; display: block; }
.footer-publications span { display: block; font-size: 11px; color: #adbdc9; margin-top: 4px; }
.footer-more { font-size: 13px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { text-decoration: none; font-size: 14px; }
.footer-bottom { grid-column: 1 / -1; border-top: 1px solid #365067; padding-top: 22px; display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.footer-bottom p { font-size: 11px; color: #b2c2ce; margin: 0; }
.footer-bottom > div { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; }
.contact-strip { padding: 25px; text-align: center; background: var(--soft); }

@media (max-width: 1090px) {
  .masthead-inner { gap: 20px; }
  .masthead-links { display: none; }
  .nav-list > li > a,.nav-dropdown > summary { padding-left: 12px; padding-right: 12px; font-size: 13px; }
  .architecture-flow { gap: 7px; grid-template-columns: 1fr 20px 1.1fr 20px 1fr; padding: 22px 18px; }
  .node { padding: 15px; }
}
@media (max-width: 960px) {
  .nav-inner { padding: 0; }
  .menu-toggle { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; color: #fff; width: 100%; padding: 13px 24px; font-size: 15px; text-align: left; }
  .js .nav-list { display: none; }
  .js .nav-list.is-open { display: block; }
  .nav-list { display: block; padding: 0 12px 12px; }
  .nav-list > li:last-child { margin-left: 0; }
  .nav-list > li > a,.nav-dropdown > summary { font-size: 15px; padding: 12px; }
  .nav-dropdown > summary { justify-content: space-between; }
  .dropdown-panel { position: static; border-radius: 8px; margin: 0 8px 8px; box-shadow: none; min-width: 0; }
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .architecture-flow { grid-template-columns: 1fr; padding: 24px; gap: 8px; }
  .flow-arrow { height: 40px; transform: rotate(90deg); }
  .node { padding: 20px; }
  .node-engine { padding-top: 17px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-inner > div:nth-child(3) { grid-column: 1 / -1; }
  .footer-links { columns: 2; }
  .footer-bottom { display: block; }
  .footer-bottom > div { margin-top: 20px; }
}
@media (max-width: 560px) {
  .masthead-inner { padding: 18px 20px; min-height: 125px; gap: 16px; }
  .logo-tile { width: 92px; height: 80px; padding: 8px; border-radius: 9px; }
  .wordmark { font-size: 32px; display: block; }
  .wordmark span { display: block; font-size: 10px; letter-spacing: .09em; line-height: 1.5; margin-top: 3px; }
  .brand p { font-size: 11px; margin-top: 6px; }
  .hero { padding: 45px 22px 48px; }
  .hero h1 { font-size: 39px; }
  .hero p { font-size: 17px; }
  .hero-compact { padding-top: 35px; padding-bottom: 35px; }
  .hero-compact h1 { font-size: 32px; }
  .hero-compact p { font-size: 16px; }
  .section { padding: 36px 20px; }
  .section h2 { font-size: 27px; }
  .section > p { font-size: 16px; }
  .grid { grid-template-columns: 1fr; gap: 16px; margin-top: 22px; }
  .card { padding: 23px; }
  .architecture-heading { padding: 18px 20px; }
  .architecture-flow { padding: 20px; }
  .feedback { padding: 18px; font-size: 14px; }
  .timeline li { grid-template-columns: 1fr; gap: 10px; padding: 22px 0; }
  .timeline li > div { padding-left: 20px; }
  .timeline p { font-size: 15px; }
  .faq > summary { font-size: 16px; padding-left: 18px; }
  .faq > div { padding-left: 18px; padding-right: 18px; font-size: 15px; }
  .publication { padding: 22px; }
  .publication h2 { font-size: 21px; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; padding: 40px 22px 24px; }
  .footer-links { columns: 1; }
  .legal th,.legal td { padding: 9px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
@media print {
  body { background: #fff; color: #000; }
  .site-header,.site-footer,.actions,.publication-search,.skip-link { display: none; }
  .hero { background: #fff; padding: 20px 0; }
  .hero h1,.hero h1 span,.hero p,.hero .eyebrow { color: #000; }
  .hero::after { display: none; }
  .section { padding: 22px 0; }
  .card,.architecture,.publication { box-shadow: none; break-inside: avoid; }
}
