:root {
  color-scheme: light;
  --ink: #17231f;
  --muted: #65726c;
  --paper: #f5f3ec;
  --card: #fffdf8;
  --line: #d9ddd7;
  --green: #0f6b4f;
  --green-dark: #094b38;
  --orange: #e4823e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(228, 130, 62, 0.14), transparent 34rem),
    var(--paper);
  color: var(--ink);
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 76px 0; }
header { max-width: 760px; margin-bottom: 36px; }
nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: min(1120px, calc(100vw - 32px)); margin-bottom: 64px; }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.eyebrow { color: var(--green); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
h1 { max-width: 720px; margin: 8px 0 14px; font-family: Georgia, serif; font-size: clamp(3rem, 7vw, 6.4rem); font-weight: 500; letter-spacing: -0.055em; line-height: 0.94; }
header p { max-width: 660px; color: var(--muted); font-size: 1.18rem; }
.card, .table-card { border: 1px solid var(--line); border-radius: 22px; background: rgba(255, 253, 248, 0.94); box-shadow: 0 20px 55px rgba(23, 35, 31, 0.07); }
.setup { max-width: 820px; padding: 26px; }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 0.84rem; font-weight: 700; }
input { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 12px 13px; color: var(--ink); font: inherit; }
.drop-zone { margin-top: 16px; border: 1px dashed #aeb9b2; border-radius: 15px; padding: 26px; cursor: pointer; transition: 160ms ease; }
.drop-zone:hover { border-color: var(--green); background: #f5faf7; }
.drop-zone span { color: var(--ink); font-size: 1rem; }
.drop-zone small { font-weight: 500; }
.drop-zone input { display: none; }
.actions { display: flex; align-items: center; gap: 18px; margin-top: 18px; }
button { border: 0; border-radius: 999px; background: var(--green); padding: 12px 19px; color: white; font: inherit; font-weight: 800; cursor: pointer; }
button:hover { background: var(--green-dark); }
button:disabled { cursor: wait; opacity: 0.58; }
a { color: var(--green); font-weight: 750; text-underline-offset: 3px; }
.checkout-link { text-decoration: none; }
.button-link { border-radius: 999px; background: var(--green); padding: 12px 19px; color: white; text-decoration: none; white-space: nowrap; }
.button-link:hover { background: var(--green-dark); }
.offer-strip { display: grid; grid-template-columns: 180px 1fr auto; align-items: center; gap: 26px; max-width: 960px; margin: -4px 0 18px; border: 1px solid #c7d4cc; border-radius: 18px; background: #edf5f0; padding: 18px 22px; }
.offer-strip div span { display: block; color: var(--muted); font-size: 0.74rem; font-weight: 800; text-transform: uppercase; }
.offer-strip div strong { font-family: Georgia, serif; font-size: 2rem; font-weight: 500; }
.offer-strip p { margin: 0; color: #46554e; font-size: 0.9rem; }
#status { min-height: 24px; margin-top: 15px; color: var(--muted); }
#status.success { color: var(--green); }
#status.warning { color: #8b541f; }
#status.error { color: #a22f2f; }
.results { margin-top: 42px; scroll-margin-top: 22px; }
.hidden { display: none; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.metrics article { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 18px; }
.metrics span { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; }
.metrics strong { display: block; margin-top: 6px; font-family: Georgia, serif; font-size: 1.8rem; }
.table-card { padding: 24px; }
.table-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
h2 { margin: 3px 0 0; font-family: Georgia, serif; font-size: 2rem; font-weight: 500; }
button.secondary { border: 1px solid var(--line); background: white; color: var(--green); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { border-bottom: 1px solid var(--line); padding: 14px 11px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
td { font-size: 0.9rem; }
td.message { min-width: 330px; color: #35423c; }
td.priority { font-weight: 800; }
td.priority.high { color: #b14d16; }
td.priority.medium { color: #8a6b12; }
td.priority.low { color: var(--green); }
.approval-note { margin: 14px 0 0; color: var(--muted); font-size: 0.82rem; }
footer { display: flex; justify-content: space-between; gap: 24px; margin-top: 48px; border-top: 1px solid var(--line); padding-top: 22px; color: var(--muted); font-size: 0.82rem; }
footer div { display: flex; gap: 18px; }
.policy-page { max-width: 780px; }
.policy-page h1 { margin-top: 42px; font-size: clamp(2.8rem, 7vw, 5rem); }
.policy-page h2 { margin: 34px 0 8px; font-family: Georgia, serif; font-size: 1.55rem; font-weight: 500; }
.policy-page p { color: #46554e; }
.policy-meta { color: var(--muted); }
.policy-warning { margin-top: 42px; border: 1px solid #e0c7a8; border-radius: 12px; background: #fff5e9; padding: 16px; }

@media (max-width: 720px) {
  main { padding-top: 42px; }
  nav { margin-bottom: 42px; }
  .offer-strip { grid-template-columns: 1fr; gap: 12px; }
  .field-grid, .metrics { grid-template-columns: 1fr; }
  .actions, .table-heading, footer { align-items: flex-start; flex-direction: column; }
}
