:root {
  color-scheme: light;
  --ink: #171918;
  --muted: #626865;
  --line: #dfe3e1;
  --paper: #f5f6f4;
  --panel: #ffffff;
  --soft: #eef2f0;
  --accent: #185548;
  --accent-dark: #103f36;
  --accent-soft: #e7f0ed;
  --warning: #8a5715;
  --warning-soft: #fff7e8;
  --danger: #934519;
  --shadow: 0 20px 55px rgba(21, 29, 26, 0.07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

a, button, input { font: inherit; letter-spacing: 0; }
a { color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.55; }
p { margin: 0; color: var(--muted); line-height: 1.58; }
h1, h2 { margin: 0; letter-spacing: 0; }

.topnav {
  display: flex;
  width: min(1120px, calc(100% - 40px));
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand span {
  display: grid; width: 32px; height: 32px; place-items: center;
  border-radius: 7px; background: var(--ink); color: white;
  font-size: 0.7rem; font-weight: 800;
}
.brand strong { font-size: 1rem; font-weight: 720; }
.topnav nav { display: flex; gap: 24px; }
.topnav nav a { color: var(--muted); font-size: 0.86rem; font-weight: 620; text-decoration: none; }
.topnav nav a:hover { color: var(--ink); }
.topnav nav .nav-cta { margin-left: 2px; border: 1px solid var(--ink); border-radius: 6px; background: var(--ink); color: white; padding: 8px 12px; }

main {
  display: grid;
  width: min(1120px, calc(100% - 40px));
  gap: 72px;
  margin: 0 auto;
  padding: 78px 0 48px;
}

.product-intro { max-width: 820px; margin: 0 auto; text-align: center; }
.product-intro > span, .section-kicker {
  display: block; margin-bottom: 14px; color: var(--accent);
  font-size: 0.72rem; font-weight: 760; text-transform: uppercase;
}
.product-intro h1 {
  max-width: 800px; font-size: clamp(2.65rem, 5.2vw, 4.7rem);
  font-weight: 700; line-height: 1.02;
}
.product-intro p { max-width: 680px; margin: 22px auto 0; font-size: 1.08rem; }

.product-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(430px, 1.28fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.workspace-topbar {
  display: flex; grid-column: 1 / -1; align-items: center; gap: 22px;
  min-height: 48px; border-bottom: 1px solid var(--line); background: #fafbfa; padding: 0 20px;
}
.workspace-topbar span { display: inline-flex; align-items: center; gap: 7px; color: #929895; font-size: 0.76rem; font-weight: 660; }
.workspace-topbar span i { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid #cfd5d2; border-radius: 50%; font-size: 0.65rem; font-style: normal; }
.workspace-topbar span.is-active { color: var(--accent); }
.workspace-topbar span.is-active i { border-color: var(--accent); background: var(--accent); color: white; }
.workspace-topbar small { margin-left: auto; color: var(--accent); font-size: 0.72rem; font-weight: 680; }

.workspace-copy {
  display: grid; align-content: center; gap: 0;
  border-right: 1px solid var(--line); padding: 48px;
}
.workspace-copy h2 { max-width: 340px; font-size: 2rem; line-height: 1.12; }
.workspace-copy > p { margin-top: 13px; font-size: 0.96rem; }
.quiet-proof { display: grid; gap: 0; margin: 30px 0 0; }
.quiet-proof div { display: grid; gap: 4px; border-top: 1px solid var(--line); padding: 15px 0; }
.quiet-proof dt { color: var(--muted); font-size: 0.73rem; font-weight: 650; text-transform: uppercase; }
.quiet-proof dd { margin: 0; font-size: 0.9rem; font-weight: 650; }

.converter-card { display: grid; gap: 14px; padding: 28px; }
.dropzone {
  display: grid; gap: 16px; min-height: 410px;
  border: 1px dashed #aeb8b4; border-radius: 7px;
  background: #fafbfa; padding: 24px;
}
.dropzone.has-file { border-color: var(--accent); background: #f7faf9; }
.dropzone.is-dragging { border-color: var(--accent); background: var(--accent-soft); }
.upload-target {
  display: grid; min-height: 250px; align-content: center;
  justify-items: center; gap: 10px; cursor: pointer; text-align: center;
}
.upload-target input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-icon {
  display: grid; width: 48px; height: 48px; place-items: center;
  border-radius: 7px; background: var(--accent); color: white;
  font-size: 1.65rem; line-height: 1;
}
.upload-title { margin-top: 6px; font-size: 1.18rem; font-weight: 720; }
.upload-help { color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.selected-file {
  max-width: 100%; margin-top: 7px; border: 1px solid var(--line);
  border-radius: 6px; background: white; color: var(--muted);
  font-size: 0.82rem; font-weight: 620; overflow-wrap: anywhere; padding: 8px 10px;
}
.has-file .selected-file { border-color: #a8c4bc; background: var(--accent-soft); color: var(--accent-dark); }
.password-field { display: grid; gap: 7px; text-align: left; }
.password-field > span { font-size: 0.8rem; font-weight: 680; }
.password-field small { color: var(--muted); font-weight: 500; }
.password-field input, .manual-check input {
  width: 100%; min-height: 44px; border: 1px solid var(--line);
  border-radius: 6px; background: white; padding: 0 12px;
}
.password-field input:focus, .manual-check input:focus { border-color: var(--accent); outline: 3px solid rgba(24, 85, 72, 0.1); }
.upload-actions { display: grid; grid-template-columns: 1fr auto; gap: 9px; }

button, .payment-box a, .download-buttons a, .legal-links a, .back-home, .seo-entry-grid a {
  display: inline-flex; min-height: 44px; align-items: center; justify-content: center;
  border: 1px solid var(--ink); border-radius: 6px; background: var(--ink);
  color: white; font-weight: 680; padding: 0 18px; text-decoration: none;
}
.secondary-button { border-color: var(--line); background: white; color: var(--ink); }
.secondary-button:hover { border-color: #b9c0bd; background: var(--soft); }
.upload-assurance { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.76rem; }
.upload-assurance span::before { content: "✓"; margin-right: 6px; color: var(--accent); font-weight: 800; }

.result-band {
  display: grid; grid-template-columns: minmax(250px, 0.34fr) minmax(0, 1fr);
  gap: 16px; scroll-margin-top: 22px;
}
.status-panel, .preview-section {
  border: 1px solid var(--line); border-radius: 8px;
  background: white; box-shadow: var(--shadow); padding: 24px;
}
.status-title { display: grid; gap: 5px; margin-bottom: 20px; }
.status-title span, dt { color: var(--muted); font-size: 0.74rem; }
.status-title strong { font-size: 1.28rem; }
.status-panel dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.status-panel dl div { border-top: 1px solid var(--line); padding-top: 12px; }
dd { margin: 4px 0 0; font-size: 1rem; font-weight: 700; }

.diagnosis-box, .quality-box, .recommendations, .export-pack {
  display: grid; gap: 8px; margin-top: 14px;
  border: 1px solid var(--line); border-radius: 7px; padding: 14px;
}
.diagnosis-box span { color: var(--muted); font-size: 0.84rem; line-height: 1.45; }
.diagnosis-box.is-good, .quality-box { border-color: #c9ddd7; background: var(--accent-soft); }
.diagnosis-box.is-review, .quality-box.grade-c, .quality-box.grade-d { border-color: #ead7b6; background: var(--warning-soft); }
.quality-score { display: grid; gap: 3px; }
.quality-score span, .export-pack-head span { color: var(--muted); font-size: 0.7rem; font-weight: 720; text-transform: uppercase; }
.quality-score strong { color: var(--accent-dark); font-size: 2.35rem; line-height: 1; }
.quality-score em { font-size: 0.84rem; font-style: normal; font-weight: 680; }
.quality-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.quality-metrics span { border: 1px solid rgba(24, 85, 72, 0.12); border-radius: 5px; background: rgba(255,255,255,.7); color: var(--muted); font-size: 0.72rem; padding: 8px; }
.quality-metrics strong { display: block; color: var(--ink); font-size: 0.92rem; }

.payment-box { display: grid; gap: 11px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 18px; }
.payment-title { font-size: 1rem; }
.payment-box p { font-size: 0.85rem; }
.payment-box a { border-color: var(--accent); background: var(--accent); }
.consent-row {
  display: grid; grid-template-columns: auto 1fr; gap: 9px;
  align-items: start; border: 1px solid var(--line); border-radius: 6px;
  background: #fafbfa; color: var(--muted); font-size: 0.78rem; line-height: 1.42; padding: 11px;
}
.consent-row input { margin-top: 2px; }
.consent-row.needs-consent { border-color: #cf7651; background: #fff1ec; box-shadow: 0 0 0 3px rgba(147, 69, 25, 0.1); }
.consent-hint { grid-column: 2; color: var(--danger); font-size: 0.72rem; }
.payment-box a.is-locked, .download-buttons a.is-locked { cursor: not-allowed; opacity: 0.42; filter: grayscale(0.7); }
.unlock-list { display: grid; gap: 6px; }
.unlock-list span { color: var(--muted); font-size: 0.78rem; }
.unlock-list span::before { content: "✓"; margin-right: 7px; color: var(--accent); font-weight: 800; }
.payment-note { color: var(--muted); line-height: 1.4; }
.manual-check { display: grid; gap: 8px; }
.manual-check button { border-color: var(--accent); background: var(--accent); }
.payment-box.is-free .manual-check, .payment-box.is-free #checkStatusButton { display: none; }
.fulfillment-text { color: var(--accent); font-size: 0.8rem; font-weight: 620; }

.horizontal { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.preview-section h2 { font-size: 1.35rem; }
.preview-section .panel-head p { margin-top: 6px; font-size: 0.88rem; }
.download-buttons { display: flex; gap: 6px; }
.download-buttons a { min-height: 36px; border-color: var(--line); background: var(--soft); color: var(--ink); font-size: 0.76rem; padding: 0 11px; }
.warnings { display: grid; gap: 8px; margin-top: 14px; }
.warning { border-left: 2px solid var(--danger); background: var(--warning-soft); color: #60300f; font-size: 0.84rem; padding: 10px 12px; }
.recommendations { background: var(--accent-soft); }
.recommendations strong { color: var(--accent-dark); font-size: 0.82rem; }
.recommendations div { color: #365a51; font-size: 0.8rem; line-height: 1.42; }
.recommendations div::before { content: "→"; margin-right: 7px; }
.export-pack { background: #fafbfa; }
.export-pack-head { display: flex; justify-content: space-between; gap: 10px; }
.export-pack-head strong { color: var(--accent); font-size: 0.82rem; }
.export-pack-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.export-pack-grid article { border: 1px solid var(--line); border-radius: 5px; background: white; padding: 9px; }
.export-pack-grid article.is-ready { border-color: #c8ddd7; background: var(--accent-soft); }
.export-pack-grid strong, .export-pack-grid span { display: block; }
.export-pack-grid strong { font-size: 0.78rem; }
.export-pack-grid span { margin-top: 4px; color: var(--muted); font-size: 0.68rem; line-height: 1.35; }
.insights-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.insights-grid div { border: 1px solid var(--line); border-radius: 5px; background: #fafbfa; padding: 9px; }
.insights-grid span, .insights-grid strong { display: block; }
.insights-grid span { color: var(--muted); font-size: 0.68rem; }
.insights-grid strong { margin-top: 3px; font-size: 0.86rem; overflow-wrap: anywhere; }

.table-wrap { position: relative; overflow: auto; max-height: 470px; margin-top: 14px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.preview-watermark { position: sticky; top: 0; z-index: 3; border-bottom: 1px solid var(--line); background: #f7f8f7; color: var(--muted); font-size: 0.72rem; font-weight: 620; padding: 8px 11px; }
table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
th, td { border-bottom: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; white-space: nowrap; user-select: none; }
th { position: sticky; top: 32px; z-index: 2; background: var(--soft); color: #4b514e; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; }
tbody tr.is-review-row td { background: var(--warning-soft); }
tbody tr.is-limited-row td { background: #f5f6f5; color: #737976; }
.status-cell { font-weight: 700; }
.status-cell[data-status="ok"] { color: var(--accent); }
.status-cell[data-status="review"] { color: var(--warning); }
.empty-state { height: 110px; color: var(--muted); text-align: center; vertical-align: middle; white-space: normal; }
.feedback-box {
  display: grid; grid-template-columns: 1fr auto; gap: 12px 18px;
  align-items: center; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 16px;
}
.feedback-box strong, .feedback-box span { display: block; }
.feedback-box strong { font-size: 0.86rem; }
.feedback-box div > span { margin-top: 4px; color: var(--muted); font-size: 0.75rem; }
.feedback-actions { display: flex; gap: 7px; }
.feedback-actions button { min-height: 36px; font-size: 0.76rem; padding: 0 12px; }
.feedback-status { grid-column: 1 / 3; color: var(--accent); font-size: 0.75rem; }

.output-showcase {
  display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
  gap: 44px; align-items: center;
}
.showcase-copy h2, .pricing-copy h2, .faq-section h2 { font-size: 2rem; line-height: 1.15; }
.showcase-copy > p { margin-top: 15px; }
.showcase-list { display: grid; gap: 0; margin-top: 24px; }
.showcase-list span { border-top: 1px solid var(--line); font-size: 0.88rem; font-weight: 620; padding: 13px 0; }
.showcase-list span::before { content: "✓"; margin-right: 9px; color: var(--accent); font-weight: 800; }
.workbook-figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: var(--shadow); }
.workbook-figure img { display: block; width: 100%; height: auto; }
.workbook-figure figcaption { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.72rem; padding: 10px 13px; }

.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-strip div { padding: 28px 26px; }
.trust-strip div + div { border-left: 1px solid var(--line); }
.trust-strip strong, .trust-strip span { display: block; }
.trust-strip strong { font-size: 0.94rem; }
.trust-strip span { margin-top: 6px; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }

.pricing-section {
  display: grid; grid-template-columns: .72fr 1.28fr; gap: 42px;
  align-items: center; border: 1px solid var(--line); border-radius: 8px;
  background: var(--ink); color: white; padding: 42px 48px;
}
.pricing-copy p { max-width: 560px; margin-top: 12px; color: #b7bfbb; }
.pricing-section .section-kicker { color: #9bc8bc; }
.launch-prices { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #414644; border-radius: 7px; overflow: hidden; }
.launch-prices article { display: grid; align-content: start; padding: 20px; }
.launch-prices article + article { border-left: 1px solid #414644; }
.launch-prices span { color: #aeb5b2; font-size: 0.7rem; font-weight: 680; text-transform: uppercase; }
.launch-prices strong { display: grid; gap: 5px; margin-top: 11px; font-size: 0.9rem; }
.launch-prices s { color: #7f8783; font-weight: 520; }
.launch-prices small { margin-top: 9px; color: #929a96; font-size: 0.72rem; }

.faq-section { display: grid; grid-template-columns: .36fr 1fr; gap: 48px; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.faq-grid article { border-bottom: 1px solid var(--line); padding: 20px 18px 20px 0; }
.faq-grid article:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
.faq-grid strong { font-size: 0.9rem; }
.faq-grid p { margin-top: 7px; font-size: 0.82rem; }

.legal-section { display: flex; justify-content: space-between; gap: 20px; align-items: center; border-top: 1px solid var(--line); padding-top: 24px; }
.legal-section p { font-size: 0.78rem; }
.legal-links { display: flex; gap: 7px; }
.legal-links a { min-height: 34px; border-color: var(--line); background: transparent; color: var(--muted); font-size: 0.76rem; padding: 0 10px; }

.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(18,21,20,.58); padding: 18px; }
.modal-panel { position: relative; display: grid; width: min(500px, 100%); gap: 12px; border-radius: 8px; background: white; box-shadow: 0 30px 90px rgba(0,0,0,.24); padding: 28px; }
.modal-panel h2 { font-size: 1.5rem; }
.modal-close { position: absolute; top: 12px; right: 12px; width: 34px; min-height: 34px; border: 0; border-radius: 50%; background: var(--soft); color: var(--ink); padding: 0; }
.modal-details { display: grid; gap: 7px; }
.modal-details p { border-left: 2px solid var(--danger); background: var(--warning-soft); padding: 9px 11px; }

.doc-shell { width: min(800px, calc(100% - 40px)); margin: 0 auto; padding: 44px 0 64px; }
.doc-shell h1 { margin: 30px 0 12px; font-size: clamp(2.2rem, 5vw, 4rem); }
.doc-shell section { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 20px; }
.back-home { border-color: var(--line); background: white; color: var(--ink); }
.admin-controls, .admin-orders { display: grid; gap: 10px; }
.admin-order { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 7px; background: white; padding: 14px; }
.admin-order pre { overflow: auto; background: var(--soft); padding: 10px; }
.hidden { display: none !important; }

@media (max-width: 900px) {
  main { gap: 56px; padding-top: 58px; }
  .product-workspace, .result-band, .output-showcase, .pricing-section, .faq-section { grid-template-columns: 1fr; }
  .workspace-copy { border-right: 0; border-bottom: 1px solid var(--line); padding: 34px; }
  .quiet-proof { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .pricing-section { gap: 28px; }
}

@media (max-width: 680px) {
  .topnav { width: calc(100% - 24px); min-height: 62px; }
  .topnav nav { gap: 12px; }
  .topnav nav a:nth-child(-n+2) { display: none; }
  .topnav nav .nav-cta { display: none; }
  main { width: calc(100% - 24px); gap: 44px; padding: 44px 0 34px; }
  .product-intro h1 { font-size: 2.45rem; }
  .product-intro p { font-size: 0.98rem; }
  .workspace-copy, .converter-card, .status-panel, .preview-section, .pricing-section { padding: 22px; }
  .workspace-copy h2, .showcase-copy h2, .pricing-copy h2, .faq-section h2 { font-size: 1.65rem; }
  .trust-strip, .faq-grid, .upload-actions, .export-pack-grid, .insights-grid, .quality-metrics { grid-template-columns: 1fr; }
  .quiet-proof { display: none; }
  .workspace-topbar { gap: 10px; padding: 0 12px; }
  .workspace-topbar small { display: none; }
  .workspace-topbar span { flex: 1; justify-content: center; }
  .dropzone { min-height: 370px; padding: 16px; }
  .upload-target { min-height: 225px; }
  .horizontal { flex-direction: column; }
  .download-buttons { display: grid; width: 100%; grid-template-columns: repeat(5, 1fr); }
  .download-buttons a { min-width: 0; padding: 0 5px; }
  .trust-strip { border: 0; }
  .trust-strip div { border-top: 1px solid var(--line); padding: 18px 0; }
  .trust-strip div + div { border-left: 0; }
  .pricing-section { padding: 28px 24px; }
  .launch-prices { grid-template-columns: 1fr; }
  .launch-prices article + article { border-top: 1px solid #414644; border-left: 0; }
  .faq-grid article, .faq-grid article:nth-child(even) { border-left: 0; padding: 18px 0; }
  .legal-section { align-items: flex-start; flex-direction: column; }
  .feedback-box { grid-template-columns: 1fr; }
  .feedback-status { grid-column: 1; }
}
