:root {
  --bg: #f3efe7;
  --bg-accent: #ebe3d4;
  --surface: rgba(255, 252, 248, 0.92);
  --surface-strong: #fffdf9;
  --surface-tint: #f7f1e7;
  --ink: #182126;
  --muted: #5f6b6d;
  --line: rgba(24, 33, 38, 0.12);
  --line-strong: rgba(24, 33, 38, 0.18);
  --accent: #0f766e;
  --accent-dark: #0a4f4a;
  --accent-soft: #dff2ef;
  --danger: #b1432f;
  --danger-soft: #f8e1da;
  --warn: #a76612;
  --warn-soft: #f8ebd3;
  --success: #1a7f4b;
  --success-soft: #dff3e7;
  --shadow: 0 20px 44px rgba(44, 36, 24, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.1), transparent 30%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-accent) 100%);
  color: var(--ink);
}

a,
button,
select,
input[type="file"] {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 72px;
}

.site-header,
.hero-copy-block,
.hero-panel,
.standards-section,
.workflow-section,
.upload-card,
.result-section {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.site-header,
.hero-section,
.standards-grid,
.workflow-grid,
.upload-card,
.upload-support,
.result-overview,
.result-summary-grid,
.detail-grid,
.preview-grid,
.panel-stack {
  display: grid;
  gap: 20px;
}

.site-header,
.standards-section,
.workflow-section,
.upload-section,
.result-section,
.hero-section {
  margin-top: 24px;
}

.site-header {
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #57b7a9);
  box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.12);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--ink);
}

.hero-section {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  align-items: stretch;
}

.hero-copy-block,
.hero-panel,
.standards-section,
.workflow-section,
.upload-card,
.result-section {
  padding: 32px;
}

.hero-copy-block {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 252, 248, 0.92)),
    linear-gradient(135deg, rgba(15, 118, 110, 0.05), rgba(255, 255, 255, 0));
}

.hero-panel {
  background: linear-gradient(180deg, rgba(245, 239, 229, 0.95), rgba(255, 252, 248, 0.98));
}

.eyebrow,
.section-kicker,
.panel-label,
.mini-label,
.outcome-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.hero-copy-block h1 {
  margin: 12px 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 5vw, 4.7rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  max-width: 11ch;
}

.hero-lead,
.section-copy,
.info-tile p,
.standard-card p,
.workflow-step p,
.support-card li,
.detail-card li,
.result-summary-card p,
.preview-placeholder,
.action-feedback,
pre,
.hero-note,
.outcome-list span,
.processing-step,
.trust-strip span,
.guidance-card li {
  color: var(--muted);
}

.hero-lead,
.section-copy {
  margin: 0;
  max-width: 650px;
  font-size: 1.06rem;
  line-height: 1.72;
}

.hero-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-points span {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  font-size: 0.93rem;
}

