/*
  EASYON Analytics — "검색·AI 건강검진 결과지"
  톤은 형제 서비스 seo.easymedical.kr(이지온커뮤니케이션)의 2026-12 개편과 맞춘다: 네이비 머리글·히어로,
  파란 포인트(#1f3fae), 옅은 회색 바탕 위의 흰 카드. seo 화면처럼 라이트 전용이다.
  검진 결과지의 문법(판정 칩, 등급 타일, 고정폭 수치)은 그대로 쓴다.
  글꼴은 시스템 글꼴만 쓴다(AGENTS.md). CSP 때문에 인라인 스타일 없이 이 파일 하나로 관리한다.
*/

:root {
  color-scheme: light;
  /* seo.easymedical.kr landing.css·styles.css와 같은 값 */
  --night: #1d1a17;
  --night-text: #d6cfc6;
  --night-muted: #a39a8f;
  --paper: #f7f3ec;
  --sheet: #ffffff;
  --sheet-soft: #fbf8f2;
  --ink: #1a1c22;
  --text: #1a1c22;
  --ink-soft: #3d3b37;
  --muted: #55534e;
  --faint: #6b6862;
  --rule: #e7e0d4;
  --rule-strong: #d5ccbd;
  --accent: #1f3fae;
  --accent-strong: #18318a;
  --accent-soft: #e9edf8;
  --accent-on: #d6def5;
  --accent-pale: #a9b8e6;
  --band: #f0eadf;
  --on-accent: #ffffff;
  --ghost-line: #7a7268;

  --error: #b42318;
  --error-bg: #fdecea;
  --warning: #8a5300;
  --warning-bg: #fff4db;
  --notice: #18318a;
  --notice-bg: #e9edf8;
  --pass: #0b7a47;
  --pass-bg: #e6f4ec;
  --unknown: #6b6862;
  --unknown-bg: #f0eadf;
  --hot: #c2410c;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-sm: 0.875rem;
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.3rem);
  --text-xl: clamp(1.5rem, 1.15rem + 1.2vw, 2.1rem);
  --text-hero: clamp(2.3rem, 1.3rem + 3.4vw, 3.6rem);

  --gutter: clamp(20px, 4vw, 32px);
  --space-section: clamp(4rem, 2.8rem + 4vw, 7rem);
  --radius: 8px;
  --radius-sm: 6px;
  --radius-card: 16px;
  --shadow-sheet: 0 1px 2px rgb(29 26 23 / 5%);
  --shadow-raised: 0 12px 32px rgb(29 26 23 / 12%);

  --duration-fast: 180ms;
  --duration-normal: 320ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #c3cdeb;
  color: var(--ink);
}

/* 결과지 머리. 히어로와 달리 옅은 회색 바탕을 그대로 쓴다. */
.ruled {
  background: transparent;
}

a {
  color: var(--accent);
  text-underline-offset: 4px;
}

a:hover {
  color: var(--accent-strong);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 네이비 바탕(머리·꼬리) 위에서는 흰 테두리로 보이게 한다 */
:is(.site-header, .site-footer) :is(a, button):focus-visible {
  outline-color: #ffffff;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

.wrap {
  width: min(100%, 1240px);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

/* ---------- 머리·꼬리 ---------- */

/* seo 홈 머리글과 같은 네이비 띠 */
.site-header {
  background: var(--night);
  color: #ffffff;
  border-bottom: 1px solid rgb(255 255 255 / 6%);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  gap: 12px 32px;
  padding-block: 14px;
}

.site-header .form-note {
  color: var(--night-text);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 26px;
  font-size: 14px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--night-text);
  text-decoration: none;
  transition: color var(--duration-fast);
}

.nav-link:hover {
  color: #ffffff;
}

/* seo.easymedical.kr 상단 메뉴의 HOT 표식과 같은 모양 */
.hot-badge {
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--hot);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* 로고: seo의 EZ 표식 + 서비스 이름 + 작은 영문 설명 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
}

.brand:hover {
  color: #ffffff;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand strong {
  display: block;
  font-size: 16px;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.brand small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--night-muted);
}

.site-footer {
  margin-top: var(--space-section);
}

/* 회사 정보 footer: aiblog·analytics·seo 세 서비스가 같은 마크업·값을 쓴다 */
.company-footer {
  --footer-bg: #1d1a17;
  --footer-text: #d6cfc6;
  --footer-muted: #a39a8f;
  --footer-line: rgba(255, 255, 255, 0.1);
  --footer-hover: #a9b8e6;
  background: var(--footer-bg);
  color: var(--footer-muted);
  font-size: 13px;
  line-height: 1.7;
}
.company-footer .wrap {
  display: grid;
  gap: 10px;
  padding-block: 40px 32px;
}
.company-footer p { margin: 0; }
.company-footer .footer-brand { color: var(--footer-text); }
.company-footer .footer-brand strong { margin-right: 2px; color: #ffffff; font-size: 15px; font-weight: 700; }
.company-footer .footer-brand span { margin-left: 8px; color: var(--footer-muted); }
.company-footer .footer-info { display: flex; flex-wrap: wrap; gap: 2px 20px; font-style: normal; }
.company-footer .footer-info b { margin-right: 6px; color: var(--footer-text); font-weight: 600; }
.company-footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--footer-line);
  font-size: 12px;
}
.company-footer a { color: #ffffff; text-decoration: none; }
.company-footer a:hover { color: var(--footer-hover); text-decoration: underline; }
.company-footer a:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; border-radius: 2px; }

/* 작은 머리말: 한국어로, 넓은 자간·대문자 없이 */
.eyebrow {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
}

/* ---------- 버튼·입력 ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.4rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast), transform var(--duration-fast) var(--ease-out);
}

.button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--on-accent);
}

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

.button[disabled] {
  opacity: 0.55;
  cursor: progress;
}

/* seo 대시보드의 secondary-button과 같은 흰 버튼 */
.button.secondary {
  background: var(--sheet);
  border-color: var(--rule-strong);
  color: var(--ink);
  font-weight: 650;
}

.button.secondary:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

/* 네이비 머리글 안의 버튼: seo 홈의 테두리 버튼 */
.site-header .button.secondary {
  min-height: 40px;
  padding: 0 1rem;
  background: transparent;
  border-color: var(--ghost-line);
  color: #ffffff;
  font-size: 14px;
}

.site-header .button.secondary:hover {
  background: rgb(255 255 255 / 8%);
  border-color: var(--ghost-line);
  color: #ffffff;
}

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

.field {
  display: grid;
  gap: 0.35rem;
}

.field label,
.field .label {
  font-weight: 650;
  font-size: var(--text-sm);
}

.field .hint {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 400;
}

input[type="text"],
input[type="tel"],
input[type="url"],
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--sheet);
  color: var(--ink);
  font: inherit;
}

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

input:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgb(31 63 174 / 22%);
  outline-offset: 0;
}

input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.form-error {
  color: var(--error);
  font-weight: 600;
  font-size: var(--text-sm);
}

.form-error:empty {
  display: none;
}

/* ---------- 판정 칩 ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.6em;
  padding: 0.1rem 0.55rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.chip.error { background: var(--error-bg); color: var(--error); }
.chip.warning { background: var(--warning-bg); color: var(--warning); }
.chip.notice { background: var(--notice-bg); color: var(--notice); }
.chip.pass { background: var(--pass-bg); color: var(--pass); }
.chip.unknown { background: var(--unknown-bg); color: var(--unknown); }

/* 점수에 넣지 않는 항목 표시 */
.tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0 0.45rem;
  border-radius: 99px;
  background: var(--band);
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 600;
  vertical-align: 0.1em;
  white-space: nowrap;
}

/* ---------- 홈 ---------- */

/* seo 홈 히어로와 같은 밝은 리포트형: 종이색 바탕 + 결과지 한 장 */
.hero {
  padding-block: clamp(3rem, 2rem + 4vw, 5rem) clamp(3.5rem, 2.5rem + 4vw, 6rem);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 1rem + 4vw, 4rem);
  align-items: center;
}

@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

.hero h1 {
  font-size: var(--text-hero);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin-block: 1.25rem 1.5rem;
}

.hero h1 em {
  font-style: normal;
}

.hero .lede {
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.8;
  max-width: 32em;
}

.audit-form {
  margin-top: 2rem;
  display: grid;
  gap: 0.9rem;
  max-width: 580px;
  padding: 1.4rem;
  background: var(--sheet);
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sheet);
}

.audit-form .row {
  display: grid;
  gap: 0.6rem;
}

