:root {
  color-scheme: light;
  --paper: #f7f8f4;
  --surface: #fff;
  --ink: #1c302d;
  --muted: #50635f;
  --line: #d1d9d2;
  --sea: #18574d;
  --deep: #143f39;
  --pale: #e8f0eb;
  --acid: #e1f6a4;
  --focus: #176f65;
  --error: #922e23;
  --mono: "IBM Plex Mono", Consolas, "Liberation Mono", monospace;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 100%;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
button, select, textarea, input { font: inherit; }
a { color: var(--sea); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: #0d3a33; }
button:disabled, select:disabled { cursor: wait; opacity: .58; }
[hidden] { display: none !important; }
::selection { color: #123c34; background: #dfefa9; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
textarea, input { caret-color: var(--sea); }
[id] { scroll-margin-top: 1rem; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 620; }
.shell { width: min(74rem, calc(100% - 5rem)); margin-inline: auto; }
.skip { position: fixed; top: .5rem; left: .5rem; transform: translateY(-180%); background: white; padding: .7rem 1rem; z-index: 5; }
.skip:focus { transform: none; }
.sr-only, .icon-library { position: absolute; overflow: hidden; width: 1px; height: 1px; clip-path: inset(50%); white-space: nowrap; }
.topbar { border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-inner { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1.3rem; }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font-size: 1.36rem; font-weight: 680; letter-spacing: -.04em; text-decoration: none; }
.brand-light { font-weight: 430; }
.brand-symbol { width: 2rem; height: 2rem; padding: .42rem; border-radius: .42rem; background: var(--sea); display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); gap: 2px; flex: 0 0 auto; }
.brand-symbol i { border: 1px solid #d6e5dc; border-radius: 50%; }
.brand-symbol i:nth-child(3n + 1) { background: var(--acid); border-color: var(--acid); }
.topbar nav { align-self: stretch; display: flex; align-items: stretch; gap: 2rem; }
.topbar nav a { display: inline-flex; align-items: center; position: relative; text-decoration: none; color: var(--muted); font-size: .94rem; font-weight: 550; }
.topbar nav a:hover, .topbar nav .nav-tool { color: var(--sea); }
.nav-tool::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; background: var(--sea); height: 3px; }
.page-intro { padding: 3.35rem 0 2.15rem; }
.page-intro h1 { font-size: 3.45rem; font-weight: 600; letter-spacing: -.04em; line-height: 1.08; }
.page-intro p { max-width: 43rem; margin-top: .93rem; color: var(--muted); font-size: 1.15rem; line-height: 1.56; }
.import-layout { display: grid; grid-template-columns: minmax(0, 1.37fr) minmax(0, 1fr); gap: 1.4rem; align-items: stretch; }
.import-card, .review-panel, .preview-panel { background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; }
.import-card { padding: 1.8rem 1.9rem 1.4rem; }
.card-heading, .section-heading, .plate-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.card-heading h2, .plate-heading h2, .section-heading h2 { font-size: 1.45rem; line-height: 1.25; letter-spacing: -.025em; }
.file-type { padding: .1rem .44rem .15rem; border: 1px solid var(--line); border-radius: .3rem; background: var(--paper); color: var(--muted); font: .8rem/1.35 var(--mono); }
.support-line { margin: .4rem 0 1.33rem; font-size: .88rem; color: var(--muted); }
.support-line span { padding-inline: .22rem; }
.drop-zone { display: flex; position: relative; flex-direction: column; align-items: center; justify-content: center; min-height: 12.2rem; padding: 1.45rem .7rem 1.55rem; border: 1.5px dashed #91a89c; border-radius: .62rem; background: #f5f8f4; transition: background-color 150ms ease-out, border-color 150ms ease-out; }
.drop-zone:focus-within, .drop-zone:hover { border-color: var(--sea); }
.drop-zone.is-dragging, .drop-zone[data-dragging="true"] { background: #e5efd9; border-color: var(--sea); outline: 2px solid var(--sea); outline-offset: -2px; }
.file-illustration, .icon { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.file-illustration { width: 2.35rem; height: 2.35rem; color: var(--sea); stroke-width: 1.35; margin-bottom: .56rem; }
.icon { width: 1.12rem; height: 1.12rem; stroke-width: 1.65; flex: 0 0 auto; }
.drop-title { color: var(--ink); font-size: 1.06rem; font-weight: 540; }
.button, .review-actions button { display: inline-flex; gap: .55rem; align-items: center; justify-content: center; min-height: 2.65rem; border-radius: .43rem; border: 1px solid transparent; padding: .55rem 1rem; cursor: pointer; font-size: .95rem; line-height: 1.25; font-weight: 600; text-align: center; }
.button.primary { background: var(--sea); color: #fff; }
.button.primary:hover, .button.primary:active { background: #10483f; }
.button.secondary, .review-actions button { background: #fff; color: var(--sea); border-color: #b8c7be; }
.button.secondary:hover, .review-actions button:hover { background: var(--pale); border-color: var(--sea); }
.file-action { margin-top: 1.05rem; }
#file-input:focus-visible + .file-action { outline: 3px solid var(--focus); outline-offset: 4px; }
.import-foot { display: flex; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; align-items: center; margin-top: .8rem; }
.import-foot p { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .87rem; }
.import-foot .icon { height: 1rem; width: 1rem; }
.text-button { border: 0; background: transparent; color: var(--sea); font-weight: 600; font-size: .9rem; padding: .42rem 0; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.text-button:hover { color: #082e26; }
#file-error:empty, #status:empty, #review-guidance:empty { display: none; }
#file-error, .no-js { background: #fff2e9; color: var(--error); border-radius: .38rem; margin-top: .8rem; padding: .65rem .85rem; overflow-wrap: anywhere; }
.plate-figure { position: relative; display: flex; flex-direction: column; border-radius: .9rem; overflow: hidden; background: var(--deep); color: #f1f8eb; padding: 1.8rem 1.74rem 1.4rem; }
.plate-heading { align-items: baseline; }
.plate-heading span { color: #c7dace; font: .79rem var(--mono); white-space: nowrap; }
.plate { display: block; width: 90%; max-width: 23rem; height: auto; margin: auto; padding-block: .65rem; }
.plate-labels { font-family: var(--mono); }
.plate-figure figcaption { display: flex; align-items: flex-start; gap: 1rem; border-top: 1px solid #4c6c62; padding-top: .87rem; font-size: .92rem; line-height: 1.43; color: #e2eee6; }
.well-key { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; color: var(--acid); font: .82rem/1.65 var(--mono); }
.well-key i { width: .53rem; height: .53rem; border-radius: 50%; background: var(--acid); }
.workspace-intro { display: flex; justify-content: space-between; align-items: start; gap: 1rem; padding: 2.7rem 0 1.8rem; }
.workspace-intro h1 { font-size: 2.45rem; letter-spacing: -.035em; line-height: 1.18; overflow-wrap: anywhere; }
.workspace-intro p { color: var(--muted); margin-top: .5rem; overflow-wrap: anywhere; }
.workspace-intro .button { flex: 0 0 auto; }
.workspace-links { display: none; }
.work-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr); align-items: start; gap: 1.25rem; }
.review-panel, .preview-panel { min-width: 0; padding: 1.45rem; }
#review-count { font-size: .85rem; color: var(--sea); font-weight: 600; }
.section-intro { font-size: .94rem; color: var(--muted); margin-top: .6rem; }
.check-row { display: inline-flex; align-items: center; gap: .55rem; font-size: .92rem; color: var(--sea); padding-block: .65rem; margin-top: .4rem; font-weight: 550; cursor: pointer; }
.check-row input { width: 1.05rem; height: 1.05rem; accent-color: var(--sea); margin: 0; }
#review-list { overflow-wrap: anywhere; }
#review-list > :first-child { margin-top: .45rem; }
#review-list > * { border-top: 1px solid var(--line); padding: .95rem 0; }
#review-list p { color: var(--muted); margin-block: .4rem; font-size: .95rem; }
#review-list summary { cursor: pointer; color: var(--ink); font-weight: 600; }
#review-list .review-item > summary { display: grid; grid-template-columns: minmax(0,1fr) auto .55rem; grid-template-rows: auto auto; gap: .12rem .55rem; align-items: center; list-style: none; }
#review-list .review-item > summary:hover .review-label { color: var(--sea); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.review-item > summary::-webkit-details-marker { display: none; }
.review-item > summary::after { content: ""; width: .44rem; height: .44rem; border: solid var(--sea); border-width: 0 1.5px 1.5px 0; grid-column: 3; grid-row: 1 / span 2; transform: rotate(45deg); }
.review-item[open] > summary::after { transform: rotate(225deg); }
.review-item .review-meta { grid-column: 1; grid-row: 1; }
.review-item .review-label { grid-column: 1; grid-row: 2; }
.field-status { grid-column: 2; grid-row: 1 / span 2; padding: .15rem .42rem; border: 1px solid #cbdbd0; color: var(--sea); font-size: .77rem; font-weight: 600; border-radius: .28rem; }
.review-body { margin-top: .8rem; }
.review-legend { display: flex; align-items: baseline; gap: .5rem; color: var(--muted); margin-top: .7rem; font-size: .93rem; line-height: 1.45; }
.review-icon { color: #a3302e; width: 1.1rem; height: 1.1rem; stroke-width: 2; align-self: flex-start; margin-top: .12rem; }
.review-legend strong { color: #942b29; }
.review-nav { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; border-top: 1px solid var(--line); padding-top: .8rem; }
.review-nav[hidden] { display: none; }
#review-position { flex: 1 1 7rem; font-size: .87rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.review-nav .button { font-size: .86rem; min-height: 2.25rem; padding: .4rem .68rem; }
.review-nav button:disabled { opacity: .45; cursor: default; }
#review-list .active-review { border-top: none; padding-top: .5rem; }
.active-review h3 { margin: 0; scroll-margin-block-start: 3rem; }
.active-review .review-meta { display: block; margin-bottom: .2rem; }
#review-list .review-question { color: #7f2e2c; background: #fdf1ef; border-radius: .4rem; padding: .6rem .75rem; line-height: 1.5; }
.field-status.is-warning { display: inline-flex; align-items: center; gap: .28rem; color: #942b29; border-color: #e3bfbb; }
.field-status .review-icon { width: .95rem; height: .95rem; margin: 0; align-self: center; }
.review-marker { display: inline-flex; align-items: center; justify-content: center; gap: .16rem; min-width: 1.8rem; min-height: 1.72rem; padding: .12rem .3rem; vertical-align: middle; color: #942b29; border: 1px solid #e9ccc8; border-radius: .35rem; background: #fdf1ef; cursor: pointer; font-size: .8rem; font-weight: 650; }
.review-marker:hover { background: #f7dedb; border-color: #ba7772; }
.review-marker .review-icon { margin: 0; align-self: center; }
.review-body > label { display: block; margin-top: .8rem; font-size: .9rem; color: var(--ink); font-weight: 600; }
.original-wording { padding-block: .28rem; font-size: .9rem; }
#review-list .review-label, #review-list h3 { display: block; font-size: 1rem; font-weight: 600; }
#review-list .review-meta, #review-list small { font-size: .82rem; color: var(--muted); }
#review-list textarea { display: block; width: 100%; min-height: 6.8rem; margin-block: .45rem; padding: .7rem; border: 1px solid #adbdb4; border-radius: .35rem; resize: vertical; color: var(--ink); background: #fdfefb; font-size: 1rem; line-height: 1.5; }
.review-actions, .export-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.review-actions button { font-size: .87rem; min-height: 2.3rem; }
.export-bar { display: flex; flex-wrap: wrap; gap: .65rem; align-items: flex-end; justify-content: space-between; margin-top: 1.1rem; border-bottom: 1px solid var(--line); padding-bottom: 1.15rem; }
.format-help { flex-basis: 100%; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.paste-help { display: none; }
.export-bar:has(option[value="protocolsio"]:checked):not(:has(#download:disabled)) .paste-help { display: inline; }
.export-bar:has(#download:disabled) .format-help { background: #f9efdb; color: #654917; padding: .45rem .6rem; border-radius: .28rem; }
.export-bar button:disabled, .review-actions button:disabled { cursor: not-allowed; }
.field { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; }
.field label { font-size: .86rem; font-weight: 550; color: var(--muted); }
select { min-height: 2.65rem; border: 1px solid #adbbb3; border-radius: .4rem; color: var(--ink); background: white; padding: .42rem .6rem; }
.preview-context { margin-top: 1rem; color: var(--muted); overflow-wrap: anywhere; font-size: .97rem; line-height: 1.55; }
.preview-stocks { margin-top: .6rem; }
.preview-stocks summary { color: var(--sea); font-size: .94rem; font-weight: 600; cursor: pointer; }
.preview-stocks ul { padding-left: 1.45rem; margin-block: .5rem; }
#preview { padding-left: 2.2rem; margin: .5rem 0 0; overflow-wrap: anywhere; }
#preview li { padding-block: .75rem; padding-inline-start: .4rem; border-bottom: 1px solid #e2e8e0; color: var(--ink); line-height: 1.55; white-space: pre-wrap; }
#preview li:last-child { border-bottom: 0; }
#preview li::marker { font-family: var(--mono); font-size: .9rem; color: var(--sea); font-weight: 600; }
#status { position: sticky; top: .5rem; z-index: 2; color: #fff; background: var(--sea); width: fit-content; max-width: 100%; padding: .5rem .9rem; border-radius: .4rem; margin: .65rem 0 0 auto; overflow-wrap: anywhere; font-size: .91rem; }
footer { margin-top: 3.1rem; background: #f0f3ec; border-top: 1px solid var(--line); }
.about-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 5rem; padding-block: 1.85rem 2.1rem; }
.about-layout h2, .about-layout h3 { font-size: 1rem; line-height: 1.45; letter-spacing: -.01em; }
.about-layout p { font-size: .93rem; color: var(--muted); line-height: 1.56; margin-top: .42rem; max-width: 57ch; }
.source-links { display: flex; gap: .24rem 1rem; flex-wrap: wrap; margin-top: .45rem; }
.source-links a { font-size: .85rem; line-height: 1.6; font-weight: 560; }
@media (min-width: 85rem) { .page-intro { padding-block: 3.8rem 2.45rem; } .drop-zone { min-height: 13rem; } }
@media (max-width: 64rem) {
  .shell { width: calc(100% - 3rem); }
  .import-card, .plate-figure { padding: 1.5rem; }
  .import-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1rem; }
  .work-layout { grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr); }
  .about-layout { gap: 2.5rem; }
}
@media (max-width: 48rem) {
  .shell { width: calc(100% - 2.5rem); }
  .topbar-inner { min-height: 4rem; }
  .topbar nav { gap: 1.15rem; }
  .page-intro { padding-block: 2.5rem 1.6rem; }
  .page-intro h1 { font-size: 2.65rem; }
  .page-intro p { font-size: 1.05rem; }
  .import-layout, .work-layout { grid-template-columns: 1fr; }
  .plate-figure { display: grid; grid-template: auto 1fr / minmax(0, 1fr) minmax(12rem, 1fr); gap: .6rem 1.25rem; align-items: center; }
  .plate { grid-column: 2; grid-row: 1 / span 2; width: 100%; padding: 0; }
  .plate-heading { display: block; }
  .plate-heading span { display: block; margin-top: .25rem; }
  .plate-figure figcaption { flex-direction: column; gap: .25rem; border: 0; padding-top: .15rem; }
  .workspace-intro { flex-wrap: wrap; padding-block: 2rem 1.25rem; }
  .workspace-intro h1 { font-size: 2rem; }
  .workspace-links { display: flex; flex-wrap: wrap; gap: .65rem 1.25rem; margin: -.25rem 0 1.2rem; font-size: .93rem; font-weight: 600; }
  #review-title, #preview-title { scroll-margin-top: 3.7rem; }
  .about-layout { grid-template-columns: 1fr; gap: 1.25rem; padding-block: 1.5rem; }
  footer { margin-top: 2rem; }
}
@media (max-width: 32rem) {
  .shell { width: calc(100% - 2rem); }
  .wordmark { font-size: 1.12rem; gap: .42rem; }
  .brand-symbol { width: 1.75rem; height: 1.75rem; padding: .36rem; }
  .topbar nav { gap: .85rem; }
  .topbar nav a { font-size: .84rem; }
  .page-intro h1 { font-size: 2.38rem; }
  .import-card, .plate-figure, .review-panel, .preview-panel { padding: 1.2rem; }
  .card-heading h2, .plate-heading h2, .section-heading h2 { font-size: 1.27rem; }
  .support-line { font-size: .81rem; }
  .drop-zone { min-height: 11.5rem; }
  .plate-figure { display: flex; align-items: stretch; gap: .65rem; }
  .plate-heading { display: flex; }
  .plate-heading span { margin: 0; }
  .plate { max-width: 18rem; }
  .plate-figure figcaption { flex-direction: row; gap: .8rem; border-top: 1px solid #4c6c62; padding-top: .65rem; }
  .section-heading { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
