:root {
  --bg: #F2F4F5; --panel: #FFFFFF; --ink: #1E2124; --muted: #53565A;
  --line: #D8DCDF; --accent: #005F83; --accent-soft: #E2EEF5; --coral: #855C05;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11161A; --panel: #1B2228; --ink: #E9EDEF; --muted: #A7ADB2;
    --line: #2C353C; --accent: #4E95B3; --accent-soft: #10303F; --coral: #F1B434;
  }
}
:root[data-theme="dark"] {
  --bg: #11161A; --panel: #1B2228; --ink: #E9EDEF; --muted: #A7ADB2;
  --line: #2C353C; --accent: #4E95B3; --accent-soft: #10303F; --coral: #F1B434;
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
}
.wrap { max-width: 1340px; margin: 0 auto; padding: 0 16px 64px; }
.masthead { background: #005F83; color: #fff; margin: 0 -16px 22px;
  padding: 20px 16px; display: flex; align-items: center; gap: 26px; }
.masthead .lockup { height: 52px; width: auto; display: block; flex: 0 0 auto;
  margin-right: 6px; }
.masthead .mast-text { flex: 1 1 auto; min-width: 0; }
@media (max-width: 760px) { .masthead { gap: 14px; }
  .masthead .lockup { height: 34px; } .masthead h1 { font-size: 1.1rem; } }
.masthead .dept { margin: 0 0 6px; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: #BFDCE9; }
.masthead h1 { color: #fff; margin: 0 0 4px; }
.masthead .sub { color: #CFE4EE; margin: 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(224px, 30%, 360px);
  gap: 20px; align-items: start; }
.layout.wide { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 620px) { .layout { grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; } .panel { padding: 10px; } .card { width: 100%; } }
h1 { font-size: 1.4rem; margin: 0 0 4px; font-weight: 700; letter-spacing: -0.01em; }
.sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 20px; }
.tabs { margin-top: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab {
  font-weight: 600;
  appearance: none; border: 1px solid var(--line); background: var(--panel);
  color: var(--muted); font: inherit; font-size: 0.88rem; padding: 7px 14px;
  border-radius: 999px; cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab-pull { border-radius: 6px; border-color: var(--muted); color: var(--ink);
  border-style: dashed; margin-left: 6px; }
.tab-pull[aria-selected="true"] { background: var(--muted); border-color: var(--muted);
  border-style: solid; color: #fff; }
.board {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; overflow-x: auto;
}
.board svg { width: 100%; min-width: 700px; height: auto; display: block; }
.hint { color: var(--muted); font-size: 0.82rem; margin: 10px 2px 0; }
.hit { fill: transparent; cursor: pointer; stroke: none; }
.hit:hover { fill: rgba(15,110,86,0.12); }
.hit:focus-visible { outline: none; fill: rgba(15,110,86,0.2); }
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px;
  position: sticky; top: calc(16px + env(safe-area-inset-top, 0px));
}
.panel h2 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.ship {
  display: inline-block; margin-left: 8px; font-size: 0.72rem; font-weight: 600;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 999px;
  padding: 1px 9px; vertical-align: 2px;
}
.covers { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; }
.card { width: calc(50% - 9px); min-width: 112px; }
.card img.cover { cursor: zoom-in; }
.card img {
  width: 100%; max-width: 100%; height: auto; display: block;
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
.card .t { font-size: 0.82rem; font-weight: 600; margin-top: 9px; line-height: 1.3; }
.card .s { font-size: 0.78rem; color: var(--muted); margin-top: 2px; line-height: 1.3; }
.card .c { font-size: 0.78rem; color: var(--accent); margin-top: 4px; font-weight: 600; }
.card .summary { display: inline-block; margin-top: 5px; font-size: 0.76rem;
  color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.card .summary:hover { text-decoration: none; }
.card .meta { font-size: 0.72rem; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }
.card .qty { font-size: 0.8rem; margin-top: 2px; }
.card .qty strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.card .meta.none { color: var(--coral); }
.pullhead { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 4px; }
.pulltitle { margin: 0; font-size: 1.05rem; font-weight: 600; }
.pullsub { margin: 4px 0 0; color: var(--muted); font-size: 0.85rem; }
.pdfnote { font-size: 0.8rem; color: var(--muted); align-self: center; }
.printbtn { appearance: none; border: 1px solid var(--accent); background: var(--accent);
  color: #fff; font: inherit; font-size: 0.85rem; padding: 7px 16px;
  border-radius: 999px; cursor: pointer; flex: none; }
.gradehead { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }
.pullrow { display: flex; align-items: center; gap: 12px; padding: 9px 4px;
  border-bottom: 1px solid var(--line); }
.pullrow img { width: 34px; height: auto; border: 1px solid var(--line); border-radius: 3px;
  flex: none; background: #fff; }
.pullrow .box { width: 17px; height: 17px; border: 1.5px solid var(--muted);
  border-radius: 3px; flex: none; }
.pullrow .txt { flex: 1; min-width: 0; }
.pullrow .txt b { font-weight: 600; font-size: 0.88rem; display: block; }
.pullrow .txt span { color: var(--muted); font-size: 0.78rem; }
.pullrow .n { font-weight: 600; font-size: 1rem; font-variant-numeric: tabular-nums;
  flex: none; min-width: 62px; text-align: right; }
.pullrow .n em { font-style: normal; font-weight: 400; font-size: 0.72rem;
  color: var(--muted); display: block; }
.pulltotal { margin-top: 16px; font-size: 0.9rem; }
.pulltotal strong { font-variant-numeric: tabular-nums; }
@media print {
  .tabs, .side, .hint, .printbtn, h1, .sub { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .layout { display: block; }
  .board { border: none; padding: 0; }
  .pullrow { break-inside: avoid; }
  body { background: #fff; color: #000; }
}
.pullboard { padding: 0; border: none; background: none; overflow: visible; }
.sheettools { display: flex; gap: 8px; margin-bottom: 14px; }
.sheet {
  background: #FFFFFF; color: #16150F; max-width: 8.5in; margin: 0 auto;
  padding: 0.55in 0.6in 0.5in; border: 1px solid #DEDCD3; border-radius: 3px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.10);
  font-size: 10.5pt; line-height: 1.35;
}
.sheet .org { font-size: 8pt; letter-spacing: 0.12em; text-transform: uppercase;
  color: #005F83; font-weight: 700; margin: 0 0 3px; }
.sheet h2 { margin: 0 0 2px; font-size: 16pt; font-weight: 700; letter-spacing: -0.01em;
  color: #005F83; }
.sheet .stand { margin: 0 0 14px; font-size: 9.5pt; color: #5F5E5A; }
.sheet .rule { height: 3px; background: #005F83; margin: 0 0 12px; }
.meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 18px;
  border: 1px solid #CFCDC4; padding: 10px 12px; margin-bottom: 16px; }
.meta div span { display: block; font-size: 7.5pt; letter-spacing: 0.1em;
  text-transform: uppercase; color: #6B6A66; }
.meta div b { font-size: 11pt; font-weight: 600; }
.meta div .fill { display: block; border-bottom: 1px solid #16150F; height: 15px; }
.gtitle { font-size: 9pt; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: #005F83; color: #fff; border: 1px solid #005F83; border-bottom: none;
  padding: 5px 9px; margin: 0; }
table.pull { width: 100%; border-collapse: collapse; margin: 0 0 14px; }
table.pull th { font-size: 7.5pt; letter-spacing: 0.08em; text-transform: uppercase;
  color: #5F5E5A; text-align: left; font-weight: 600; padding: 5px 9px;
  border: 1px solid #CFCDC4; background: #F7F6F2; }
table.pull td { padding: 6px 9px; border: 1px solid #CFCDC4; vertical-align: middle; }
table.pull td.tick { width: 30px; text-align: center; }
table.pull td.tick i { display: inline-block; width: 14px; height: 14px;
  border: 1.5px solid #16150F; border-radius: 2px; }
table.pull td.pic { width: 40px; }
table.pull td.pic img { width: 30px; display: block; border: 1px solid #DEDCD3; }
table.pull td.num { width: 62px; text-align: right; font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: 11pt; }
table.pull td.num em { display: block; font-style: normal; font-weight: 400;
  font-size: 7pt; letter-spacing: 0.05em; text-transform: uppercase; color: #6B6A66; }
table.pull td.init { width: 74px; }
table.pull .ttl { font-weight: 600; }
table.pull .sub { color: #5F5E5A; font-size: 9pt; }
table.pull .isbn { font-size: 8.5pt; color: #5F5E5A; font-variant-numeric: tabular-nums; }
table.pull tr.sum td { background: #F7F6F2; font-weight: 700; }
.howto { border: 1px solid #005F83; background: #E2EEF5; padding: 12px 16px 12px;
  margin-top: 18px; }
.howto h3 { margin: 0 0 6px; font-size: 8.5pt; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #005F83; }
.howto ol { margin: 0; padding-left: 18px; font-size: 9.5pt; }
.howto li { margin: 2px 0; }
.sign { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 22px; margin-top: 26px; }
.sign div { border-top: 1px solid #16150F; padding-top: 4px; font-size: 8pt;
  letter-spacing: 0.06em; text-transform: uppercase; color: #5F5E5A; }
.sheet .foot { margin-top: 18px; font-size: 8.5pt; color: #5F5E5A; }
.needsite { background: var(--panel); border: 1px dashed var(--accent); border-radius: 12px;
  padding: 22px; text-align: center; color: var(--ink); font-size: 0.92rem; }
.picker.required select { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pdfnote { font-size: 0.8rem; color: var(--muted); align-self: center; }
.printbtn { appearance: none; border: 1px solid var(--accent); background: var(--accent);
  color: #fff; font: inherit; font-size: 0.85rem; padding: 7px 14px;
  border-radius: 8px; cursor: pointer; }
@page { size: letter; margin: 0.5in; }
@media print {
  h1, .sub, .tabs, .hint, .side, .sheettools, .picker, .lightbox { display: none !important; }
  .layout { display: block; }
  .wrap { max-width: none; padding: 0; }
  body { background: #fff; }
  .sheet { border: none; box-shadow: none; padding: 0; max-width: none; }
  .gtitle, table.pull { break-inside: avoid; }
  table.pull tr { break-inside: avoid; }
}
.refs { margin-top: 14px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px 16px; }
.refs h2 { margin: 0 0 8px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); }
.refs p { margin: 0 0 12px; }
.refs p:last-child { margin-bottom: 0; }
.refs a { display: block; font-size: 0.88rem; font-weight: 600; color: var(--accent);
  text-decoration: underline; text-underline-offset: 2px; }
.refs a:hover { text-decoration: none; }
.refs span { display: block; margin-top: 3px; font-size: 0.78rem; color: var(--muted);
  line-height: 1.4; }
.picker { display: block; margin-bottom: 16px; max-width: 380px; }
.picker span { display: block; font-size: 0.75rem; color: var(--muted); margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: 0.06em; }
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(12,12,14,0.88);
  display: flex; align-items: center; justify-content: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 20px calc(24px + env(safe-area-inset-bottom, 0px));
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; text-align: center; max-height: 100%; }
.lightbox img {
  max-width: min(760px, 92vw); max-height: 78vh; width: auto; height: auto;
  border-radius: 6px; background: #fff; display: block; margin: 0 auto;
}
.lightbox figcaption {
  color: #F2F0EA; font-size: 0.85rem; margin-top: 12px; max-width: 520px;
  margin-left: auto; margin-right: auto; line-height: 1.4;
}
.lb-close {
  position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 16px;
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.35); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.picker select {
  width: 100%; font: inherit; font-size: 0.9rem; padding: 8px 10px; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
}
.empty { color: var(--muted); font-size: 0.9rem; margin: 0; }
