/* Navigation inspired by the reference, using BioIDz's existing theme. */
.nav-icon { width:24px; height:24px; flex-shrink:0; object-fit:contain; }
.icon-button { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border:1px solid var(--line-strong); border-radius:12px; background:var(--surface); color:var(--ink); cursor:pointer; }
.nav-links { display:grid; gap:6px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.nav-link { display:flex; align-items:center; gap:12px; min-height:48px; padding:12px; border:0; border-radius:12px; background:transparent; color:var(--ink-soft); font:500 13px 'IBM Plex Sans',sans-serif; cursor:pointer; text-align:left; }
.nav-link:hover { background:var(--surface); color:var(--ink); }
.nav-link[aria-current="page"] { background:var(--brand-tint); color:var(--brand); }
.search-field { display:flex; align-items:center; gap:10px; background:var(--surface); border:1px solid var(--line-strong); border-radius:12px; padding:0 14px; margin:0 0 18px; color:var(--ink-soft); }
.search-field input { width:100%; min-width:0; min-height:48px; border:0; background:transparent; color:var(--ink); font:16px 'IBM Plex Sans',sans-serif; }
.search-field:focus-within { border-color:var(--brand); }
.search-field input:focus { outline:none; }
.search-empty { color:var(--ink-soft); font-size:14px; padding:16px 0; }
.nav-fab { position:fixed; right:max(24px,env(safe-area-inset-right)); bottom:28px; z-index:20; display:flex; align-items:center; justify-content:center; gap:10px; min-height:56px; padding:0 22px; border:1px solid var(--brand-deep); border-radius:18px; background:var(--brand); color:var(--on-brand); box-shadow:0 8px 28px rgba(0,0,0,.25); font:600 14px 'IBM Plex Sans',sans-serif; cursor:pointer; }
.mobile-tabs { display:none; }
.nav-dialog { background:var(--surface); color:var(--ink); border:1px solid var(--line-strong); box-shadow:0 20px 80px rgba(0,0,0,.35); padding:24px; border-radius:20px; width:min(440px,calc(100% - 32px)); max-height:85dvh; overflow:auto; }
.nav-dialog::backdrop { background:rgba(0,0,0,.55); backdrop-filter:blur(4px); }
.dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.dialog-heading h2 { margin:0; font-size:22px; }
.nav-dialog .nav-link { width:100%; }
.nav-dialog p { font-size:14px; line-height:1.7; color:var(--ink-soft); }
.nav-dialog .muted { font-size:12px; }
.drawer-brand { color:var(--brand); font:600 28px 'Fraunces',serif; }
.sheet-handle { display:none; }
.nav-live { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media (max-width:860px) {
  .top-actions { display:none; }
  .rail > .nav-links { display:none; }
  .layout { padding-bottom:150px; }
  .mobile-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); position:fixed; z-index:25; bottom:0; left:0; right:0; padding:8px max(10px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left)); background:var(--surface); border-top:1px solid var(--line-strong); box-shadow:0 -4px 24px rgba(0,0,0,.12); }
  .mobile-tabs .nav-link { display:flex; flex-direction:column; gap:5px; font-size:11px; padding:8px 4px; text-align:center; justify-content:center; min-height:54px; }
  .nav-fab { bottom:calc(90px + env(safe-area-inset-bottom)); right:18px; width:56px; height:56px; padding:0; border-radius:50%; }
  .nav-fab span { display:none; }
  .nav-fab .nav-icon { width:26px; height:26px; }
  #quickActions { margin:auto auto 0; width:100%; max-width:600px; border-radius:24px 24px 0 0; padding:12px 20px calc(24px + env(safe-area-inset-bottom)); border-bottom:0; }
  .sheet-handle { display:block; width:36px; height:4px; margin:0 auto 16px; background:var(--line-strong); border-radius:99px; }
  footer { padding-bottom:calc(110px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion:no-preference) {
  .nav-dialog[open] { animation:nav-appear .18s ease-out; }
  @keyframes nav-appear { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
}
.group-card[hidden] { display:none; }
.nav-link:disabled { opacity:.45; cursor:not-allowed; }

@media (max-width:860px) { .top-inner { padding-top:calc(24px + env(safe-area-inset-top)); } }
/* Home screen */
.mobile-tabs { grid-template-columns:repeat(4,minmax(0,1fr)); }
body[data-view="home"] .rail-step, body[data-view="home"] .rail-group-summary,
body[data-view="log"] .rail-step, body[data-view="log"] .rail-group-summary { display:none; }
body[data-view="home"] .nav-fab { display:none; }
#homeView[hidden], #identificationView[hidden], #sessionLogSection[hidden], .home-resume[hidden] { display:none; }
#homeView { margin-bottom:0; }
.home-hero { position:relative; overflow:hidden; border:1px solid var(--pos-line); border-radius:22px; padding:30px; background:radial-gradient(ellipse at top right,var(--brand-tint),transparent 70%),var(--surface); }
.home-eyebrow { display:flex; align-items:center; gap:8px; color:var(--brand); font:500 10px 'JetBrains Mono',monospace; letter-spacing:.08em; line-height:1.5; }
.home-status-dot { width:6px; height:6px; flex-shrink:0; background:var(--brand); border-radius:50%; box-shadow:0 0 0 4px var(--brand-tint); }
.home-hero-content { display:grid; grid-template-columns:1.45fr 1fr; align-items:center; gap:16px; margin:22px 0; }
.home-hero h2 { font-size:clamp(30px,3.5vw,46px); line-height:1.12; margin:0 0 16px; font-weight:600; }
.home-hero-content p { font-size:14px; color:var(--ink-soft); line-height:1.7; margin:0; max-width:390px; }
.home-specimen { position:relative; display:grid; place-items:center; height:190px; isolation:isolate; }
.specimen-orbit { position:absolute; width:170px; height:170px; border:1px solid var(--pos-line); border-radius:50%; background:radial-gradient(circle,var(--brand-tint),transparent 70%); }
.specimen-orbit::before, .specimen-orbit::after { content:''; position:absolute; inset:18px; border:1px dashed var(--line-strong); border-radius:50%; }
.specimen-orbit::after { inset:-14px; border-style:solid; opacity:.4; }
.home-specimen img { width:150px; height:150px; object-fit:contain; z-index:1; transform:rotate(-12deg); }
.specimen-label { position:absolute; bottom:-4px; color:var(--ink-soft); font:9px 'JetBrains Mono',monospace; letter-spacing:.08em; }
.home-start { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; min-height:52px; }
.home-start > span:last-child { margin-left:auto; }
.home-resume { display:block; margin:14px auto 0; background:none; color:var(--brand); border:0; min-height:44px; font:500 13px 'IBM Plex Sans',sans-serif; cursor:pointer; }
.home-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; padding:22px 0; margin-bottom:6px; border-bottom:1px solid var(--line-strong); }
.home-stats > div { display:grid; gap:6px; text-align:center; padding:0 8px; border-right:1px solid var(--line-strong); }
.home-stats > div:last-child { border:0; }
.home-stats strong { font:600 25px 'Fraunces',serif; }
.home-stats span { color:var(--ink-soft); font-size:11px; line-height:1.5; }
.home-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:26px 0 14px; }
.home-section-head h3 { margin:0; font-size:19px; }
.home-section-head > span { color:var(--ink-soft); font:9px 'JetBrains Mono',monospace; letter-spacing:.05em; }
.home-shortcuts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.home-shortcut { display:flex; align-items:center; gap:12px; padding:18px; background:var(--surface); border:1px solid var(--line-strong); border-radius:16px; text-align:left; color:var(--ink); cursor:pointer; }
.home-shortcut:hover { border-color:var(--brand); }
.home-shortcut-icon { display:grid; place-items:center; width:40px; height:40px; flex-shrink:0; color:var(--brand); background:var(--brand-tint); border-radius:12px; }
.home-shortcut strong { display:block; font:600 13px 'IBM Plex Sans',sans-serif; line-height:1.5; }
.home-shortcut small { display:block; color:var(--ink-soft); font:11px 'IBM Plex Sans',sans-serif; line-height:1.6; margin-top:4px; }
.home-arrow { margin-left:auto; color:var(--ink-soft); }
.home-text-button { min-height:44px; padding:0 4px; border:0; background:none; color:var(--brand); font:500 12px 'IBM Plex Sans',sans-serif; cursor:pointer; }
.home-guide { list-style:none; padding:18px; margin:0; background:var(--surface); border:1px solid var(--line); border-radius:16px; display:grid; gap:18px; }
.home-guide li { display:flex; gap:14px; align-items:flex-start; }
.home-guide li > span { display:grid; place-items:center; width:32px; height:32px; border-radius:10px; flex-shrink:0; background:var(--brand-tint); color:var(--brand); font:11px 'JetBrains Mono',monospace; }
.home-guide strong { font-size:13px; }
.home-guide p { margin:5px 0 0; color:var(--ink-soft); font-size:12px; line-height:1.6; }
.home-recent { border:1px solid var(--line); background:var(--surface); border-radius:16px; overflow:hidden; }
.home-empty { margin:0; padding:20px; color:var(--ink-soft); font-size:13px; line-height:1.7; }
.home-recent-row { display:flex; width:100%; align-items:center; gap:12px; justify-content:space-between; background:transparent; border:0; border-bottom:1px solid var(--line); color:var(--ink); padding:16px; text-align:left; cursor:pointer; }
.home-recent-row:last-child { border:0; }
.home-recent-row strong { display:block; font:600 14px 'Fraunces',serif; }
.home-recent-row small { display:block; color:var(--ink-soft); font-size:11px; margin-top:6px; line-height:1.5; }
.home-recent-match { color:var(--brand); font:11px 'JetBrains Mono',monospace; flex-shrink:0; }
.home-note { display:flex; align-items:flex-start; gap:10px; margin-top:22px; color:var(--ink-soft); }
.home-note p { margin:0; font-size:11px; line-height:1.7; }
@media (max-width:860px) {
  body[data-view="home"] .rail, body[data-view="log"] .rail { display:none; }
  body[data-view="home"] .layout, body[data-view="log"] .layout { padding-top:20px; }
}
@media (max-width:600px) {
  .home-hero { padding:22px; border-radius:18px; }
  .home-hero-content { grid-template-columns:minmax(0,1fr); margin:20px 0; }
  .home-specimen { display:none; }
  .home-hero h2 { font-size:34px; }
  .home-hero-content p { font-size:13px; }
  .home-eyebrow { font-size:9px; }
  .home-shortcuts { grid-template-columns:1fr; gap:10px; }
  .home-shortcut { padding:16px; }
  .home-stats span { font-size:10px; }
  .home-recent-row { align-items:flex-start; }
}

.home-start { font-family:'IBM Plex Sans',sans-serif; }
.home-arrow .nav-icon { width:16px; height:16px; }
html[data-theme="light"] header.top { background:var(--page-bg-overlay),var(--page-bg-image) center/cover no-repeat,var(--header-bg); }

/* Object illustrations have room for detail while small directional controls stay crisp. */
.home-shortcut-icon .nav-icon { width:32px; height:32px; }
.home-note .nav-icon { width:24px; height:24px; }
[data-theme="dark"] .nav-icon { filter:brightness(1.12); }