.hero-note {
  margin: 20px 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.info-tile,
.outcome-card,
.standard-card,
.support-card,
.detail-card,
.preview-card,
.result-summary-card,
.mini-summary,
.result-preview-card {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.info-tile,
.standard-card,
.support-card,
.detail-card,
.preview-card,
.result-summary-card,
.mini-summary,
.result-preview-card {
  padding: 20px;
}

.info-tile strong,
.standard-card h3,
.workflow-step h3,
.support-card h3,
.detail-card h3,
.preview-card h3,
.result-summary-card h3 {
  display: block;
  margin: 0 0 10px;
  font-size: 1.04rem;
}

.info-tile p,
.standard-card p,
.support-card ul,
.detail-card ul,
.result-summary-card p,
.mini-summary strong {
  margin: 0;
}

.outcome-card {
  margin-top: 18px;
  padding: 18px 20px;
  background: var(--surface-tint);
}

.outcome-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 12px;
}

.outcome-list li {
  display: grid;
  gap: 3px;
}

.outcome-list strong {
  font-size: 0.98rem;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 22px;
}

.section-heading-wide {
  max-width: 780px;
}

.section-heading h2 {
  margin: 10px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.95rem, 3vw, 2.6rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.section-heading p + p {
  margin-top: 10px;
}

.standards-grid,
.workflow-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.standard-card {
  border-color: rgba(24, 33, 38, 0.1);
}

.workflow-step {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(251, 247, 239, 0.96));
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.upload-card {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  align-items: start;
}

.upload-form,
.field {
  display: grid;
  gap: 12px;
}

.field span {
  font-weight: 600;
}

select,
input[type="file"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: #fffdfa;
  color: var(--ink);
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.2);
}

.button-primary:hover {
  background: #0d6a62;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.84);
  border-color: var(--line);
  color: var(--ink);
}

.button-danger {
  background: var(--danger);
  color: #fff;
}

.button-wide {
  width: 100%;
}

.button[disabled] {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.support-card ul,
.detail-card ul {
  padding-left: 18px;
}

.support-card li,
.detail-card li,
.guidance-card li {
  margin-top: 8px;
  line-height: 1.55;
}

.processing-steps {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
}

.processing-step {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid transparent;
  font-size: 0.95rem;
}

.processing-step.is-active {
  color: var(--accent-dark);
  border-color: rgba(15, 118, 110, 0.18);
  background: var(--accent-soft);
  font-weight: 700;
}

.status-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.status-inline-pass {
  color: var(--success);
  background: var(--success-soft);
}

.status-inline-review {
  color: var(--warn);
  background: var(--warn-soft);
}

.status-inline-review::before,
.status-inline-retake::before {
  content: "⚠";
  font-size: 0.82rem;
}

.status-inline-retake {
  color: var(--danger);
  background: var(--danger-soft);
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.trust-strip span {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  font-size: 0.9rem;
}

.guidance-card {
  margin-bottom: 20px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--danger-soft);
  border: 1px solid rgba(177, 67, 47, 0.16);
}

.guidance-card h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.guidance-card ul {
  margin: 0;
  padding-left: 18px;
}

.result-overview {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  align-items: start;
  margin-top: 18px;
}

.result-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.mini-summary strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  line-height: 1.5;
}

.result-preview-card {
  display: grid;
  gap: 12px;
}

.result-preview-card h3 {
  margin: 0;
}

.preview-placeholder {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border: 1px dashed rgba(24, 33, 38, 0.2);
  border-radius: var(--radius-md);
  text-align: center;
}

.detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.preview-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 22px;
}

.preview-card img,
.result-preview-card img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.decision-banner {
  margin-top: 10px;
  padding: 16px 18px;
  border-radius: 18px;
  font-weight: 700;
}

.decision-pass {
  background: var(--success-soft);
  border: 1px solid rgba(26, 127, 75, 0.2);
  color: var(--success);
}

.decision-review {
  background: var(--warn-soft);
  border: 1px solid rgba(167, 102, 18, 0.22);
  color: var(--warn);
}

.decision-retake {
  background: var(--danger-soft);
  border: 1px solid rgba(177, 67, 47, 0.22);
  color: var(--danger);
}

.action-feedback,
.raw-report pre {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.raw-report {
  margin-top: 24px;
}

.raw-report summary {
  cursor: pointer;
  font-weight: 700;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
}

@media (max-width: 960px) {
  .site-header,
  .hero-section,
  .standards-grid,
  .workflow-grid,
  .upload-card,
  .result-overview,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .page-shell {
    width: min(100% - 24px, 1120px);
    padding-top: 20px;
  }

  .hero-copy-block,
  .hero-panel,
  .standards-section,
  .workflow-section,
  .upload-card,
  .result-section {
    padding: 24px;
  }

  .site-header {
    justify-content: start;
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .hero-copy-block h1 {
    font-size: 2.9rem;
  }

  .site-nav,
  .hero-actions,
  .result-actions {
    display: grid;
  }

  .site-nav,
  .hero-actions,
  .result-actions,
  .result-summary-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}
