:root {
  --ink: #17231f;
  --muted: #66736d;
  --paper: #f4f2eb;
  --surface: #ffffff;
  --line: #dfe3dc;
  --forest: #173f35;
  --mint: #b9e6cf;
  --lime: #d9f471;
  --coral: #f0765b;
  --amber: #e4aa36;
  --shadow: 0 24px 70px rgba(23, 35, 31, 0.11);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 760; text-decoration: none; letter-spacing: -0.02em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--forest); color: var(--lime); font-size: 12px; letter-spacing: 0.06em; }
.brand-light { color: white; }
.brand-light .brand-mark { background: var(--lime); color: var(--forest); }

.public-header { height: 82px; display: flex; align-items: center; justify-content: space-between; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.pilot-badge, .status-pill { display: inline-flex; align-items: center; gap: 8px; color: #43524c; border: 1px solid #d7dcd6; background: rgba(255,255,255,.62); padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 650; }
.pilot-badge i, .status-pill i, .privacy-chip i { width: 7px; height: 7px; border-radius: 50%; background: #3da878; box-shadow: 0 0 0 4px rgba(61,168,120,.13); }

.login-shell { min-height: 100vh; background: radial-gradient(circle at 72% 25%, rgba(217,244,113,.32), transparent 22%), linear-gradient(135deg, #f6f4ed 0%, #edf2e9 100%); }
.login-main { min-height: calc(100vh - 82px); max-width: 1240px; margin: 0 auto; padding: 70px 32px 100px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(360px, .7fr); gap: 90px; align-items: center; }
.eyebrow { margin: 0 0 14px; color: #658075; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.hero-copy h1 { margin: 0; max-width: 720px; font-size: clamp(48px, 6.5vw, 82px); line-height: 1.03; letter-spacing: -.055em; font-weight: 790; }
.hero-lead { max-width: 650px; margin: 28px 0 38px; color: var(--muted); font-size: 19px; line-height: 1.75; }
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 690px; }
.feature-row article { min-height: 106px; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; border: 1px solid rgba(23,63,53,.12); border-radius: 18px; background: rgba(255,255,255,.58); }
.feature-row strong { color: #5b776d; font-size: 12px; letter-spacing: .08em; }
.feature-row span { font-size: 14px; font-weight: 700; }
.scope-note { margin: 24px 0 0; color: #718078; font-size: 12px; }
.invite-card { padding: 38px; border-radius: 28px; background: var(--forest); color: white; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.invite-card::after { content: ""; position: absolute; right: -45px; top: -55px; width: 170px; height: 170px; border-radius: 50%; background: rgba(217,244,113,.13); }
.card-kicker { color: #b7d7c8; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.invite-card h2 { margin: 18px 0 8px; font-size: 29px; letter-spacing: -.035em; }
.invite-card > p { margin: 0 0 30px; color: #bdd0c8; }
.invite-card label { display: block; margin-bottom: 9px; color: #dce9e3; font-size: 12px; font-weight: 650; }
.invite-card input { width: 100%; height: 54px; border: 1px solid rgba(255,255,255,.18); border-radius: 13px; background: rgba(255,255,255,.08); color: white; padding: 0 15px; outline: none; }
.invite-card input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(217,244,113,.12); }
.invite-card .primary-button { width: 100%; margin-top: 12px; }
.invite-card small { display: block; margin-top: 18px; color: #8eaaa0; font-size: 11px; line-height: 1.6; }

.primary-button, .secondary-button { border: 0; border-radius: 13px; min-height: 48px; padding: 0 18px; font-weight: 750; display: inline-flex; align-items: center; justify-content: center; gap: 16px; }
.primary-button { color: var(--forest); background: var(--lime); }
.primary-button:hover { filter: brightness(.97); transform: translateY(-1px); }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.secondary-button { color: var(--forest); border: 1px solid #cfd8d2; background: white; }
.text-button { border: 0; background: transparent; color: inherit; padding: 5px; font-size: 12px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 30px 22px 24px; background: var(--forest); color: white; display: flex; flex-direction: column; }
.sidebar nav { margin-top: 54px; display: grid; gap: 8px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 12px; padding: 12px 14px; background: transparent; color: #a9c0b6; text-align: left; font-weight: 650; }
.nav-item span { width: 18px; font-size: 18px; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.09); }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; }
.privacy-chip { display: flex; align-items: flex-start; gap: 11px; color: #d5e2dd; font-size: 12px; line-height: 1.5; }
.privacy-chip i { flex: 0 0 auto; margin-top: 5px; }
.privacy-chip small { color: #819c91; }
.sidebar-foot .text-button { margin-top: 16px; color: #8eaaa0; }

.workspace { min-width: 0; padding: 42px clamp(24px, 4.5vw, 72px) 80px; }
.workspace-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.workspace-header h1 { margin: 0; font-size: 34px; letter-spacing: -.045em; }
.panel-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 24px; align-items: start; }
.validation-form { display: grid; gap: 18px; }
.form-section, .guide-card, .history-list, .report-sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.form-section { padding: 28px; }
.section-heading { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 25px; }
.section-heading > span { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; background: #edf2ed; color: #527165; font-size: 11px; font-weight: 800; }
.section-heading h2 { margin: 1px 0 4px; font-size: 18px; letter-spacing: -.02em; }
.section-heading p, .history-head p { margin: 0; color: var(--muted); font-size: 12px; }
.field-grid { display: grid; gap: 17px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.full-width { grid-column: 1 / -1; }
.field-grid label { display: grid; gap: 8px; color: #4e5b56; font-size: 12px; font-weight: 650; }
.field-grid input, .field-grid textarea { width: 100%; border: 1px solid #d9dfda; border-radius: 11px; background: #fbfcfa; color: var(--ink); padding: 12px 13px; outline: none; resize: vertical; }
.field-grid input { height: 45px; }
.field-grid input:focus, .field-grid textarea:focus { border-color: #709688; box-shadow: 0 0 0 3px rgba(112,150,136,.11); }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.check-card { min-height: 80px; display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid #dce2dd; border-radius: 13px; background: #fbfcfa; cursor: pointer; }
.check-card:has(input:checked) { border-color: #6e9486; background: #f1f7f3; }
.check-card input { margin-top: 3px; accent-color: var(--forest); }
.check-card span { display: grid; gap: 4px; }
.check-card strong { font-size: 13px; }
.check-card small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.submit-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-radius: 18px; background: var(--forest); color: white; }
.submit-bar div { display: grid; gap: 4px; }
.submit-bar strong { font-size: 13px; }
.submit-bar div span { color: #9eb6ac; font-size: 11px; }
.submit-bar .primary-button { min-width: 180px; }

.guide-card { position: sticky; top: 30px; padding: 25px; }
.guide-card .card-kicker { color: #749085; }
.guide-card h3 { margin: 15px 0 24px; font-size: 19px; }
.guide-card dl { margin: 0; display: grid; gap: 20px; }
.guide-card dl > div { display: grid; grid-template-columns: 10px 1fr; gap: 12px; }
.dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; }
.dot.go { background: #36a875; } .dot.hold { background: var(--amber); } .dot.no-go { background: var(--coral); }
.guide-card dd { margin: 0; display: grid; gap: 3px; }
.guide-card dd strong { font-size: 12px; }
.guide-card dd span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.guide-warning { margin-top: 24px; padding: 14px; border-radius: 12px; background: #f5f4ec; color: #6e746e; font-size: 11px; line-height: 1.55; }

.history-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.history-head h2 { margin: 0 0 5px; font-size: 20px; }
.history-list { overflow: hidden; }
.history-empty { padding: 70px 20px; text-align: center; color: var(--muted); }
.history-row { width: 100%; display: grid; grid-template-columns: 1fr 120px 140px 24px; gap: 20px; align-items: center; border: 0; border-bottom: 1px solid #e8ebe7; background: white; color: var(--ink); padding: 20px 24px; text-align: left; }
.history-row:last-child { border-bottom: 0; }
.history-row:hover { background: #fafbf9; }
.history-row strong { display: block; margin-bottom: 5px; }
.history-row small { color: var(--muted); }
.decision-chip { width: fit-content; padding: 6px 10px; border-radius: 999px; font-size: 10px; font-weight: 850; letter-spacing: .04em; }
.decision-chip.go { color: #14724d; background: #e3f4ea; }
.decision-chip.hold { color: #8a5b04; background: #fff2cf; }
.decision-chip.no-go { color: #a53d2a; background: #ffe7e1; }

.report-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.report-sheet { max-width: 980px; margin: 0 auto; padding: clamp(28px, 5vw, 62px); box-shadow: 0 12px 40px rgba(23,35,31,.06); }
.report-top { display: flex; justify-content: space-between; gap: 30px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.report-top h2 { margin: 4px 0 9px; font-size: 31px; letter-spacing: -.04em; }
.report-top p { margin: 0; color: var(--muted); }
.decision-stamp { flex: 0 0 auto; width: 116px; height: 116px; display: grid; place-items: center; border-radius: 50%; font-size: 18px; font-weight: 900; letter-spacing: .04em; }
.decision-stamp.go { color: #11623f; border: 2px solid #5bb58b; background: #e5f5ec; }
.decision-stamp.hold { color: #875902; border: 2px solid #e5b64f; background: #fff3d7; }
.decision-stamp.no-go { color: #9f3c29; border: 2px solid #eb816a; background: #ffebe6; }
.report-section { padding: 30px 0; border-bottom: 1px solid var(--line); }
.report-section:last-child { border-bottom: 0; padding-bottom: 0; }
.report-section h3 { margin: 0 0 18px; font-size: 17px; }
.finding-list, .action-list, .limitations { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.finding-list li, .action-list li { display: grid; grid-template-columns: 34px 1fr; align-items: start; gap: 12px; padding: 13px 15px; border-radius: 12px; background: #f7f8f5; font-size: 13px; line-height: 1.5; }
.finding-list b, .action-list b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: white; color: #5f756d; font-size: 11px; }
.scenario-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.scenario-table th, .scenario-table td { padding: 12px 10px; border-bottom: 1px solid #e7eae6; text-align: right; }
.scenario-table th:first-child, .scenario-table td:first-child { text-align: left; }
.scenario-table th { color: var(--muted); font-weight: 650; }
.scenario-table td strong { font-size: 14px; }
.limit-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.limit-grid article { min-height: 118px; padding: 15px; display: flex; flex-direction: column; border-radius: 13px; background: #f5f7f4; }
.limit-grid span { color: var(--muted); font-size: 10px; }
.limit-grid strong { margin: 11px 0 8px; font-size: 22px; letter-spacing: -.03em; }
.limit-grid small { margin-top: auto; color: #87918c; font-size: 9px; line-height: 1.45; }
.calculation-note { margin: 10px 0 0; color: var(--muted); font-size: 10px; }
.confidence-head { display: flex; align-items: center; gap: 14px; margin-bottom: 15px; }
.confidence-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.confidence-chip { flex: 0 0 auto; padding: 7px 11px; border-radius: 999px; font-size: 10px; font-weight: 850; letter-spacing: .06em; }
.confidence-chip.high { color: #14724d; background: #e3f4ea; }
.confidence-chip.medium { color: #875902; background: #fff3d7; }
.confidence-chip.low { color: #9f3c29; background: #ffebe6; }
.confidence-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.confidence-grid > div { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 11px 12px; border: 1px solid #e2e6e1; border-radius: 10px; font-size: 10px; }
.confidence-status { font-size: 8px; letter-spacing: .04em; }
.confidence-status.verified { color: #14724d; }
.confidence-status.partial, .confidence-status.assumed { color: #875902; }
.confidence-status.missing { color: #9f3c29; }
.checklist-table { display: grid; gap: 8px; }
.checklist-table > div { display: grid; grid-template-columns: 74px 170px 1fr; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #e3e7e2; border-radius: 11px; }
.checklist-table strong { font-size: 11px; }
.checklist-table p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.checklist-status { width: fit-content; padding: 5px 7px; border-radius: 999px; font-size: 8px; font-weight: 850; letter-spacing: .04em; }
.checklist-status.confirmed { color: #14724d; background: #e3f4ea; }
.checklist-status.review { color: #875902; background: #fff3d7; }
.checklist-status.missing { color: #9f3c29; background: #ffebe6; }
.experiment-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.experiment-list li { display: grid; grid-template-columns: 38px 1fr; gap: 13px; padding: 15px; border-radius: 12px; background: #f7f8f5; }
.experiment-list > li > b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: white; color: #5f756d; font-size: 11px; }
.experiment-list div { display: grid; gap: 5px; }
.experiment-list span { color: #6e837a; font-size: 9px; font-weight: 800; }
.experiment-list strong { font-size: 11px; line-height: 1.5; }
.experiment-list small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.source-list { display: grid; gap: 8px; }
.source-list a { color: #2f6f5b; font-size: 12px; text-decoration: none; word-break: break-all; }
.source-list a:hover { text-decoration: underline; }
.limitations li { color: var(--muted); font-size: 11px; line-height: 1.5; }
.report-meta { display: flex; gap: 22px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.research-banner { margin-top: 24px; display: flex; align-items: flex-start; gap: 13px; padding: 15px 17px; border-radius: 14px; }
.research-banner i { flex: 0 0 auto; width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; }
.research-banner span { display: grid; gap: 3px; }
.research-banner strong { font-size: 12px; }
.research-banner small { font-size: 11px; line-height: 1.5; }
.research-banner.pending { color: #765109; background: #fff3d7; }
.research-banner.pending i { background: var(--amber); box-shadow: 0 0 0 4px rgba(228,170,54,.14); }
.research-banner.partial { color: #8e4d31; background: #fff0e8; }
.research-banner.partial i { background: var(--coral); }
.research-banner.complete { color: #176746; background: #e7f5ed; }
.research-banner.complete i { background: #36a875; }
.evidence-empty { padding: 18px; border: 1px dashed #d5ddd7; border-radius: 13px; background: #fafbf9; color: var(--muted); font-size: 12px; }
.evidence-empty.warning { border-color: #edc8bd; background: #fff8f5; color: #8a5543; }
.evidence-card { display: grid; gap: 8px; padding: 18px; border-radius: 14px; background: #f7f9f6; }
.evidence-card strong { font-size: 14px; }
.evidence-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.evidence-label { color: #6d827a; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.market-summary { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; margin-bottom: 22px; }
.market-summary > div { display: grid; gap: 6px; padding: 14px; border-radius: 12px; background: #f5f7f4; }
.market-summary span { color: var(--muted); font-size: 10px; }
.market-summary strong { font-size: 15px; }
.research-columns { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.research-column-full { grid-column: 1 / -1; }
.research-columns h4 { margin: 0 0 12px; font-size: 13px; }
.research-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.research-links li { padding: 12px; border: 1px solid #e4e8e3; border-radius: 11px; }
.research-links a { color: #2f6f5b; font-size: 12px; font-weight: 700; text-decoration: none; }
.research-links a:hover { text-decoration: underline; }
.research-links p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.market-note { margin-top: 14px; padding: 14px; border-left: 3px solid #7fa394; background: #f5f7f4; }
.market-note strong { font-size: 10px; }
.market-note p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; transform: translate(-50%, 20px); min-width: 260px; max-width: min(90vw, 520px); padding: 13px 17px; border-radius: 12px; background: var(--ink); color: white; box-shadow: var(--shadow); text-align: center; font-size: 12px; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1000px) {
  .login-main { grid-template-columns: 1fr; gap: 48px; padding-top: 45px; }
  .invite-card { max-width: 560px; }
  .panel-grid { grid-template-columns: 1fr; }
  .guide-card { position: static; }
  .three-columns { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 720px) {
  .public-header { padding: 0 18px; }
  .login-main { padding: 32px 18px 70px; }
  .hero-copy h1 { font-size: 44px; }
  .hero-lead { font-size: 16px; }
  .feature-row { grid-template-columns: 1fr; }
  .feature-row article { min-height: 78px; }
  .invite-card { padding: 28px 22px; }
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 17px 18px; flex-direction: row; align-items: center; justify-content: space-between; }
  .sidebar nav { margin: 0; display: flex; }
  .sidebar-foot { display: none; }
  .nav-item { width: auto; padding: 10px; }
  .nav-item span { display: none; }
  .workspace { padding: 28px 16px 60px; }
  .workspace-header { display: block; }
  .workspace-header .status-pill { margin-top: 14px; }
  .two-columns, .three-columns, .check-grid { grid-template-columns: 1fr; }
  .form-section { padding: 22px 18px; }
  .submit-bar { align-items: stretch; flex-direction: column; }
  .history-row { grid-template-columns: 1fr 80px 20px; }
  .history-row time { display: none; }
  .report-sheet { padding: 24px 18px; }
  .report-top { flex-direction: column-reverse; }
  .decision-stamp { width: 82px; height: 82px; }
  .scenario-table { display: block; overflow-x: auto; white-space: nowrap; }
  .market-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .research-columns { grid-template-columns: 1fr; }
  .limit-grid, .confidence-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .checklist-table > div { grid-template-columns: 74px 1fr; }
  .checklist-table p { grid-column: 1 / -1; }
}

@media print {
  body { background: white; }
  .sidebar, .workspace-header, .no-print, #new-panel, #history-panel, .toast { display: none !important; }
  .app-shell, .workspace, .report-panel { display: block !important; padding: 0 !important; }
  .report-sheet { max-width: none; border: 0; box-shadow: none; padding: 0; }
  .report-section { break-inside: avoid; }
  .limit-grid article, .checklist-table > div, .experiment-list li { break-inside: avoid; }
  @page { size: A4; margin: 16mm; }
}
