:root {
  --canvas: #ece7db;
  --paper: #f7f4eb;
  --paper-deep: #e8e0d0;
  --ink: #292b25;
  --muted: #687064;
  --olive: #57634a;
  --olive-dark: #354233;
  --olive-soft: #dce1d1;
  --leather: #9c6b46;
  --leather-dark: #71462e;
  --brass: #c59a5b;
  --danger: #a9493d;
  --danger-soft: #f4dfd8;
  --line: #d3cabb;
  --shadow: 0 18px 44px rgba(58, 54, 41, 0.1);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--canvas);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 6%, rgba(255,255,255,.55), transparent 26rem),
    linear-gradient(110deg, rgba(255,255,255,.13), transparent 40%),
    var(--canvas);
  font-family: "Avenir Next", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input[type="checkbox"] {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 64px) 34px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--paper);
  background: var(--olive-dark);
  border-radius: 7px 7px 7px 2px;
  font-family: Georgia, serif;
  font-size: 20px;
  box-shadow: 4px 4px 0 var(--leather);
}

.brand-name,
.brand-caption {
  display: block;
}

.brand-name {
  font-weight: 800;
  letter-spacing: .06em;
}

.brand-caption,
.eyebrow,
.section-kicker {
  color: var(--olive);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
}

.brand-caption {
  margin-top: 1px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .2em;
}

.header-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(360px, 1.08fr);
  align-items: stretch;
  gap: clamp(26px, 6vw, 82px);
  padding: clamp(20px, 5vw, 58px) 0 clamp(42px, 7vw, 84px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 600px;
}

.eyebrow {
  margin: 0 0 18px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.15;
}

h1 {
  margin: 0;
  color: var(--olive-dark);
  font-family: Georgia, "Hiragino Mincho ProN", serif;
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 500;
  letter-spacing: -.06em;
}

h1 span {
  display: block;
  margin-top: 14px;
  color: var(--leather-dark);
  font-family: "Avenir Next", "Hiragino Sans", system-ui, sans-serif;
  font-size: clamp(15px, 1.75vw, 21px);
  font-weight: 700;
  letter-spacing: .08em;
}

.hero-lede {
  max-width: 540px;
  margin: 27px 0 25px;
  color: #54594f;
  font-size: 15px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 20px;
  color: var(--muted);
  font-size: 12px;
}

.hero-facts b {
  margin-right: 4px;
  color: var(--leather);
  font-family: Georgia, serif;
  font-size: 16px;
}

.hero-image {
  position: relative;
  min-height: 330px;
  margin: 0;
  overflow: hidden;
  border: 8px solid var(--paper);
  border-radius: 4px 24px 4px 24px;
  background: var(--paper-deep);
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

.hero-image::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(93, 77, 52, .25);
  box-shadow: inset 0 0 0 10px rgba(255,255,255,.08);
}

.hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
}

.hero-image figcaption {
  position: absolute;
  right: 20px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px 7px 9px;
  color: var(--paper);
  background: var(--leather-dark);
  box-shadow: 3px 4px 0 rgba(51, 42, 30, .25);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  transform: rotate(-3deg);
}

.tag-hole {
  width: 8px;
  height: 8px;
  border: 2px solid var(--paper);
  border-radius: 50%;
}

