/* Cipher — matches the Geneticker product family: Google Sans + Material Icons
   on a light Google-Material surface. Cipher's own accent is a teal-green so it
   reads as a sibling of Vault (green) and Lab (blue), not a different product. */
:root {
  --bg:      #f8f9fa;
  --panel:   #ffffff;
  --panel2:  #f1f3f4;
  --ink:     #202124;
  --ink2:    #5f6368;
  --ink3:    #80868b;
  --line:    #dadce0;
  --line2:   #e8eaed;
  --blue:    #1a73e8;
  --blue-h:  #1557b0;
  --green:   #0d904f;
  --teal:    #0ca678;   /* Cipher accent */
  --teal-h:  #0b8f68;
  --red:     #d93025;
  --amber:   #e37400;
  --violet:  #8b5cf6;
  --display: 'Google Sans','Google Sans Text','Roboto','Helvetica Neue',Arial,sans-serif;
  --body:    'Google Sans Text','Google Sans','Roboto','Helvetica Neue',Arial,sans-serif;
  --mono:    'Roboto Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --radius:  14px;
  --shadow:  0 1px 3px rgba(60,64,67,.12), 0 4px 12px rgba(60,64,67,.10);
  --shadow-lg: 0 8px 28px -8px rgba(60,64,67,.28);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  letter-spacing: .1px;
}
a { color: var(--blue); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink2); }
.dim { color: var(--ink3); }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ink); }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--teal);
  display: grid; place-items: center; color: #fff;
}
.brand .logo .material-icons-outlined { font-size: 18px; }
.brand small { font-family: var(--mono); font-weight: 500; color: var(--ink3); font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 999px; border: none;
  background: transparent; color: var(--ink2); display: grid; place-items: center;
  transition: .15s;
}
.icon-btn:hover { color: var(--ink); background: var(--panel2); }
.chip-user { display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: 13px; color: var(--ink); }
.chip-user .av { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; }
.chip-user .av img { width: 100%; height: 100%; display: block; image-rendering: pixelated; border-radius: 50%; }

/* ---------------------------------------------------------------- 9-dot launcher */
.apps-wrap { position: relative; }
.apps-popover {
  position: absolute; right: 0; top: 48px; width: 300px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 14px; display: none;
}
.apps-popover.open { display: block; }
.apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.apps-grid a { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px; border-radius: 12px; color: var(--ink); transition: .15s; }
.apps-grid a:hover { background: var(--panel2); }
.apps-grid .app-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 21px; }
.apps-grid .app-name { font-size: 12px; color: var(--ink2); }
.apps-footer { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; text-align: center; }
.apps-footer a { font-size: 12.5px; }

/* ---------------------------------------------------------------- layout */
.stage { max-width: 940px; margin: 0 auto; padding: 40px 22px 100px; }
.stage.narrow { max-width: 460px; }
.center-wrap { min-height: calc(100vh - 63px); display: grid; place-items: center; padding: 30px 20px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card.pad-lg { padding: 32px; }
.card.flat { box-shadow: none; }

h1.title { font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: -.4px; color: var(--ink); }
h2.title { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -.2px; }
.eyebrow { font-family: var(--display); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--teal); font-weight: 700; }
.lead { color: var(--ink2); font-size: 15px; margin-top: 8px; }

/* ---------------------------------------------------------------- auth */
.auth-logo { width: 52px; height: 52px; border-radius: 14px; background: var(--teal); display: grid; place-items: center; color: #fff; margin: 0 auto 16px; }
.auth-logo .material-icons-outlined { font-size: 28px; }
.tabs { display: flex; border-bottom: 1px solid var(--line); margin: 0 0 4px; }
.tabs button { flex: 1; padding: 0 0 12px; background: none; border: none; border-bottom: 2px solid transparent; font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--ink2); display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: .15s; }
.tabs button .material-icons-outlined { font-size: 17px; }
.tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }
.field { margin-top: 16px; }
.field label { display: block; font-size: 11px; font-weight: 700; color: var(--ink2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.input {
  width: 100%; padding: 11px 13px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font-size: 14px; font-family: var(--body); transition: .15s;
}
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.input.mono { font-family: var(--mono); font-size: 12px; }
.keybox { padding: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; font-family: var(--mono); font-size: 11px; color: var(--ink2); word-break: break-all; line-height: 1.6; max-height: 84px; overflow-y: auto; position: relative; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 8px; border: 1px solid transparent;
  font-family: var(--display); font-weight: 600; font-size: 14px; transition: .15s;
}
.btn .material-icons-outlined { font-size: 18px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-h); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-h); }
.btn-ghost { background: var(--panel); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--panel2); }
.btn-soft { background: var(--bg); border-color: var(--line); color: var(--ink2); }
.btn-soft:hover { background: var(--panel2); color: var(--ink); }
.btn-danger { background: var(--panel); border-color: rgba(217,48,37,.4); color: var(--red); }
.btn-danger:hover { background: rgba(217,48,37,.06); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.hr-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.hr-or::before, .hr-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.hr-or span { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink3); }
.check-row { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; cursor: pointer; font-size: 13px; color: var(--ink); }
.check-row input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--blue); }

