@font-face { font-family: Schibsted; src: url(fonts/schibsted-grotesk-latin-wght-normal.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #E7EEEC; --panel: #F6FAF8; --ink: #12322F; --soft: #4F6B67; --line: #C6D5D1; --hair: #D8E3E0;
  --act: #17564E; --act-ink: #F4FBF8; --late: #A3320B; --due: #17564E; --done: #5C7570;
  --c0: #3B5BDB; --c1: #C2410C; --c2: #0F8A6A; --c3: #B5179E; --c4: #8A6D00; --c5: #0A7FA8;
  --r: 6px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14211F; --panel: #1C2D2A; --ink: #E4EFEC; --soft: #9DB5AF; --line: #355049; --hair: #2A403B;
    --act: #8FD8C6; --act-ink: #10211E; --late: #FFA27F; --due: #8FD8C6; --done: #8AA39D;
    --c0: #7F97F7; --c1: #EE8650; --c2: #3DB893; --c3: #E26ECE; --c4: #C2A435; --c5: #45AFD6; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.45 Schibsted, system-ui, sans-serif; }
h1 { font-size: 30px; line-height: 1.15; font-weight: 650; letter-spacing: -.012em; margin: 0; }
h2 { font-size: 15px; font-weight: 650; margin: 0 0 8px; color: var(--soft); }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--act); outline-offset: 2px; }
input, select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
textarea { resize: vertical; }
input[type=file] { padding: 9px; }