@media (min-width: 560px) {
  .audit-form .row {
    grid-template-columns: 1fr auto;
  }
}

.turnstile-slot {
  min-height: 65px;
}

.form-note {
  color: var(--muted);
  font-size: var(--text-sm);
}

/* 히어로 오른쪽의 견본 결과지: 장식용(aria-hidden). 실제 결과지 상단(등급 타일·점수·영역 점수)과 같은 문법 */
.specimen {
  position: relative;
  isolation: isolate;
  justify-self: center;
  width: min(100%, 440px);
  padding-bottom: 1.6rem;
  color: var(--text);
}

/* 결과지 종이 한 장. 음수 z-index는 부모 배경 위에 그려지므로 배경을 가상 요소로 둔다 */
.specimen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  background: var(--sheet);
  box-shadow: var(--shadow-sheet), var(--shadow-raised);
}

.specimen-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.specimen-head span:last-child {
  color: var(--accent-on);
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.specimen-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 1.4rem;
  padding-block: 0.6rem;
  border-bottom: 1px dashed var(--rule-strong);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* 결과지 요약(renderSummary)을 견본 크기로 줄인다 */
.specimen-summary .summary {
  gap: 1.4rem;
  margin: 1.1rem 1.1rem 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

.specimen-summary .summary-intro,
.specimen-summary .score-card-note,
.specimen-summary .radar figcaption {
  display: none;
}

.specimen-summary .score-card {
  gap: 0.6rem 0.75rem;
  padding: 1.1rem 0.75rem 1rem;
}

.specimen-summary .grade-tile {
  width: 72px;
  font-size: 2.6rem;
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 35%),
    0 10px 20px var(--tile-glow);
}

.specimen-summary .score-total {
  min-height: 72px;
}

.specimen-summary .score-total strong {
  font-size: 2.9rem;
}

.specimen-summary .score-unit,
.specimen-summary .score-max {
  font-size: 0.95rem;
}

.specimen-summary .pill {
  padding: 0.2rem 0.7rem;
  font-size: 0.7rem;
}

.specimen-summary .rings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

.specimen-summary .ring {
  width: auto;
  gap: 0.45rem;
}

.specimen-summary .ring-dial {
  width: 64px;
}

.specimen-summary .ring-number {
  font-size: 1.1rem;
}

.specimen-summary .ring figcaption {
  font-size: 0.72rem;
  text-align: center;
  white-space: nowrap;
}

.specimen-summary .ring figcaption small {
  font-size: 0.62rem;
}

.specimen-summary .radar {
  width: 100%;
}

.specimen-summary .radar-label {
  font-size: 19px;
}

.specimen-list {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  margin: 1.2rem 1.4rem 0;
  padding: 0;
  font-size: var(--text-sm);
}

.specimen-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: center;
  line-height: 1.45;
}

/* 진행 표시 */
.progress {
  margin-top: 2rem;
  max-width: 580px;
  padding: 1.25rem 1.4rem;
  background: var(--sheet);
  color: var(--text);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}

.hero .progress {
  box-shadow: var(--shadow-sheet);
}

.progress h2 {
  font-size: var(--text-lg);
}

.progress ol {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.progress li {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.6rem;
  align-items: center;
  color: var(--muted);
}

.progress li::before {
  content: "";
  width: 0.8rem;
  height: 0.8rem;
  margin-inline: auto;
  border: 2px solid var(--rule-strong);
  border-radius: 50%;
}

.progress li[data-state="active"] {
  color: var(--ink);
  font-weight: 700;
}

.progress li[data-state="active"]::before {
  border-color: var(--accent);
  background: var(--accent-soft);
  animation: pulse 1.2s var(--ease-out) infinite;
}

.progress li[data-state="done"] {
  color: var(--ink-soft);
}

.progress li[data-state="done"]::before {
  border-color: var(--accent);
  background: var(--accent);
}

@keyframes pulse {
  50% { transform: scale(1.35); opacity: 0.6; }
}

/* 진단 항목 소개: seo 홈의 운영 과정(growth-process)과 같은 모양. 카드 대신 위쪽 선으로 나눈 열 */
.areas {
  padding-block: var(--space-section) 0;
}

.areas h2 {
  margin-top: 0.75rem;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
  max-width: 20em;
}

.areas ol {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem 1.5rem;
  margin: 3rem 0 0;
  padding: 0;
}

.areas li {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--rule-strong);
}

