:root {
  --bg: #f7f8fa;
  --bg-soft: #f9fafb;
  --surface: #ffffff;
  --surface-warm: #fffafa;
  --ink: #111827;
  --text: #1f2937;
  --muted: #667085;
  --subtle: #98a2b3;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --red: #c62828;
  --red-deep: #991b1b;
  --red-soft: #fef2f2;
  --red-border: #fecaca;
  --black: #111827;
  --shadow: 0 18px 48px rgba(17, 24, 39, 0.08);
  --shadow-soft: 0 10px 30px rgba(17, 24, 39, 0.06);
  --radius: 8px;
  --container: 1120px;
  --font: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 0%, rgba(198, 40, 40, 0.07), transparent 28rem),
    linear-gradient(180deg, #fff 0%, var(--bg) 26rem);
  font-family: var(--font);
  line-height: 1.78;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  z-index: -1;
  background-image:
    linear-gradient(rgba(17, 24, 39, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 72%);
}

a { color: inherit; }

*::before,
*::after {
  pointer-events: none;
}

h1,
h2,
h3,
p,
li,
a,
button {
  overflow-wrap: anywhere;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: clamp(1rem, 2vw, 1.12rem);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.brand::before {
  content: "";
  width: 10px;
  height: 28px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 5px var(--red-soft);
}

.nav, .site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-size: 0.92rem;
  font-weight: 700;
}

.nav a,
.site-footer a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
}

.nav a {
  padding: 6px 10px;
}

.nav a:hover,
.site-footer a:hover {
  color: var(--red-deep);
  background: var(--red-soft);
}

.hero {
  min-height: min(760px, calc(100dvh - 56px));
  display: grid;
  align-items: center;
  padding: clamp(52px, 9vw, 104px) clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(198, 40, 40, 0.08) 0 6px, transparent 6px 100%),
    radial-gradient(circle at 86% 26%, rgba(198, 40, 40, 0.13), transparent 19rem),
    linear-gradient(135deg, #ffffff 0%, #ffffff 48%, #f9fafb 100%);
}

.hero__body, .section {
  width: min(var(--container), 100%);
  margin: 0 auto;
}

.hero__body {
  position: relative;
  display: grid;
  gap: 14px;
}

.hero__body::after {
  content: "CHECK";
  position: absolute;
  right: 0;
  top: 50%;
  translate: 0 -50%;
  z-index: -1;
  color: rgba(198, 40, 40, 0.05);
  font-size: clamp(4.5rem, 15vw, 10rem);
  font-weight: 900;
  line-height: 1;
}

.hero h1,
.tool-hero h1,
.article-body h1 {
  color: var(--ink);
  text-wrap: balance;
}

.hero h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(2.75rem, 8vw, 5.7rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: 0;
}

.lead {
  max-width: 850px;
  margin: 10px 0 0;
  color: var(--ink);
  font-size: clamp(1.18rem, 3.2vw, 2.1rem);
  font-weight: 900;
  line-height: 1.42;
  text-wrap: balance;
}

.sublead {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.14rem);
  font-weight: 500;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 4px;
  padding: 4px 12px;
  border: 1px solid var(--red-border);
  border-radius: 6px;
  background: var(--red-soft);
  color: var(--red-deep);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
}

.note,
.privacy-note {
  color: var(--muted);
  font-size: 0.93rem;
}

.privacy-note--strong {
  max-width: 820px;
  margin: 4px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--red-border);
  border-left: 6px solid var(--red);
  border-radius: var(--radius);
  background: var(--red-soft);
  color: var(--ink);
  font-weight: 800;
}

.paste-examples {
  max-width: 820px;
  margin: 10px 0 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.paste-examples p {
  margin: 0 0 10px;
  color: var(--ink);
  font-weight: 900;
}

.paste-examples ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.paste-examples li,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.paste-examples li::before,
.tag::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--red);
}

.section {
  padding: clamp(50px, 8vw, 92px) clamp(18px, 4vw, 30px);
}

.section__heading {
  max-width: 820px;
  margin-bottom: 26px;
}

.section__heading p {
  color: var(--muted);
  font-weight: 500;
}

h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(1.55rem, 4vw, 2.55rem);
  font-weight: 900;
  line-height: 1.32;
  text-wrap: balance;
}

h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.45;
}

.button {
  min-height: 50px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 12px 18px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  text-align: center;
  white-space: normal;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover,
.copy-button:hover,
.choice-button:hover,
.article-links a:hover {
  transform: translateY(-2px);
}

.button:active,
.copy-button:active,
.choice-button:active {
  transform: translateY(1px);
  box-shadow: 2px 2px 0 var(--ink);
}

.button--primary {
  border-color: var(--red-deep);
  background: var(--red);
  color: #fff;
  box-shadow: 4px 4px 0 var(--red-deep);
}

.button--wide { width: 100%; }

.form-card,
.panel,
.mini-card,
.sample-card,
.article-body,
.tool-note-card,
.line-checker__panel,
.article-links a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-card {
  position: relative;
  z-index: 1;
  padding: clamp(20px, 4vw, 34px);
}

.form-steps {
  display: grid;
  gap: 12px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.form-steps li {
  position: relative;
  min-height: 92px;
  padding: 16px 16px 16px 18px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--red);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--ink);
  font-weight: 900;
}