.shell { display: flex; min-height: 100dvh; }
nav { position: sticky; top: 0; align-self: flex-start; width: 190px; height: 100dvh; padding: 26px 16px; border-right: 1px solid var(--line); flex: none; }
.brand { display: block; font-weight: 700; font-size: 18px; padding: 0 10px 22px; }
.tabs { display: flex; flex-direction: column; gap: 2px; }
.tabs button { text-align: left; padding: 9px 10px; border-radius: var(--r); color: var(--soft); font-weight: 550; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-current] { background: var(--act); color: var(--act-ink); }
main { flex: 1; min-width: 0; max-width: 760px; padding: 34px 32px 72px; }
section { margin-top: 34px; }
.lede { color: var(--soft); margin-top: 4px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.head select { width: auto; max-width: 52%; }

.primary { background: var(--act); color: var(--act-ink); font-weight: 650; padding: 11px 16px; border-radius: var(--r); min-height: 44px; white-space: nowrap; }
.primary:disabled { opacity: .55; }
.plain { color: var(--soft); min-height: 44px; padding: 0 4px; }
.danger { color: var(--late); font-weight: 600; min-height: 44px; padding: 0 8px; }

.quick { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 8px; margin-top: 18px; }
.quick button { border: 1px solid var(--act); color: var(--act); font-weight: 600; padding: 9px 14px; border-radius: var(--r); min-height: 44px; }
.quick button:first-child { background: var(--act); color: var(--act-ink); }

.list { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 2px; text-align: left; border-bottom: 1px solid var(--hair); text-decoration: none; color: inherit; min-height: 56px; }
button.row:hover, a.row:hover { background: color-mix(in srgb, var(--panel) 70%, transparent); }
.grow { flex: 1; min-width: 0; }
.main { font-weight: 600; overflow-wrap: anywhere; }
.sub { color: var(--soft); font-size: 15px; overflow-wrap: anywhere; }
.status { font-size: 15px; font-weight: 600; text-align: right; flex: none; max-width: 42%; }
.status.late { color: var(--late); }
.status.due { color: var(--due); }
.status.done, .status.quiet { color: var(--done); font-weight: 500; }

/* A vial's flip-off cap identifies each peptide, always beside its name. */
.cap { flex: none; width: 15px; height: 20px; border-radius: 4px 4px 2px 2px; background: var(--c0); box-shadow: inset 0 -5px 0 color-mix(in srgb, var(--panel) 62%, transparent); }
.cap[data-c="1"] { background: var(--c1); } .cap[data-c="2"] { background: var(--c2); } .cap[data-c="3"] { background: var(--c3); } .cap[data-c="4"] { background: var(--c4); } .cap[data-c="5"] { background: var(--c5); }

.figure { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.big { font-size: 46px; line-height: 1; font-weight: 650; letter-spacing: -.02em; }
.unit { color: var(--soft); }
.delta { margin-left: auto; color: var(--soft); font-size: 15px; }

.chart { position: relative; margin-top: 12px; min-height: 220px; touch-action: pan-y; }
.chart svg { display: block; max-width: 100%; }
.grid { stroke: var(--hair); }
.axis { fill: var(--soft); font-size: 12px; }
.line { fill: none; stroke: var(--act); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dot { fill: var(--act); stroke: var(--bg); stroke-width: 2; }
.cross { stroke: var(--soft); stroke-dasharray: 2 3; }
.mark { fill: var(--act); stroke: var(--bg); stroke-width: 2; }
.tip { position: absolute; top: -6px; left: 0; background: var(--ink); color: var(--bg); font-size: 14px; padding: 3px 8px; border-radius: 4px; white-space: nowrap; pointer-events: none; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.seg button { padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line); color: var(--soft); font-weight: 550; min-height: 40px; }
.seg button[aria-pressed=true] { background: var(--act); border-color: var(--act); color: var(--act-ink); }
.seg.small { margin-top: 8px; }

.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 16px; white-space: nowrap; }
th { text-align: left; font-size: 14px; color: var(--soft); font-weight: 600; padding: 8px 14px 8px 0; border-bottom: 1px solid var(--line); }
td { padding: 11px 14px 11px 0; border-bottom: 1px solid var(--hair); }
.n { text-align: right; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: color-mix(in srgb, var(--panel) 70%, transparent); }

.pickbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 10px; color: var(--soft); }
.pickbar p { margin-right: auto; color: var(--ink); font-weight: 600; }
.pickbar button { color: var(--act); font-weight: 600; min-height: 44px; }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.shot { position: relative; display: block; aspect-ratio: 3/4; overflow: hidden; border-radius: var(--r); background: var(--panel); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot span { position: absolute; left: 6px; bottom: 6px; background: rgb(10 25 22 / .72); color: #fff; font-size: 13px; padding: 1px 7px; border-radius: 4px; }
.shot.on { outline: 3px solid var(--act); outline-offset: -3px; }

.stack article { padding: 18px 0; border-bottom: 1px solid var(--line); }
.stack article:first-child { padding-top: 12px; }
.title { display: flex; align-items: center; gap: 10px; }
.title h2 { font-size: 20px; color: var(--ink); margin: 0; }
.title .sub { margin-left: auto; text-align: right; }
.stack article > .sub { margin-top: 4px; }
.links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
.links button { color: var(--act); font-weight: 600; min-height: 44px; }

.syringe { margin-top: 10px; max-width: 340px; }
.syringe svg { display: block; width: 100%; height: auto; }
.barrel { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.tick { stroke: var(--ink); stroke-width: .8; }
.ticknum { fill: var(--soft); font-size: 10px; }
.fill { fill: var(--c0); opacity: .8; }
.fill[data-c="1"] { fill: var(--c1); } .fill[data-c="2"] { fill: var(--c2); } .fill[data-c="3"] { fill: var(--c3); } .fill[data-c="4"] { fill: var(--c4); } .fill[data-c="5"] { fill: var(--c5); }
.draw { margin-top: 2px; font-size: 15px; color: var(--soft); }
.draw b { color: var(--ink); font-size: 19px; font-weight: 650; }
.live { margin-top: 12px; }
.hint { color: var(--soft); font-size: 14px; margin-top: 4px; }
.hint.warn { color: var(--late); font-weight: 600; }

.empty { padding: 18px 0; border-top: 1px solid var(--line); margin-top: 14px; }
.empty p { color: var(--soft); max-width: 44ch; }
.empty .primary { margin-top: 12px; }
.account .sub { font-size: 14px; }

dialog.sheet { border: 0; padding: 0 20px 22px; background: var(--bg); color: var(--ink); border-radius: 12px; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; }
dialog.sheet::backdrop { background: rgb(8 20 18 / .55); }
dialog.sheet header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; background: var(--bg); padding: 12px 0 8px; }
dialog.sheet h2 { font-size: 20px; color: var(--ink); margin: 0; }
.fields { display: flex; flex-wrap: wrap; gap: 12px; }
.field { width: 100%; }
.field.half { width: calc(50% - 6px); }
.field label, legend { display: block; font-size: 15px; font-weight: 600; margin-bottom: 4px; padding: 0; }
fieldset { border: 0; margin: 0; padding: 0; width: 100%; min-width: 0; }
.dots { display: flex; gap: 6px; }
.dots label { flex: 1; }
.dots input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.dots span { display: grid; place-items: center; min-height: 44px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); font-size: 15px; }
.dots input:checked + span { background: var(--act); border-color: var(--act); color: var(--act-ink); font-weight: 650; }
.dots input:focus-visible + span { outline: 2px solid var(--act); outline-offset: 2px; }
.weekdays .dots span { font-size: 13px; }
.scale { display: flex; justify-content: space-between; color: var(--soft); font-size: 13px; margin-top: 3px; }
.actions { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.actions button:not(.primary):not(.danger) { color: var(--act); font-weight: 600; min-height: 44px; }
.err { color: var(--late); font-weight: 600; margin-top: 10px; width: 100%; }
.preview img { display: block; max-height: 220px; max-width: 100%; margin-top: 8px; border-radius: var(--r); }
.viewer img { display: block; width: 100%; max-height: 72dvh; object-fit: contain; border-radius: var(--r); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compare figure { margin: 0; }
.compare img { display: block; width: 100%; border-radius: var(--r); }
.compare figcaption { font-size: 15px; font-weight: 600; margin-top: 4px; }
dialog.sheet:has(.compare) { width: min(860px, calc(100vw - 32px)); }

.auth { width: min(380px, calc(100vw - 32px)); margin: 0 auto; padding-top: 12vh; }
.auth .fields { margin-top: 22px; }
.auth .primary { width: 100%; }

#toast { position: fixed; left: 50%; bottom: calc(82px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: var(--r); opacity: 0; pointer-events: none; transition: opacity .18s; z-index: 50; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; }

@media (max-width: 720px) {
  .shell { display: block; }
  nav { position: fixed; z-index: 10; inset: auto 0 0 0; top: auto; width: auto; height: auto; padding: 0 0 env(safe-area-inset-bottom); background: var(--panel); border-right: 0; border-top: 1px solid var(--line); }
  .brand { display: none; }
  .tabs { flex-direction: row; }
  .tabs button { flex: 1; text-align: center; padding: 15px 0; border-radius: 0; font-size: 15px; min-height: 54px; }
  .tabs button[aria-current] { background: none; color: var(--act); font-weight: 700; box-shadow: inset 0 2px 0 var(--act); }
  main { padding: 22px 16px 96px; }
  .quick { grid-template-columns: 1fr 1fr; justify-content: stretch; }
  .big { font-size: 42px; }
  .delta { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }
