:root {
  color-scheme: light;
  --ink: #182a24;
  --muted: #51635a;
  --paper: #f2f5ef;
  --line: #d3ddd3;
  --accent: #285b44;
  --warn: #7b4809;
  font: 16px/1.5 system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: var(--accent); }
.frame { width: min(100% - 2rem, 58rem); margin-inline: auto; }
.masthead { background: #142720; color: #fff; }
.bar, .brand, .row, footer { display: flex; align-items: center; gap: .75rem; }
.bar, footer { justify-content: space-between; }
.bar { min-height: 4.25rem; }
.brand { color: white; text-decoration: none; font-size: 1.2rem; font-weight: 750; }
.mark { background: #c9edaf; color: #142720; padding: .32rem .5rem; border-radius: .45rem; font-size: .86rem; letter-spacing: -.03em; }
.demo, .eyebrow, footer { font-size: .74rem; font-weight: 750; letter-spacing: .11em; }
.demo { color: #c9edaf; border: 1px solid #668273; border-radius: 99px; padding: .3rem .65rem; }
main { min-height: 70vh; padding-block: 1.5rem 2.5rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.06; letter-spacing: -.055em; }
h2 { font-size: 1.2rem; margin-bottom: .65rem; }
h3 { font-size: 1.05rem; }
p { margin-block: .45rem; }
.eyebrow { color: var(--accent); text-transform: uppercase; margin-bottom: .45rem; }
.hero { background: #e0ebdc; padding: clamp(1.2rem, 5vw, 2.5rem); border: 1px solid var(--line); border-radius: 1rem; }
.hero p:last-child { margin-bottom: 0; }
.group { margin-top: 1.5rem; }
.grid, .stack { display: grid; gap: .75rem; }
.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile, .card { padding: 1rem; border-radius: .8rem; border: 1px solid var(--line); background: #fff; }
.tile { display: grid; gap: .4rem; align-content: start; text-decoration: none; color: var(--ink); min-height: 7rem; }
.tile strong { line-height: 1.25; }
.tile small, .muted, footer { color: var(--muted); }
.tile:hover, .linkrow:hover { border-color: var(--accent); background: #e9f3e5; }
.tile .icon { font-size: 1.4rem; color: var(--accent); line-height: 1; }
.linkrow { display: flex; gap: .65rem; align-items: center; justify-content: space-between; min-height: 3.2rem; padding: .65rem .9rem; background: white; border: 1px solid var(--line); border-radius: .65rem; text-decoration: none; color: var(--ink); font-weight: 650; }
.badge { display: inline-block; width: fit-content; padding: .2rem .55rem; border-radius: 99px; background: #e2efe4; color: #204832; font-size: .8rem; font-weight: 650; }
.warn { background: #fff0d6; color: var(--warn); }
.row { flex-wrap: wrap; }
.between { justify-content: space-between; }
.back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: .6rem; }
form { display: grid; gap: .8rem; }
label { display: grid; gap: .3rem; font-weight: 650; }
input, select, button { font: inherit; min-height: 44px; }
input:not([type=checkbox]), select { width: 100%; min-width: 0; padding: .6rem .65rem; color: var(--ink); background: white; border: 1px solid #84988b; border-radius: .45rem; }
button { padding: .55rem .85rem; border: 1px solid var(--accent); border-radius: .5rem; background: var(--accent); color: white; font-weight: 700; cursor: pointer; }
button.secondary { color: var(--accent); background: white; }
button:hover { filter: brightness(.93); }
:focus-visible { outline: 3px solid #437d32; outline-offset: 3px; }
.check { display: flex; gap: .65rem; align-items: center; min-height: 44px; }
.check input { width: 1.25rem; min-height: 0; height: 1.25rem; flex: none; accent-color: var(--accent); }
.lookup { display: grid; gap: .55rem; grid-template-columns: 1fr auto; align-items: end; }
.lookup button { height: 46px; }
#notice:not(:empty), .error:not(:empty) { padding: .75rem; border-radius: .55rem; }
#notice:not(:empty) { margin-bottom: .75rem; background: #dcefe0; }
#approved-name { margin: 0; }
#shared-actions button { min-height: 3.75rem; text-align: left; }
#dashboard-nav button { text-align: left; }
#reports-panel, #report-preview { min-width: 0; }
.report-table { overflow-x: auto; }
.report-table table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.report-table th, .report-table td {
  padding: .45rem .6rem;
  border: 1px solid #c7d4c8;
  text-align: left;
  vertical-align: top;
  white-space: pre-wrap;
  min-width: 7rem;
}
.report-table th { background: #e0ebdc; }
#dashboard-nav button[aria-expanded=true], #inventory-types button[aria-pressed=true] {
  background: #e0ebdc;
}
#workflow-status:empty, #auth-status:empty, #shared-draft:empty { display: none; }
#workflow-status:not(:empty) {
  margin: 0;
  padding: .65rem .8rem;
  border-left: .25rem solid var(--accent);
  background: #e0ebdc;
  border-radius: .35rem;
}
#official-panel, #range-panel, #history-panel, #shared-inventory { min-height: 8rem; }
.error:not(:empty) { background: #fbe4df; color: #79271c; }
[hidden] { display: none !important; }
code { overflow-wrap: anywhere; }
#scanner-dialog {
  width: min(100% - 1rem, 34rem);
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  padding: clamp(.625rem, 2vw, 1rem);
  border: 1px solid var(--line);
  border-radius: .8rem;
  color: var(--ink);
  background: white;
}
#scanner-dialog::backdrop { background: rgb(20 39 32 / .72); }
#scanner-reader {
  width: 100%;
  min-width: 0;
  min-height: 8rem;
  overflow: hidden;
  border-radius: .5rem;
  background: #142720;
}
#scanner-preview { position: relative; }
#scanner-reader video {
  display: block;
  width: 100% !important;
  height: auto;
}
#scanner-guide {
  position: absolute;
  border: 2px solid #fff;
  border-radius: .3rem;
  box-shadow: 0 0 0 100vmax rgb(0 0 0 / .28);
  pointer-events: none;
}
.scanner-diagnostics { white-space: pre-wrap; overflow-wrap: anywhere; }
footer { padding-block: 1.1rem; border-top: 1px solid var(--line); }
footer span { letter-spacing: 0; text-align: right; }
@media (min-width: 48rem) {
  .actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tools { grid-template-columns: 1fr 1fr; }
  .content { max-width: 43rem; }
}