.err { margin-top: 14px; padding: 10px 13px; border-radius: 8px; background: #fce8e6; border: 1px solid #f5c6c2; color: #c5221f; font-size: 13px; }
.note { margin-top: 14px; padding: 11px 13px; border-radius: 8px; background: #e8f0fe; border: 1px solid #d2e3fc; color: #174ea6; font-size: 12.5px; line-height: 1.5; }
.note.warn { background: #fef7e0; border-color: #feefc3; color: #b06000; }
.note .material-icons-outlined { font-size: 15px; vertical-align: -3px; margin-right: 4px; }

/* ---------------------------------------------------------------- tier bars */
.tiers { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.tier {
  display: flex; align-items: center; gap: 16px; text-align: left; width: 100%;
  padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel); transition: .15s; box-shadow: var(--shadow);
}
.tier:hover { border-color: var(--ink3); }
.tier.selected { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), var(--shadow); background: #f7faff; }
.tier .t-icon { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 23px; }
.tier .t-body { flex: 1; }
.tier .t-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tier .t-name { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--ink); }
.tier .t-tag { font-family: var(--display); font-size: 10.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink2); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.tier .t-tag.pay { color: var(--teal); border-color: rgba(12,166,120,.4); background: rgba(12,166,120,.08); }
.tier .t-tag.free { color: var(--blue); border-color: rgba(26,115,232,.35); background: #e8f0fe; }
.tier .t-desc { color: var(--ink2); font-size: 13px; margin-top: 4px; max-width: 620px; }
.tier .t-check { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; transition: .15s; }
.tier.selected .t-check { border-color: var(--blue); background: var(--blue); color: #fff; }
.tier .t-check .material-icons-outlined { font-size: 15px; }

/* ---------------------------------------------------------------- upload */
.drop {
  border: 2px dashed var(--line); border-radius: 16px; padding: 42px 24px; text-align: center;
  transition: .15s; background: var(--panel); cursor: pointer; margin-top: 22px;
}
.drop:hover, .drop.drag { border-color: var(--blue); background: #f7faff; }
.drop .up-ic { width: 58px; height: 58px; border-radius: 15px; margin: 0 auto 14px; display: grid; place-items: center; background: #e8f0fe; color: var(--blue); }
.drop .up-ic .material-icons-outlined { font-size: 30px; }
.progress { height: 8px; border-radius: 999px; background: var(--panel2); overflow: hidden; margin-top: 6px; }
.progress > span { display: block; height: 100%; background: var(--blue); width: 0; transition: width .2s; }

/* ---------------------------------------------------------------- categories */
.cat { display: flex; align-items: flex-start; gap: 14px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin-top: 12px; transition: .15s; box-shadow: var(--shadow); }
.cat.on { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), var(--shadow); }
.cat .cb { width: 22px; height: 22px; flex: none; margin-top: 1px; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; cursor: pointer; }
.cat.on .cb { background: var(--blue); border-color: var(--blue); color: #fff; }
.cat .cb .material-icons-outlined { font-size: 15px; }
.cat .c-name { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ink); }
.cat .c-desc { color: var(--ink2); font-size: 12.5px; margin-top: 3px; }
.cat .c-count { font-family: var(--mono); font-size: 12px; color: var(--ink2); margin-left: auto; white-space: nowrap; padding-left: 12px; }
.risk { font-size: 10px; font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; padding: 2px 8px; border-radius: 999px; }
.risk.low { color: var(--green); background: rgba(13,144,79,.1); }
.risk.med { color: var(--amber); background: rgba(227,116,0,.1); }
.risk.high { color: var(--red); background: rgba(217,48,37,.1); }

/* ---------------------------------------------------------------- dashboard */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px,1fr)); gap: 14px; margin-top: 20px; }
.metric { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
.metric .m-label { font-size: 12px; color: var(--ink2); display: flex; align-items: center; gap: 7px; }
.metric .m-value { font-family: var(--display); font-weight: 700; font-size: 25px; margin-top: 8px; color: var(--ink); }
.metric .m-sub { font-size: 12px; color: var(--ink3); margin-top: 2px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 32px 0 4px; }
.section-head h2 { font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--ink); }

.trait { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin-top: 10px; box-shadow: var(--shadow); }
.trait .tr-geno { font-family: var(--mono); font-weight: 700; font-size: 14px; color: var(--blue); background: #e8f0fe; padding: 4px 10px; border-radius: 7px; min-width: 52px; text-align: center; }
.trait .tr-name { font-weight: 600; font-size: 14px; color: var(--ink); }
.trait .tr-rs { font-family: var(--mono); font-size: 11px; color: var(--ink3); }
.trait .tr-read { color: var(--ink2); font-size: 12.5px; margin-top: 2px; }
.trait .tr-tag { margin-left: auto; }

.sub-banner { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); margin-top: 20px; box-shadow: var(--shadow); }
.sub-banner .sb-badge { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; font-size: 25px; background: rgba(139,92,246,.1); color: var(--violet); }
.sub-banner .sb-name { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ink); }
.sub-banner .sb-meta { color: var(--ink2); font-size: 13px; }

table.assets { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
table.assets th { text-align: left; color: var(--ink2); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.assets td { padding: 11px 10px; border-bottom: 1px solid var(--line); color: var(--ink); }
table.assets td.cid { font-family: var(--mono); font-size: 11.5px; color: var(--blue); }
.kind-pill { font-family: var(--display); font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink2); }

/* ---------------------------------------------------------------- misc */
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-ghost .spinner, .btn-soft .spinner, .btn-danger .spinner { border: 2px solid rgba(95,99,104,.3); border-top-color: var(--ink2); }
@keyframes spin { to { transform: rotate(360deg); } }
.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 10px 18px; border-radius: 8px; background: #202124; color: #fff; font-size: 13.5px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 9px; animation: rise .2s ease; }
.toast .material-icons-outlined { font-size: 18px; }
.toast.ok .material-icons-outlined { color: #81c995; } .toast.bad .material-icons-outlined { color: #f28b82; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.steps { display: flex; gap: 8px; margin: 0 0 16px; }
.step-dot { flex: 1; height: 4px; border-radius: 999px; background: var(--line); }
.step-dot.done { background: var(--blue); }
.callout { margin-top: 18px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-size: 12.5px; color: var(--ink2); line-height: 1.6; }
.callout strong { color: var(--ink); }
.footer-honest { max-width: 940px; margin: 36px auto 0; padding: 0 22px; color: var(--ink3); font-size: 12px; line-height: 1.7; }
.footer-honest a { color: var(--ink2); text-decoration: underline; }

/* ---------------------------------------------------------------- tiered sharing controls */
.tier-section { margin-top: 26px; }
.tier-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tier-head strong { font-family: var(--display); font-size: 15.5px; color: var(--ink); }
.tier-badge { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .5px; padding: 3px 9px; border-radius: 6px; border: 1px solid; }
.tier-reveal { color: var(--ink2); font-size: 12.5px; margin: 4px 0 10px; }
.mini-toggle { margin-left: auto; font-family: var(--display); font-size: 12px; font-weight: 600; color: var(--blue); background: none; border: none; padding: 2px 6px; border-radius: 6px; }
.mini-toggle:hover { background: var(--panel2); }
.feat-row.disabled { opacity: .5; pointer-events: none; }
.feat-row.disabled .cb { border-style: dashed; }

.share-summary {
  position: sticky; top: 74px; z-index: 20;
  display: flex; align-items: center; gap: 16px; justify-content: space-between;
  padding: 12px 16px; margin-top: 22px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line2); box-shadow: var(--shadow);
}
.share-summary .ss-count { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--ink); }
.share-summary .ss-meter { display: flex; gap: 3px; margin-top: 6px; }
.share-summary .meter-seg { width: 22px; height: 6px; border-radius: 2px; }
.share-summary .ss-right { font-size: 12.5px; color: var(--ink2); text-align: right; }
.share-summary .ss-right.warn { color: var(--amber); }
.share-summary .ss-right.danger { color: var(--red); }
.share-summary .ss-right strong { color: inherit; }
@media (max-width: 560px) { .share-summary { flex-direction: column; align-items: flex-start; gap: 8px; } .share-summary .ss-right { text-align: left; } }

/* ---------------------------------------------------------------- group-first sharing (panels + bundles + search) */
.share-tools { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.share-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); }
.share-search .material-icons-outlined { font-size: 20px; color: var(--ink3); }
.share-search input { flex: 1; border: none; outline: none; background: transparent; padding: 12px 0; font-family: var(--body); font-size: 14px; color: var(--ink); }
.bundles { display: flex; flex-wrap: wrap; gap: 8px; }
.bundle { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 12.5px; transition: .15s; }
.bundle:hover { border-color: var(--teal); color: var(--teal-h); }
.bundle .material-icons-outlined { font-size: 16px; }
.bundle .bundle-n { font-family: var(--mono); font-size: 11px; color: var(--ink2); background: var(--panel2); padding: 1px 7px; border-radius: 999px; }
.bundle:disabled { opacity: .45; cursor: not-allowed; }
.bundle.clear { color: var(--ink2); } .bundle.clear:hover { color: var(--red); border-color: rgba(217,48,37,.4); }

