:root {
  /* Palette — warm paper + green + harmonized amber */
  --bg: #f6f0e6;
  --bg-tint: #f1e9db;
  --panel: #fffdf9;
  --ink: #2a2118;
  --muted: #7a6f60;
  --line: #e4dccc;
  --line-strong: #d3c8b2;

  --accent: #176b5b;
  --accent-dark: #0f5346;
  --accent-soft: #e3f1ec;
  --accent-ink: #0e3f36;

  --amber: #c07f2c;
  --amber-dark: #a76b1f;
  --amber-soft: #f6ead2;
  --amber-line: #e7cf9f;

  /* Radius + shadow */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(42, 33, 24, 0.06), 0 1px 3px rgba(42, 33, 24, 0.05);
  --shadow: 0 4px 12px rgba(42, 33, 24, 0.07), 0 2px 4px rgba(42, 33, 24, 0.05);
  --shadow-lg: 0 18px 45px rgba(42, 33, 24, 0.12);

  /* Fonts */
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 480px at 82% -8%, rgba(23, 107, 91, 0.06), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

a {
  color: var(--accent-dark);
}

/* ---------- Layout shell ---------- */

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.workspace {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* ---------- Site header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(255, 253, 249, 0.9);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
}

.brand-text span {
  color: var(--muted);
  font-size: 0.76rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.site-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.site-nav a.nav-cta {
  background: var(--accent);
  color: #fff;
}

.site-nav a.nav-cta:hover {
  background: var(--accent-dark);
  color: #fff;
}

/* ---------- Topbar / hero ---------- */

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
}

.hero-bar {
  background:
    radial-gradient(700px 300px at 100% 0%, var(--accent-soft), transparent 70%),
    var(--panel);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  line-height: 1.1;
}

.hero-copy {
  max-width: 660px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.6;
}

/* State switch pills */
.state-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}

.state-button {
  min-width: 52px;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.state-button:hover {
  color: var(--accent-dark);
}

.state-button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.top-link {
  align-self: flex-start;
  padding: 11px 18px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s;
}

.top-link:hover {
  background: var(--accent-dark);
}

/* ---------- Tool grid (label generator) ---------- */

.tool-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(440px, 1.15fr);
}

.input-panel,
.output-panel {
  padding: clamp(20px, 3vw, 32px);
}

.input-panel {
  border-right: 1px solid var(--line);
  background: var(--bg-tint);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.section-title span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
}

.section-title h2 {
  margin: 0;
  font-size: 1.12rem;
}

/* ---------- Forms ---------- */

label,
fieldset {
  display: grid;
  gap: 7px;
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--ink);
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input::placeholder,
textarea::placeholder {
  color: #a89c88;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
  resize: vertical;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  background: #fff;
}

legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 700;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.chips label:hover {
  border-color: var(--accent);
}

.chips input {
  width: auto;
  accent-color: var(--accent);
}

.packet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.packet-grid label {
  border-radius: var(--r-sm);
  justify-content: flex-start;
}

/* ---------- Output side ---------- */

.state-note {
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  line-height: 1.5;
}

.checklist {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.check-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.check-item span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.check-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.check-item strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 0.98rem;
}

/* Label preview */
.label-preview {
  margin-bottom: 24px;
  padding: 26px;
  width: min(100%, 540px);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  background: #fff;
  box-shadow: var(--shadow);
}

.label-brand {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.label-preview h3 {
  margin: 8px 0 16px;
  font-size: 1.7rem;
  line-height: 1.1;
}

.label-preview p {
  margin-bottom: 8px;
  line-height: 1.45;
}

.label-preview .disclaimer {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line-strong);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-ink);
}

/* Source box */
.source-box {
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.source-box h2,
.cta-panel h2 {
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.source-box p,
.cta-panel p {
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.source-box a {
  display: block;
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.source-box a:hover {
  text-decoration: underline;
}

.last-checked {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

/* ---------- CTA panel (amber, harmonized) ---------- */

.cta-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: var(--r);
  background: linear-gradient(160deg, var(--amber-soft), #fff);
  border: 1px solid var(--amber-line);
  box-shadow: var(--shadow-sm);
}

.cta-panel p {
  margin-bottom: 0;
}

.included-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.4;
}

.included-list li {
  position: relative;
  padding-left: 24px;
}

.included-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--amber);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 900;
}

.cta-panel label {
  margin-bottom: 0;
}

.cta-panel button {
  min-width: 150px;
  height: 48px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--amber);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s;
}

.cta-panel button:hover {
  background: var(--amber-dark);
}

.email-inline {
  margin: 0;
}

/* ---------- Workflow strip as cards ---------- */

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: clamp(20px, 3vw, 32px);
  padding-bottom: 0;
}

.workflow-strip div {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.workflow-strip strong {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
}

.workflow-strip span {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}

/* ---------- Landing layout ---------- */

.landing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
  gap: 32px;
  padding: clamp(20px, 3vw, 32px);
}

.landing-main {
  max-width: 760px;
}

.lead {
  color: var(--ink);
  font-size: 1.14rem;
  line-height: 1.6;
}

.landing-main h2 {
  margin: 32px 0 12px;
  font-size: 1.35rem;
}

.landing-main p {
  color: var(--muted);
  line-height: 1.65;
}

.landing-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.primary-link::after {
  content: "→";
  transition: transform 0.15s;
}

.primary-link:hover::after {
  transform: translateX(3px);
}

/* ---------- AI review section ---------- */

.review-section {
  padding: clamp(24px, 4vw, 40px);
  border-top: 1px solid var(--line);
  background: var(--bg-tint);
}

.lead-sm {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.6;
}

.review-form {
  display: grid;
  gap: 16px;
  max-width: 940px;
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.review-details {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-tint);
}

.field-group-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.review-form button {
  justify-self: start;
  min-width: 200px;
  height: 48px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s;
}

.review-form button:hover {
  background: var(--accent-dark);
}

.review-form button:disabled,
.cta-panel button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.review-card {
  max-width: 940px;
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.review-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.review-status span {
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.review-status strong {
  font-size: 1.15rem;
  font-family: var(--font-display);
}

.review-card pre {
  white-space: pre-wrap;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-tint);
  overflow-x: auto;
}

.review-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.review-card h3 {
  margin: 16px 0 8px;
  font-size: 1rem;
}

.review-card ul {
  margin-top: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.source-list a {
  color: var(--accent-dark);
  font-weight: 700;
}

.form-message {
  width: 100%;
  margin: 0;
  color: var(--amber-dark);
  font-size: 0.88rem;
  font-weight: 700;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: clamp(24px, 4vw, 36px);
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.site-footer h4 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-footer a {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-about p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .app-shell {
    width: 100%;
    padding: 0;
  }

  .workspace {
    border: 0;
    border-radius: 0;
  }

  .site-header {
    padding: 12px 18px;
  }

  .topbar {
    flex-direction: column;
    padding: 24px 20px;
  }

  .landing-layout {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .workflow-strip {
    grid-template-columns: 1fr;
    padding: 20px;
    padding-bottom: 0;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .input-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .input-panel,
  .output-panel,
  .review-section {
    padding: 20px;
  }

  .split,
  .review-columns,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    gap: 20px;
  }
}
