:root {
  color-scheme: light;
  --ink: #18272a;
  --muted: #5e6c6e;
  --paper: #f2f5f3;
  --surface: #ffffff;
  --line: #d4dcdc;
  --deep: #17373b;
  --teal: #247c78;
  --coral: #ef6b5b;
  --gold: #f4c95d;
  --soft: #e7f1ef;
  --shadow: 0 14px 34px rgba(23, 55, 59, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px max(24px, calc((100vw - 1480px) / 2));
  color: var(--ink);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--deep);
  border-radius: 6px;
}

nav {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 0.9rem;
}

nav a {
  text-decoration: none;
}

main {
  min-height: calc(100vh - 120px);
}

.intro-band {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: white;
  background: var(--deep);
}

.intro-band > img,
.intro-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.intro-band > img {
  object-fit: cover;
  object-position: center;
}

.intro-shade {
  background: linear-gradient(90deg, rgba(10, 26, 29, 0.94) 0%, rgba(10, 26, 29, 0.79) 36%, rgba(10, 26, 29, 0.18) 72%, rgba(10, 26, 29, 0.05) 100%);
}

.intro-copy {
  position: relative;
  z-index: 2;
  width: min(720px, 58vw);
  padding: 72px max(32px, calc((100vw - 1480px) / 2));
}

.eyebrow,
.step-label {
  margin: 0;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 14px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.45rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.lede {
  max-width: 650px;
  margin: 0 0 28px;
  color: #edf3f2;
  font-size: 1.08rem;
}

.primary-button,
.secondary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  color: #172325;
  background: var(--gold);
}

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

.secondary-button {
  color: var(--deep);
  background: white;
  border-color: var(--line);
}

.secondary-button:hover {
  border-color: var(--teal);
}

.secondary-button:disabled {
  color: #929b9c;
  background: #edf0ef;
  border-color: #e0e5e4;
  cursor: not-allowed;
}

.full-width {
  width: 100%;
}

.scanner-shell {
  width: min(1540px, 100%);
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(280px, 0.7fr) minmax(430px, 1.25fr);
  gap: 0;
  margin: 0 auto;
  padding: 20px;
}