.form-steps span,
.step-label {
  display: block;
  color: var(--red-deep);
  font-size: 0.82rem;
  font-weight: 900;
}

.form-step-block {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.step-label { margin: 0 0 8px; }

.step-help {
  margin: 0 0 12px;
  color: var(--muted);
}

.field {
  position: relative;
  z-index: 1;
}

.field label,
legend {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 900;
}

textarea,
select {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px 13px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  pointer-events: auto;
  touch-action: manipulation;
}

textarea {
  display: block;
  resize: vertical;
  min-height: 180px;
}

.case-textarea {
  display: block;
  width: 100%;
  min-height: 210px;
  margin: 10px 0 14px;
  border: 2px solid var(--red-border);
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, rgba(198, 40, 40, 0.28), rgba(17, 24, 39, 0.08)) border-box;
  box-shadow: inset 0 0 0 1px rgba(198, 40, 40, 0.05), 0 10px 24px rgba(17, 24, 39, 0.05);
}

.case-textarea::placeholder {
  color: #8a94a6;
  opacity: 1;
}

textarea:focus,
select:focus,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(198, 40, 40, 0.24);
  outline-offset: 3px;
}

.question-grid {
  display: grid;
  grid-auto-flow: dense;
  gap: 14px;
  margin: 24px 0;
}

.question-grid--basic,
.question-grid--detail {
  margin-top: 14px;
}

.details-questions {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.details-questions summary {
  padding: 14px 16px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.details-questions .question-grid {
  padding: 0 14px 14px;
}

fieldset {
  margin: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.form-error {
  padding: 13px 14px;
  border: 1px solid var(--red-border);
  border-left: 6px solid var(--red);
  border-radius: var(--radius);
  background: var(--red-soft);
  color: var(--red-deep);
  font-weight: 800;
}

.result-section { padding-top: 28px; }

.result-hero {
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--red-border);
  border-top: 6px solid var(--red);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 92% 8%, rgba(198, 40, 40, 0.1), transparent 16rem),
    #fff;
  box-shadow: var(--shadow);
}

.score-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 20px 0 12px;
  color: var(--muted);
}

.score-box strong {
  color: var(--ink);
  font-size: clamp(2.45rem, 11vw, 4.9rem);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.result-disclaimer {
  padding: 12px 14px;
  border-left: 6px solid var(--red);
  border-radius: var(--radius);
  background: var(--red-soft);
  color: var(--ink);
  font-weight: 800;
}

.result-type {
  display: inline-flex;
  margin: 8px 0 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.result-grid,
.card-grid {
  display: grid;
  grid-auto-flow: dense;
  gap: 16px;
  margin-top: 24px;
}

.panel,
.mini-card,
.sample-card {
  padding: 19px;
}

.panel--highlight {
  border-color: var(--red-border);
  background: var(--red-soft);
}

.panel--wide { grid-column: 1 / -1; }

.risk-list { display: grid; gap: 14px; }

.risk-item strong,
.risk-item span {
  display: block;
}

.risk-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.bar {
  height: 10px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef0f3;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fca5a5, var(--red));
}

.word-category { margin-bottom: 14px; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.copy-button {
  min-height: 40px;
  border: 1px solid var(--red-deep);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: var(--red);
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.copy-status {
  display: block;
  min-height: 1.6em;
  color: #047857;
  font-weight: 900;
}

pre {
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 10px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  line-height: 1.65;
}

.mini-card {
  box-shadow: var(--shadow-soft);
}

.mini-card,
.article-links a {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.mini-card:hover,
.article-links a:hover {
  border-color: var(--red-border);
  box-shadow: 0 18px 42px rgba(198, 40, 40, 0.12);
}

.mini-card::before,
.panel::before,
.sample-card::before {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--red);
}

.split {
  display: grid;
  gap: 20px;
}

.steps {
  display: grid;
  gap: 10px;
  padding-left: 1.35em;
  color: var(--ink);
  font-weight: 900;
}

.article-links {
  display: grid;
  grid-auto-flow: dense;
  gap: 12px;
}

.article-links a {
  display: block;
  padding: 17px;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.6;
  text-decoration: none;
}

.article-links a::after {
  content: " →";
  color: var(--red);
}

.site-footer {
  padding: 34px clamp(18px, 4vw, 48px);
  background: var(--ink);
  color: #fff;
}

.site-footer p {
  max-width: 880px;
  color: #d1d5db;
}

.site-footer a {
  padding: 6px 0;
  color: #fee2e2;
}

.article-shell {
  width: min(940px, 100%);
  margin: 0 auto;
  padding: clamp(36px, 7vw, 76px) clamp(18px, 4vw, 30px);
}

.article-body {
  padding: clamp(22px, 5vw, 46px);
}

.article-body h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 6vw, 3.35rem);
  font-weight: 900;
  line-height: 1.18;
}

.article-body h2 {
  margin-top: 38px;
  padding-top: 4px;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  border-top: 3px solid var(--red);
}

.article-body p {
  max-width: 72ch;
}

.article-body ul {
  padding-left: 1.35em;
}

.article-body li + li {
  margin-top: 0.35em;
}

.article-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.article-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.article-table th,
.article-table td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-table th {
  background: var(--red-soft);
  color: var(--red-deep);
  font-weight: 900;
}

.article-table tr:last-child td { border-bottom: 0; }

.cta-box {
  margin: 32px 0;
  padding: clamp(18px, 4vw, 26px);
  border: 1px solid var(--red-border);
  border-left: 7px solid var(--red);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(198, 40, 40, 0.09), transparent 16rem),
    var(--red-soft);
}