.grp { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin-top: 12px; box-shadow: var(--shadow); overflow: hidden; }
.grp.open { border-color: var(--ink3); }
.grp-head { display: flex; align-items: center; }
.grp-cb { width: 24px; height: 24px; flex: none; margin-left: 15px; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; cursor: pointer; transition: .12s; }
.grp-cb .material-icons-outlined { font-size: 16px; }
.grp-cb.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.grp-cb.some { background: var(--panel2); border-color: var(--blue); color: var(--blue); }
.grp-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: none; border: none; text-align: left; }
.grp-ic { width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center; font-size: 21px; }
.grp-body { flex: 1; min-width: 0; }
.grp-name { display: block; font-family: var(--display); font-weight: 700; font-size: 14.5px; color: var(--ink); }
.grp-sub { display: block; color: var(--ink2); font-size: 12px; margin-top: 3px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.grp-count { font-family: var(--mono); font-size: 12.5px; color: var(--ink2); flex: none; padding: 0 4px; }
.grp-caret { flex: none; color: var(--ink3); transition: transform .18s; }
.grp.open .grp-caret { transform: rotate(180deg); }
.grp-rows { padding: 4px 16px 16px 53px; }
.grp-rows .feat-row { margin-top: 8px; }
.grp-more { margin-top: 10px; padding: 9px 12px; border-radius: 8px; background: var(--bg); border: 1px dashed var(--line); color: var(--ink2); font-size: 12px; }
.grp-warn { color: var(--red); background: rgba(217,48,37,.08); font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.warn-note { display: flex; align-items: flex-start; gap: 5px; margin-top: 6px; padding: 7px 10px; border-radius: 8px; background: #fef7e0; border: 1px solid #feefc3; color: #b06000; font-size: 11px; line-height: 1.45; }
.warn-note .material-icons-outlined { font-size: 13px; margin-top: 1px; flex: none; }
@media (max-width: 560px) { .grp-rows { padding-left: 16px; } .grp-sub { font-size: 11.5px; } }

/* ================================================================ app shell (sidebar + content) */
.shell { display: flex; align-items: flex-start; gap: 26px; max-width: 1140px; margin: 0 auto; padding: 26px 22px 90px; }
.sidebar { position: sticky; top: 87px; flex: none; width: 244px; display: flex; flex-direction: column; gap: 6px; }
.side-profile { display: flex; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); margin-bottom: 6px; }
.side-profile .av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; }
.side-profile .sp-name { font-family: var(--mono); font-size: 12.5px; color: var(--ink); word-break: break-all; line-height: 1.3; }
.side-profile .sp-mode { font-size: 11px; color: var(--teal); font-weight: 600; margin-top: 2px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; border: none; background: none; width: 100%; text-align: left; color: var(--ink2); font-family: var(--display); font-weight: 600; font-size: 14px; transition: .13s; }
.side-item .material-icons-outlined { font-size: 20px; }
.side-item:hover { background: var(--panel2); color: var(--ink); }
.side-item.active { background: rgba(12,166,120,.1); color: var(--teal-h); }
.side-item .si-badge { margin-left: auto; font-family: var(--mono); font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--panel2); color: var(--ink2); }
.side-item.active .si-badge { background: rgba(12,166,120,.16); color: var(--teal-h); }
.content { flex: 1; min-width: 0; }
.content .stage { max-width: none; margin: 0; padding: 0; }
.tab-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.tab-head .eyebrow { margin-bottom: 2px; }

