:root {
  --ink: #20201e;
  --muted: #77746e;
  --canvas: #f7f7f5;
  --surface: #ffffff;
  --surface-soft: #f1f2ee;
  --line: #e4e6e1;
  --green: #2d8761;
  --green-soft: #e6f3eb;
  --blue-soft: #eaf1fc;
  --orange-soft: #fff0e3;
  --red-soft: #fce9e7;
  --shadow: 0 1px 2px rgba(23, 31, 25, .04), 0 12px 30px rgba(23, 31, 25, .04);
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button { font: inherit; }
button:focus-visible { outline: 3px solid rgba(59, 117, 200, .35); outline-offset: 2px; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 270px; flex: 0 0 270px; min-height: 100vh; padding: 28px 18px 20px; display: flex; flex-direction: column; background: #fbfcfa; border-right: 1px solid var(--line); }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 10px; margin-bottom: 26px; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--ink); color: white; font-weight: 800; letter-spacing: -.06em; }
.eyebrow { margin: 0 0 3px; color: var(--green); font-size: 10px; line-height: 1; font-weight: 800; letter-spacing: .15em; }
.brand h1 { margin: 0; font-size: 17px; letter-spacing: -.03em; }
.hub-state { display: flex; align-items: flex-start; gap: 10px; margin: 0 4px 28px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.hub-state strong, .hub-state span { display: block; }
.hub-state strong { font-size: 12px; }
.hub-state span:not(.status-dot) { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.status-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; margin-top: 4px; border-radius: 50%; background: #bd6a2f; }
.status-dot--live { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.nav-group { margin-bottom: 24px; }
.nav-label { margin: 0 12px 8px; color: #9a9892; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; margin: 2px 0; padding: 10px 12px; border: 0; border-radius: 8px; color: #686761; background: transparent; text-align: left; font-size: 13px; cursor: pointer; }
.nav-item:hover { color: var(--ink); background: #f0f2ee; }
.nav-item.is-active { color: var(--ink); background: #e8eee8; font-weight: 700; }
.nav-icon { width: 17px; color: var(--green); text-align: center; font-size: 17px; line-height: 1; }
.sidebar-footer { margin-top: auto; }
.actor-card { display: flex; align-items: center; gap: 9px; padding: 11px 10px; border-top: 1px solid var(--line); }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px; border-radius: 50%; color: white; background: var(--ink); border: 0; font-size: 12px; font-weight: 800; }
.actor-card strong, .actor-card span { display: block; }
.actor-card strong { font-size: 12px; }
.actor-card span:not(.more) { margin-top: 2px; color: var(--muted); font-size: 11px; }
.actor-card .more { margin-left: auto; color: #aaa9a4; letter-spacing: 2px; }
.footer-note { margin: 8px 10px 0; color: #9a9892; font-size: 10px; line-height: 1.45; }

.main-content { width: 100%; min-width: 0; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 5vw; background: rgba(255,255,255,.72); border-bottom: 1px solid var(--line); }
.breadcrumbs { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; }
.breadcrumbs strong { color: var(--ink); }
.crumb-separator { color: #b5b3ad; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { width: 34px; height: 34px; position: relative; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: #6e6d68; background: var(--surface); cursor: pointer; }
.icon-button:hover { color: var(--ink); border-color: #c7cbc4; }
.notification-dot { position: absolute; top: 6px; right: 7px; width: 5px; height: 5px; border-radius: 50%; background: #bd6a2f; }
.avatar--small { cursor: pointer; }
.content-wrap { width: min(1180px, calc(100% - 64px)); margin: 0 auto; padding: 42px 0 72px; }

.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-intro h2 { margin: 0 0 8px; max-width: 700px; font-size: clamp(27px, 4vw, 42px); line-height: 1.08; letter-spacing: -.055em; }
.page-intro p { max-width: 620px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.intro-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.button { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 15px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); font-size: 12px; font-weight: 700; cursor: pointer; }
.button:hover { border-color: #c5cac2; transform: translateY(-1px); }
.button--primary { color: white; border-color: var(--ink); background: var(--ink); }
.button--primary:hover { background: #3b3b38; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.metric-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.metric-card .metric-label { margin: 0 0 14px; color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-value { margin: 0; font-size: 28px; line-height: 1; letter-spacing: -.05em; }
.metric-foot { margin: 9px 0 0; color: var(--muted); font-size: 11px; }
.metric-foot strong { color: var(--green); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr); gap: 18px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 20px 16px; border-bottom: 1px solid var(--line); }
.panel-header h3 { margin: 0; font-size: 15px; letter-spacing: -.02em; }
.panel-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.link-button { padding: 0; border: 0; color: var(--green); background: none; font-size: 11px; font-weight: 800; cursor: pointer; }
.request-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 20px; border-bottom: 1px solid #eff0ed; }
.request-row:last-child { border-bottom: 0; }
.request-title { margin: 0 0 7px; font-size: 13px; font-weight: 700; }
.request-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); font-size: 11px; }
.meta-separator { color: #c1c1bc; }
.badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.badge--green { color: #24714e; background: var(--green-soft); }
.badge--blue { color: #2f63ad; background: var(--blue-soft); }
.badge--orange { color: #9f591f; background: var(--orange-soft); }
.badge--red { color: #a43f3a; background: var(--red-soft); }
.badge--neutral { color: #686762; background: #f0f1ee; }

.report-card { padding: 20px; }
.report-card--featured { margin: 18px; padding: 17px; border: 1px solid #dcece0; border-radius: 10px; background: #f6fbf7; }
.report-kicker { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.report-kicker h4 { margin: 0; font-size: 13px; }
.report-card dl { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px 12px; margin: 0; font-size: 11px; }
.report-card dt { color: var(--muted); }
.report-card dd { margin: 0; color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }
.report-card dd.muted { color: var(--muted); font-weight: 500; }
.report-card ul { margin: 0; padding-left: 17px; color: #484843; }
.report-card li + li { margin-top: 5px; }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 34px 0 14px; }
.section-heading h3 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.genome-card { display: flex; flex-direction: column; min-height: 184px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform .18s ease, box-shadow .18s ease; }
.genome-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.genome-card .card-top { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.genome-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; font-size: 19px; background: var(--surface-soft); }
.genome-card h4 { margin: 17px 0 6px; font-size: 14px; }
.genome-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.48; }
.card-link { margin-top: auto; padding-top: 17px; color: var(--green); font-size: 11px; font-weight: 800; background: none; border: 0; text-align: left; cursor: pointer; }

.timeline { padding: 4px 20px 20px; }
.timeline-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid #eff0ed; }
.timeline-item:last-child { border-bottom: 0; }
.timeline-marker { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.timeline-item strong { display: block; font-size: 12px; }
.timeline-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.timeline-time { white-space: nowrap; color: #a19f99; font-size: 10px; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.detail-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.detail-hero .genome-icon { width: 48px; height: 48px; font-size: 24px; }
.detail-hero h2 { margin: 0 0 4px; font-size: 28px; letter-spacing: -.045em; }
.detail-hero p { margin: 0; color: var(--muted); font-size: 13px; }
.list-block { padding: 4px 20px 20px; }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 15px 0; border-bottom: 1px solid #eff0ed; }
.list-item:last-child { border-bottom: 0; }
.list-item h4 { margin: 0 0 5px; font-size: 13px; }
.list-item p { margin: 0; color: var(--muted); font-size: 11px; }
.side-stack { display: flex; flex-direction: column; gap: 18px; }
.connection-list { padding: 6px 20px 20px; }
.connection { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #eff0ed; }
.connection:last-child { border-bottom: 0; }
.connection .connection-symbol { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--green); background: var(--green-soft); font-size: 13px; font-weight: 800; }
.connection strong, .connection span { display: block; }
.connection strong { font-size: 12px; }
.connection span { margin-top: 3px; color: var(--muted); font-size: 10px; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 10; max-width: min(370px, calc(100vw - 44px)); padding: 12px 15px; color: white; background: #262724; border-radius: 8px; box-shadow: var(--shadow); font-size: 12px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .sidebar { width: 226px; flex-basis: 226px; }
  .content-wrap { width: min(100% - 40px, 880px); }
  .dashboard-grid, .detail-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .app-shell { display: block; }
  .sidebar { width: 100%; min-height: auto; padding: 18px 16px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin-bottom: 15px; }
  .hub-state { display: none; }
  .nav-group { display: flex; gap: 3px; overflow-x: auto; margin: 0 0 4px; padding-bottom: 3px; }
  .nav-label { display: none; }
  .nav-item { width: auto; flex: 0 0 auto; padding: 9px 10px; white-space: nowrap; }
  .nav-item .nav-icon { display: none; }
  .sidebar-footer { display: none; }
  .topbar { height: 60px; padding: 0 20px; }
  .content-wrap { width: calc(100% - 32px); padding: 30px 0 48px; }
  .page-intro { display: block; margin-bottom: 24px; }
  .page-intro h2 { font-size: 31px; }
  .intro-actions { margin-top: 17px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card { padding: 14px; }
  .metric-value { font-size: 24px; }
  .card-grid { grid-template-columns: 1fr; }
  .request-row { grid-template-columns: 1fr; gap: 12px; }
  .request-row .button { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
/* Genome Office: local owner-readback panel (read-only). */
.owner-reader { margin-bottom: 16px; }
.owner-reader-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.owner-reader-form label { font-size: 12px; font-weight: 700; }
.owner-reader-form input { min-width: 220px; flex: 1 1 250px; border-radius: 8px; border: 1px solid var(--line); padding: 11px 12px; font: inherit; color: var(--ink); background: white; }
.owner-reader-form input:focus-visible { outline: 3px solid rgba(59,117,200,.35); outline-offset: 1px; }
.owner-reader-form button:disabled { cursor: progress; opacity: .65; }
.owner-reader-note { font-size: 12px; line-height: 1.5; margin: 12px 0 0; }
