:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #182822;
  background: #f7f8f3;
  --ink: #183c30;
  --muted: #495f54;
  --line: #d3ded5;
  --white: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
[hidden] { display: none !important; }
a { color: var(--ink); text-underline-offset: .2em; }
img { display: block; max-width: 100%; object-fit: cover; }
button, select, input { font: inherit; }
button, select, input, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #a45123; outline-offset: 3px; }
.skip { position: absolute; top: -5rem; left: 1rem; padding: .65rem; background: white; z-index: 2; }
.skip:focus { top: .5rem; }
.demo-bar, .site-header, .wrap { padding-inline: clamp(16px, 5vw, 66px); }
.demo-bar, .site-header, .section-heading, .actions {
  display: flex; flex-wrap: wrap; gap: .65rem 1rem; align-items: center; justify-content: space-between;
}
.demo-bar { background: #e8eee5; color: #375144; padding-block: .55rem; font-size: .9rem; }
.site-header { padding-block: 1rem; border-bottom: 1px solid var(--line); background: var(--white); }
.brand { font-size: 1.3rem; text-decoration: none; color: #364b41; }
.brand strong { color: var(--ink); }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .85rem; }
nav a { padding: .45rem .5rem; border-radius: .35rem; text-decoration: none; }
nav [aria-current="page"] { background: #e1eee5; font-weight: 700; }
.wrap { max-width: 1440px; margin-inline: auto; }
#notice:not(:empty) { margin-block: .7rem; color: var(--ink); font-weight: 700; }
.hero { display: grid; align-items: center; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 74px); padding-block: clamp(24px, 6vw, 76px); }
.hero h1 { max-width: 13ch; font-size: clamp(2.4rem, 5.1vw, 5.1rem); line-height: 1.01; letter-spacing: -.065em; }
.hero p { max-width: 45ch; margin: 1rem 0 1.4rem; }
.hero img { width: 100%; height: auto; border-radius: 1rem; aspect-ratio: 4 / 3; }
h1, h2, h3, p { margin: 0; }
p { color: var(--muted); }
h1 { color: var(--ink); font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -.035em; }
h3 { font-size: 1.05rem; }
.collection, .admin { padding-block: 1.5rem 2.5rem; }
.products, .metrics, .records { display: grid; gap: 1rem; margin-top: 1rem; }
.products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product, .panel, .metric, .record {
  min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: .75rem;
}
.product img { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: .7rem .7rem 0 0; }
.product-copy, .panel, .metric, .record { padding: clamp(14px, 2vw, 22px); }
.product-copy .button { margin-top: .8rem; }
.product-copy p { margin-top: .3rem; }
.price { color: var(--ink); font-weight: 750; }
.button, select, input {
  min-height: 42px; padding: .46rem .7rem; border: 1px solid #a1b6a9;
  border-radius: .45rem; background: white; color: var(--ink); max-width: 100%;
}
.button { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.button:hover { background: #e9f2ea; }
.button:disabled { opacity: .55; cursor: default; }
.button.primary { background: var(--ink); color: white; border-color: var(--ink); }
.button.primary:hover { background: #255644; }
dialog {
  width: min(calc(100% - 24px), 640px); max-height: 88vh; padding: clamp(16px, 4vw, 30px);
  border: 1px solid var(--line); border-radius: .8rem; color: inherit;
}
dialog::backdrop { background: #17292195; }
dialog .section-heading { margin-bottom: 1rem; }
dialog img { width: min(100%, 300px); height: auto; border-radius: .45rem; margin-bottom: .75rem; }
dialog [role="status"]:not(:empty) { margin-top: .55rem; font-weight: 650; }
fieldset { margin: .65rem 0; padding: 0; border: 0; }
legend { font-weight: 700; margin-bottom: .25rem; }
.actions { justify-content: flex-start; margin-top: .65rem; }
.totals { display: grid; gap: .25rem; margin-block: 1rem; }
.totals div { display: flex; justify-content: space-between; gap: 1rem; }
.totals dd { margin: 0; font-weight: 650; }
.panel { margin-top: 1.25rem; }
.metric strong { display: block; font-size: 1.55rem; }
.record p + p { margin-top: .3rem; }
.record input { width: 7rem; }
footer { border-top: 1px solid var(--line); padding-block: 1rem; }
@media (max-width: 1000px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 660px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { max-width: 16ch; }
}
@media (max-width: 400px) { .products, .metrics { grid-template-columns: 1fr; } }

/* Employee Portal */
.admin-shell { display: grid; grid-template-columns: minmax(180px, 230px) minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); }
.admin-sidebar { align-self: start; padding: 1rem; border: 1px solid var(--line); border-radius: .75rem; background: #e6eee8; }
.admin-sidebar p { font-weight: 750; color: var(--ink); margin-bottom: .6rem; }
.admin-sidebar nav { display: grid; gap: .2rem; margin-bottom: 1rem; }
.admin-sidebar nav [aria-current="page"] { background: var(--ink); color: white; }
.admin-heading { border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.admin-workspace { min-width: 0; }
.metric-link { text-decoration: none; }
.metric-link:hover { background: #e6eee8; }
.editor { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .8rem 1rem; align-items: end; margin-top: 1rem; }
.editor label { display: grid; gap: .25rem; font-weight: 650; min-width: 0; }
.editor .wide { grid-column: 1 / -1; }
.editor button { justify-self: start; }
textarea { font: inherit; color: var(--ink); background: white; max-width: 100%; min-width: 0; padding: .45rem .7rem; border: 1px solid #a1b6a9; border-radius: .45rem; resize: vertical; }
.product-editor summary { cursor: pointer; }
.product-editor summary span { display: inline-block; margin-left: .7rem; color: var(--muted); }
.state { padding: .2rem .55rem; border-radius: .35rem; background: #e1eee5; }
#request-fields { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
#request-quantity { width: 5rem; }
#request-status:not(:empty) { margin-top: .5rem; font-weight: 650; }
@media (max-width: 780px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar nav { display: flex; }
}
@media (max-width: 460px) {
  .editor { grid-template-columns: 1fr; }
}