.areas .num {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.areas h3 {
  font-size: 1.1875rem;
  font-weight: 700;
}

.areas li p {
  color: var(--muted);
  font-size: var(--text-sm);
  word-break: keep-all;
}

@media (max-width: 1080px) {
  .areas ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .areas ol {
    grid-template-columns: 1fr;
  }
}

/* ---------- 결과지 ---------- */

.report-head {
  padding-block: 2.5rem 0.5rem;
}

.report-head h1 {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.4rem);
  font-weight: 750;
  margin-block: 0.5rem;
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--muted);
}

.refresh {
  display: grid;
  justify-items: start;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.refresh .progress {
  margin-top: 0;
  width: 100%;
}

.report-meta a {
  color: var(--ink);
}

/* 요약: 점수 카드 → 원형 게이지 → 레이더 차트 순으로 가운데 정렬해 쌓는다 */
.summary {
  display: grid;
  justify-items: center;
  gap: clamp(2rem, 1.4rem + 2vw, 3rem);
  margin-top: 2rem;
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem) clamp(1rem, 0.5rem + 2.5vw, 3rem);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sheet);
  text-align: center;
}

.summary-intro {
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: var(--text-lg);
  line-height: 1.6;
  text-wrap: balance;
}

.summary-intro strong {
  color: var(--ink);
}

/* 점수 카드: seo 대시보드 첫 지표 카드처럼 파란 바탕 */
.score-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 1.25rem 1rem;
  width: min(100%, 640px);
  padding: clamp(1.5rem, 1rem + 2vw, 2.25rem) clamp(1rem, 0.5rem + 2vw, 2rem) 1.25rem;
  background: var(--accent);
  border-radius: 20px;
  color: #ffffff;
}

.score-card-cell {
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 1rem;
}

.score-card-note {
  grid-column: 1 / -1;
  color: var(--accent-on);
  font-size: var(--text-sm);
}

.pill {
  display: inline-block;
  padding: 0.35rem 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-accent);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.score-card .pill {
  background: #ffffff;
  color: var(--accent-strong);
}

/* 등급 타일: 등급마다 다른 금속 느낌 그라데이션 */
.grade-tile {
  --tile-top: #ffc94d;
  --tile-bottom: #b4650c;
  --tile-glow: rgb(120 60 0 / 35%);
  display: grid;
  place-items: center;
  width: clamp(92px, 70px + 6vw, 128px);
  aspect-ratio: 1;
  border-radius: 24%;
  background: linear-gradient(180deg, var(--tile-top), var(--tile-bottom));
  color: #fff;
  font-size: clamp(3rem, 2.2rem + 3vw, 4.4rem);
  font-weight: 600;
  line-height: 1;
  text-shadow: 0 2px 6px rgb(0 0 0 / 18%);
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 35%),
    0 14px 26px var(--tile-glow);
}

