/* SYNAPSE experiment platform — one stylesheet; light and dark theme via body[data-theme]. */
:root {
  --bg: #f5f6fa; --panel: #ffffff; --panel-2: #eef1f8; --text: #172033; --muted: #5b6577; --line: #dde2ec;
  --accent: #3b5bfd; --accent-2: #8b5cf6; --accent-text: #fff; --warn: #c2321f; --ok: #12a150; --note: #ecf0ff;
  --radius: 14px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body[data-theme="dark"] {
  --bg: #0b0f1a; --panel: #131a2a; --panel-2: #182136; --text: #e8ecf5; --muted: #9aa6bd; --line: #26314a;
  --accent: #6d8bff; --accent-2: #a78bfa; --note: #1a2444; --warn: #ff8a7a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { line-height: 1.55; transition: background-color .3s, color .3s; }
a { color: var(--accent); }
h1 { font-size: 1.8rem; line-height: 1.2; margin: .2em 0 .5em; letter-spacing: -.01em; }
h2 { font-size: 1.45rem; margin: .2em 0 .5em; letter-spacing: -.01em; }
h3 { font-size: 1.08rem; margin: .8em 0 .35em; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .warn { color: var(--warn); min-height: 1.2em; }
.pre { white-space: pre-line; } .mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.page { max-width: 1000px; margin: 0 auto; padding: 28px 16px 90px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 14px 0; box-shadow: var(--shadow); }
.card.center { text-align: center; max-width: 780px; margin: 6vh auto; }
.note { background: var(--note); border-radius: var(--radius); padding: 12px 16px; }
.warnbox { border-color: #f5c26b; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.row.space { justify-content: space-between; } .center-row { justify-content: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 16px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.field > span { font-weight: 600; font-size: .9rem; }
input, select, textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
  transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); }
.field input[type="checkbox"] { align-self: flex-start; }

/* buttons */
.btn { font: inherit; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 10px; padding: 9px 16px; cursor: pointer; text-decoration: none; font-weight: 500;
  transition: transform .12s, box-shadow .15s, border-color .15s, background-color .15s; }
.btn:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--grad); color: var(--accent-text); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 12px; font-size: .88rem; }
.btn.big { padding: 13px 24px; font-size: 1.05rem; }
.icon-btn { font: inherit; background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 999px; width: 36px; height: 36px; cursor: pointer; }
kbd { font-size: .72rem; border: 1px solid currentColor; border-radius: 5px; padding: 0 5px; opacity: .65; font-family: inherit; }
.link { font-weight: 600; text-decoration: none; }

/* ---- home ------------------------------------------------------------------------------------------------- */
.home { min-height: 100vh; }
.glass-btn { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .3); backdrop-filter: blur(6px); }
.band { max-width: 1100px; margin: 0 auto; padding: 64px 24px; }
.band.alt { max-width: none; background: var(--panel-2); }
.band.alt > * { max-width: 1052px; margin-left: auto; margin-right: auto; }
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 22px; }
.task-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.task-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(16, 24, 40, .14); }
.preview { height: 150px; display: grid; place-items: center; background: #0e1424; color: #fff; overflow: hidden; }
.pv-big { font-size: 3.2rem; font-weight: 800; } .pv-mid { font-size: 2rem; font-weight: 800; }
.pv-img { max-height: 120px; max-width: 90%; } .pv-photo { width: 100%; height: 100%; object-fit: cover; }
.task-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.task-body h3 { margin: 4px 0 0; } .task-body p { color: var(--muted); margin: 0 0 10px; flex: 1; }
.task-body .btn { align-self: flex-start; }
.tag { align-self: flex-start; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 36px; align-items: start; }
.two-col.small-gap { gap: 18px; margin-top: 10px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.facts div, .stats div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.facts strong, .stats strong { display: block; font-size: 1.45rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.facts span, .stats span { font-size: .82rem; color: var(--muted); }
.timeline { display: flex; gap: 4px; margin: 12px 0; }
.tl-seg { font: inherit; border: 0; border-radius: 8px; padding: 10px 4px; color: #fff; cursor: pointer; min-width: 44px; display: flex; flex-direction: column;
  align-items: center; transition: transform .15s, filter .15s; }
.tl-seg small { opacity: .8; font-size: .72rem; }
.tl-seg.q { background: #64748b; } .tl-seg.rest { background: #0ea5a4; } .tl-seg.task { background: var(--grad); }
.tl-seg:hover, .tl-seg.active { transform: translateY(-3px); filter: brightness(1.12); box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }
.tl-detail { min-height: 110px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px; margin-bottom: 16px; }
.steps3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 18px; }
.step-card { margin: 0; position: relative; }
.step-n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; }
.funding { text-align: center; color: var(--muted); max-width: 760px; margin: 18px auto 0; }
.cite p { margin: .3em 0; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .pop { animation: none; } }

/* data table */
.table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.table th { background: var(--panel-2); font-weight: 600; }
.table td.num { text-align: right; } .table td.actions { white-space: nowrap; }
.table tr.hl { background: var(--note); }

/* designer */
.toolbar select { min-width: 240px; }
details.step { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 8px 0; background: var(--panel); }
details.step[open] { border-color: var(--accent); }
details.step summary { cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.step-no { display: inline-block; min-width: 1.8em; text-align: center; background: var(--note); border-radius: 6px; font-weight: 600; }
.inline-checks { display: flex; gap: 14px; }
.qedit { border-left: 3px solid var(--accent); padding-left: 12px; margin-top: 8px; }
.qitem, .slot { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 8px; }
.errors { color: var(--warn); }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; border-top: 1px solid var(--line); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; z-index: 50; }
.check { display: flex; gap: 8px; align-items: center; margin: 10px 0; }

/* ---- running session -------------------------------------------------------------------------------------- */
.run { min-height: 100vh; display: flex; flex-direction: column; position: relative; isolation: isolate; }
.backdrop { position: fixed; inset: 0; z-index: -1; background-size: cover; background-position: center; opacity: 0; transition: opacity .6s; }
.run.with-bg .backdrop { opacity: .4; }
body:not([data-theme="dark"]) .run.with-bg .backdrop { opacity: .5; filter: invert(1) hue-rotate(180deg) saturate(1.4) brightness(1.05); }
.timer { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 600; }
.timer svg { width: 34px; height: 34px; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--line); stroke-width: 4; }
.ring-progress { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.timer.urgent .ring-progress { stroke: #f59e0b; }
.stage { flex: 1; overflow: auto; padding: 16px; }
.run.with-bg .stage > .card, .run.with-bg .questionnaire section, .glass { background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(6px); }
.instruction { font-size: 1.15rem; max-width: 640px; margin: 10px auto 20px; }
.task { display: flex; flex-direction: column; align-items: center; gap: 22px; margin-top: 6vh; }
.stimulus { min-height: 160px; display: flex; align-items: center; justify-content: center; font-weight: 800; user-select: none; }
.stimulus.big { font-size: clamp(3rem, 9vw, 6.5rem); }
.stimulus.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .1em; }
.fixation { font-size: 4rem; font-weight: 300; color: var(--muted); }
.fixation.big { font-size: 6rem; margin: 30px 0; }
.pop { animation: pop .14s ease-out; }
@keyframes pop { from { transform: scale(.9); opacity: .3; } to { transform: scale(1); opacity: 1; } }
.responses { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn.response { font-size: 1.15rem; padding: 15px 28px; min-width: 140px; justify-content: center; font-weight: 700; border-width: 2px; }
.btn.response:not(:disabled):hover { background: var(--note); }
.task-image { max-width: min(92vw, 900px); max-height: 58vh; border-radius: 12px; box-shadow: var(--shadow); }
.stroop-image { max-height: 250px; max-width: 80vw; border-radius: 12px; }
.question { font-size: 1.2rem; font-weight: 600; margin: 0; }
.count-input { width: 140px; font-size: 1.3rem; text-align: center; }

/* try-out summary */
.summary .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.rt-strip { display: flex; align-items: flex-end; gap: 3px; height: 90px; padding: 8px; background: var(--panel-2); border-radius: 10px; margin-bottom: 16px; }
.rt-strip i { flex: 1; border-radius: 3px 3px 0 0; min-height: 3px; }
.rt-strip i.ok { background: var(--ok); } .rt-strip i.err { background: var(--warn); }

/* questionnaire */
.questionnaire { max-width: 780px; margin: 0 auto; }
.questionnaire > h1 { text-shadow: 0 1px 8px rgba(0, 0, 0, .15); }
.questionnaire section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 12px 0; box-shadow: var(--shadow); }
.item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item.missing { background: rgba(220, 38, 38, .07); outline: 2px solid var(--warn); border-radius: 8px; padding: 10px; }
.item-text { display: block; font-weight: 600; margin-bottom: 8px; }
.req { color: var(--warn); }
.choices { display: flex; flex-direction: column; gap: 6px; }
.choices.inline { flex-direction: row; flex-wrap: wrap; gap: 10px; }
.choice { display: flex; gap: 8px; align-items: center; cursor: pointer; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--note); }
.scale-labels { display: flex; justify-content: space-between; width: 100%; }
.questionnaire select { min-width: 280px; }

/* practice feedback */
.stimulus, .task { position: relative; }
.feedback { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); font-size: 1.1rem; font-weight: 700; padding: 6px 16px;
  border-radius: 999px; animation: pop .15s ease-out; white-space: nowrap; }
.feedback.ok { background: color-mix(in srgb, var(--ok) 18%, var(--panel)); color: var(--ok); }
.feedback.err { background: color-mix(in srgb, var(--warn) 18%, var(--panel)); color: var(--warn); }

/* rating scale */
.likert { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.likert-end { font-size: .85rem; color: var(--muted); max-width: 160px; }
.likert-points { display: flex; gap: 6px; }
.likert-point { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; }
.likert-point:has(input:checked) { border-color: var(--accent); background: var(--note); }

/* ---- shared page chrome ----------------------------------------------------------------------------------- */
.lead-sm { font-size: 1.08rem; color: var(--muted); max-width: 760px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { font-size: .82rem; padding: 3px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.chip.strong { background: var(--note); border-color: var(--accent); font-weight: 600; }
.badge-soft { display: inline-block; margin-left: 6px; font-size: .72rem; padding: 1px 8px; border-radius: 999px; background: var(--note); color: var(--accent); font-weight: 600; }
.linkish { font: inherit; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-weight: 600; }
.status { font-size: .8rem; font-weight: 600; } .status.completed { color: var(--ok); } .status.paused, .status.running { color: #b7791f; }
.table tr.detail td { background: var(--panel-2); }
.empty { padding: 40px 20px; }
.danger-zone { justify-content: flex-end; margin-top: 30px; }
.checklist { margin: 12px 0; } .checklist summary { cursor: pointer; font-weight: 600; }
.plain { list-style: none; padding: 0; margin: 6px 0 10px; }
.cite-line { font-family: Georgia, "Times New Roman", serif; font-size: 1.02rem; }
.author { display: flex; gap: 18px; align-items: flex-start; }
.avatar { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; font-size: 1.3rem; }
.guide-step { display: flex; gap: 16px; align-items: flex-start; } .guide-step .step-n { flex: none; margin-top: 4px; }
.guide-step h2 { margin-top: 0; }

/* ---- designer --------------------------------------------------------------------------------------------- */
.designer { padding-bottom: 120px; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 18px 0; }
.template { font: inherit; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius); cursor: pointer;
  background: var(--panel); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.template:hover { transform: translateY(-3px); border-color: var(--accent); }
.template span:last-child { color: var(--muted); font-size: .9rem; }
.template.synapse { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--panel)), var(--panel)); }
.tpl-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 800; font-size: 1.1rem; }
.saved-row { border-top: 1px solid var(--line); padding-top: 8px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.stat-row div { background: var(--panel-2); border-radius: 12px; padding: 10px; text-align: center; }
.stat-row strong { display: block; font-size: 1.35rem; } .stat-row span { font-size: .8rem; color: var(--muted); }
details.section > summary { cursor: pointer; list-style: none; }
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary h2 { display: inline; }
details.section > summary h2::before { content: '▸ '; color: var(--muted); font-size: .9em; }
details.section[open] > summary h2::before { content: '▾ '; }
details.section > summary p { margin: 4px 0 10px; }
details.step summary { list-style: none; align-items: center; }
details.step summary::-webkit-details-marker { display: none; }
.drag { cursor: grab; color: var(--muted); letter-spacing: -2px; user-select: none; }
.step-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--note); color: var(--accent); font-weight: 700; flex: none; }
.step-main { flex: 1; min-width: 0; }
.step-time { white-space: nowrap; }
details.step > .grid2 { margin-top: 12px; }
details.step.dragging { opacity: .4; }
details.step.drop-target { border-color: var(--accent); box-shadow: 0 -3px 0 var(--accent); }
.advanced { margin: 10px 0; border-top: 1px dashed var(--line); padding-top: 8px; }
.advanced > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .9rem; }
.step-actions { border-top: 1px solid var(--line); padding-top: 10px; }
.span-all { grid-column: 1 / -1; }
.qsection { border-left: 2px solid var(--line); padding-left: 10px; margin: 10px 0; }
.grid4 { display: grid; grid-template-columns: 1fr 1fr 1.4fr auto; gap: 10px 14px; align-items: end; }
.library { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.lib-card { font: inherit; text-align: left; display: grid; grid-template-columns: 32px 1fr; gap: 2px 10px; padding: 12px; border-radius: 12px; cursor: pointer;
  background: var(--panel); color: var(--text); border: 1px dashed var(--line); transition: border-color .15s, transform .15s; }
.lib-card:hover { border-color: var(--accent); border-style: solid; transform: translateY(-2px); }
.lib-icon { grid-row: span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--note); color: var(--accent); font-weight: 700; }
.lib-card span:last-child { font-size: .8rem; color: var(--muted); }
.save-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(960px, calc(100% - 32px)); z-index: 30;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(16, 24, 40, .18); }
.save-bar .row { margin: 0; }
.save-state { font-size: .9rem; color: var(--ok); font-weight: 600; } .save-state.unsaved { color: #b7791f; }
@media (max-width: 720px) { .stat-row { grid-template-columns: repeat(2, 1fr); } .grid4 { grid-template-columns: 1fr; } .save-bar { flex-direction: column; } }


/* ======================================================================================================= v2.2 */
/* navigation bar */
.topnav { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 18px; padding: 10px 28px;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topnav.overlay { position: fixed; transition: background .25s, color .25s; left: 0; right: 0; background: linear-gradient(rgba(5, 8, 24, .55), rgba(5, 8, 24, 0)); border-bottom: 0; color: #fff; backdrop-filter: none; }
.topnav.overlay.scrolled { background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--text); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topnav.overlay.scrolled .nav-link.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.topnav.overlay.scrolled .icon-btn { color: var(--text); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 800; box-shadow: 0 4px 14px rgba(59, 91, 253, .35); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; font-weight: 800; letter-spacing: .1em; }
.brand-text small { font-weight: 500; letter-spacing: .02em; font-size: .72rem; opacity: .7; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; color: inherit; text-decoration: none; font-weight: 600; font-size: .93rem; opacity: .82;
  transition: background .15s, opacity .15s; }
.nav-link:hover { opacity: 1; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.nav-link.active { opacity: 1; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.topnav.overlay .nav-link.active { color: #fff; background: rgba(255, 255, 255, .18); }
.topnav.overlay .nav-link:hover { background: rgba(255, 255, 255, .14); }
.nav-ic { font-size: .85rem; opacity: .8; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.topnav.overlay .icon-btn { color: #fff; border-color: rgba(255, 255, 255, .35); }
.nav-cta { padding: 8px 16px; border-radius: 999px; box-shadow: 0 6px 18px rgba(59, 91, 253, .35); }
.burger { display: none; }
@media (max-width: 900px) {
  .burger { display: inline-block; }
  .nav-links { display: none; position: absolute; top: 100%; right: 16px; flex-direction: column; padding: 8px; border-radius: 14px; background: var(--panel); color: var(--text);
    border: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .topnav.overlay .nav-links .nav-link.active { color: var(--accent); }
  .nav-cta { display: none; }
}

/* hero */
.hero { position: relative; min-height: 86vh; display: flex; align-items: center; background-size: cover; background-position: center right; color: #fff; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(1200px 600px at 15% 40%, rgba(5, 8, 24, .55), transparent), linear-gradient(100deg, rgba(5, 8, 24, .94) 0%, rgba(5, 8, 24, .78) 45%, rgba(5, 8, 24, .45) 100%); }
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: -1; background: linear-gradient(transparent, var(--bg)); }
.hero-inner { max-width: 1200px; margin: 0 auto; padding: 110px 28px 70px; width: 100%; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.7rem); line-height: 1.07; letter-spacing: -.025em; margin: .25em 0 .35em; }
.grad-text { background: linear-gradient(90deg, #8fa6ff, #c4a7ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.16rem; max-width: 600px; color: #d3daf0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 6px 14px; border-radius: 999px; font-size: .8rem; letter-spacing: .06em;
  text-transform: uppercase; color: #cfd8ff; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.hero-cta { margin: 28px 0 22px; gap: 12px; }
.hero-link { color: #cfd8ff; font-weight: 600; text-decoration: none; margin-left: 6px; } .hero-link:hover { color: #fff; }
.trust { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 8px 22px; color: #c3cbe6; font-size: .92rem; }
.trust li span { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 6px; background: rgba(255, 255, 255, .1); color: #a9b8ff; font-size: .75rem; }
.mock { background: rgba(14, 20, 36, .82); border: 1px solid rgba(255, 255, 255, .14); border-radius: 18px; overflow: hidden; backdrop-filter: blur(8px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55); transform: perspective(1200px) rotateY(-6deg) rotateX(2deg); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: rgba(255, 255, 255, .05); font-size: .78rem; color: #aab3cc; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; } .mock-bar i:nth-child(2) { background: #febc2e; } .mock-bar i:nth-child(3) { background: #28c840; }
.mock-bar span { margin-left: 10px; }
.mock-progress { display: flex; gap: 3px; padding: 0 14px 8px; background: rgba(255, 255, 255, .05); }
.mock-progress i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .15); }
.mock-progress i.done { background: #6d8bff; } .mock-progress i.now { background: #c4a7ff; }
.mock-body .preview { height: 190px; background: transparent; }
.mock-buttons { display: flex; justify-content: center; gap: 8px; padding: 0 16px 18px; }
.mock-buttons span { padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .2); font-size: .78rem; font-weight: 700; color: #dfe5f7; }
.mock-foot { display: flex; justify-content: space-between; padding: 10px 16px; font-size: .76rem; color: #8f9abb; border-top: 1px solid rgba(255, 255, 255, .08); }
@media (max-width: 960px) { .hero-inner { grid-template-columns: 1fr; } .mock { display: none; } .trust { grid-template-columns: 1fr; } }

/* partner logos */
.partner-strip { max-width: 1200px; margin: 0 auto; padding: 10px 28px 40px; text-align: center; }
.partner-strip > p { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }
.logo-tiles { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 22px; margin: 12px 0; }
.logo-tile { display: flex; align-items: center; justify-content: center; width: calc(200px * var(--logo-scale, 1)); height: calc(76px * var(--logo-scale, 1));
  border-radius: 12px; transition: transform .15s, background-color .15s; }
a.logo-tile:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.logo-tile img { display: block; width: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.card .logo-tiles { gap: 6px 10px; flex-wrap: nowrap; }

/* footer */
.site-footer { margin-top: 40px; background: #0b1020; color: #c5cbe0; padding: 48px 28px 22px; }
.site-footer a { color: #c5cbe0; text-decoration: none; } .site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .brand { color: #fff; }
.f-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 30px; }
.f-brand p { font-size: .9rem; color: #9aa4c4; max-width: 340px; }
.f-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.f-badges span { font-size: .74rem; padding: 3px 9px; border-radius: 999px; border: 1px solid #2a3350; color: #aab3d3; }
.f-col h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin: 6px 0 12px; }
.f-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .9rem; }
.f-col .muted { color: #8892b3; }
.f-funding { max-width: 1200px; margin: 34px auto 0; padding: 18px 0; display: flex; align-items: center; gap: 16px; border-top: 1px solid #1f2742; }
.f-funding img { height: 38px; }
.f-funding p { margin: 0; font-size: .84rem; color: #9aa4c4; }
.f-bottom { max-width: 1200px; margin: 0 auto; padding-top: 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .8rem; color: #7d87a8;
  border-top: 1px solid #1f2742; }
.f-cite { font-family: Georgia, serif; }
@media (max-width: 900px) { .f-grid { grid-template-columns: 1fr 1fr; } .f-brand { grid-column: 1 / -1; } }

/* session bar and controls */
.run-bar { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 16px;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.run-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.run-counter { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.run-title { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-weight: 800; font-size: .7rem; letter-spacing: .08em; border-radius: 6px; padding: 3px 8px; color: #111; background: #f59e0b; }
.badge.mode-test, .badge.mode-preview { background: #22d3ee; } .badge.mode-try { background: #a78bfa; color: #fff; }
.bar-right { display: flex; gap: 10px; align-items: center; }
.ctl-group { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.ctl { font: inherit; font-size: .88rem; font-weight: 600; padding: 7px 12px; background: transparent; color: var(--text); border: 0; border-left: 1px solid var(--line); cursor: pointer; }
.ctl:first-child { border-left: 0; }
.ctl:hover { background: var(--note); color: var(--accent); }
.ctl.strong { color: var(--accent); }
.ctl.exit:hover { color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.ctl.ghosty { opacity: .45; font-size: 1.1rem; padding: 4px 12px; } .ctl.ghosty:hover { opacity: 1; }
.pulse-btn { animation: glow 1.6s infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent); } }
.run-menu { position: absolute; right: 16px; top: calc(100% + 6px); z-index: 60; width: 300px; max-height: 70vh; overflow: auto; padding: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .25); }
.menu-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 10px 4px; }
.menu-item { font: inherit; display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); cursor: pointer; font-size: .9rem; }
.menu-item:hover { background: var(--note); }
.menu-item span { display: inline-grid; place-items: center; min-width: 24px; height: 22px; border-radius: 6px; background: var(--panel-2); font-size: .75rem; font-weight: 700; }
.menu-item.now { background: var(--note); color: var(--accent); font-weight: 700; }
.menu-item.danger { color: var(--warn); border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.run-progress { display: flex; gap: 3px; padding: 0 16px; height: 6px; background: transparent; }
.seg { position: relative; flex: 1; height: 4px; margin-top: 1px; padding: 0; border: 0; border-radius: 2px; background: var(--line); cursor: pointer; transition: height .12s; }
.seg:disabled { cursor: default; }
.seg.done { background: color-mix(in srgb, var(--accent) 65%, transparent); } .seg.now { background: var(--accent-2); }
.seg:not(:disabled):hover { height: 7px; }
.seg-tip { display: none; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .75rem; padding: 3px 8px; border-radius: 6px;
  background: var(--text); color: var(--bg); z-index: 70; }
.seg:not(:disabled):hover .seg-tip { display: block; }
.run.mode-live .run-progress .seg { height: 3px; }

/* author, citation, related outputs */
.section-head { max-width: 760px; margin-bottom: 18px; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--accent); margin: 0 0 4px; }
.cite-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }
.cite-grid .card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.card-label { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.author-card .author { gap: 16px; } .author-card h3 { margin: 0 0 6px; font-size: 1.25rem; }
.orcid-ic { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #a6ce39; color: #fff; font-size: .62rem; font-weight: 800; }
.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--panel-2); }
.tab { font: inherit; font-size: .8rem; font-weight: 600; border: 0; background: none; color: var(--muted); padding: 4px 12px; border-radius: 999px; cursor: pointer; }
.tab.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.cite-box { flex: 1; margin: 0; padding: 14px 16px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; line-height: 1.55; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.ref-card { margin: 0; display: flex; flex-direction: column; gap: 6px; border-top: 3px solid var(--accent); }
.ref-card .btn, .ref-card .doi-pending { align-self: flex-start; margin-top: auto; }
.ref-kind { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.ref-kind.protocol { color: #0ea5a4; } .ref-card:has(.ref-kind.protocol) { border-top-color: #0ea5a4; }
.ref-text { margin: 4px 0; font-family: Georgia, "Times New Roman", serif; font-size: 1rem; line-height: 1.5; }
.doi-pending { font-size: .82rem; padding: 4px 10px; border-radius: 999px; border: 1px dashed var(--line); color: var(--muted); }
@media (max-width: 860px) { .cite-grid { grid-template-columns: 1fr; } }

/* contact icons */
.socials { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.social { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  transition: transform .15s, background-color .15s, color .15s, border-color .15s; }
.social svg { width: 20px; height: 20px; }
.social:hover { transform: translateY(-2px); text-decoration: none; }
.social.email:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.social.linkedin:hover { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.social.orcid:hover { border-color: #a6ce39; }
.socials.sm .social { width: 34px; height: 34px; background: transparent; border-color: #2a3350; color: #c5cbe0; }
.socials.sm .social svg { width: 17px; height: 17px; }
.site-footer .social:hover { text-decoration: none; }

/* acronym line */
.acronym { margin: 14px 0 0; font-size: .98rem; letter-spacing: .01em; color: #aeb8d8; }
.acronym b { color: #fff; font-weight: 800; }
.f-full { font-size: .8rem !important; color: #8c97ba !important; font-style: italic; margin: 8px 0 0; }

/* logo / brand: SYNAPSE wordmark, tagline below */
.brand { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { display: none; }
.brand-text { display: inline-flex; flex-direction: column; line-height: 1; letter-spacing: 0; }
.brand-word { font-size: 1.9rem; font-weight: 900; letter-spacing: .04em; line-height: .9;
  background: linear-gradient(95deg, #3b5bfd 0%, #6d5cf6 55%, #a855f7 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: filter .2s; }
.brand:hover .brand-word { filter: brightness(1.15) saturate(1.2); }
.topnav.overlay:not(.scrolled) .brand-word, body[data-theme="dark"] .brand-word, .site-footer .brand-word {
  background-image: linear-gradient(95deg, #9db0ff 0%, #b9a4ff 55%, #d8b4fe 100%); }
.brand-tag { display: block; width: 100%; margin-top: 5px; font-size: .6rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
  opacity: .7; text-align: justify; text-align-last: justify; white-space: nowrap; letter-spacing: .2em; }
.site-footer .brand-word { font-size: 1.7rem; }
.site-footer .brand-tag { letter-spacing: .1em; }
.site-footer .brand-word { font-size: 1.45rem; }

/* citation card */
.cite-card .row { margin: 0; }
.doi-badge { display: inline-flex; border-radius: 6px; overflow: hidden; font-size: .78rem; font-weight: 600; text-decoration: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.doi-badge span:first-child { background: #555; color: #fff; padding: 3px 7px; }
.doi-badge span:last-child { background: #1682d4; color: #fff; padding: 3px 8px; }
.doi-badge:hover { filter: brightness(1.1); }
.cite-tools a { color: var(--muted); text-decoration: none; } .cite-tools a:hover { color: var(--accent); }
.cite-frame { position: relative; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.cite-text { margin: 0; padding: 16px 56px 16px 16px; white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .84rem; line-height: 1.6; height: 196px; overflow-y: auto; overscroll-behavior: contain; user-select: all;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.cite-text::-webkit-scrollbar { width: 8px; } .cite-text::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.cite-frame::after { content: ''; position: absolute; left: 0; right: 12px; bottom: 0; height: 22px; pointer-events: none;
  background: linear-gradient(transparent, var(--panel-2)); }
.copy-btn { position: absolute; top: 10px; right: 14px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted); transition: color .15s, border-color .15s, background .15s; }
.copy-btn svg { width: 18px; height: 18px; }
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.done { color: #fff; background: var(--ok); border-color: var(--ok); }
.copy-tip { position: absolute; top: 14px; right: 56px; z-index: 2; font-size: .75rem; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--text); color: var(--bg);
  opacity: 0; transform: translateX(6px); transition: opacity .15s, transform .15s; pointer-events: none; }
.copy-tip.show { opacity: 1; transform: none; }
.cite-foot { margin: 0; }

.cite-card.kind-dataset { border-top: 3px solid var(--accent); } .cite-card.kind-protocol { border-top: 3px solid #0ea5a4; }
.cite-card.kind-software { border-top: 3px solid var(--accent-2); }

.hero h1 .grad-text { white-space: nowrap; }

/* three citation cards in a row; author frame in the footer */
.cite-grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .cite-grid.three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .cite-grid.three { grid-template-columns: 1fr; } }
.f-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr 1.35fr; }
.f-author-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid #222b45; border-radius: 14px; background: #10162b; }
.f-author-head { display: flex; gap: 12px; align-items: center; }
.f-author-head > div:last-child { display: flex; flex-direction: column; gap: 2px; font-size: .84rem; }
.f-author-card .socials { margin: 0; padding-top: 10px; border-top: 1px solid #222b45; }
.f-author-card strong { color: #fff; font-size: .95rem; }
.avatar.sm { width: 42px; height: 42px; font-size: .95rem; }
.social.telegram:hover { background: #229ed9; border-color: #229ed9; color: #fff; }

/* case study section */
.study-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: stretch; }
.study-card { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.study-card h3 { margin: 2px 0 0; font-size: 1.25rem; }
.study-card .facts { margin-top: 10px; }
.study-card .tl-detail { flex: none; }
.study-card > .btn { align-self: flex-start; margin-top: auto; }
.study-links { margin-top: 12px; }
.domains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.domain { padding: 22px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.domain h3 { margin: 10px 0 6px; font-size: 1.08rem; }
.domain p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.domain-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--note); color: var(--accent); font-size: 1.2rem; font-weight: 700; }
@media (max-width: 960px) { .study-grid, .domains { grid-template-columns: 1fr; } }
