:root {
  color-scheme: light;
  --page: #f7f6ef;
  --surface: #fffdf7;
  --paper: #fffefa;
  --ink: #202c25;
  --muted: #535e54;
  --line: #dcded0;
  --green: #184e37;
  --green-deep: #113926;
  --green-faint: #e5eddf;
  --gold-faint: #f9efd8;
  --gold-line: #e9d4a4;
  --error: #9a352b;
  --radius: 14px;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 16px;
  background: var(--page);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; line-height: 1.5; }
a { color: var(--green); text-underline-offset: 0.2em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.57; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #2e7755; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h2, h3 { line-height: 1.2; }
p { color: var(--muted); }

.page-width { width: min(1080px, calc(100% - 80px)); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 1;
  inset: 10px auto auto 10px;
  transform: translateY(-200%);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}
.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--line); }
.header-content, .footer-content { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.header-content { min-height: 67px; }
.brand, nav a { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 0.95rem; font-weight: 750; color: var(--ink); }
.brand-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 31px;
  height: 31px;
  border: 1px solid #c8d8c6;
  border-radius: 8px;
  background: var(--green-faint);
  color: var(--green);
}
.brand-icon span {
  position: relative;
  width: 12px;
  height: 15px;
  border: 1.4px solid currentColor;
  border-radius: 2px;
}
.brand-icon span::after {
  content: '';
  position: absolute;
  inset: 4px 2px auto;
  height: 4px;
  border-block: 1px solid currentColor;
}
nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); }
nav a { padding: 7px 0; color: var(--muted); font-size: 0.875rem; }
nav a:hover { color: var(--green); text-decoration: underline; }

