/* 3X Genetics Shareholder Portal
   Light and clinical: white paper, navy ink, the 3X brand blue as the one accent.
   Montserrat for headings and figures, Source Sans 3 for text (the company's web fonts). */

@font-face { font-family: "Montserrat"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/montserrat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }

:root {
  --ink: #0e2240;
  --ink-soft: #46566f;
  --navy: #0a1a33;
  --blue: #35b7ef;          /* 3X brand blue: accents, and text on navy */
  --blue-deep: #0a69ab;     /* the same hue, dark enough for text and buttons on white */
  --blue-wash: #eaf6fd;
  --paper: #ffffff;
  --mist: #f3f6fa;
  --rule: #d5dde8;
  --rule-soft: #e8edf4;
  --field: #a9b6c9;
  --up: #0b7a4b;
  --down: #b42318;
  --down-wash: #fdf1ef;
  --head: "Montserrat", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --text: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
h1, h2 { font-family: var(--head); font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.0625rem; }
p { margin: 0 0 0.75em; }
a { color: var(--blue-deep); text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }
strong { font-weight: 600; }
abbr[title] { text-decoration: none; cursor: help; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 3px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
html:not(.js) .js-only { display: none !important; }

/* ---------------------------------------------------------------- wordmark */
.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; }
.wordmark img { height: 34px; width: auto; display: block; }
.wordmark-name { font-family: var(--head); font-weight: 700; font-size: 1.125rem; letter-spacing: 0.005em; white-space: nowrap; }
.wordmark-mark { display: inline-flex; gap: 2px; align-items: center; }
.wordmark-mark i { display: block; width: 7px; height: 7px; background: var(--blue); }
.wordmark.on-dark { color: #fff; }

/* ------------------------------------------------- sign-in and its siblings */
.entry { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(360px, 44fr) 56fr; }
.entry-brand {
  background: var(--navy);
  color: #fff;
  padding: 2.75rem 3rem 3rem;
  display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem;
  position: relative; overflow: hidden;
}
.entry-home { text-decoration: none; align-self: flex-start; }
.entry-title {
  font-family: var(--head); font-weight: 600;
  font-size: clamp(2.5rem, 4.6vw, 3.75rem); line-height: 1.04; letter-spacing: -0.02em;
  margin: 0 0 1.25rem; max-width: 9ch;
}
.entry-lede { font-size: 1.1875rem; line-height: 1.45; color: #c7d5e8; max-width: 27ch; margin: 0; }

/* Repeat tracts: runs of three, each run longer than the one before. */
.tracts { display: grid; gap: 11px; }
.tracts span {
  display: block; height: 11px;
  /* one triplet per tile; "round" fits a whole number of tiles, so no run is ever cut short */
  background: linear-gradient(90deg,
    var(--blue) 0 12px, transparent 12px 15px,
    var(--blue) 15px 27px, transparent 27px 30px,
    var(--blue) 30px 42px, transparent 42px 58px) 0 0 / 58px 100% round;
  animation: tract 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.tracts span:nth-child(1) { width: 30%; opacity: 0.4; }
.tracts span:nth-child(2) { width: 56%; opacity: 0.68; animation-delay: 140ms; }
.tracts span:nth-child(3) { width: 100%; animation-delay: 280ms; }
@keyframes tract { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .tracts span { animation: none; } }

.entry-main { display: flex; align-items: center; justify-content: center; padding: 3rem 2rem; }
.entry-card { width: 100%; max-width: 27rem; }
.entry-card h1 { margin-bottom: 1.5rem; }
.entry-card .lede { color: var(--ink-soft); margin: -0.75rem 0 1.5rem; }

.form { display: grid; gap: 0.375rem; }
.form label { font-weight: 600; font-size: 0.9375rem; margin-top: 0.75rem; }
.form label:first-of-type { margin-top: 0; }
.form input[type="text"], .form input[type="password"], .form input[type="search"] {
  font: inherit; color: var(--ink);
  height: 3rem; padding: 0 0.875rem; width: 100%;
  border: 1px solid var(--field); border-radius: 6px; background: #fff;
}
.form input:focus-visible { outline: 3px solid var(--blue); outline-offset: 0; border-color: var(--blue-deep); }
.form .input-short { max-width: 9rem; font-family: var(--head); font-weight: 600; letter-spacing: 0.08em; }
.form .input-code { max-width: 11rem; font-family: var(--head); font-weight: 600; font-size: 1.25rem; letter-spacing: 0.2em; }
.hint { font-size: 0.9375rem; color: var(--ink-soft); margin: 0.25rem 0 0; }
.entry-card > .hint { margin-top: 1rem; }
.form-secondary { margin-top: 0.75rem; }

.button {
  font-family: var(--head); font-weight: 600; font-size: 0.9375rem; letter-spacing: 0.01em;
  display: inline-flex; align-items: center; justify-content: center;
  height: 3rem; padding: 0 1.5rem; margin-top: 1.25rem;
  border: 1px solid var(--blue-deep); border-radius: 6px;
  background: var(--blue-deep); color: #fff; text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.button-quiet { background: #fff; color: var(--blue-deep); height: 2.5rem; padding: 0 1rem; margin-top: 0; }
.button-quiet:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.link-button { font: inherit; color: var(--blue-deep); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer; }
.link-button:hover { color: var(--ink); }

.notice { margin: 0 0 1.25rem; padding: 0.75rem 1rem; border-left: 4px solid var(--blue-deep); background: var(--blue-wash); border-radius: 0 6px 6px 0; }
.notice-error { border-left-color: var(--down); background: var(--down-wash); color: #7a1a12; }

.entry-links { list-style: none; margin: 2rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid var(--rule); display: grid; gap: 0.875rem; }
.entry-links li { display: grid; gap: 0.1rem; }
.entry-links a { font-family: var(--head); font-weight: 600; font-size: 0.9375rem; justify-self: start; }
.entry-links span { color: var(--ink-soft); font-size: 0.9375rem; }
.fine-print { margin: 2rem 0 0; font-size: 0.875rem; color: var(--ink-soft); }
.back { margin: 1.75rem 0 0; font-size: 0.9375rem; }

.steps { margin: 0 0 1.75rem; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 0.75rem; }
.steps li { counter-increment: step; position: relative; padding-left: 2.5rem; color: var(--ink-soft); }
.steps li strong { color: var(--ink); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0.05rem;
  width: 1.625rem; height: 1.625rem; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--head); font-weight: 600; font-size: 0.8125rem; color: var(--blue-deep);
  border: 1.5px solid var(--blue-deep);
}
.result { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.result h2 { margin-bottom: 0.75rem; }
.usernames { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.usernames li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; padding: 0.5rem 0.5rem 0.5rem 0.875rem; background: var(--mist); border-radius: 6px; }
.username { font-family: var(--head); font-weight: 600; font-size: 1.0625rem; overflow-wrap: anywhere; }

/* ------------------------------------------------------ signed-in pages */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 0.75rem 2rem; min-height: 3.75rem;
  border-bottom: 1px solid var(--rule); background: #fff;
}
.top-home { display: inline-flex; align-items: center; gap: 0.875rem; text-decoration: none; color: var(--ink); }
.top-product { font-family: var(--head); font-weight: 500; font-size: 0.9375rem; color: var(--ink-soft); padding-left: 0.875rem; border-left: 1px solid var(--rule); }
.top-nav { display: flex; align-items: center; gap: 1.5rem; font-size: 0.9375rem; flex-wrap: wrap; }
.top-nav form { margin: 0; }
.top-user { color: var(--ink-soft); }
.top-user strong { color: var(--ink); }

.plain { display: flex; justify-content: center; padding: 3rem 1.5rem; }
.plain-card { width: 100%; max-width: 27rem; }
.plain-card h1 { margin-bottom: 1.5rem; }

.shell { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100vh; height: 100dvh; }
.panes { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(21rem, 1fr); min-height: 0; }
.pane { overflow: auto; min-height: 0; }
.pane-info { padding: 2rem 2.5rem 3.5rem; }
.pane-records { padding: 2rem 1.75rem 3.5rem; background: var(--mist); border-left: 1px solid var(--rule); }

.holder { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.holder-asof { margin: 0; font-size: 0.9375rem; color: var(--ink-soft); }

.position { margin: 0 0 2.25rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.position > div { padding: 0.875rem 1rem 1rem 0; }
.position > div + div { padding-left: 1rem; border-left: 1px solid var(--rule-soft); }
.position dt { font-size: 0.9375rem; color: var(--ink-soft); }
.position dd { margin: 0.125rem 0 0; font-family: var(--head); font-weight: 600; font-size: clamp(1.125rem, 1.75vw, 1.5rem); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.up { color: var(--up); }
.down { color: var(--down); }

.pane-info section { margin-bottom: 2.25rem; }
.pane-info section > h2 { margin-bottom: 0.625rem; }
.table-scroll { overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; font-size: 1rem; font-variant-numeric: tabular-nums; min-width: 34rem; }
.ledger th, .ledger td { padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; }
.ledger th:first-child, .ledger td:first-child { padding-left: 0; }
.ledger th:last-child, .ledger td:last-child { padding-right: 0; }
.ledger .num { text-align: right; white-space: nowrap; }
.ledger thead th { font-size: 0.875rem; font-weight: 600; color: var(--ink-soft); border-bottom: 1px solid var(--ink); white-space: nowrap; }
.ledger .class-row th, .ledger .class-row td { font-weight: 600; padding-top: 0.875rem; border-bottom: 1px solid var(--rule); }
.ledger .class-row th { font-family: var(--head); font-size: 0.9375rem; }
.ledger .lot-row td { border-bottom: 1px solid var(--rule-soft); color: var(--ink-soft); }
.ledger .lot-row td:first-child { padding-left: 1rem; color: var(--ink); }
.ledger-rights .lot-row td:first-child { padding-left: 0; }
.ledger tfoot th, .ledger tfoot td { font-weight: 600; border-top: 2px solid var(--ink); padding-top: 0.75rem; }
.ledger tfoot th { font-family: var(--head); font-size: 0.9375rem; }
.cert { font-weight: 600; white-space: nowrap; }
.lot-note { display: block; font-size: 0.875rem; color: var(--ink-soft); max-width: 30ch; }
.notes { font-size: 0.9375rem; color: var(--ink-soft); max-width: 70ch; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.notes h2 { color: var(--ink); }
.notes strong { color: var(--ink); }
.empty { color: var(--ink-soft); }

/* ------------------------------------------------------------ the records */
.records-head { margin-bottom: 1rem; }
.records-head h2 { font-size: 1.25rem; }
.records-count { margin: 0.25rem 0 0; font-size: 0.9375rem; color: var(--ink-soft); }
.records-tools { display: flex; gap: 0.5rem; margin-top: 0.875rem; flex-wrap: wrap; }
.records-tools input {
  font: inherit; font-size: 0.9375rem; color: var(--ink);
  flex: 1 1 12rem; min-width: 0; height: 2.5rem; padding: 0 0.75rem;
  border: 1px solid var(--field); border-radius: 6px; background: #fff;
}
.tool { font: inherit; font-size: 0.875rem; color: var(--blue-deep); height: 2.5rem; padding: 0 0.75rem; background: #fff; border: 1px solid var(--rule); border-radius: 6px; cursor: pointer; white-space: nowrap; }
.tool:hover { border-color: var(--blue-deep); }

.tree { list-style: none; margin: 0; padding: 0; }
.tree .tree { margin-left: 0.6875rem; padding-left: 0.875rem; border-left: 1px solid var(--rule); }
.tree li { margin: 0; }
.tree .is-hidden { display: none; }
.tree summary {
  display: flex; align-items: baseline; gap: 0.5rem; cursor: pointer; list-style: none;
  padding: 0.4375rem 0.5rem; border-radius: 6px;
}
.tree summary::-webkit-details-marker { display: none; }
.tree summary::before {
  content: ""; flex: none; width: 0.4375rem; height: 0.4375rem; align-self: center;
  border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft);
  transform: rotate(-45deg); margin: 0 0.25rem 0 0.125rem;
}
.tree details[open] > summary::before { transform: rotate(45deg); }
.tree summary:hover, .tree-file:hover { background: #e6ecf4; }
.tree summary .tree-name { font-weight: 600; overflow-wrap: anywhere; }
.tree-count, .tree-size { margin-left: auto; padding-left: 0.5rem; font-size: 0.8125rem; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tree-file { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.375rem 0.5rem; border-radius: 6px; }
.tree-file a { display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; text-decoration: none; color: var(--ink); }
.tree-file a:hover .tree-name { text-decoration: underline; color: var(--blue-deep); }
.tree-file .tree-name { overflow-wrap: anywhere; }
.tree-kind {
  flex: none; min-width: 2.625rem; text-align: center;
  font-family: var(--head); font-weight: 600; font-size: 0.6875rem; letter-spacing: 0.02em; line-height: 1.5;
  color: var(--ink-soft); border: 1px solid currentColor; border-radius: 3px; padding: 0 0.25rem; background: #fff;
}
.kind-pdf { color: #a12a1f; }
.kind-xlsx, .kind-xls, .kind-csv { color: #0b6b43; }
.kind-docx, .kind-doc { color: #0a5c96; }
.tree details.is-target > summary { background: #d3ecfb; }

/* ---------------------------------------------------------- small screens */
@media (max-width: 60rem) {
  .entry { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .entry-brand { padding: 1.5rem 1.5rem 1.75rem; gap: 1.25rem; }
  .entry-title { font-size: 2rem; max-width: none; margin-bottom: 0.5rem; }
  .entry-lede { font-size: 1.0625rem; max-width: 36ch; }
  .tracts { gap: 7px; }
  .tracts span { height: 7px; }
  .entry-main { align-items: flex-start; padding: 2rem 1.5rem 3rem; }

  .shell { height: auto; display: block; }
  .panes { grid-template-columns: minmax(0, 1fr); }
  .pane { overflow: visible; }
  .pane-info { padding: 1.5rem 1.25rem 2rem; }
  .pane-records { padding: 1.5rem 1.25rem 3rem; border-left: 0; border-top: 1px solid var(--rule); }
  .top { padding: 0.75rem 1.25rem; }
  .top-nav { gap: 1rem; }
  .position { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .position > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .position > div:nth-child(n + 3) { border-top: 1px solid var(--rule-soft); }
}

/* On a phone the ledger turns into a list: one block per holding, one line per certificate. */
@media (max-width: 40rem) {
  .table-scroll { overflow: visible; }
  .ledger { min-width: 0; }
  .ledger, .ledger tbody, .ledger tfoot, .ledger tr, .ledger th, .ledger td { display: block; }
  .ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ledger th, .ledger td, .ledger th:first-child, .ledger td:first-child, .ledger th:last-child, .ledger td:last-child { padding: 0; border: 0; }
  .ledger .num { text-align: left; }
  .ledger td:empty { display: none; }
  .ledger td[data-label]::before { content: attr(data-label); display: block; font-size: 0.8125rem; font-weight: 400; color: var(--ink-soft); }

  .ledger .class-row, .ledger tfoot tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1rem;
    padding: 1rem 0 0.75rem; border-top: 2px solid var(--ink);
  }
  .ledger .class-row th, .ledger tfoot th { grid-column: 1 / -1; font-size: 1rem; }
  .ledger .class-row th, .ledger .class-row td, .ledger tfoot th, .ledger tfoot td { padding: 0; border: 0; }
  .ledger .lot-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.125rem 1rem;
    padding: 0.625rem 0 0.625rem 0.75rem; border-top: 1px solid var(--rule-soft);
  }
  .ledger .lot-row td { border: 0; }
  .ledger .lot-row td:first-child { padding: 0; }
  .ledger .lot-row td[data-label]::before { display: inline; content: attr(data-label) " "; }
  .ledger .lot-row td:nth-child(2), .ledger .lot-row td:nth-child(4) { text-align: right; }
  .ledger-rights .lot-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 0; }
  .ledger-rights .lot-row td:nth-child(2), .ledger-rights .lot-row td:nth-child(4) { text-align: left; }
  .ledger-rights .lot-row td[data-label]::before { display: block; content: attr(data-label); }
  .lot-note { max-width: none; }
}

/* ------------------------------------------------------------------ print */
@media print {
  body { font-size: 11pt; }
  .top-nav, .pane-records, .notice, .js-only { display: none !important; }
  .shell { height: auto; display: block; }
  .panes { display: block; }
  .pane { overflow: visible; padding: 0; }
  .top { border: 0; padding: 0 0 12pt; }
  .cert { color: inherit; text-decoration: none; }
}