.cta-box p:first-child {
  margin-top: 0;
  color: var(--ink);
  font-size: 1.08rem;
}

.answer-box,
.checklist-panel {
  margin: 28px 0;
  padding: clamp(18px, 4vw, 26px);
  border: 1px solid var(--line);
  border-top: 6px solid var(--red);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.answer-box {
  background:
    linear-gradient(90deg, rgba(198, 40, 40, 0.07) 0 6px, transparent 6px 100%),
    #fff;
}

.answer-box p:first-child,
.checklist-panel p:first-child {
  margin-top: 0;
}

.checklist-panel ul {
  columns: 2 260px;
  column-gap: 28px;
  margin: 0;
}

.warning-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 12px;
}

.warning-terms span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--red-border);
  border-radius: 6px;
  background: var(--red-soft);
  color: var(--red-deep);
  font-size: 0.92rem;
  font-weight: 900;
}

.source-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.source-list a {
  display: block;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.source-list a:hover {
  border-color: var(--red-border);
  background: var(--red-soft);
}

.template-grid {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.template-grid pre {
  margin: 0;
  border-left: 5px solid var(--red);
  background: #fff;
}

.flow-list {
  display: grid;
  gap: 10px;
  padding-left: 1.35em;
}

.flow-list li {
  padding-left: 0.2em;
}

.tool-shell {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: clamp(34px, 6vw, 72px) clamp(18px, 4vw, 30px);
}

.tool-hero {
  display: grid;
  gap: 20px;
  align-items: start;
  margin-bottom: 26px;
}

.tool-hero h1 {
  margin: 0;
  font-size: clamp(2.15rem, 7vw, 4.55rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
}

.tool-note-card {
  padding: 18px;
  border-top: 5px solid var(--red);
}

.tool-note-card ul {
  margin: 8px 0 0;
  padding-left: 1.3em;
}

.line-checker__panel {
  padding: clamp(20px, 4vw, 36px);
  border-top: 6px solid var(--red);
}

.line-checker__panel h2 { margin-top: 0; }

.line-checker__progress {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 900;
}

.line-checker__choices {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.choice-button {
  min-height: 58px;
  width: 100%;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.choice-button:hover,
.choice-button:focus-visible {
  border-color: var(--red-border);
  background: var(--red-soft);
}

.line-checker__score {
  margin: 8px 0 14px;
  color: var(--muted);
  font-weight: 900;
}

.line-checker__score strong {
  color: var(--ink);
  font-size: clamp(2rem, 9vw, 3.6rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.result-type[data-level="low"] { background: #047857; }
.result-type[data-level="caution"] { background: #b45309; }
.result-type[data-level="danger"] { background: var(--red); }

.line-result-grid { margin-bottom: 20px; }
.line-related-links { margin-top: 12px; }
.line-related-links a { box-shadow: var(--shadow-soft); }

@media (min-width: 720px) {
  .question-grid,
  .card-grid,
  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .split {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .tool-hero {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

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

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

  .hero__body {
    padding-right: 210px;
  }
}

@media (max-width: 640px) {
  body {
    background: linear-gradient(180deg, #fff 0%, var(--bg) 24rem);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    font-size: 0.86rem;
  }

  .nav a {
    padding-left: 0;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(2.3rem, 13vw, 3.25rem);
  }

  .hero__body,
  .article-shell,
  .tool-shell,
  .article-body,
  .form-card,
  .line-checker__panel,
  .panel,
  .mini-card,
  .sample-card,
  .cta-box,
  .paste-examples {
    min-width: 0;
    max-width: 100%;
  }

  .hero__body::after {
    display: none;
  }

  .panel-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .copy-button {
    width: 100%;
  }
}