.intro { padding: 44px 0 31px; }
.intro h1 {
  max-width: 870px;
  margin-bottom: 18px;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(2.65rem, 6.1vw, 4.85rem);
  font-weight: 400;
  line-height: 0.99;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.intro p { max-width: 610px; font-size: clamp(1rem, 1.7vw, 1.14rem); }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 29%);
  overflow: hidden;
  border: 1px solid #d5dace;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 28px rgb(27 50 34 / 0.04);
}
.feed-form { min-width: 0; padding: clamp(20px, 3vw, 30px); }
.feed-form h2 { margin-bottom: 19px; font-size: 1.22rem; letter-spacing: -0.02em; }
.file-inputs, .settings { display: grid; gap: 12px; }
.file-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.file-field {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  padding: 14px;
  border: 1px dashed #aeb9a6;
  border-radius: 9px;
  background: var(--paper);
}
label { display: block; color: var(--ink); font-size: 0.88rem; font-weight: 700; }
.optional { margin-left: 0.25rem; color: var(--muted); font-size: 0.72rem; font-weight: 400; white-space: nowrap; }
.file-field p { margin: 2px 0 12px; font-size: 0.8rem; }
.file-field input { display: block; width: 100%; min-width: 0; font-size: 0.78rem; }
.file-field input::file-selector-button {
  margin-right: 7px;
  padding: 5px 8px;
  border: 1px solid #d5dfd2;
  border-radius: 5px;
  background: #eef3eb;
  color: #244d38;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.file-field input::file-selector-button:hover { background: var(--green-faint); }
.settings { grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(95px, 0.65fr)); margin-top: 16px; }
.settings input, .resolution-list select {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 5px;
  padding: 8px 10px;
  border: 1px solid #cdd5c6;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.88rem;
}
.settings input::placeholder { color: #626d63; }
.settings input[readonly] { background: #edf1e8; color: #455246; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}
.button-primary { border-color: var(--green); background: var(--green); color: white; }
.button-primary:not(:disabled):hover { border-color: var(--green-deep); background: var(--green-deep); }
.button-secondary { border-color: #c7d0c2; background: transparent; color: var(--green); }
.button-secondary:not(:disabled):hover { background: #eaf0e7; }
.run-status:not(:empty) { margin-top: 10px; font-size: 0.875rem; }
.run-status.error, .run-status[data-state=error] { color: var(--error); }

.workspace-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(19px, 2.5vw, 27px);
  border-left: 1px solid #d5dace;
  background: #eaf0e4;
}
.workspace-aside h2 { margin-bottom: 16px; font-size: 1rem; }
.workflow { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.workflow li { display: grid; grid-template-columns: auto 1fr; gap: 9px; align-items: start; }
.step-marker {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #b3c4af;
  border-radius: 50%;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 750;
}
.workflow strong { display: block; font-size: 0.85rem; }
.workflow p { margin-top: 2px; font-size: 0.8rem; }
.privacy-note {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #cfdccc;
  color: var(--green-deep);
  font-size: 0.77rem;
  font-weight: 650;
}
.lock-icon { position: relative; flex: none; width: 11px; height: 8px; border: 1.4px solid currentColor; border-radius: 2px; }
.lock-icon::before { content: ''; position: absolute; inset: -6px 1px auto; height: 5px; border: 1.4px solid currentColor; border-bottom: 0; border-radius: 4px 4px 0 0; }
.notice { margin: 15px 0; padding: 12px 15px; border: 1px solid var(--gold-line); border-radius: 8px; background: var(--gold-faint); }

.results {
  margin-top: 24px;
  padding: clamp(19px, 3vw, 29px);
  border: 1px solid #d5dace;
  border-radius: var(--radius);
  background: var(--surface);
}
.results-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.results h2 { font-size: 1.3rem; }
.results h3 { margin-bottom: 8px; font-size: 1rem; }
.results-header p { margin-top: 3px; font-size: 0.87rem; }
.summary-counts:not(:empty), .issue-list:not(:empty), .resolution-list:not(:empty), .missing-review, .product-preview:not(:empty) { margin-top: 16px; }
.prior-change-section { margin-top: 16px; }
.prior-change-section .table-scroll { margin-top: 8px; overflow-wrap: anywhere; }
.summary-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 8px; }
.metric { padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.metric-value { display: block; color: var(--green); font-size: 1.4rem; font-weight: 750; }
.metric-label { display: block; font-size: 0.81rem; color: var(--muted); }
.issue-list ul { display: grid; gap: 8px; padding-inline-start: 20px; }
.issue { padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.issue-title { font-weight: 750; }
.issue-details { color: var(--muted); }
.issue + .issue, .resolution-list label + label, .resolution-list fieldset + fieldset { margin-top: 8px; }
.resolution-list select { max-width: 600px; }
.missing-review { padding: 14px; border: 1px solid var(--gold-line); border-radius: 8px; background: var(--gold-faint); }
.missing-ids { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 4px 19px; padding-inline-start: 22px; margin: 10px 0; font-size: 0.85rem; overflow-wrap: anywhere; }
.review-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block: 14px; }
.review-pagination .button { min-height: 33px; padding: 5px 9px; font-size: 0.78rem; }
.review-pagination p { font-size: 0.82rem; }
.missing-confirmation { display: flex; align-items: flex-start; gap: 8px; }
.missing-confirmation input { flex: none; margin-top: 4px; accent-color: var(--green); }
.missing-confirmation label { font-weight: 600; }
.product-preview, .table-scroll { overflow-x: auto; }
.results table { width: 100%; border-spacing: 0; border-collapse: collapse; text-align: left; font-size: 0.84rem; }
.results th, .results td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.results th { background: #eaf0e7; font-weight: 700; }
.results td { background: var(--paper); }

.details { display: grid; grid-template-columns: minmax(190px, 0.65fr) minmax(0, 1fr); gap: clamp(21px, 6vw, 78px); padding: 32px 0; border-bottom: 1px solid var(--line); }
#how-it-works { margin-top: 25px; }
.details h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 400;
  letter-spacing: -0.04em;
}
.details-heading p { margin-top: 8px; max-width: 320px; font-size: 0.91rem; }
.details-content { margin: 0; }
.details-content dt, summary { font-weight: 700; }
.details-content dd { margin: 3px 0 11px; color: var(--muted); font-size: 0.89rem; }
.details-content > div:last-child dd { margin-bottom: 0; }
.faq details { padding: 10px 0; border-bottom: 1px solid var(--line); }
.faq details:first-child { padding-top: 0; }
.faq details:last-child { padding-bottom: 0; border-bottom: 0; }
summary { cursor: pointer; font-size: 0.91rem; }
summary:hover { color: var(--green); }
.faq details p { margin: 5px 0 0 16px; font-size: 0.88rem; }
code { font-size: 0.87em; }
.footer-content { min-height: 70px; color: var(--muted); font-size: 0.82rem; }
.footer-content span:first-child { font-weight: 700; color: var(--ink); }

@media (max-width: 780px) {
  .page-width { width: calc(100% - 40px); }
  .workspace { grid-template-columns: 1fr; }
  .workspace-aside { border-top: 1px solid #d5dace; border-left: 0; }
  .workflow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .page-width { width: calc(100% - 28px); }
  .header-content { min-height: 58px; gap: 8px; }
  .brand { gap: 6px; font-size: 0.82rem; }
  .brand-icon { width: 24px; height: 24px; }
  nav { gap: 9px; }
  nav a { font-size: 0.73rem; }
  .intro { padding: 31px 0 23px; }
  .intro h1 { margin-bottom: 13px; }
  .feed-form, .workspace-aside { padding: 16px; }
  .file-inputs, .workflow, .details { grid-template-columns: 1fr; }
  .settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seller-field { grid-column: 1 / -1; }
  .results-header, .footer-content { align-items: flex-start; flex-direction: column; }
  .details { gap: 15px; padding-block: 22px; }
  .footer-content { justify-content: center; gap: 4px; }
}
