:root {
  color-scheme: light;
  --ink: #10233f;
  --muted: #607089;
  --line: #d9e2ef;
  --blue: #0756c9;
  --cyan: #19b8d4;
  --paper: #f5f8fc;
  --white: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans JP", "Yu Gothic", sans-serif;
  letter-spacing: 0;
}
a { color: inherit; }
.diagnosis-header {
  min-height: 76px;
  padding: 14px clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.diagnosis-brand img { width: 150px; height: 42px; object-fit: contain; object-position: left center; }
.diagnosis-header nav { display: flex; align-items: center; gap: 24px; font-weight: 700; font-size: 14px; }
.diagnosis-header nav a { text-decoration: none; }
.diagnosis-header .header-cta { padding: 13px 18px; color: white; background: var(--blue); }
main { overflow: hidden; }
.diagnosis-hero {
  min-height: 500px;
  padding: 90px max(7vw, 24px) 110px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
  align-items: end;
  gap: 72px;
  color: white;
  background:
    linear-gradient(110deg, rgba(7, 43, 91, .96), rgba(8, 86, 163, .86)),
    url("/static/default_images/b2b/real/hero_01.webp") center/cover;
}
.eyebrow { margin: 0 0 14px; font-size: 12px; font-weight: 800; letter-spacing: .18em; color: var(--cyan); }
.diagnosis-hero h1 { max-width: 800px; margin: 0; font-family: "Yu Mincho", serif; font-size: clamp(44px, 6vw, 84px); line-height: 1.12; font-weight: 600; }
.diagnosis-hero h1 span { color: #6be7f3; }
.hero-lead { max-width: 760px; margin: 28px 0 0; font-size: 18px; line-height: 2; }
.hero-metrics { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.5); }
.hero-metrics div { padding: 22px 12px; border-right: 1px solid rgba(255,255,255,.35); }
.hero-metrics div:last-child { border-right: 0; }
.hero-metrics dt { font-size: 34px; font-weight: 800; }
.hero-metrics dd { margin: 4px 0 0; font-size: 12px; }
.diagnosis-panel,
.diagnosis-result,
.diagnosis-progress,
.diagnosis-error {
  width: min(1120px, calc(100% - 40px));
  margin: 56px auto;
}
.diagnosis-panel {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 56px;
  padding: clamp(30px, 5vw, 64px);
  background: var(--white);
  border: 1px solid var(--line);
}
.panel-heading p { margin: 0 0 8px; color: var(--blue); font-weight: 800; }
.panel-heading h2 { margin: 0; font-family: "Yu Mincho", serif; font-size: 34px; line-height: 1.4; }
#diagnosis-form { display: grid; gap: 14px; }
#diagnosis-form > label { font-weight: 800; }
#diagnosis-form > label span { color: #c33; font-size: 12px; }
textarea, select {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid #aebed1;
  background: white;
  color: var(--ink);
  font: inherit;
  border-radius: 0;
}
textarea { min-height: 112px; resize: vertical; }
.measurement-note { margin: 0; color: var(--muted); font-size: 13px; }
#diagnosis-submit {
  width: fit-content;
  min-width: 260px;
  margin-top: 10px;
  padding: 17px 28px;
  border: 0;
  color: white;
  background: var(--blue);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
#diagnosis-submit:disabled { opacity: .55; cursor: wait; }
.diagnosis-progress { padding: 28px; display: flex; align-items: center; gap: 20px; background: white; border: 1px solid var(--line); }
.diagnosis-progress[hidden], .diagnosis-error[hidden], .diagnosis-result[hidden] { display: none; }
.diagnosis-progress p { margin: 6px 0 0; color: var(--muted); }
.spinner { width: 44px; aspect-ratio: 1; flex: 0 0 auto; border: 4px solid #dceafb; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.diagnosis-error { padding: 20px; color: #8b2020; background: #fff0f0; border: 1px solid #e8b5b5; }
.diagnosis-result { scroll-margin-top: 20px; }
.result-summary { padding: clamp(28px, 5vw, 60px); display: grid; grid-template-columns: 190px 1fr; align-items: center; gap: 44px; color: white; background: #0b2b57; }
.score-ring { width: 170px; aspect-ratio: 1; display: grid; place-content: center; text-align: center; border: 12px solid #5ce0ea; border-radius: 50%; }
.score-ring strong { font-size: 64px; line-height: .9; }
.score-ring span { margin-top: 8px; }
.result-summary h2 { margin: 0 0 12px; font-size: 34px; }
.result-summary h2 small { display: block; margin-top: 8px; font-size: 18px; font-weight: 500; }
.result-summary p:not(.eyebrow) { margin: 5px 0; color: #d9e9ff; word-break: break-all; }
.axis-section, .category-section, .priority-section { padding: clamp(28px, 5vw, 56px); background: white; border: 1px solid var(--line); border-top: 0; }
.axis-section h3, .category-section h3, .priority-section h3 { margin: 0 0 28px; font-family: "Yu Mincho", serif; font-size: 30px; }
.axis-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.axis-grid article > div:first-child, .category-list article > div:first-child { display: flex; justify-content: space-between; gap: 12px; }
.axis-grid strong { font-size: 14px; }
.axis-grid span, .category-list span { color: var(--blue); font-weight: 800; }
.meter { height: 8px; margin-top: 10px; overflow: hidden; background: #e7eef7; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.category-section { margin-top: 28px; }
.category-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.category-list article { padding: 20px 0; border-top: 1px solid var(--line); }
.category-list p { margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.priority-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.priority-grid article { padding: 24px; background: #f2f7fd; border-left: 3px solid var(--blue); }
.priority-grid article > span { color: var(--cyan); font-size: 12px; font-weight: 800; }
.priority-grid h4 { margin: 8px 0 12px; font-size: 19px; }
.priority-grid p { color: var(--muted); line-height: 1.7; }
.priority-grid article > p:first-of-type { margin: 4px 0; color: var(--blue); font-weight: 800; }
.result-cta { padding: clamp(28px, 5vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 40px; color: white; background: #0756c9; }
.result-cta h3 { margin: 0; font-family: "Yu Mincho", serif; font-size: 30px; }
.result-cta p:not(.eyebrow) { margin: 12px 0 0; line-height: 1.8; }
.result-cta a { flex: 0 0 auto; padding: 16px 24px; color: var(--blue); background: white; text-decoration: none; font-weight: 800; }
footer { padding: 30px max(5vw, 20px); display: flex; justify-content: space-between; gap: 20px; color: #d9e9ff; background: #081c38; font-size: 13px; }
footer a { font-weight: 800; }

@media (max-width: 860px) {
  .diagnosis-header nav a:not(.header-cta) { display: none; }
  .diagnosis-hero { grid-template-columns: 1fr; min-height: auto; padding-top: 64px; gap: 42px; }
  .diagnosis-panel { grid-template-columns: 1fr; gap: 28px; }
  .axis-grid { grid-template-columns: repeat(2, 1fr); }
  .category-list { grid-template-columns: 1fr; }
  .priority-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .diagnosis-header { min-height: 64px; padding: 10px 16px; }
  .diagnosis-brand img { width: 118px; }
  .diagnosis-header .header-cta { padding: 11px 12px; font-size: 12px; }
  .diagnosis-hero { padding: 54px 20px 64px; }
  .diagnosis-hero h1 { font-size: 42px; }
  .hero-lead { font-size: 15px; line-height: 1.9; }
  .hero-metrics dt { font-size: 28px; }
  .diagnosis-panel, .diagnosis-result, .diagnosis-progress, .diagnosis-error { width: calc(100% - 24px); margin: 28px auto; }
  .diagnosis-panel { padding: 24px 18px; }
  #diagnosis-submit { width: 100%; min-width: 0; }
  .result-summary { grid-template-columns: 1fr; gap: 24px; }
  .score-ring { width: 140px; }
  .score-ring strong { font-size: 52px; }
  .axis-grid { grid-template-columns: 1fr; }
  .result-cta { align-items: flex-start; flex-direction: column; }
  .result-cta a { width: 100%; text-align: center; }
  footer { flex-direction: column; }
}