.status-line {
  min-height: 25px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.preset-panel {
  margin-bottom: 22px;
  background: rgba(244, 239, 228, .82);
}

.preset-badge {
  flex: 0 0 auto;
  padding: 4px 9px;
  color: var(--leather-dark);
  background: #f0dfcf;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
}

.preset-controls {
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(0, 1.6fr) auto;
  align-items: end;
  gap: 15px;
}

.preset-copy {
  min-width: 0;
  padding-bottom: 4px;
}

.preset-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.preset-copy .preset-warning {
  margin-top: 5px;
  color: var(--leather-dark);
  font-size: 11px;
}

.preset-controls .button {
  white-space: nowrap;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(320px, .78fr);
  align-items: start;
  gap: 22px;
}

.workspace-main,
.workspace-side {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.panel,
.summary-card {
  background: rgba(250, 248, 241, .9);
  border: 1px solid rgba(130, 119, 98, .22);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(68, 61, 48, .055);
}

.panel {
  padding: clamp(18px, 3vw, 30px);
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 22px;
}

.heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.panel-heading h2 {
  margin: 4px 0 0;
  color: var(--olive-dark);
  font-family: Georgia, "Hiragino Mincho ProN", serif;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -.04em;
}

.section-kicker {
  margin: 0;
}

.count-badge,
.result-count,
.result-hint {
  flex: 0 0 auto;
  padding: 4px 9px;
  color: var(--olive-dark);
  background: var(--olive-soft);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
}

.compact-heading {
  align-items: center;
  margin-bottom: 16px;
}

.button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: var(--paper);
  background: var(--olive-dark);
}

.button-primary:hover {
  background: #263225;
}

.button-outline {
  color: var(--olive-dark);
  background: transparent;
  border-color: var(--olive);
}

.button-outline:hover {
  background: var(--olive-soft);
}

.button-quiet {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}

.button-quiet:hover {
  color: var(--olive-dark);
  background: var(--paper-deep);
}

.item-form {
  margin-bottom: 23px;
  padding: 17px;
  border: 1px dashed #b7aa94;
  border-radius: 14px;
  background: rgba(238, 232, 218, .55);
}

.form-intro {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 15px;
}

.field-index {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--paper);
  background: var(--leather);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
}

.form-intro strong {
  color: var(--olive-dark);
  font-size: 14px;
}

.form-intro p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.item-form-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1.55fr) minmax(85px, .6fr) minmax(105px, .8fr) minmax(160px, 1.2fr);
  gap: 12px;
  align-items: end;
}

.field,
.check-field {
  min-width: 0;
}

.field > span {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 21px;
  margin-bottom: 5px;
  color: var(--olive-dark);
  font-size: 12px;
  font-weight: 800;
}

.field em {
  color: var(--leather-dark);
  font-size: 9px;
  font-style: normal;
  letter-spacing: .05em;
}

.field small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.field input,
.field select,
.bag-input,
.bag-limit {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c8bead;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
}

.field input::placeholder {
  color: #969083;
}

.check-field {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 9px;
  padding: 6px 10px;
  border: 1px solid #c8bead;
  border-radius: 8px;
  background: rgba(255,255,255,.25);
}

.check-field input {
  width: 20px;
  height: 20px;
  accent-color: var(--olive-dark);
  flex: 0 0 auto;
}

.check-field span {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.check-field b {
  color: var(--olive-dark);
  font-size: 12px;
}

.check-field small {
  color: var(--muted);
  font-size: 10px;
}

.row-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.row-switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--leather);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 15px;
}

.form-error {
  flex: 1 1 auto;
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

.items-list {
  display: grid;
  gap: 9px;
}

.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(72px, .45fr) minmax(88px, .56fr) minmax(125px, .88fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .46);
}

.item-row.prepared {
  background: rgba(224, 229, 214, .52);
}

.item-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.item-check {
  width: 21px;
  height: 21px;
  accent-color: var(--olive-dark);
}

.item-check-wrap {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
}

.item-name-wrap {
  min-width: 0;
}

.item-edit-input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 5px 6px;
  color: var(--olive-dark);
  background: transparent;
  font-size: 16px;
  font-weight: 800;
}

.item-edit-input:hover,
.item-edit-input:focus {
  border-color: var(--line);
  background: var(--paper);
}