/* mobile: sidebar becomes a horizontal scroller on top */
@media (max-width: 820px) {
  .shell { flex-direction: column; gap: 16px; padding-top: 18px; }
  .sidebar { position: static; width: 100%; }
  .side-profile { margin-bottom: 2px; }
  .side-nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .side-item { flex: none; width: auto; padding: 9px 13px; }
  .side-item .si-badge { display: none; }
}

/* ================================================================ analytics (diseases by severity) */
.dz-list { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.dz-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.dz-sev { width: 6px; align-self: stretch; border-radius: 999px; flex: none; }
.dz-main { flex: 1; min-width: 0; }
.dz-name { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--ink); }
.dz-meta { font-size: 11.5px; color: var(--ink3); margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dz-cat { text-transform: capitalize; }
.dz-prob { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.prob-chip { font-family: var(--mono); font-weight: 700; font-size: 12px; padding: 3px 10px; border-radius: 999px; line-height: 1; }
.prob-chip.low { color: var(--green); background: rgba(13,144,79,.12); }
.prob-chip.med { color: var(--amber); background: rgba(227,116,0,.13); }
.prob-chip.high { color: var(--red); background: rgba(217,48,37,.12); }
.prob-track { width: 74px; height: 5px; border-radius: 999px; background: var(--panel2); overflow: hidden; }
.prob-track > span { display: block; height: 100%; border-radius: 999px; }
.dz-empty { margin-top: 16px; padding: 26px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; color: var(--ink2); background: var(--panel); }
.dz-empty .material-icons-outlined { font-size: 34px; color: var(--ink3); }
.upgrade-card { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 16px 18px; border: 1px solid rgba(12,166,120,.35); border-radius: 14px; background: rgba(12,166,120,.06); }
.upgrade-card .material-icons-outlined { font-size: 26px; color: var(--teal); flex: none; }
.upgrade-card .uc-body { flex: 1; min-width: 0; }
.upgrade-card .uc-title { font-family: var(--display); font-weight: 700; font-size: 14.5px; color: var(--ink); }
.upgrade-card .uc-sub { font-size: 12.5px; color: var(--ink2); margin-top: 2px; }

/* ================================================================ ancestry */
.anc-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 14px; margin-top: 16px; }
.anc-card { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); padding: 18px; }
.anc-card .ac-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink3); font-weight: 700; }
.anc-card .ac-value { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ink); margin-top: 6px; }
.anc-comp { margin-top: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); padding: 18px; }
.anc-bar-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.anc-bar-row:first-of-type { margin-top: 4px; }
.anc-bar-name { width: 120px; flex: none; font-size: 13px; color: var(--ink); }
.anc-bar { flex: 1; height: 12px; border-radius: 999px; background: var(--panel2); overflow: hidden; }
.anc-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--teal); }
.anc-bar-pct { width: 44px; flex: none; text-align: right; font-family: var(--mono); font-size: 12.5px; color: var(--ink2); }

/* ================================================================ vault + decoys tables */
.asset-actions { display: flex; gap: 6px; }
.mini-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink2); font-family: var(--display); font-weight: 600; font-size: 11.5px; transition: .13s; }
.mini-btn:hover { background: var(--panel2); color: var(--ink); border-color: var(--ink3); }
.mini-btn.danger:hover { color: var(--red); border-color: rgba(217,48,37,.4); }
.mini-btn .material-icons-outlined { font-size: 15px; }
.mini-btn:disabled { opacity: .5; cursor: not-allowed; }
.stepper { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper button { width: 38px; height: 38px; border: none; background: var(--panel); color: var(--ink); display: grid; place-items: center; }
.stepper button:hover { background: var(--panel2); }
.stepper .step-val { min-width: 46px; text-align: center; font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--ink); border-left: 1px solid var(--line); border-right: 1px solid var(--line); height: 38px; display: grid; place-items: center; }
.decoy-panel { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); padding: 20px; margin-top: 16px; }
.decoy-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tier-pill { font-family: var(--mono); font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--panel2); color: var(--ink2); }

