/* Additions for the web-app version: accounts, IP map, simple pages. Uses tokens from styles.css. */

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent-magenta); color: #fff; padding: .6rem 1rem; z-index: 3000; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent-magenta-bright); outline-offset: 2px; }

/* header account controls */
.auth-slot { display: flex; align-items: center; }
.nav-signin { padding: .55rem 1rem; font-size: .85rem; cursor: pointer; }
.user-menu { position: relative; }
.user-chip { display: flex; align-items: center; gap: .5rem; background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-main); padding: .3rem .8rem .3rem .3rem; border-radius: var(--radius-full); cursor: pointer; font: 600 .85rem var(--font-body); }
.user-chip:hover { border-color: var(--border-glow); }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--gradient-hero); color: #fff; display: grid; place-items: center; font-size: .72rem; font-weight: 700; }
.user-dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--bg-glass); backdrop-filter: blur(16px); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: .5rem; z-index: 1200; }
.user-dropdown[hidden] { display: none; }
.user-dd-head { display: flex; flex-direction: column; padding: .6rem .75rem; border-bottom: 1px solid var(--border-color); margin-bottom: .35rem; font-size: .85rem; }
.user-dd-head span { color: var(--text-muted); font-size: .75rem; word-break: break-all; }
.user-dropdown a, .user-dropdown button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text-main); padding: .55rem .75rem; border-radius: 8px; font: 500 .88rem var(--font-body); text-decoration: none; cursor: pointer; }
.user-dropdown a:hover, .user-dropdown button:hover { background: rgba(233, 30, 99, .12); }
@media (max-width: 640px) { .user-chip-name { display: none; } .user-chip { padding-right: .3rem; } }

