:root {
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --canvas: #f6f4ef;
  --accent: #b45309;
  --accent-soft: #fff3df;
  --danger: #b91c1c;
  --success: #166534;
  --shadow: 0 18px 50px rgba(31, 41, 55, 0.08);
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.65;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { min-height: 100vh; margin: 0; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 0.15em; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.02em; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: white; background: var(--accent); }
.nav { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--accent); }
.text-button { padding: 0; border: 0; color: var(--muted); background: transparent; }
.text-button:hover { color: var(--accent); }

.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: clamp(32px, 6vw, 72px) 0; flex: 1; }
.narrow-shell { width: min(760px, calc(100% - 32px)); }
.hero { max-width: 880px; padding: 36px 0 64px; }
.hero h1 { max-width: 780px; margin: 0; font-size: clamp(38px, 7vw, 72px); line-height: 1.08; letter-spacing: -0.045em; }
.hero-copy { max-width: 680px; margin: 24px 0 0; color: var(--muted); font-size: clamp(17px, 2vw, 21px); }
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 30px; }
.section { margin-top: 32px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-size: clamp(24px, 4vw, 36px); letter-spacing: -0.025em; }
.section-heading p { max-width: 520px; margin: 0; color: var(--muted); }
.section-heading.compact { align-items: center; margin-bottom: 18px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  color: white;
  background: var(--accent);
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(180, 83, 9, 0.2); }
.button:disabled { cursor: wait; opacity: 0.6; transform: none; }
.button.wide { width: 100%; }
.button.secondary { color: var(--accent); background: var(--accent-soft); border-color: transparent; box-shadow: none; }
.align-end { align-self: end; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.analysis-card { display: block; min-height: 220px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); transition: transform 0.2s ease, border-color 0.2s ease; }
.analysis-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.analysis-card h3 { margin: 22px 0 10px; font-size: 23px; }
.analysis-card p { color: var(--muted); }
.analysis-card .card-action { color: var(--accent); font-weight: 800; }
.card-pill { display: inline-flex; padding: 5px 10px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 12px; font-weight: 800; }

.panel { padding: clamp(22px, 5vw, 42px); border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.panel h1 { margin: 0 0 12px; font-size: clamp(30px, 5vw, 46px); line-height: 1.15; letter-spacing: -0.03em; }
.panel h2 { margin-top: 0; }
.notice-panel { padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(135deg, #fff 0%, var(--accent-soft) 120%); }
.notice-panel h2 { margin-bottom: 8px; }
.notice-panel p { max-width: 780px; margin: 0; color: var(--muted); }

.form-stack { display: grid; gap: 18px; margin-top: 26px; }
.form-grid { display: grid; grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1fr) auto; gap: 16px; align-items: end; }
.inline-form { display: flex; gap: 12px; align-items: end; margin-top: 20px; }
.field { display: grid; gap: 8px; color: var(--ink); font-weight: 700; }
.field > span { font-size: 14px; }
.field input, .field select { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; outline: none; transition: border-color 0.18s ease, box-shadow 0.18s ease; }
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.field.grow { flex: 1; }
.form-error { min-height: 24px; margin: 0; color: var(--danger); font-weight: 700; }
.form-note { padding: 14px 16px; border-radius: 12px; color: var(--muted); background: #f9fafb; }
.field-help { color: var(--muted); font-size: 13px; font-weight: 400; }

.loading { color: var(--muted); }
.status-box { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f9fafb; }
.status-box strong { display: block; margin-bottom: 6px; }
.status-processing { color: var(--accent); }
.status-ready { color: var(--success); }
.status-failed { color: var(--danger); }

.report-shell { width: min(920px, 100%); margin: 0 auto; }
.report-document { padding: clamp(22px, 6vw, 68px); border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.report-hero { padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.report-hero h1 { margin: 8px 0 6px; font-size: clamp(30px, 5vw, 52px); line-height: 1.15; letter-spacing: -0.035em; }
.report-hero p:last-child { margin: 0; color: var(--muted); }
.report-chart { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 28px 0; }
.report-chart > div { padding: 16px; border-radius: 14px; background: var(--accent-soft); }
.report-chart strong, .report-chart span { display: block; }
.report-chart strong { margin-bottom: 6px; color: var(--accent); font-size: 12px; letter-spacing: 0.08em; }
.report-section { padding: 26px 0; border-bottom: 1px solid var(--line); }
.report-section h2 { margin: 0 0 12px; font-size: 24px; }
.report-section p { margin: 0 0 12px; color: #374151; }
.report-disclaimer { margin-top: 28px; padding: 18px; border-radius: 14px; color: var(--muted); background: #f9fafb; font-size: 14px; }
.report-meta { margin-top: 14px; color: var(--muted); font-size: 13px; }

.admin-workspace { display: grid; gap: 22px; margin-top: 22px; }
.key-result { display: grid; gap: 12px; margin-top: 20px; padding: 18px; border: 1px solid #bbf7d0; border-radius: 14px; background: #f0fdf4; }
.key-result code { display: block; padding: 12px; border-radius: 10px; overflow-wrap: anywhere; background: white; font-size: 18px; font-weight: 800; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.status-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #f3f4f6; font-size: 12px; font-weight: 800; }
.status-badge.ready { color: var(--success); background: #dcfce7; }
.status-badge.failed { color: var(--danger); background: #fee2e2; }
.status-badge.processing, .status-badge.queued { color: var(--accent); background: var(--accent-soft); }

.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 24px clamp(18px, 4vw, 56px); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer a { color: var(--accent); }

@media (max-width: 760px) {
  .site-header { align-items: flex-start; }
  .nav { gap: 12px; font-size: 13px; }
  .section-heading { align-items: start; flex-direction: column; }
  .form-grid, .inline-form { grid-template-columns: 1fr; display: grid; }
  .inline-form .button { width: 100%; }
  .report-chart { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
}

@media print {
  :root { background: white; }
  body { background: white; }
  .no-print, .site-header, .site-footer { display: none !important; }
  .shell { width: 100%; padding: 0; }
  .report-document { border: 0; border-radius: 0; box-shadow: none; padding: 0; }
}