/* ================================================================ settings */
.set-section { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); padding: 20px; margin-top: 16px; }
.set-section h3 { font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.set-section h3 .material-icons-outlined { font-size: 19px; color: var(--ink2); }
.set-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.set-row .sr-body { flex: 1; min-width: 200px; }
.set-row .sr-title { font-weight: 600; font-size: 14px; color: var(--ink); }
.set-row .sr-sub { font-size: 12.5px; color: var(--ink2); margin-top: 2px; }
.switch { position: relative; width: 44px; height: 25px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: .18s; }
.switch .track::before { content: ''; position: absolute; width: 19px; height: 19px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .18s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--teal); }
.switch input:checked + .track::before { transform: translateX(19px); }
.mode-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: rgba(12,166,120,.1); color: var(--teal-h); font-family: var(--display); font-weight: 600; font-size: 12.5px; }

/* undo / back button on onboarding steps */
.btn-row .btn-back { margin-right: auto; }
.step-back { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: var(--ink2); font-family: var(--display); font-weight: 600; font-size: 13px; padding: 4px 6px; border-radius: 8px; margin-bottom: 10px; }
.step-back:hover { background: var(--panel2); color: var(--ink); }
.step-back .material-icons-outlined { font-size: 18px; }

/* ================================================================================
   DECIPHER — researcher console. Extends Cipher's design system but re-accents
   from Cipher's teal to a research indigo, and adds the query builder, the
   federated-results visualisations, the public-genome registry and the DNA
   Canvas (genome browser + clinical info pane).
   ============================================================================== */
:root {
  --teal:    #4f46e5;   /* Decipher accent (indigo) — remaps the teal accent */
  --teal-h:  #4338ca;
  --indigo:  #4f46e5;
  --indigo-h:#4338ca;
  --plum:    #7c3aed;
  --cyan:    #0891b2;
  --gb-bg:   #0b1020;   /* genome-browser dark canvas surface */
}
/* Re-tint the few places Cipher hard-coded its teal rgba. */
.side-item.active { background: rgba(79,70,229,.10); color: var(--indigo-h); }
.side-item.active .si-badge { background: rgba(79,70,229,.16); color: var(--indigo-h); }
.upgrade-card { border-color: rgba(79,70,229,.35); background: rgba(79,70,229,.06); }
.upgrade-card .material-icons-outlined { color: var(--indigo); }
.brand .logo { background: linear-gradient(135deg, var(--indigo), var(--plum)); }
.auth-logo { background: linear-gradient(135deg, var(--indigo), var(--plum)); }
.tier .t-tag.pay { color: var(--indigo); border-color: rgba(79,70,229,.4); background: rgba(79,70,229,.08); }
.mode-chip { background: rgba(79,70,229,.1); color: var(--indigo-h); }

