:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #555555;
  --accent: #0b5ed7;
  --border: #d9d9d9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.5;
}

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
}

.nav {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-brand { font-weight: 700; color: var(--fg); text-decoration: none; }
.nav-link { color: var(--accent); text-decoration: none; }

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.section { margin-bottom: 2rem; }

h1 { font-size: 1.9rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.25rem; margin: 0 0 0.75rem; }
.subtitle { color: var(--muted); margin: 0 0 1rem; }
.phase-note { color: var(--muted); font-size: 0.9rem; }

.points { padding-left: 1.25rem; }
.section-list { padding-left: 1.25rem; }

.cta {
  display: inline-block;
  margin-top: 0.75rem;
  background: var(--accent);
  color: #ffffff;
  padding: 0.7rem 1.1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}

.field { margin-bottom: 1rem; }

label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.required { color: #c00; }

input, textarea, select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  background: var(--bg);
  color: var(--fg);
}

textarea { min-height: 80px; resize: vertical; }

.helper { margin: 0.3rem 0 0; font-size: 0.85rem; color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .container { padding: 1rem 0.75rem 2rem; }
  h1 { font-size: 1.5rem; }
}

.checkbox-group { border: 0; padding: 0; margin: 0 0 1rem; }

.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0;
  font-weight: 400;
}

.checkbox-option input[type="checkbox"] {
  width: auto;
  margin-top: 0.2rem;
}

.consent-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.5rem 0;
  font-weight: 400;
}

.consent-item input[type="checkbox"] { width: auto; margin-top: 0.2rem; }

.field-error { color: #b00020; font-size: 0.85rem; min-height: 1rem; margin: 0.3rem 0 0; }

.file-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.file-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8f9fb;
  color: var(--fg);
  font-weight: 600;
  cursor: pointer;
}
.file-control:focus-within .file-trigger {
  outline: 3px solid rgba(11, 94, 215, 0.25);
  outline-offset: 2px;
}
.file-name {
  flex: 1 1 180px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.not-sure-option { margin-top: 0.55rem; }

.demo-message {
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #2e7d32;
  background: #eaf6ec;
  color: #1b5e20;
  border-radius: 6px;
  font-size: 0.9rem;
}

.intro-note { color: var(--muted); max-width: 42rem; }

.form-section { border-top: 1px solid var(--border); padding-top: 1.25rem; }

.submit-section { padding-top: 1rem; }

.form-error-summary {
  margin: 0 0 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #b00020;
  background: #fdecea;
  color: #7a0000;
  border-radius: 6px;
  font-size: 0.9rem;
}

.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: #b00020;
}

.field.has-error .field-error,
.field-error:not(:empty) { color: #b00020; }

.success-message { font-weight: 600; }

.lead-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.1rem;
  padding: 0.5rem 0.7rem;
  border: 1px dashed var(--border);
  border-radius: 6px;
  display: inline-block;
}

.progress { list-style: none; padding: 0; }

.progress li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.status-tag { color: var(--muted); font-size: 0.85rem; }
.progress li.done .status-tag { color: #1b5e20; font-weight: 600; }

/* ===== Internal Review Workspace ===== */
.internal-warning {
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.7rem;
  border: 1px solid #b26a00;
  background: #fff6e6;
  color: #7a4a00;
  border-radius: 6px;
  font-size: 0.85rem;
}

.filter-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

.filter-link {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--fg);
  font-size: 0.85rem;
}

.filter-link.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.table-wrap { overflow-x: auto; }

.lead-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.lead-table th, .lead-table td { border-bottom: 1px solid var(--border); padding: 0.5rem 0.6rem; text-align: left; vertical-align: top; white-space: nowrap; }
.lead-table th { background: #f6f7f9; font-weight: 600; }

.badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; border: 1px solid transparent; }
.badge-accept { background: #eaf6ec; color: #1b5e20; border-color: #2e7d32; }
.badge-need_more_info { background: #fff6e6; color: #7a4a00; border-color: #b26a00; }
.badge-manual_review { background: #e8f0fe; color: #1a3d7c; border-color: #1a73e8; }
.badge-reject { background: #fdecea; color: #7a0000; border-color: #b00020; }

.next-action { margin: 0.75rem 0; padding: 0.6rem 0.8rem; border-left: 4px solid var(--accent); background: #f2f6ff; }
.breadcrumb { margin: 0 0 0.5rem; font-size: 0.85rem; }

.decision-block { border-left: 4px solid var(--border); padding-left: 0.9rem; }
.decision-accept { border-left-color: #2e7d32; }
.decision-need-more-info { border-left-color: #b26a00; }
.decision-manual-review { border-left-color: #1a73e8; }
.decision-reject { border-left-color: #b00020; }

.detail-grid { display: grid; grid-template-columns: 220px 1fr; gap: 0.35rem 1rem; margin: 0; }
.detail-grid dt { font-weight: 600; }
.detail-grid dd { margin: 0; word-break: break-word; }

.score-table { border-collapse: collapse; min-width: 280px; }
.score-table th, .score-table td { border-bottom: 1px solid var(--border); padding: 0.35rem 0.7rem; text-align: left; }
.score-table th { font-weight: 500; }
.score-table td { text-align: right; }
.score-table .score-total th, .score-table .score-total td { font-weight: 700; border-top: 2px solid var(--fg); }

.critical-questions, .reason-list, .assumption-list { padding-left: 1.25rem; }

@media (max-width: 600px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid dt { margin-top: 0.4rem; }
}

/* ===== Phase F review actions ===== */
.flash-message {
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid #2e7d32;
  background: #eaf6ec;
  color: #1b5e20;
  border-radius: 6px;
  font-size: 0.9rem;
}

.review-form { margin-top: 1rem; max-width: 640px; }
.review-form .field { margin-bottom: 1rem; }

/* ===== Phase G auth ===== */
.login-form { max-width: 380px; margin-top: 1rem; }
.login-form .field { margin-bottom: 1rem; }

.internal-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f6f7f9;
}

.logout-form { margin: 0; }
.link-button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}

/* ===== Homepage V1 (buyer-first) ===== */
.hero { padding: 1.5rem 0 2rem; border-bottom: 1px solid var(--border); }
.hero h1 { font-size: 2.4rem; line-height: 1.15; margin: 0 0 0.9rem; }
.hero-value { font-weight: 700; font-size: 1.15rem; margin: 0 0 0.9rem; color: #0b3d91; }
.hero-value span { display: inline-block; margin-right: 0.35rem; }
.hero-trust {
  margin: 1rem 0;
  padding: 0.6rem 0.8rem;
  border-left: 4px solid #2e7d32;
  background: #eaf6ec;
  color: #1b5e20;
}
.cta-note { margin: 0.6rem 0 0; font-size: 0.85rem; color: var(--muted); }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  background: #fff;
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.card p { margin: 0 0 0.5rem; }
.card-question { color: var(--muted); font-style: italic; }
.card-answer { font-weight: 500; }

.emphasis {
  margin: 1.1rem 0 0;
  font-weight: 700;
  color: #0b3d91;
}

.service-name {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.35rem;
}
.service-card-secondary { margin-top: 1rem; background: #f8f9fb; }
.cta-secondary { display: inline-block; margin-top: 0.35rem; }
.price-note { font-weight: 600; }

.pricing-card { border-top: 3px solid #0b3d91; }
.value-statement { margin-top: 0.9rem; font-weight: 600; }

.check-list { padding-left: 1.25rem; }
.check-list li { margin-bottom: 0.3rem; }
.boundary { margin-top: 1rem; }

.steps { list-style: none; padding: 0; counter-reset: step; }
.step { position: relative; padding: 0 0 1rem 3rem; border-left: 2px solid var(--border); margin-left: 1rem; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -1.05rem;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.step h3 { margin: 0 0 0.3rem; }

.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.video-card { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.video-card video { width: 100%; display: block; }
.video-frame { aspect-ratio: 16 / 9; background: #e9edf3; }
.video-card h3 { margin: 0.7rem 0.9rem 0.3rem; font-size: 1rem; }
.video-card p { margin: 0 0.9rem 0.9rem; color: var(--muted); font-size: 0.9rem; }

.testimonial-card { border-left: 3px solid #0b3d91; }
.testimonial-quote { margin: 0 0 0.6rem; }
.testimonial-meta { margin: 0; color: var(--muted); font-size: 0.9rem; }

.final-cta {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  text-align: center;
}
.final-line { margin: 0.2rem 0; color: var(--muted); }
.final-closing { margin: 0.9rem 0; font-weight: 600; }

.footer-brand { font-weight: 700; margin: 0 0 0.3rem; }
.footer-copy { margin: 0 0 0.4rem; }
.footer-note { margin: 0.1rem 0; }

@media (max-width: 860px) {
  .card-grid, .video-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.7rem; }
  .card-grid, .video-grid { grid-template-columns: 1fr; }
}

/* ===== Homepage V1.1 (compressed + visual upgrade) ===== */
.container-wide { max-width: 1120px; }

.hero-section { padding-top: 1rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 2.5rem;
  align-items: center;
}
.hero-copy h1 { font-size: 2.6rem; line-height: 1.12; margin: 0 0 0.9rem; letter-spacing: -0.01em; }

.hero-visual {
  background: #f4f6f9;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem;
}
.visual-title {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 0.7rem;
}
.visual-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.visual-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.visual-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); font-weight: 700; }
.visual-value { font-weight: 600; font-size: 0.9rem; }
.visual-note { font-size: 0.75rem; color: var(--muted); }

.section-alt { background: #f7f8fa; border-radius: 14px; padding: 2rem; }
.section-dark { background: #0f172a; color: #e8eef7; border-radius: 14px; padding: 2rem; }
.section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-dark .module-name { color: #9dc0ff; }
.section-dark .module-copy, .section-dark .boundary-light, .section-dark .step-light p { color: #c7d3e3; }

.card-number {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}
.worry-card { border-top: 3px solid var(--accent); }

.consolidation-line {
  margin: 1.1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
}

.model-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.model-col h3 { margin-top: 0; }
.module-list { display: grid; gap: 0.6rem; }
.module { border-left: 3px solid #4d7cfe; padding-left: 0.7rem; }
.module-name { margin: 0 0 0.1rem; font-weight: 700; }
.module-copy { margin: 0; font-size: 0.9rem; }
.emphasis-light { margin: 1rem 0 0.4rem; font-weight: 700; color: #fff; }
.value-statement-light { margin: 0; color: #c7d3e3; }

.steps-light { border: 0; padding: 0; }
.step-light { border-left-color: #33507a; }
.step-light::before { background: #4d7cfe; }
.step-light h4 { margin: 0 0 0.2rem; }
.boundary-light { margin: 0.6rem 0 1rem; font-size: 0.9rem; }
.cta-on-dark { background: #fff; color: #0f172a; }

.evidence-labels { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin: 1rem 0; }
.evidence-label {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 1rem;
  font-weight: 600;
  text-align: center;
  background: #fbfcfe;
}

.ground-section .final-cta { margin-top: 1.75rem; padding-top: 1.5rem; }

@media (max-width: 900px) {
  .hero-grid, .model-grid { grid-template-columns: 1fr; }
  .hero-visual { order: 2; }
  .evidence-labels { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .hero-copy h1 { font-size: 1.75rem; }
  .card-grid, .visual-stack { grid-template-columns: 1fr; }
  .section-alt, .section-dark { padding: 1.25rem; }
}

/* ===== Phase I-003A internal review UX ===== */
.status-row { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0.75rem 0; }
.status-card {
  flex: 1 1 220px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  background: #f8f9fb;
}
.status-label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}
.badge-workflow { background: #eef1f6; color: #22314d; border-color: #b9c4d6; }
.badge-wf-manual_review_completed, .badge-wf-ready_for_sourcing, .badge-wf-customer_replied {
  background: #eaf6ec; color: #1b5e20; border-color: #2e7d32;
}
.badge-wf-closed_rejected { background: #fdecea; color: #7a0000; border-color: #b00020; }
.flash-success {
  font-weight: 600;
  border-width: 1px;
  border-style: solid;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* ===== Phase I-003B internal image preview ===== */
.file-thumb-link { display: inline-block; margin-top: 0.5rem; }
.file-thumb {
  display: block;
  max-width: 320px;
  max-height: 260px;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 0.25rem;
}
@media (max-width: 600px) {
  .file-thumb { max-width: 100%; max-height: 240px; }
}

/* ===== Homepage V1.1 (real field photos) ===== */
.hero-section .hero-copy { max-width: 780px; }
.hero-photo {
  display: block;
  width: 100%;
  max-width: 780px;
  height: auto;
  margin-top: 1.25rem;
  border-radius: 12px;
}

.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.25rem 0;
}
.photo-card {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.photo-card img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: contain;   /* show the full field photo, never crop evidence */
  background: #f4f6f9;
}
.photo-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
}
.photo-caption { font-weight: 600; }

.supplier-comm {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8f9fb;
}
.supplier-comm h3 { margin: 0 0 0.4rem; }
.comm-photo { display: block; width: 100%; height: auto; border-radius: 10px; margin-top: 0.6rem; }

@media (max-width: 700px) {
  .photo-grid { grid-template-columns: 1fr; }
  .photo-card img { height: auto; max-height: 320px; }
}

/* ===== SEO guide foundation ===== */
.guides-link {
  margin: -0.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.guides-link a { color: var(--accent); }

.guide-article .section { margin-bottom: 1.5rem; }
.guide-disclaimer {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 0.9rem;
  background: #f4f7fc;
  color: #26364d;
}
.guide-checklist {
  padding: 0;
  list-style: none;
  counter-reset: guide-step;
}
.guide-item {
  border-top: 1px solid var(--border);
  padding: 1.2rem 0;
}
.guide-item h2 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}
.guide-item p { margin: 0; }
.guide-cta {
  margin-top: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8f9fb;
}