.grade-tile[data-grade="B"] { --tile-top: #5fd08f; --tile-bottom: #0b7a47; --tile-glow: rgb(4 60 34 / 35%); }
.grade-tile[data-grade="C"] { --tile-top: #f2c46d; --tile-bottom: #8a5300; --tile-glow: rgb(80 48 0 / 35%); }
.grade-tile[data-grade="D"] { --tile-top: #f4a06b; --tile-bottom: #c2410c; --tile-glow: rgb(110 36 6 / 35%); }
.grade-tile[data-grade="F"] { --tile-top: #f0857b; --tile-bottom: #b42318; --tile-glow: rgb(100 18 12 / 35%); }
.grade-tile[data-grade="-"] { --tile-top: #cfc6b8; --tile-bottom: #6b6862; --tile-glow: rgb(29 26 23 / 25%); }

.score-total {
  display: flex;
  align-items: baseline;
  justify-content: center;
  min-height: clamp(92px, 70px + 6vw, 128px);
  align-content: center;
  flex-wrap: wrap;
  color: #ffffff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.score-total strong {
  font-size: clamp(3rem, 2rem + 4vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.score-unit {
  margin-left: 0.15em;
  font-size: var(--text-lg);
  font-weight: 800;
}

.score-max {
  margin-left: 0.4em;
  color: var(--accent-on);
  font-size: var(--text-lg);
  white-space: pre;
}

/* 원형 게이지 */
.rings {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem clamp(1.5rem, 0.5rem + 4vw, 3.5rem);
}

.ring {
  --ring-color: var(--accent);
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  margin: 0;
  width: 7.5rem;
}

.ring[data-tone="good"] { --ring-color: #12a160; }
.ring[data-tone="warning"] { --ring-color: #d98e04; }
.ring[data-tone="error"] { --ring-color: var(--error); }
.ring[data-tone="na"] { --ring-color: var(--unknown); }

.ring-dial {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(96px, 84px + 2vw, 112px);
  aspect-ratio: 1;
}

.ring-dial svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track,
.ring-value {
  fill: none;
  stroke-width: 11;
}

.ring-track {
  stroke: var(--band);
}

.ring-value {
  stroke: var(--ring-color);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--value, 0) * 100);
  transition: stroke-dashoffset 1100ms var(--ease-out);
}

.ring[data-tone="na"] .ring-value {
  stroke: none;
}

.ring-number {
  position: relative;
  color: var(--ink);
  font-size: 1.6rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.ring-number.na {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
}

.ring figcaption {
  display: grid;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.4;
}

.ring figcaption small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

/* 레이더 차트 */
.radar {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  width: min(100%, 560px);
  margin: 0;
}

.radar-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.radar-grid {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1;
}

.radar-grid:last-of-type {
  stroke: var(--rule-strong);
  stroke-width: 1.5;
}

.radar-axis {
  stroke: var(--rule);
  stroke-width: 1;
}

.radar-area {
  fill: rgb(31 63 174 / 14%);
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  transform-origin: 260px 212px;
  animation: radar-grow 900ms var(--ease-out) both;
}

.radar-dot {
  fill: var(--accent);
  stroke: var(--sheet);
  stroke-width: 2;
}

.radar-dot.na {
  fill: var(--unknown);
}

.radar-label {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.radar-value {
  fill: var(--accent);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.radar figcaption {
  display: grid;
  gap: 0.25rem;
}

.radar figcaption strong {
  color: var(--ink);
  font-size: var(--text-lg);
}

.radar figcaption small {
  color: var(--muted);
  font-size: var(--text-sm);
}

/* 좁은 화면: 게이지는 2열, 차트 라벨은 축소 비율만큼 키운다 */
@media (max-width: 560px) {
  .rings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 0.75rem;
    width: 100%;
  }

  .ring {
    width: auto;
  }

  .radar {
    width: calc(100% + 1.5rem);
  }

  .radar-label {
    font-size: 23px;
  }
}

@media (max-width: 380px) {
  .pill {
    padding-inline: 0.75rem;
    font-size: 0.8125rem;
  }

  .radar-label {
    font-size: 25px;
  }
}

@keyframes radar-grow {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ring-value,
  .radar-area {
    transition: none;
    animation: none;
  }
}

/* 결과지 각 영역: seo 대시보드의 section-band처럼 흰 카드 */
.report-section {
  margin-top: 20px;
  padding: clamp(1.25rem, 0.8rem + 1.6vw, 2rem);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sheet);
}

#report-body > .report-section:first-child {
  margin-top: 2rem;
}

.report-section > h2 {
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem);
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -0.02em;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.report-section > p.section-note {
  margin-top: 0.75rem;
  color: var(--muted);
}

.priorities {
  list-style: none;
  counter-reset: priority;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

@media (min-width: 900px) {
  .priorities {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.priorities li {
  counter-increment: priority;
  position: relative;
  padding: 1.25rem;
  background: var(--sheet-soft);
  border: 1px solid var(--rule);
  border-radius: 12px;
}

.priorities li::before {
  content: "0" counter(priority);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 0.75rem;
  border-radius: 10px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.priorities h3 {
  font-size: 1.05rem;
  margin-block: 0.5rem 0.4rem;
}

.priorities p {
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.priorities p + p {
  margin-top: 0.5rem;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-list > li {
  border-bottom: 1px solid var(--rule);
}

.check-list > li:last-child {
  border-bottom: 0;
}

.check-list summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.4rem 0.9rem;
  align-items: baseline;
  padding: 0.95rem 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  list-style: none;
  transition: background-color var(--duration-fast);
}

.check-list summary:hover {
  background: #f1f3fa;
}

.check-list summary::-webkit-details-marker {
  display: none;
}

.check-list summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--faint);
}

.check-list details[open] summary::after {
  content: "−";
}

.check-list summary:hover .check-title {
  color: var(--accent-strong);
}

.check-title {
  font-weight: 700;
}

.check-evidence {
  grid-column: 2 / 3;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.check-body {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.2rem;
  padding: 1rem 1.1rem;
  background: var(--sheet-soft);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: var(--text-sm);
}

@media (min-width: 640px) {
  .check-body {
    margin-left: 4.6rem;
  }
}

.check-body dt {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.check-body dd {
  margin: 0.15rem 0 0;
}

.check-body .affected {
  margin: 0;
  padding-left: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.passed-toggle {
  margin-top: 1rem;
}

.notice-box {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-soft);
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

/* 인쇄·PDF·문서 내려받기 */
.print-only {
  display: none;
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 1rem;
}

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* 상담 신청 */
.lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (min-width: 900px) {
  .lead {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }
}

.lead > div:first-child p + p {
  margin-top: 0.75rem;
}

.lead-form {
  display: grid;
  gap: 1rem;
  padding: 1.4rem;
  background: var(--sheet-soft);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
}

.lead-form .pair {
  display: grid;
  gap: 1rem;
}

@media (min-width: 560px) {
  .lead-form .pair {
    grid-template-columns: 1fr 1fr;
  }
}

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: start;
  font-size: var(--text-sm);
}

.consent input {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.2rem;
  accent-color: var(--accent);
}

.consent-detail {
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

.consent-detail summary {
  cursor: pointer;
  font-weight: 650;
}

.consent-detail table {
  width: 100%;
  margin-top: 0.5rem;
  border-collapse: collapse;
  background: var(--sheet);
}

.consent-detail th,
.consent-detail td {
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.success {
  padding: 1.25rem;
  border: 1px solid var(--pass);
  background: var(--pass-bg);
  border-radius: var(--radius);
  color: var(--ink);
}

.state-message {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sheet);
}

.state-message h2 {
  font-size: var(--text-lg);
  margin-bottom: 0.5rem;
}

.state-message .button {
  margin-top: 1rem;
}

/* ---------- 관리 ---------- */

.admin-grid {
  display: grid;
  gap: 20px;
  margin-top: 2rem;
}

@media (min-width: 900px) {
  .admin-grid {
    grid-template-columns: 1.1fr 2fr;
    align-items: start;
  }
}

.panel {
  padding: 1.5rem;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sheet);
}

.panel h2 {
  font-size: 1.1875rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* 오늘 사용량 막대 */
.meters {
  display: grid;
  gap: 0.9rem;
}

.meter {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  font-size: var(--text-sm);
}

.meter .bar {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--band);
}

.meter .bar i {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--pass);
  transform: scaleX(var(--value, 0));
  transform-origin: left center;
  transition: transform 700ms var(--ease-out);
}

.meter[data-tone="warning"] .bar i { background: #d98e04; }
.meter[data-tone="error"] .bar i { background: var(--error); }

.meter .value {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.switch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.switch-state {
  font-weight: 800;
}

.switch-state[data-on="true"] { color: var(--pass); }
.switch-state[data-on="false"] { color: var(--error); }

.table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--sheet);
}

.leads-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.leads-table th,
.leads-table td {
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.leads-table th {
  background: var(--sheet-soft);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.leads-table tbody tr:hover {
  background: #f1f3fa;
}

.leads-table td.message {
  max-width: 22rem;
  white-space: pre-wrap;
}

.leads-table .mono {
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* ---------- 문서(개인정보 처리방침, 404) ---------- */

.doc {
  max-width: 820px;
  padding-block: 3rem 0;
}

.doc h1 {
  font-size: var(--text-xl);
  font-weight: 750;
  margin-bottom: 1.5rem;
}

.doc .eyebrow + h1 {
  margin-top: 0.5rem;
}

.doc h2 {
  font-size: var(--text-lg);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.doc p + p,
.doc ul {
  margin-top: 0.5rem;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  background: var(--sheet);
  font-size: var(--text-sm);
}

.doc th,
.doc td {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.doc th {
  background: var(--sheet-soft);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.switch-heading {
  margin-top: 1.75rem;
}

/* 좁은 화면: 장식 요소가 가로 스크롤을 만들지 않게 하고, 점수 영역은 줄바꿈한다 */
.hero {
  overflow-x: clip;
}

@media (max-width: 420px) {
  .specimen-summary .summary {
    margin-inline: 0.75rem;
  }

  .specimen-summary .ring-dial {
    width: 54px;
  }

  .specimen-summary .ring figcaption {
    font-size: 0.66rem;
    white-space: normal;
    word-break: keep-all;
  }

  .specimen-summary .radar-label {
    font-size: 25px;
  }
}

/* 그리드 칸이 내용(위젯·넓은 표) 폭 때문에 늘어나지 않게 */
.hero .wrap > *,
.lead > *,
.admin-grid > * {
  min-width: 0;
}

@media (max-width: 360px) {
  .audit-form,
  .lead-form {
    padding: 1rem;
  }
}

@media (max-width: 600px) {
  .site-header .wrap {
    min-height: 0;
  }

  .site-nav {
    flex-basis: 100%;
    gap: 0 18px;
  }

  .meter {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .meter .bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 400px) {
  .brand small {
    display: none;
  }

  .site-header .button {
    padding: 0 0.8rem;
    white-space: nowrap;
  }
}

/* ---------- 인쇄·PDF 저장 ----------
  화면용 버튼·상담 신청·다시 진단은 빼고, 접힌 항목은 report-export.js가 인쇄 직전에 모두 펼친다.
  판정 칩과 게이지 색이 빠지지 않도록 배경색 인쇄를 켠다. 네이비 머리글과 파란 점수 카드는 잉크를 아끼려 밝게 바꾼다. */
@media print {
  @page {
    size: A4;
    margin: 14mm 12mm;
  }

  :root {
    --gutter: 0px;
    --space-section: 1.75rem;
    --text-base: 10pt;
    --text-sm: 9pt;
    --text-lg: 11.5pt;
    --text-xl: 15pt;
  }

  body {
    background: #fff;
    line-height: 1.55;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-only {
    display: inline;
  }

  .site-nav,
  .no-print,
  .passed-toggle,
  .check-list summary::after {
    display: none !important;
  }

  .site-header {
    background: #fff;
    color: var(--ink);
    border-bottom: 1px solid var(--rule);
  }

  .site-header .wrap {
    min-height: 0;
    padding-block: 0 0.6rem;
  }

  .brand,
  .brand:hover {
    color: var(--ink);
  }

  .brand small {
    color: var(--muted);
  }

  .company-footer {
    --footer-bg: #ffffff;
    --footer-text: var(--ink);
    --footer-muted: var(--muted);
    --footer-line: var(--rule);
  }

  .company-footer .footer-brand strong,
  .company-footer a {
    color: var(--ink);
  }

  .report-head {
    padding-top: 1.25rem;
  }

  a {
    color: inherit;
  }

  /* 머리글과 요약 카드가 첫 쪽에 함께 들어가도록 줄인다 */
  .summary {
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    box-shadow: none;
    break-inside: avoid;
  }

  .score-card {
    width: min(100%, 520px);
    padding: 1rem 1rem 0.75rem;
    gap: 0.75rem;
    background: var(--band);
    color: var(--ink);
  }

  .score-total {
    color: var(--ink);
  }

  .score-max,
  .score-card-note {
    color: var(--muted);
  }

  .score-card .pill {
    background: var(--ink);
    color: #fff;
  }

  .score-card-cell {
    gap: 0.6rem;
  }

  .grade-tile {
    width: 76px;
    font-size: 2.6rem;
    box-shadow: none;
  }

  .score-total {
    min-height: 76px;
  }

  .score-total strong {
    font-size: 2.8rem;
  }

  .rings {
    gap: 1rem 2rem;
  }

  .ring {
    gap: 0.4rem;
  }

  .ring-dial {
    width: 76px;
  }

  .ring-number {
    font-size: 1.25rem;
  }

  .ring-value {
    transition: none;
  }

  .radar {
    width: min(100%, 340px);
  }

  .report-section {
    margin-top: var(--space-section);
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .report-section > h2 {
    padding-bottom: 0.5rem;
    break-after: avoid;
  }

  .priorities li,
  .check-list > li {
    break-inside: avoid;
  }

  .check-list summary {
    padding-block: 0.6rem;
  }

  .check-body {
    margin: 0 0 0.75rem;
    padding: 0.6rem 0.8rem;
  }
}
