:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --panel: #ffffff;
  --text: #1f2623;
  --muted: #66706a;
  --line: #d9d5cb;
  --accent: #006b5b;
  --accent-strong: #004d41;
  --warn: #a33d22;
  --ok: #176b3a;
  --low: #8b6418;
  --gone: #62676b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

.site-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}

.layout {
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto 56px;
}

.status-band,
.toolbar,
.section-head,
.update-card,
.detail-card,
.prose {
  background: var(--panel);
  border: 1px solid var(--line);
}

.status-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.status-band span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.summary {
  color: var(--accent-strong);
  font-weight: 700;
  white-space: nowrap;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  padding: 16px;
  margin-bottom: 20px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
button,
textarea {
  font: inherit;
}

input,
select {
  min-height: 38px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: #fff;
}

button,
.button-link {
  min-height: 38px;
  border: 0;
  padding: 9px 14px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button-link:hover {
  background: var(--accent-strong);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 0;
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
}

.section-head span {
  color: var(--muted);
  font-size: 13px;
}

.updates-list {
  display: grid;
  gap: 10px;
}

.update-card,
.detail-card,
.prose {
  padding: 16px;
}

.card-topline,
.meta-row,
.card-actions,
.detail-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.card-topline {
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.update-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.4;
}

.meta-row {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.card-actions {
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid currentColor;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

.badge-restocked {
  color: var(--ok);
}

.badge-added,
.badge-stock_changed {
  color: var(--accent-strong);
}

.badge-sold_out {
  color: var(--warn);
}

.badge-removed {
  color: var(--gone);
}

.empty {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
}

.detail-card h2 {
  margin: 14px 0 18px;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.25;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.detail-list div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
}

.detail-actions {
  margin: 18px 0;
}

.x-box {
  margin-top: 24px;
}

.x-box textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  padding: 12px;
  margin-bottom: 12px;
}

.prose {
  line-height: 1.8;
}

@media (max-width: 720px) {
  .site-header,
  .status-band,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary {
    white-space: normal;
  }

  .toolbar {
    align-items: stretch;
  }

  label,
  input,
  select,
  button {
    width: 100%;
  }

  .detail-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

