@layer base {
  :root {
    color-scheme: light;
    --paper: #f5f3eb;
    --surface: #fffefa;
    --ink: #172b2e;
    --muted: #4f6565;
    --line: #d5ddd4;
    --pine: #102e2d;
    --pine-light: #173d3b;
    --accent: #21645c;
    --amber: #f0be7e;
    --serif: Georgia, "Times New Roman", serif;
    --sans: "Segoe UI", system-ui, sans-serif;
    --mono: "Cascadia Mono", Consolas, monospace;
    font: 16px/1.58 var(--sans);
    color: var(--ink);
    background: var(--paper);
  }
  *, *::before, *::after { box-sizing: border-box; }
  body { margin: 0; }
  img { max-width: 100%; display: block; }
  a { color: var(--accent); text-underline-offset: .2em; }
  button, input, select { font: inherit; }
  button { cursor: pointer; }
  button:disabled { cursor: default; }
  [hidden] { display: none !important; }
  :focus-visible { outline: 3px solid #198477; outline-offset: 4px; }
  p, h1, h2, h3, figure { margin: 0; }
  h1, h2 { line-height: 1.06; }
  h1, .serif { font-family: var(--serif); font-weight: 500; letter-spacing: -.038em; }
  h2 { font-size: clamp(1.45rem, 3vw, 2.2rem); letter-spacing: -.034em; }
  h3 { font-size: 1.08rem; line-height: 1.35; }
  p + p { margin-top: .7rem; }
  input[type=checkbox], input[type=range] { accent-color: var(--accent); }
  section[id] { scroll-margin-top: 1.25rem; }
}

.site-width { width: min(100% - clamp(2rem, 7vw, 7rem), 1320px); margin-inline: auto; }
.kicker { margin: 0 0 .7rem; font: 700 .73rem/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.subtle, .muted { color: var(--muted); }
.small-text { font-size: .89rem; color: var(--muted); }
.key { font-family: var(--mono); font-size: .9em; font-weight: 650; color: var(--pine); overflow-wrap: anywhere; }
.skip-link { position: absolute; top: .75rem; left: 1rem; z-index: 20; padding: .65rem 1rem; border-radius: 6px; background: var(--surface); color: var(--ink); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.lab-header { background: var(--pine); color: #f4f7ef; border-bottom: 1px solid #3c5951; }
.lab-header > div { min-height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.25rem; }
.lab-brand { display: inline-flex; width: fit-content; align-items: center; gap: .7rem; color: inherit; text-decoration: none; }
.lab-brand strong, .lab-brand small { display: block; line-height: 1.15; }
.lab-brand strong { font: 500 1.36rem/1.08 var(--serif); }
.lab-brand small { margin-top: .22rem; color: #c1d3c3; font: 650 .59rem/1.1 var(--mono); letter-spacing: .12em; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #648179; border-radius: 8px; color: var(--amber); font: 500 1.65rem/1 var(--serif); }
.lab-nav, .lab-account { display: flex; gap: .4rem; align-items: center; }
.lab-nav a, .section-nav a, .lab-header .sign-out { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border-radius: 6px; font: 600 .89rem/1.2 var(--sans); text-decoration: none; text-transform: none; letter-spacing: normal; white-space: nowrap; }
.lab-nav a { padding: .55rem .95rem; color: #eff4ed; }
.lab-nav a:hover { background: #284945; }
.lab-nav a[aria-current] { background: #def1e3; color: var(--pine); }
.lab-account { grid-column: 3; justify-content: end; }
.lab-header .sign-out { padding: .45rem .8rem; border: 1px solid #789087; background: transparent; color: inherit; }
.lab-header .sign-out:hover { background: var(--pine-light); }
.lab-header :focus-visible, .on-dark :focus-visible { outline-color: var(--amber); }
.section-nav { background: #e9eee5; border-bottom: 1px solid #cbd8cb; }
.section-nav > div { display: flex; flex-wrap: wrap; gap: 0 .85rem; }
.section-nav a { position: relative; padding: .35rem .5rem; color: var(--ink); border-radius: 0; }
.section-nav a[aria-current]::after { content: ""; position: absolute; inset: auto .5rem 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.section-nav a:hover { text-decoration: underline; }

.button { display: inline-flex; justify-content: center; align-items: center; width: fit-content; min-height: 45px; padding: .62rem 1rem; gap: .55rem; border: 1px solid transparent; border-radius: 7px; font-weight: 660; font-size: .92rem; line-height: 1.25; text-decoration: none; }
.button.primary { background: var(--pine); color: #fff; }
.button.primary:hover { background: #25524c; }
.button.secondary { border-color: #aabdb2; background: var(--surface); color: var(--pine); }
.button.secondary:hover { border-color: var(--accent); background: #e8f1e9; }
.button .format { font: 650 .65rem var(--mono); color: #d2e7d7; }
.action-row { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem 1rem; }
.sheet { padding: clamp(1.05rem, 2.5vw, 1.9rem); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.sheet > :first-child { margin-top: 0; }
.sheet h2 + p, .sheet h3 + p { margin-top: .6rem; }
.sheet > :last-child { margin-bottom: 0; }
.standard-page { min-height: calc(100svh - 205px); padding-block: clamp(1.6rem, 4.5vw, 4rem); }
.page-intro { max-width: 780px; margin-bottom: clamp(1.4rem, 3vw, 2.4rem); }
.page-intro h1, .notice h1 { font-size: clamp(2.45rem, 6vw, 4.4rem); }
.page-intro > p:not(.kicker), .notice > p { color: var(--muted); margin-top: .8rem; max-width: 64ch; }
.notice { max-width: 720px; margin: 5vh 0; }
.notice .button { margin-top: 1.2rem; }
.access-sheet { max-width: 840px; }
.access-sheet ul { list-style: none; margin-bottom: 0; padding-left: 0; }
.access-row { display: flex; justify-content: space-between; align-items: center; gap: .65rem 1rem; flex-wrap: wrap; padding: 1rem 0; border-top: 1px solid var(--line); }
.access-row:last-child { padding-bottom: 0; }
.access-row strong, .access-row span { display: block; overflow-wrap: anywhere; }
.access-row span { color: var(--muted); font-size: .9rem; }
.download-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.download-card { display: flex; flex-direction: column; align-items: start; }
.download-card h2 { font-size: 1.5rem; }
.download-card > p:not(.kicker) { flex: 1; }
.download-card .button { margin-top: 1.15rem; }
.lab-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.lab-footer > div { display: flex; justify-content: space-between; gap: .4rem 1.3rem; flex-wrap: wrap; padding-block: 1.25rem; }
.lab-footer strong { color: var(--pine); font-weight: 650; }

.entry { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(280px, 1fr); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.entry-cover { background: var(--pine); color: #f7f7ea; padding: clamp(1.65rem, 5vw, 4rem); }
.entry-cover .kicker { color: var(--amber); }
.entry-cover h1 { font-size: clamp(2.5rem, 6vw, 5.25rem); }
.entry-cover > p:not(.kicker) { margin-top: .9rem; max-width: 31ch; color: #d2e1d8; }
.entry-elevation { position: relative; height: clamp(108px, 19vw, 184px); max-width: 410px; margin-top: 2rem; border-bottom: 1px solid #729188; }
.entry-elevation span { position: absolute; bottom: 0; width: 20%; border: 1px solid #87a79c; border-bottom: 0; background: repeating-linear-gradient(to top, #143b37 0 20px, #719386 21px 22px); }
.entry-elevation span:nth-child(1) { left: 6%; height: 65%; }
.entry-elevation span:nth-child(2) { left: 41%; height: 99%; }
.entry-elevation span:nth-child(3) { left: 76%; height: 76%; }
.entry-elevation i { position: absolute; height: 5px; width: 15%; background: var(--amber); }
.entry-elevation i:nth-of-type(1) { left: 26%; bottom: 36%; }
.entry-elevation i:nth-of-type(2) { left: 61%; bottom: 60%; }
.entry-form { padding: clamp(1.5rem, 4vw, 3rem); background: var(--surface); display: flex; flex-direction: column; justify-content: center; align-items: start; }
.entry-form p { margin: .65rem 0 1rem; color: var(--muted); }
.entry-form form { display: grid; grid-template-columns: minmax(0,1fr); width: 100%; gap: .35rem; }
.entry-form label, .field-label { font-weight: 650; }
.entry-form select, .entry-form input, .field-select { width: 100%; min-height: 45px; border: 1px solid #8ca89c; border-radius: 6px; background: #fff; color: var(--ink); padding: .55rem .65rem; }
.entry-form input, .entry-form select { margin-bottom: .7rem; }
.entry-form .alert { border-left: 3px solid #9a382e; color: #792a22; padding-left: .65rem; }
.entry-form #google-signin { margin-bottom: 1rem; }
.account-options { display: flex; flex-wrap: wrap; gap: 0 1rem; margin-top: .4rem; }
.account-options button { min-height: 44px; padding: .25rem 0; border: 0; background: transparent; color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.entry-form #account-status:empty { display: none; }

@media (max-width: 760px) {
  .lab-header > div { grid-template-columns: 1fr auto; min-height: 58px; padding-block: .55rem .45rem; gap: .45rem; }
  .lab-account { grid-column: 2; grid-row: 1; }
  .lab-nav { grid-column: 1/-1; grid-row: 2; flex-wrap: wrap; padding-top: .22rem; border-top: 1px solid #45655c; }
  .lab-nav a { padding: .48rem .68rem; }
  .entry, .download-grid { grid-template-columns: minmax(0,1fr); }
}