/* auth modal */
.auth-modal-content { max-width: 460px; }
.auth-title { font-family: var(--font-heading); font-size: 1.7rem; margin: .35rem 0 1.1rem; }
.auth-tabs { margin-bottom: 1.1rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-form[hidden] { display: none; }
.auth-submit { width: 100%; justify-content: center; padding: .9rem; cursor: pointer; }
.auth-note { color: var(--text-muted); font-size: .82rem; }
.auth-error { background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .4); color: var(--text-main); padding: .75rem 1rem; border-radius: var(--radius-md); font-size: .88rem; margin-bottom: 1rem; }
.auth-error.ok { background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .4); }
.auth-error[hidden] { display: none; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--bg-glass); border: 1px solid var(--border-glow); color: var(--text-main); padding: .8rem 1.2rem; border-radius: var(--radius-md); box-shadow: var(--shadow-glow); z-index: 4000; opacity: 0; transition: .25s; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* simple pages (legal, account, 404) */
.page-simple .page-section { padding-top: 9rem; min-height: 70vh; }
.custom-body { padding: 2rem; line-height: 1.8; color: var(--text-muted); max-width: 900px; margin: 0 auto; }
.custom-body h3, .custom-body h4 { color: var(--text-main); font-family: var(--font-heading); margin: 1.4rem 0 .5rem; }
.custom-body p, .custom-body ul, .custom-body ol { margin-bottom: 1rem; }
.custom-body ul, .custom-body ol { padding-left: 1.4rem; }
.custom-body a { color: var(--accent-magenta-bright); }
.custom-body table { border-collapse: collapse; width: 100%; } .custom-body td, .custom-body th { border: 1px solid var(--border-color); padding: .5rem .75rem; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; max-width: 1000px; margin: 0 auto; }
.acct-card { padding: 1.75rem; }
.acct-card h3 { font-family: var(--font-heading); margin-bottom: 1.1rem; }
.acct-msg { font-size: .85rem; color: var(--accent-emerald); min-height: 1.2em; }
.acct-msg.err { color: var(--accent-magenta-bright); }
.acct-list { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.acct-list li { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; border-bottom: 1px solid var(--border-color); padding-bottom: .5rem; }
.acct-list span { color: var(--text-muted); }

/* IP map */
.ip-map-card { padding: 1rem; margin-bottom: 2.5rem; color: var(--accent-violet); }
.ip-map { width: 100%; height: auto; display: block; }
.ip-land { fill: rgba(142, 36, 170, .12); stroke: rgba(233, 30, 99, .35); stroke-width: 1.2; }
.ip-pin { color: var(--accent-cyan); outline: none; cursor: default; }
.ip-pin-magenta { color: var(--accent-magenta); } .ip-pin-emerald { color: var(--accent-emerald); } .ip-pin-violet { color: var(--accent-violet-bright); } .ip-pin-cyan { color: var(--accent-cyan); }
.ip-pin-dot { fill: currentColor; }
.ip-pin-pulse { fill: currentColor; opacity: .35; transform-box: fill-box; transform-origin: center; animation: ippulse 2.2s ease-out infinite; }
.ip-pin-name { fill: var(--text-main); font: 700 14px var(--font-heading); }
.ip-pin-badge { fill: var(--text-muted); font: 500 11px var(--font-body); }
.ip-pin:focus-visible .ip-pin-dot, .ip-pin:hover .ip-pin-dot { stroke: var(--text-main); stroke-width: 2; }
@keyframes ippulse { 0% { transform: scale(.6); opacity: .6; } 100% { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ip-pin-pulse { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 640px) { .ip-pin-name { font-size: 22px; } .ip-pin-badge { font-size: 18px; } }

/* Header: the extra sign-in control needs the compact menu to kick in earlier than the base 768px */
@media (max-width: 1400px) { .nav-cta { display: none; } }
@media (max-width: 1180px) {
  .nav-menu { display: none; position: absolute; top: 100%; left: 0; width: 100%; flex-direction: column; align-items: flex-start; background: var(--bg-glass); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); padding: 1.5rem 2rem; border-bottom: 1px solid var(--border-color); gap: .85rem; }
  .nav-menu.open { display: flex; }
  .mobile-toggle-btn { display: flex; }
}
[hidden] { display: none !important; }

@media (max-width: 560px) {
  .nav-container { padding: .6rem 1rem; gap: .5rem; }
  .brand-badge { display: none; }
  .brand-name { font-size: 1rem; }
  .brand-logo-img { height: 32px; }
  .nav-actions { gap: .4rem; }
  .nav-signin { padding: .4rem .7rem; font-size: .8rem; }
}

/* ═══ Light-only polish: logo + CDK4/6/9 hero visual ═══ */
.theme-toggle-btn { display: none !important; }
.brand-logo-img { height: 58px; width: auto; filter: none; }
.brand-logo-link:hover .brand-logo-img { transform: scale(1.04); }
.brand-name { font-size: 1.25rem; }
.brand-badge { color: var(--text-muted); }
footer .brand-logo-img { height: 72px; }

.hero-trio { padding: 1.5rem; gap: 1rem; background: linear-gradient(180deg, #ffffff 0%, #f6f1fd 100%); box-shadow: 0 24px 60px -20px rgba(107, 33, 168, .28); }
.trio-stage { position: relative; }
.trio-svg { width: 100%; height: auto; display: block; overflow: visible; }
.trio-orbit { fill: none; stroke: #6b21a8; stroke-opacity: .22; stroke-width: 1.5; stroke-dasharray: 3 7; transform-origin: 260px 215px; animation: trio-spin 60s linear infinite; }
.trio-orbit.o2 { animation-direction: reverse; animation-duration: 40s; }
.trio-link { fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 8 8; animation: trio-flow 1.4s linear infinite; transition: opacity .3s; }
.trio-link.l4 { stroke: #b5124d; } .trio-link.l6 { stroke: #6b21a8; } .trio-link.l9 { stroke: #0369a1; }
.trio-pulse { fill: none; stroke: #6b21a8; stroke-width: 2; transform-origin: 260px 215px; animation: trio-pulse 2.8s ease-out infinite; }
.trio-node circle { fill: #fff; stroke-width: 3.5; transition: opacity .3s, filter .3s; }
.trio-node text { text-anchor: middle; font-family: var(--font-heading); }
.trio-node .nt { font-size: 17px; font-weight: 800; }
.trio-node .ns { font-size: 12px; font-weight: 700; fill: #1e293b; }
.n4 circle { stroke: #b5124d; } .n4 .nt { fill: #b5124d; }
.n6 circle { stroke: #6b21a8; } .n6 .nt { fill: #6b21a8; }
.n9 circle { stroke: #0369a1; } .n9 .nt { fill: #0369a1; }
.trio-node, .trio-link, .tg { transition: opacity .3s; }
.tg { text-anchor: middle; font: 700 13px var(--font-body); }
.t4 { fill: #b5124d; } .t6 { fill: #6b21a8; } .t9 { fill: #0369a1; }
.trio-node circle { filter: drop-shadow(0 6px 10px rgba(20, 5, 43, .12)); }

.trio-stage[data-mode="CDK4"] :is(.n6, .l6, .t6, .n9, .l9, .t9),
.trio-stage[data-mode="CDK6"] :is(.n4, .l4, .t4, .n9, .l9, .t9),
.trio-stage[data-mode="CDK9"] :is(.n4, .l4, .t4, .n6, .l6, .t6) { opacity: .22; }

.trio-name { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; gap: 2px; }
.trio-name .mol-name { font: 800 1.35rem var(--font-heading); color: var(--text-main); }
.trio-name .mol-sub { font-size: .78rem; color: var(--text-muted); font-weight: 500; max-width: 12ch; line-height: 1.3; }

@keyframes trio-spin { to { transform: rotate(360deg); } }
@keyframes trio-flow { to { stroke-dashoffset: -16; } }
@keyframes trio-pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .trio-orbit, .trio-link, .trio-pulse { animation: none; } }
@media (max-width: 980px) { .hero-mol-card { display: block !important; } }
.tg-l { text-anchor: start; }
.trio-stage { display: flex; flex-direction: column-reverse; }
.trio-name { position: static; flex-direction: row; align-items: baseline; gap: .6rem; margin-bottom: .25rem; }
.trio-name .mol-sub { max-width: none; }

/* ── SPV374 panel: headings, per-target annotations, evidence cards, notes (v5) ── */
.trio-name { flex-direction: column; align-items: flex-start; gap: .35rem; margin-bottom: .5rem; }
.trio-name .mol-title { font: 800 1.3rem/1.25 var(--font-heading); color: var(--text-main); margin: 0; }
.trio-name .mol-desc { font-size: .9rem; line-height: 1.45; color: #334155; margin: 0; max-width: none; }
.trio-notes { min-height: 4.6rem; }
.trio-note { display: none; margin: .25rem 0 0; padding: .75rem .9rem; border-radius: 10px; font-size: .9rem; line-height: 1.45; color: #1e293b; background: rgba(107, 33, 168, .06); border-left: 4px solid #6b21a8; }
.trio-note strong { display: block; font: 800 .85rem var(--font-heading); margin-bottom: .15rem; }
.trio-note.f4 { border-left-color: #b5124d; } .trio-note.f4 strong { color: #b5124d; }
.trio-note.f6 { border-left-color: #6b21a8; } .trio-note.f6 strong { color: #6b21a8; }
.trio-note.f9 { border-left-color: #0369a1; } .trio-note.f9 strong { color: #0369a1; }
.hero-trio[data-mode="ALL"] .trio-note.fALL,
.hero-trio[data-mode="CDK4"] .trio-note.f4,
.hero-trio[data-mode="CDK6"] .trio-note.f6,
.hero-trio[data-mode="CDK9"] .trio-note.f9 { display: block; }
.mol-card-title { font-size: .9rem; }
.dock-btn { font-size: .8rem; padding: 6px 13px; min-height: 32px; }
.mol-features { grid-template-columns: 1fr 1fr; }
.mol-feature { align-items: flex-start; font-size: .88rem; line-height: 1.4; color: #334155; }
.mol-feature .mol-dot { margin-top: .4rem; }
.mol-feature-body { display: flex; flex-direction: column; gap: .1rem; }
.mol-feature-body strong { color: #1e293b; font-size: .9rem; }
.metric-val { font-size: 1.1rem; }
.metric-lab { font-size: .8rem; color: #475569; }
.metric-ev { font-size: .72rem; color: #475569; margin-top: .15rem; }
.mol-stereo { margin: .25rem 0 0; font-size: .9rem; }
.mol-stereo a { color: #6b21a8; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.mol-caption { margin: .25rem 0 0; font-size: .82rem; line-height: 1.5; color: #475569; }
.mol-disclaimer { margin: .25rem 0 0; padding: .6rem .8rem; border-radius: 8px; font-size: .85rem; font-weight: 700; line-height: 1.4; color: #7f1d1d; background: #fef2f2; border: 1px solid #fecaca; }
@media (max-width: 640px) {
  .mol-features { grid-template-columns: 1fr; }
  .mol-metrics { grid-template-columns: 1fr; }
  .metric { flex-direction: row; justify-content: flex-start; gap: .75rem; text-align: left; flex-wrap: wrap; }
  .tg { display: none; } /* full annotations are shown in the note below the diagram */
  .trio-node .ns { font-size: 14px; } .trio-node .nt { font-size: 19px; }
  .trio-name .mol-title { font-size: 1.15rem; }
}

/* ── MDA-MB-231 data cards (v6): value → descriptor → small preclinical qualification ── */
.data-hl-val { font-size: 1.25rem; line-height: 1.25; overflow-wrap: anywhere; }
.data-hl-label { font-size: .95rem; }
.data-hl-sub { font-size: .85rem; color: #475569; line-height: 1.4; }
.ev-badge.ev-qual { white-space: normal; text-align: center; font-size: .75rem; line-height: 1.3; border-radius: 10px; padding: .25rem .6rem; color: #6b21a8; background: #f6f1fd; border-color: #d8c3f2; }
.data-highlight-card { display: flex; flex-direction: column; align-items: center; }
.hl-caption { max-width: 70ch; margin: 1.25rem auto 0; text-align: center; font-size: .85rem; line-height: 1.55; color: #475569; }

/* Panel summary lines (v8) */
.mol-summary { list-style: none; margin: .35rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
.mol-summary li { font-size: .82rem; font-weight: 700; color: #6b21a8; background: #f6f1fd; border: 1px solid #d8c3f2; border-radius: 999px; padding: .2rem .65rem; line-height: 1.3; }