.item-edit-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-edit-metric {
  display: grid;
  min-width: 0;
  gap: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.item-edit-metric .item-edit-input {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.item-row-weight {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.item-name {
  display: block;
  overflow: hidden;
  color: var(--olive-dark);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}

.item-tag {
  display: inline-block;
  padding: 2px 6px;
  color: var(--muted);
  background: var(--paper-deep);
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.3;
}

.item-tag.required {
  color: var(--leather-dark);
  background: #f0dfcf;
}

.item-metric {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.item-metric strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.item-bag {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.item-bag-print {
  display: none;
}

.item-row .item-bag-select {
  width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 5px 6px;
  color: var(--muted);
  background: transparent;
  font-size: 16px;
}

.item-row .item-bag-select:hover,
.item-row .item-bag-select:focus {
  border-color: var(--line);
  background: var(--paper);
}

.row-button {
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 16px;
}

.row-button:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.empty-state {
  padding: 30px 18px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.empty-icon {
  display: block;
  margin-bottom: 7px;
  color: var(--leather);
  font-size: 26px;
}

.empty-state strong {
  color: var(--olive-dark);
  font-size: 14px;
}

.empty-state p {
  margin: 3px 0 0;
  font-size: 12px;
}

.panel-help,
.data-note {
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 12px;
}

.bags-list {
  display: grid;
  gap: 8px;
}

.bag-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, .47fr) 44px;
  gap: 9px;
  align-items: center;
}

.bag-row-label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.bag-remove {
  align-self: end;
}

.summary-card {
  padding: 23px 25px 19px;
}

.total-card {
  color: var(--paper);
  background: var(--olive-dark);
  border-color: var(--olive-dark);
  box-shadow: 9px 10px 0 rgba(104, 75, 48, .16);
}

.total-card .section-kicker,
.total-card p {
  color: #c7d0bb;
}

.summary-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.scale-mark {
  color: var(--brass);
  font-size: 22px;
}

.total-card h2 {
  margin: 19px 0 7px;
  color: var(--paper);
  font-family: Georgia, serif;
  font-size: clamp(38px, 4vw, 54px);
  font-weight: 500;
  letter-spacing: -.05em;
}

.total-card p {
  margin: 0;
  font-size: 11px;
}

.measure-line {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 20px;
  margin-top: 20px;
  opacity: .7;
}

.measure-line span {
  width: 1px;
  height: 8px;
  background: var(--brass);
}

.measure-line span:nth-child(2),
.measure-line span:nth-child(4) {
  height: 13px;
}

.measure-line span:nth-child(3) {
  height: 20px;
}

.measure-line span:last-child {
  width: 34px;
  height: 1px;
  margin-left: 2px;
}

.result-panel {
  padding-bottom: 20px;
}

.bag-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.bag-summary-card {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .42);
}

.bag-summary-card.over {
  border-color: #d2a198;
  background: var(--danger-soft);
}

.bag-summary-head,
.bag-summary-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bag-summary-head strong {
  min-width: 0;
  color: var(--olive-dark);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.bag-summary-head span,
.bag-summary-foot {
  color: var(--muted);
  font-size: 11px;
}

.bag-summary-foot {
  margin-top: 7px;
}

.bag-status {
  color: var(--olive-dark);
  font-weight: 800;
}

.bag-status.over {
  color: var(--danger);
}

.result-block {
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.result-block + .result-block {
  margin-top: 19px;
}

.result-block-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.result-block h3 {
  margin: 0;
  color: var(--olive-dark);
  font-size: 14px;
}

.result-count {
  min-width: 25px;
  padding: 3px 7px;
  text-align: center;
}

.result-hint {
  padding: 3px 7px;
  color: var(--muted);
  background: var(--paper-deep);
  font-weight: 600;
}

.result-note {
  margin: -1px 0 10px;
  color: var(--muted);
  font-size: 11px;
}

.result-list {
  display: grid;
  gap: 5px;
}

.result-item,
.result-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 6px;
  background: rgba(232, 224, 208, .55);
  font-size: 12px;
}

.result-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.result-item span {
  flex: 0 0 auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.result-empty {
  color: var(--muted);
  background: transparent;
  border: 1px dashed var(--line);
  font-size: 11px;
}

.data-panel {
  margin-top: 22px;
}

.data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 12px;
}

.data-note {
  margin: 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 4px 0;
  color: var(--muted);
  font-size: 10px;
}

.article-link-list {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding-left: 1.25rem;
}

.article-link-list li::marker {
  color: #8a6840;
}

.article-link-list a {
  color: #4d3924;
  font-weight: 700;
  text-underline-offset: 0.18em;
}

.article-link-list a:focus-visible,
.panel-help a:focus-visible {
  outline: 3px solid #9b7546;
  outline-offset: 3px;
}

.article-link-list p {
  margin: 0.3rem 0 0;
  color: #5d5a53;
  line-height: 1.65;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .workspace-side {
    grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
    align-items: start;
  }
}

@media (max-width: 840px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 27px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-image {
    min-height: 250px;
    max-height: 360px;
  }

  .hero-image img {
    min-height: 250px;
  }

  .item-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-name {
    grid-column: span 2;
  }

  .workspace-side {
    grid-template-columns: 1fr;
  }

  .preset-controls {
    grid-template-columns: 1fr 1fr;
  }

  .preset-copy {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .preset-controls .button {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding-right: 13px;
    padding-left: 13px;
  }

  .site-header {
    min-height: 70px;
    align-items: start;
    padding-top: 17px;
  }

  .header-note {
    max-width: 145px;
    text-align: right;
  }

  .hero {
    padding-top: 24px;
    padding-bottom: 43px;
  }

  h1 {
    font-size: clamp(42px, 13vw, 62px);
  }

  .hero-image {
    min-height: 210px;
    max-height: 280px;
    border-width: 5px;
  }

  .hero-image img {
    min-height: 210px;
  }

  .panel {
    padding: 17px 14px;
  }

  .panel-heading h2 {
    font-size: 24px;
  }

  .heading-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .heading-actions .button {
    min-height: 44px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .item-form {
    padding: 13px;
  }

  .item-form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .preset-controls {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .preset-copy {
    grid-column: auto;
    grid-row: auto;
  }

  .preset-controls .button {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
  }

  .field-name {
    grid-column: span 2;
  }

  .form-actions {
    flex-wrap: wrap;
  }

  .form-error {
    flex-basis: 100%;
    order: 3;
  }

  .form-actions .button-primary {
    flex: 1 1 auto;
  }

  .item-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    padding: 12px;
  }

  .item-main {
    grid-column: 1 / -1;
  }

 .item-metric,
  .item-edit-metric,
  .item-bag {
    padding-left: 31px;
  }

  .item-row .item-bag-select {
    min-height: 44px;
    padding-left: 0;
  }

  .item-row .row-button {
    grid-column: 2;
    grid-row: 2 / span 2;
  }

  .bag-row {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .bag-row > div:nth-child(2) {
    grid-column: 1;
  }

  .bag-remove {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .data-actions .button {
    flex: 1 1 calc(50% - 9px);
  }

  .site-footer {
    display: grid;
    gap: 7px;
  }
}

@media (max-width: 350px) {
  .site-header {
    gap: 8px;
  }

  .header-note {
    font-size: 10px;
  }

  .hero-facts {
    display: grid;
    gap: 5px;
  }

  .item-form-grid {
    grid-template-columns: 1fr;
  }

  .field-name {
    grid-column: auto;
  }

  .check-field {
    min-width: 0;
  }

  .data-actions .button {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
  }

  .hero-image,
  .button:hover {
    transform: none;
  }
}

@media print {
  :root {
    --canvas: #fff;
    --paper: #fff;
    --ink: #000;
    --muted: #333;
  }

  body {
    background: #fff;
    font-size: 11px;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

  .site-header,
  .hero-copy,
  .item-form,
  .data-panel,
  .preset-panel,
  .site-footer,
  .status-line,
  .bags-panel,
  .hero-image,
  .row-button,
  .item-bag-select {
    display: none !important;
  }

  .item-bag-print {
    display: inline !important;
    color: #000;
    font-size: 11px;
  }

  .hero {
    display: block;
    padding: 0 0 15px;
  }

  .workspace,
  .workspace-side {
    display: block;
  }

  .panel,
  .summary-card {
    box-shadow: none;
    border-color: #aaa;
  }

  .item-panel,
  .result-panel {
    margin-bottom: 15px;
  }

  .total-card {
    color: #000;
    background: #fff;
  }

  .total-card h2,
  .total-card .section-kicker,
  .total-card p {
    color: #000;
  }

  .item-row {
    break-inside: avoid;
  }
}


/* SOU100 Stage A: first-view hierarchy */
.stage-a-hero { min-width: 0; min-height: 0 !important; height: auto; grid-template-columns: minmax(0, 1.15fr) minmax(200px, .85fr); align-items: center; gap: clamp(1rem, 2.5vw, 2.5rem); padding-block: clamp(1.25rem, 3vw, 2.5rem) !important; }
.stage-a-hero .hero-copy, .stage-a-hero .intro-copy { min-width: 0; min-height: 0 !important; padding: clamp(1rem, 2.7vw, 2.25rem) !important; }
.stage-a-hero h1 { max-width: none !important; margin: 0 0 .75rem !important; font-size: clamp(2rem, 4vw, 3.35rem) !important; line-height: 1.14 !important; letter-spacing: -.035em; word-break: auto-phrase; }
.stage-a-lede { max-width: 52rem; margin: .25rem 0 0 !important; color: inherit; font-size: clamp(1rem, 1.25vw, 1.15rem) !important; line-height: 1.55 !important; }
.stage-a-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem 1rem; margin: .8rem 0 0; padding-left: 1.35rem; font-size: .92rem; line-height: 1.45; }
.stage-a-steps li { min-width: 0; padding-left: .12rem; }
.stage-a-extras { margin-top: .7rem; font-size: .8rem; }
.stage-a-extras > * { margin-top: .35rem !important; margin-bottom: 0 !important; }
.stage-a-cta { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; margin-top: .9rem; padding: .7rem 1.1rem; border: 2px solid #fff; border-radius: 999px; background: #17412f; color: #fff !important; font-weight: 800; line-height: 1.25; text-align: center; text-decoration: none; }
.stage-a-cta:hover { background: #0f3324; color: #fff !important; }
.stage-a-cta:focus-visible { outline: 3px solid #005fcc; outline-offset: 3px; box-shadow: 0 0 0 6px #fff; }
.stage-a-hero :is(.hero-visual, .hero-art, .hero-image) { width: 100%; min-width: 0; min-height: 0 !important; height: min(24vw, 280px); max-height: 280px; margin: 0; align-self: center; }
.stage-a-hero :is(.hero-visual, .hero-art, .hero-image) img { display: block; width: 100%; height: 100%; max-height: 280px; object-fit: cover; }

@media (max-width: 640px) {
  .stage-a-hero { display: block; min-height: 0 !important; height: auto !important; padding: 0 !important; }
  .stage-a-hero .hero-copy, .stage-a-hero .intro-copy { min-height: 0 !important; padding: 1.1rem 1rem 1.2rem !important; }
  .stage-a-hero h1 { margin-bottom: .55rem !important; font-size: clamp(1.8rem, 8vw, 2.35rem) !important; line-height: 1.18 !important; }
  .stage-a-lede { font-size: .94rem !important; line-height: 1.5 !important; }
  .stage-a-steps { grid-template-columns: 1fr; gap: .12rem; margin-top: .55rem; font-size: .87rem; }
  .stage-a-extras { margin-top: .55rem; font-size: .74rem; }
  .stage-a-cta { min-height: 46px; margin-top: .7rem; padding: .62rem 1rem; }
  .stage-a-hero :is(.hero-visual, .hero-art, .hero-image) { display: none !important; }
  .preset-panel .panel-heading { gap: .45rem !important; margin-bottom: .8rem !important; }
  .preset-panel .panel-heading .section-kicker { display: none !important; }
  .preset-panel .panel-heading h2 { margin: 0 !important; font-size: clamp(1.2rem, 5.5vw, 1.55rem) !important; line-height: 1.25 !important; letter-spacing: 0 !important; }
  .preset-panel .panel-heading p { margin: .35rem 0 0 !important; font-size: .86rem !important; line-height: 1.45 !important; }
}