/* ---------------------------------------------------------------- overview dashboard */
.hero { display:flex; align-items:center; gap:18px; padding:22px 24px; border-radius:16px;
  background: linear-gradient(120deg, #eef2ff 0%, #f5f3ff 55%, #ecfeff 100%);
  border:1px solid var(--line); box-shadow: var(--shadow); margin-bottom:20px; }
.hero .hero-ic { width:56px; height:56px; flex:none; border-radius:15px; display:grid; place-items:center;
  color:#fff; font-size:29px; background:linear-gradient(135deg,var(--indigo),var(--plum)); }
.hero h1 { font-family:var(--display); font-weight:700; font-size:23px; letter-spacing:-.3px; }
.hero p { color:var(--ink2); font-size:13.5px; margin-top:3px; max-width:640px; }
.stat-strip { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; }
.stat { border:1px solid var(--line); border-radius:14px; background:var(--panel); box-shadow:var(--shadow); padding:16px 18px; }
.stat .s-num { font-family:var(--display); font-weight:700; font-size:26px; color:var(--ink); }
.stat .s-lab { font-size:12px; color:var(--ink2); margin-top:2px; display:flex; align-items:center; gap:6px; }
.stat .s-lab .material-icons-outlined { font-size:15px; color:var(--indigo); }

/* ---------------------------------------------------------------- query builder */
.qb-kinds { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:12px; margin-top:14px; }
.qb-kind { text-align:left; border:1px solid var(--line); border-radius:14px; background:var(--panel);
  box-shadow:var(--shadow); padding:16px; transition:.15s; }
.qb-kind:hover { border-color:var(--ink3); }
.qb-kind.selected { border-color:var(--indigo); box-shadow:0 0 0 1px var(--indigo), var(--shadow); background:#f7f7ff; }
.qb-kind .qk-ic { width:38px; height:38px; border-radius:11px; display:grid; place-items:center; font-size:20px;
  background:rgba(79,70,229,.1); color:var(--indigo); }
.qb-kind .qk-name { font-family:var(--display); font-weight:700; font-size:14.5px; margin-top:10px; color:var(--ink); }
.qb-kind .qk-desc { font-size:12px; color:var(--ink2); margin-top:3px; }
.textarea { width:100%; min-height:88px; resize:vertical; padding:11px 13px; border-radius:8px; border:1px solid var(--line);
  background:var(--panel); color:var(--ink); font-size:14px; font-family:var(--body); line-height:1.5; }
.textarea:focus { outline:none; border-color:var(--indigo); box-shadow:0 0 0 1px var(--indigo); }
.chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.mchip { display:inline-flex; align-items:center; gap:7px; padding:6px 8px 6px 12px; border-radius:999px;
  border:1px solid var(--line); background:var(--panel); font-size:12.5px; color:var(--ink); box-shadow:var(--shadow); }
.mchip .mono { color:var(--indigo); font-weight:600; }
.mchip .x { width:20px; height:20px; border-radius:50%; border:none; background:var(--panel2); color:var(--ink2);
  display:grid; place-items:center; }
.mchip .x:hover { background:#fde8e6; color:var(--red); }
.mchip .x .material-icons-outlined { font-size:14px; }
.picker-results { border:1px solid var(--line); border-radius:12px; margin-top:8px; max-height:280px; overflow-y:auto; background:var(--panel); }
.picker-row { display:flex; align-items:center; gap:12px; padding:10px 14px; border-bottom:1px solid var(--line2); cursor:pointer; }
.picker-row:last-child { border-bottom:none; }
.picker-row:hover { background:var(--panel2); }
.picker-row .pr-rs { font-family:var(--mono); font-size:12px; color:var(--indigo); min-width:96px; }
.picker-row .pr-name { font-size:13px; color:var(--ink); flex:1; min-width:0; }
.picker-row .pr-add { color:var(--ink3); }
.consent-line { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:14px; padding:12px 14px;
  border-radius:12px; background:var(--bg); border:1px solid var(--line); }
.consent-line .cl-meter { display:flex; gap:3px; }
.consent-line .cl-seg { width:20px; height:7px; border-radius:2px; }

/* ---------------------------------------------------------------- query list */
.query-card { display:flex; align-items:flex-start; gap:14px; padding:16px 18px; border:1px solid var(--line);
  border-radius:14px; background:var(--panel); box-shadow:var(--shadow); margin-top:12px; }
.query-card .qc-body { flex:1; min-width:0; }
.query-card .qc-title { font-family:var(--display); font-weight:700; font-size:15.5px; color:var(--ink); }
.query-card .qc-desc { color:var(--ink2); font-size:12.5px; margin-top:3px; }
.query-card .qc-meta { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:9px; font-size:11.5px; color:var(--ink3); }
.q-status { font-family:var(--display); font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.5px;
  padding:3px 9px; border-radius:999px; }
.q-status.draft { color:var(--ink2); background:var(--panel2); }
.q-status.published { color:var(--green); background:rgba(13,144,79,.12); }
.q-status.closed { color:var(--amber); background:rgba(227,116,0,.12); }
.q-kind-pill { font-family:var(--mono); font-size:10.5px; padding:2px 8px; border-radius:6px; background:rgba(79,70,229,.08); color:var(--indigo); }
.qc-actions { display:flex; flex-direction:column; gap:6px; flex:none; }

/* ---------------------------------------------------------------- results viz */
.result-block { border:1px solid var(--line); border-radius:14px; background:var(--panel); box-shadow:var(--shadow); padding:18px; margin-top:14px; }
.result-block h3 { font-family:var(--display); font-size:14.5px; font-weight:700; color:var(--ink); display:flex; align-items:center; gap:8px; }
.result-block h3 .mono { font-size:12px; color:var(--indigo); }
.freq-row { display:flex; align-items:center; gap:12px; margin-top:11px; }
.freq-row .fr-lab { width:70px; flex:none; font-family:var(--mono); font-size:12.5px; color:var(--ink); }
.freq-row .fr-bar { flex:1; height:20px; border-radius:6px; background:var(--panel2); overflow:hidden; position:relative; }
.freq-row .fr-bar > span { display:block; height:100%; border-radius:6px 0 0 6px; background:linear-gradient(90deg,var(--indigo),var(--plum)); }
.freq-row .fr-pct { width:88px; flex:none; text-align:right; font-family:var(--mono); font-size:12px; color:var(--ink2); }
.geno-grid { display:flex; gap:6px; margin-top:12px; flex-wrap:wrap; }
.geno-cell { border:1px solid var(--line); border-radius:10px; padding:9px 13px; background:var(--panel); text-align:center; min-width:74px; }
.geno-cell .gc-geno { font-family:var(--mono); font-weight:700; font-size:14px; color:var(--indigo); }
.geno-cell .gc-n { font-size:11.5px; color:var(--ink2); margin-top:2px; }
.donut-wrap { display:flex; align-items:center; gap:20px; flex-wrap:wrap; margin-top:8px; }
.donut-legend { display:flex; flex-direction:column; gap:6px; font-size:12.5px; }
.donut-legend .dl-row { display:flex; align-items:center; gap:8px; }
.donut-legend .dl-sw { width:12px; height:12px; border-radius:3px; flex:none; }

/* ---------------------------------------------------------------- public genomes */
.genome-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:14px; margin-top:16px; }
.genome-card { border:1px solid var(--line); border-radius:16px; background:var(--panel); box-shadow:var(--shadow); padding:18px; transition:.15s; }
.genome-card:hover { border-color:var(--indigo); box-shadow:0 0 0 1px var(--indigo), var(--shadow); }
.genome-card .gc-top { display:flex; align-items:center; gap:12px; }
.genome-card .gc-av { width:44px; height:44px; border-radius:50%; overflow:hidden; flex:none; }
.genome-card .gc-name { font-family:var(--mono); font-size:12.5px; color:var(--ink); word-break:break-all; }
.genome-card .gc-sub { font-size:11.5px; color:var(--ink3); margin-top:1px; }
.genome-card .gc-badges { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.gbadge { font-size:10.5px; font-family:var(--display); font-weight:600; padding:3px 8px; border-radius:999px;
  background:var(--panel2); color:var(--ink2); display:inline-flex; align-items:center; gap:4px; }
.gbadge .material-icons-outlined { font-size:12px; }
.genome-card .gc-cid { font-family:var(--mono); font-size:10.5px; color:var(--indigo); margin-top:12px; word-break:break-all; }
.genome-card .gc-open { margin-top:14px; }

/* ---------------------------------------------------------------- cohorts */
.cohort-card { border:1px solid var(--line); border-radius:14px; background:var(--panel); box-shadow:var(--shadow); padding:18px; margin-top:14px; }
.cohort-card .co-head { display:flex; align-items:flex-start; gap:12px; }
.cohort-card .co-name { font-family:var(--display); font-weight:700; font-size:16px; color:var(--ink); }
.cohort-card .co-desc { font-size:12.5px; color:var(--ink2); margin-top:2px; }
.member-chip { display:inline-flex; align-items:center; gap:7px; padding:6px 8px 6px 11px; border-radius:10px;
  border:1px solid var(--line); background:var(--bg); font-size:12px; color:var(--ink); }
.member-chip .mc-ic { font-size:15px; color:var(--indigo); }

/* ================================================================ DNA CANVAS (genome browser) */
.gb { display:grid; grid-template-columns:1fr 320px; gap:16px; margin-top:14px; align-items:start; }
@media (max-width:900px){ .gb { grid-template-columns:1fr; } }
.gb-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:12px 14px; border:1px solid var(--line);
  border-radius:12px; background:var(--panel); box-shadow:var(--shadow); }
.gb-toolbar .gb-group { display:flex; align-items:center; gap:6px; }
.gb-toolbar label { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--ink3); }
.gb-select { padding:7px 10px; border-radius:8px; border:1px solid var(--line); background:var(--panel); font-family:var(--mono);
  font-size:12.5px; color:var(--ink); }
.gb-input { padding:7px 10px; border-radius:8px; border:1px solid var(--line); background:var(--panel); font-family:var(--mono);
  font-size:12.5px; color:var(--ink); width:150px; }
.gb-input:focus, .gb-select:focus { outline:none; border-color:var(--indigo); box-shadow:0 0 0 1px var(--indigo); }
.gb-main { display:flex; flex-direction:column; gap:12px; }
.gb-stage { border:1px solid var(--line); border-radius:14px; overflow:hidden; background:var(--gb-bg); box-shadow:var(--shadow); }
.gb-canvas { display:block; width:100%; cursor:crosshair; touch-action:none; }
.gb-scroll { height:14px; background:var(--panel2); position:relative; cursor:pointer; }
.gb-scroll .gb-thumb { position:absolute; top:2px; height:10px; border-radius:999px; background:var(--indigo); min-width:24px; opacity:.85; }
.gb-minimap { border:1px solid var(--line); border-radius:12px; background:var(--panel); box-shadow:var(--shadow); padding:12px 14px; }
.gb-minimap .mm-title { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--ink3); margin-bottom:8px; }
.gb-ideogram { position:relative; height:26px; border-radius:6px; background:linear-gradient(90deg,#e8eaed,#f1f3f4); overflow:hidden; cursor:pointer; border:1px solid var(--line); }
.gb-ideogram .ig-view { position:absolute; top:0; bottom:0; background:rgba(79,70,229,.28); border-left:1px solid var(--indigo); border-right:1px solid var(--indigo); }
.gb-ideogram .ig-gene { position:absolute; top:0; bottom:0; width:2px; background:var(--plum); }
.gb-ideogram .ig-cursor { position:absolute; top:0; bottom:0; width:1px; background:var(--red); }

/* right-hand clinical info pane */
.gb-info { position:sticky; top:87px; border:1px solid var(--line); border-radius:16px; background:var(--panel);
  box-shadow:var(--shadow); overflow:hidden; }
.gb-info .gi-head { padding:16px 18px; background:linear-gradient(135deg, #eef2ff, #f5f3ff); border-bottom:1px solid var(--line); }
.gb-info .gi-eyebrow { font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:1px; color:var(--indigo); }
.gb-info .gi-gene { font-family:var(--display); font-weight:700; font-size:22px; letter-spacing:-.3px; color:var(--ink); margin-top:2px; }
.gb-info .gi-full { font-size:12.5px; color:var(--ink2); margin-top:2px; }
.gb-info .gi-loc { font-family:var(--mono); font-size:11.5px; color:var(--ink3); margin-top:6px; }
.gb-info .gi-body { padding:16px 18px; }
.gi-sig { font-size:13px; color:var(--ink); line-height:1.6; }
.gi-kv { display:flex; gap:8px; margin-top:10px; font-size:12.5px; }
.gi-kv .k { color:var(--ink3); min-width:82px; flex:none; }
.gi-kv .v { color:var(--ink); }
.gi-tag { display:inline-flex; align-items:center; gap:5px; font-size:10.5px; font-weight:700; padding:3px 9px; border-radius:999px;
  text-transform:uppercase; letter-spacing:.4px; }
.gi-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.gi-empty { padding:30px 18px; text-align:center; color:var(--ink2); }
.gi-empty .material-icons-outlined { font-size:34px; color:var(--ink3); }
.gi-variant { margin-top:14px; padding:12px 14px; border-radius:12px; background:var(--bg); border:1px solid var(--line); }
.gi-variant .vh { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--ink3); }
.gi-variant .vg { font-family:var(--mono); font-weight:700; font-size:16px; color:var(--indigo); margin-top:4px; }
.gb-legend { display:flex; flex-wrap:wrap; gap:12px; padding:10px 14px; border:1px solid var(--line); border-radius:12px;
  background:var(--panel); box-shadow:var(--shadow); font-size:11.5px; color:var(--ink2); }
.gb-legend .lg { display:inline-flex; align-items:center; gap:6px; }
.gb-legend .lg-sw { width:14px; height:14px; border-radius:4px; flex:none; }
.base-A { color:#16a34a; } .base-T { color:#dc2626; } .base-G { color:#d97706; } .base-C { color:#2563eb; }

/* consent / run panel reused on the Cipher research tab */
.run-block { border:1px solid var(--line); border-radius:14px; background:var(--panel); box-shadow:var(--shadow); padding:18px; margin-top:14px; }
.run-asks { display:flex; flex-direction:column; gap:8px; margin-top:12px; }
.run-ask { display:flex; align-items:center; gap:10px; padding:10px 13px; border-radius:10px; background:var(--bg); border:1px solid var(--line); font-size:13px; }
.run-ask .material-icons-outlined { font-size:18px; color:var(--indigo); }

/* ================================================================ DNA Canvas — expanded tooling
   View-mode toggle, animated-helix stage, junk-DNA annotation legend, region-
   composition strip, the ML/sequence Tools panel, and selection overlay. */
.cv-modes { display:inline-flex; border:1px solid var(--line); border-radius:9px; overflow:hidden; }
.cv-modebtn { display:inline-flex; align-items:center; gap:6px; padding:7px 12px; border:none; background:var(--panel); color:var(--ink2);
  font-family:var(--display); font-weight:600; font-size:12.5px; border-right:1px solid var(--line); }
.cv-modebtn:last-child { border-right:none; }
.cv-modebtn .material-icons-outlined { font-size:16px; }
.cv-modebtn:hover { background:var(--panel2); color:var(--ink); }
.cv-modebtn.active { background:var(--indigo); color:#fff; }
.cv-modebtn.active:hover { background:var(--indigo-h); }

/* helix stage sits on the dark surface for depth */
.gb-stage.helix { background:var(--gb-bg); }

/* region-composition strip */
.comp-strip { display:flex; height:16px; border-radius:6px; overflow:hidden; border:1px solid var(--line); margin-top:10px; box-shadow:var(--shadow); }
.comp-seg { height:100%; }
.comp-legend { display:flex; flex-wrap:wrap; gap:10px 14px; margin-top:8px; font-size:11px; color:var(--ink2); }
.comp-legend .cl { display:inline-flex; align-items:center; gap:6px; }
.comp-legend .cl-sw { width:11px; height:11px; border-radius:3px; flex:none; }

/* junk-DNA annotation legend */
.anno-legend { display:flex; flex-wrap:wrap; gap:8px 12px; padding:10px 14px; border:1px solid var(--line); border-radius:12px;
  background:var(--panel); box-shadow:var(--shadow); margin-top:12px; font-size:11px; color:var(--ink2); }
.anno-legend .al { display:inline-flex; align-items:center; gap:6px; }
.anno-legend .al-sw { width:12px; height:12px; border-radius:3px; flex:none; }

/* the Tools panel (ML extraction + sequence tools) */
.cv-tools { border:1px solid var(--line); border-radius:16px; background:var(--panel); box-shadow:var(--shadow); margin-top:16px; overflow:hidden; }
.cv-tools-head { display:flex; align-items:center; gap:10px; padding:14px 18px; background:linear-gradient(135deg,#eef2ff,#f5f3ff); border-bottom:1px solid var(--line); }
.cv-tools-head .material-icons-outlined { color:var(--indigo); }
.cv-tools-head h3 { font-family:var(--display); font-weight:700; font-size:15px; color:var(--ink); flex:1; }
.cv-tools-body { padding:16px 18px; display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:16px; }
.cv-toolsec { border:1px solid var(--line2); border-radius:12px; padding:14px; background:var(--bg); }
.cv-toolsec h4 { font-family:var(--display); font-weight:700; font-size:13px; color:var(--ink); display:flex; align-items:center; gap:7px; margin-bottom:10px; }
.cv-toolsec h4 .material-icons-outlined { font-size:16px; color:var(--indigo); }
.cv-toolsec label { display:block; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--ink3); margin:8px 0 4px; }
.cv-seq-out { font-family:var(--mono); font-size:11.5px; line-height:1.7; color:var(--ink); background:var(--panel); border:1px solid var(--line);
  border-radius:8px; padding:10px 12px; max-height:180px; overflow:auto; word-break:break-all; white-space:pre-wrap; margin-top:8px; }
.cv-metric-row { display:flex; gap:10px; flex-wrap:wrap; margin-top:6px; }
.cv-mini-stat { flex:1; min-width:90px; border:1px solid var(--line); border-radius:10px; background:var(--panel); padding:10px 12px; }
.cv-mini-stat .v { font-family:var(--display); font-weight:700; font-size:19px; color:var(--indigo); }
.cv-mini-stat .k { font-size:10.5px; color:var(--ink2); margin-top:1px; }
.aa-seq span.stop { color:var(--red); font-weight:700; }
.aa-seq span.start { color:var(--green); font-weight:700; }