.scanner-setup,
.trigger-setup,
.report-panel {
  min-width: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.scanner-setup {
  border-radius: 8px 0 0 8px;
}

.trigger-setup {
  border-left: 0;
}

.report-panel {
  border-left: 0;
  border-radius: 0 8px 8px 0;
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.section-heading h2,
.section-heading p {
  margin: 0;
}

.section-heading h2 {
  font-size: 1.18rem;
}

.section-heading div p {
  color: var(--muted);
  font-size: 0.82rem;
}

.step-label {
  width: 32px;
  height: 32px;
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  color: white;
  background: var(--deep);
  border-radius: 4px;
}

label,
legend {
  color: #314244;
  font-size: 0.8rem;
  font-weight: 750;
}

input[type="text"],
input[type="file"],
input[type="number"],
textarea {
  width: 100%;
  margin-top: 6px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 5px;
}

input[type="text"],
input[type="number"] {
  height: 42px;
  padding: 0 10px;
}

input[type="file"] {
  min-height: 42px;
  padding: 8px;
}

textarea {
  min-height: 230px;
  padding: 12px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.55;
}

.scanner-setup > label {
  display: block;
  margin-bottom: 14px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 10px;
}

.trigger-grid {
  display: grid;
  gap: 7px;
}

.trigger-grid label {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #f8faf9;
  border: 1px solid #e2e8e6;
  border-radius: 5px;
  cursor: pointer;
}

.trigger-grid input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  accent-color: var(--teal);
}

.padding-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.number-control {
  position: relative;
}

.number-control input {
  padding-right: 40px;
}

.number-control span {
  position: absolute;
  right: 10px;
  bottom: 11px;
  color: var(--muted);
  font-size: 0.72rem;
}

.inline-actions,
.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.local-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  text-align: center;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.report-summary div {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.report-summary div:last-child {
  border-right: 0;
}

.report-summary strong,
.report-summary span {
  display: block;
}

.report-summary strong {
  color: var(--deep);
  font-size: 1.4rem;
}

.report-summary span {
  color: var(--muted);
  font-size: 0.68rem;
}

.result-list {
  min-height: 420px;
  max-height: 650px;
  overflow: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.empty-state {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 36px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
}

.result-row {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 4px;
  border-bottom: 1px solid #e5eae9;
}

.result-row:last-child {
  border-bottom: 0;
}

.time-window {
  color: var(--deep);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  font-weight: 850;
}

.time-window small {
  display: block;
  margin: 2px 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 500;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.category-tags span {
  padding: 3px 6px;
  color: #6f2d25;
  background: #fde9e6;
  border: 1px solid #f5c7c0;
  border-radius: 4px;
  font-size: 0.66rem;
  font-weight: 800;
}

.result-copy p {
  margin: 8px 0 5px;
  font-size: 0.88rem;
}

.result-copy small {
  color: var(--muted);
  font-size: 0.7rem;
}

.report-actions {
  margin-top: 14px;
}

.accuracy-band,
.offer-band {
  display: grid;
  gap: 24px;
  padding: 44px max(28px, calc((100vw - 1480px) / 2));
}

.accuracy-band {
  grid-template-columns: minmax(300px, 0.8fr) minmax(400px, 1.2fr);
  align-items: center;
  color: white;
  background: var(--deep);
}

.accuracy-band h2,
.offer-band h2 {
  margin: 7px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1.15;
}

.accuracy-band p:last-child {
  margin: 0;
  color: #dbe7e6;
}

.offer-band {
  grid-template-columns: minmax(300px, 1.2fr) repeat(2, minmax(260px, 0.7fr));
  background: #e9efed;
}

.offer-band .eyebrow {
  color: var(--teal);
}

.offer-band article {
  padding-left: 22px;
  border-left: 3px solid var(--coral);
}

.offer-band article h3,
.offer-band article p {
  margin: 5px 0 8px;
}

.offer-band article p {
  color: var(--muted);
  font-size: 0.86rem;
}

.offer-band article a {
  color: var(--deep);
  font-weight: 800;
}

.price {
  color: var(--coral);
  font-size: 1.55rem;
  font-weight: 900;
}

.legal {
  width: min(860px, calc(100% - 32px));
  margin: 48px auto;
  padding: 34px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.legal h1 {
  margin-top: 18px;
  color: var(--deep);
  font-size: 2.6rem;
}

.legal h2 {
  margin-top: 28px;
  font-size: 1.2rem;
}

.legal p,
.legal li {
  color: #3f5052;
}

footer {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px max(24px, calc((100vw - 1480px) / 2));
  color: #ccdad8;
  background: #10272a;
  font-size: 0.78rem;
}

footer a {
  margin-left: 14px;
}

@media (max-width: 1120px) {
  .scanner-shell {
    grid-template-columns: 1fr 1fr;
  }

  .scanner-setup {
    border-radius: 8px 0 0 0;
  }

  .trigger-setup {
    border-radius: 0 8px 0 0;
  }

  .report-panel {
    grid-column: 1 / -1;
    border-top: 0;
    border-left: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
  }

  .result-list {
    min-height: 300px;
  }

  .offer-band {
    grid-template-columns: 1fr 1fr;
  }

  .offer-band > div {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .topbar {
    position: static;
    align-items: flex-start;
    padding: 12px 16px;
  }

  nav {
    gap: 12px;
    padding-top: 8px;
    font-size: 0.78rem;
  }

  nav a:nth-child(2) {
    display: none;
  }

  .intro-band {
    min-height: 540px;
    align-items: flex-end;
  }

  .intro-band > img {
    object-position: 64% center;
  }

  .intro-shade {
    background: linear-gradient(0deg, rgba(10, 26, 29, 0.98) 0%, rgba(10, 26, 29, 0.78) 52%, rgba(10, 26, 29, 0.18) 100%);
  }

  .intro-copy {
    width: 100%;
    padding: 36px 22px 42px;
  }

  h1 {
    font-size: 2.45rem;
  }

  .scanner-shell {
    display: block;
    padding: 10px;
  }

  .scanner-setup,
  .trigger-setup,
  .report-panel {
    padding: 18px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 0;
  }

  .scanner-setup {
    border-radius: 8px 8px 0 0;
  }

  .report-panel {
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
  }

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

  .accuracy-band,
  .offer-band {
    grid-template-columns: 1fr;
    padding: 36px 22px;
  }

  .offer-band > div {
    grid-column: auto;
  }

  .offer-band article {
    padding: 18px 0 0;
    border-top: 3px solid var(--coral);
    border-left: 0;
  }

  .legal {
    width: calc(100% - 20px);
    margin: 10px auto;
    padding: 22px;
  }

  .legal h1 {
    font-size: 2rem;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  footer a {
    margin: 0 10px 0 0;
  }
}

@media (max-width: 420px) {
  .brand span:last-child {
    display: none;
  }

  .padding-row,
  .report-summary {
    grid-template-columns: 1fr;
  }

  .report-summary div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .report-summary div:last-child {
    border-bottom: 0;
  }

  .result-row {
    grid-template-columns: 1fr;
  }

  .time-window small {
    display: inline;
    margin: 0 4px;
  }
}
