/* PHP Checker — 白地に青の方眼。技術資料のように静かで、信頼できる見た目にする */
:root {
  --font-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", YuGothic, Meiryo, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --ink: #0d1b3e;
  --ink-soft: #4a5878;
  --ink-faint: #8792ab;
  --blue: #1947c8;
  --blue-deep: #0f2f8f;
  --blue-soft: #dfe8ff;
  --blue-wash: #f3f6ff;
  --line: #d9e0f0;
  --line-strong: #b9c5e2;
  --paper: #ffffff;
  --grid: rgba(25, 71, 200, 0.06);

  /* 状態の色は小さな印にだけ使い、面では使わない */
  --st-ended: #b5472f;
  --st-security: #b07a12;
  --st-active: #1d8058;

  --radius: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.85;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt";
}

a {
  color: var(--blue);
  text-underline-offset: 3px;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

code,
.mono {
  font-family: var(--font-mono);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}

.wordmark-logo {
  display: block;
  width: 32px;
  height: 32px;
}

.wordmark-name {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wordmark-by {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 48px 0 56px;
  background-color: var(--blue-wash);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(rgba(25, 71, 200, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 71, 200, 0.035) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 16px 16px, 16px 16px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

/* 方眼の上の大きな「<?php」記号（装飾） */
.hero::after {
  content: "<?php";
  position: absolute;
  right: -12px;
  top: 8px;
  font-family: var(--font-mono);
  font-size: clamp(72px, 18vw, 150px);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: rgba(25, 71, 200, 0.06);
  pointer-events: none;
  line-height: 1;
}

.eyebrow,
.section-no {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--blue);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--blue);
}

h1 {
  font-size: clamp(27px, 6.6vw, 40px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}

.lead {
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 28px;
}

.panel {
  position: relative;
  z-index: 1;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(15, 47, 143, 0.35);
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.url-row {
  display: grid;
  gap: 10px;
}

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

input,
textarea {
  width: 100%;
  padding: 13px 14px;
  font-size: 16px; /* iOSで自動ズームさせない */
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

input[aria-invalid="true"] {
  border-color: var(--st-ended);
}

textarea[readonly] {
  background: var(--blue-wash);
}

.field-error,
.form-error {
  margin-top: 8px;
  font-size: 13px;
  color: var(--st-ended);
}

.fine {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ink-faint);
  line-height: 1.7;
}

.turnstile:empty {
  display: none;
}

.turnstile {
  margin-top: 12px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s;
}

.btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(25, 71, 200, 0.7);
}

.btn-primary:hover {
  background: var(--blue-deep);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn-ghost {
  background: var(--paper);
  border-color: var(--line-strong);
  color: var(--blue);
  padding: 9px 16px;
  font-size: 14px;
}

.btn-light {
  background: #fff;
  color: var(--blue-deep);
}

.btn-light:hover {
  background: var(--blue-soft);
}

.btn-wide {
  display: flex;
  width: 100%;
  padding: 16px;
}

/* ---------- result ---------- */

.result-section {
  padding: 32px 0 8px;
}

.result-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  animation: rise 0.5s var(--ease) both;
}

.result-head {
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--blue-wash), var(--paper));
}

.result-meta {
  font-size: 12px;
  color: var(--ink-faint);
  word-break: break-all;
  margin-bottom: 10px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  margin-bottom: 10px;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-detected {
  color: var(--blue);
}
.status-possible {
  color: var(--blue-deep);
}
.status-unknown {
  color: var(--ink-soft);
}

.result-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.55;
}

.result-version {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 12px;
}

.result-version .label {
  font-size: 12px;
  color: var(--ink-faint);
}

.result-version .value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--blue-deep);
}

.result-version .value.none {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
}

.result-body {
  padding: 18px 20px 20px;
}

.result-body > * + * {
  margin-top: 14px;
}

.result-subhead {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

.signals {
  list-style: none;
  font-size: 14px;
}

.signals li {
  position: relative;
  padding-left: 16px;
}

.signals li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.78em;
  width: 6px;
  height: 1px;
  background: var(--blue);
}

.caution {
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.7;
}

.redirect-box {
  font-size: 14px;
}

.redirect-box .url {
  font-family: var(--font-mono);
  font-size: 13px;
  word-break: break-all;
}

.result-error {
  padding: 18px 20px;
  color: var(--st-ended);
  font-size: 14px;
}

.loading {
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 14px;
}

.loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid var(--blue-soft);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ---------- sections ---------- */

.section {
  padding: 56px 0;
}

.section-tint {
  background: var(--blue-wash);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-no {
  margin-bottom: 6px;
}

h2 {
  font-size: clamp(21px, 4.8vw, 26px);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 10px;
}

.section-lead {
  color: var(--ink-soft);
  margin-bottom: 24px;
}

/* ---------- timeline chart ---------- */

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sw {
  display: inline-block;
  width: 18px;
  height: 8px;
  border-radius: 2px;
}

.sw-active {
  background: var(--blue);
}

.sw-security {
  background: repeating-linear-gradient(135deg, var(--blue-soft) 0 3px, #b8c9f5 3px 5px);
}

.sw-today {
  width: 2px;
  height: 12px;
  background: var(--ink);
}

.chart {
  --label-w: 52px;
  position: relative;
  border-top: 1px solid var(--line);
}

.chart-axis {
  position: relative;
  height: 24px;
  margin-left: var(--label-w);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-faint);
}

.chart-axis span {
  position: absolute;
  top: 4px;
  transform: translateX(-50%);
}

.chart-row {
  display: grid;
  grid-template-columns: var(--label-w) 1fr;
  align-items: center;
  height: 38px;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}

.chart-row.is-mine {
  background: var(--blue-wash);
}

.chart-label {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
}

.chart-row.is-ended .chart-label {
  color: var(--ink-faint);
}

.chart-row.is-mine .chart-label {
  color: var(--blue);
}

.chart-track {
  position: relative;
  height: 100%;
  background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: calc(100% / var(--years)) 100%;
}

.bar {
  position: absolute;
  top: 50%;
  height: 12px;
  transform: translateY(-50%) scaleX(0);
  transform-origin: left;
  border-radius: 2px;
  animation: grow 0.9s var(--ease) forwards;
  animation-delay: var(--delay, 0s);
}

.bar-active {
  background: var(--blue);
}

.bar-security {
  background: repeating-linear-gradient(135deg, var(--blue-soft) 0 3px, #b8c9f5 3px 5px);
}

.chart-row.is-ended .bar-active {
  background: #c3cbe0;
}

.chart-row.is-ended .bar-security {
  background: repeating-linear-gradient(135deg, #eef0f5 0 3px, #d7dbe6 3px 5px);
}

.chart-row.is-mine .bar {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--blue);
}

.today {
  position: absolute;
  top: 24px;
  bottom: 0;
  width: 2px;
  background: var(--ink);
  pointer-events: none;
}

.today::before {
  content: "今日";
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10.5px;
  font-weight: 700;
  background: var(--ink);
  color: #fff;
  padding: 0 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.source {
  margin-top: 28px;
  font-size: 12px;
  color: var(--ink-faint);
}

.source a {
  color: inherit;
}

.eol-heading {
  margin: 40px 0 12px;
  font-size: 17px;
  font-weight: 700;
}

.table-scroll {
  overflow-x: auto;
}

.eol-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.eol-table th,
.eol-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.eol-table thead th {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-faint);
}

.eol-table td {
  font-family: var(--font-mono);
  color: var(--ink-soft);
}

.eol-table tbody th {
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ---------- guide ---------- */

.guide {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
}

.guide summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 44px 15px 18px;
  font-weight: 700;
  position: relative;
}

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

.guide summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s var(--ease);
}

.guide[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.guide > :not(summary) {
  margin: 0 18px 16px;
  font-size: 14px;
}

.guide ol {
  padding-left: 1.3em;
}

.mail {
  font-family: var(--font-sans);
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.8;
  padding: 14px 16px;
  background: var(--blue-wash);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
}

.copy-status {
  margin-left: 10px;
  font-size: 13px;
  color: var(--st-active);
}

.guide-foot {
  margin-top: 18px;
  font-size: 14px;
}

/* ---------- concerns ---------- */

.concerns {
  list-style: none;
  display: grid;
  gap: 8px;
}

.concern {
  position: relative;
  background: var(--paper);
  padding: 14px 16px 14px 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* 注意の印（!）。チェックボックスに見えないよう丸で描く */
.concern::before {
  content: "!";
  position: absolute;
  left: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--st-security);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

/* ---------- footer ---------- */

.notes {
  font-size: 13.5px;
  color: var(--ink-soft);
}

.notes dt {
  font-weight: 700;
  color: var(--ink);
  margin-top: 10px;
}

.notes code {
  font-size: 12.5px;
  background: var(--blue-wash);
  padding: 1px 5px;
  border-radius: 3px;
}

.site-footer {
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-faint);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.footer-logo {
  display: block;
  width: 20px;
  height: 20px;
}

.footer-brand span {
  font-weight: 400;
  color: var(--ink-faint);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.site-footer a {
  color: inherit;
}

/* ---------- hero extras ---------- */

.panel {
  padding: 20px;
}

.badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -12px 0 22px;
}

.badges li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px 3px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-deep);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.badges li::before {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: translateY(-2px) rotate(-45deg);
}

/* ---------- 02 統計 ---------- */

.stat {
  padding: 20px;
  margin-bottom: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
}

.stat-label {
  font-size: 13px;
  color: var(--ink-soft);
}

.stat-figures {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin: 2px 0 8px;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--blue-deep);
  line-height: 1.2;
}

.stat-num small {
  font-family: var(--font-sans);
  font-size: 16px;
  margin-left: 2px;
}

.stat-sub strong {
  font-family: var(--font-mono);
  color: var(--blue-deep);
}

/* カウントアップ中に桁数が変わっても横幅が動かないよう、右寄せで幅を固定する（幅はJSで設定） */
.count {
  display: inline-block;
  text-align: right;
}

.stat-ratio {
  transition: opacity 0.5s var(--ease);
}

.stat-ratio.is-waiting {
  opacity: 0;
}

.stat-source {
  font-size: 11.5px;
  color: var(--ink-faint);
  line-height: 1.6;
}

.stat-source a {
  color: inherit;
}

/* ---------- 04 / 05 ---------- */

.points {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-bottom: 26px;
}

.points li {
  position: relative;
  padding-left: 22px;
}

.points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border: 2px solid var(--blue);
  border-radius: 2px;
}

.scope {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

@media (min-width: 600px) {
  .scope {
    grid-template-columns: 1fr 1fr;
  }
}

.scope-col {
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.scope-col ul {
  padding-left: 1.2em;
  font-size: 14px;
  display: grid;
  gap: 6px;
}

.scope-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.scope-yes {
  color: var(--blue);
}

.scope-no {
  color: var(--ink-soft);
}

/* ---------- 結果の追加要素 ---------- */

.support {
  padding: 12px 14px;
  border-radius: 8px;
  border-left: 3px solid currentColor;
  background: var(--blue-wash);
  font-size: 14.5px;
}

.support-ended {
  color: var(--st-ended);
}
.support-security {
  color: var(--st-security);
}
.support-active {
  color: var(--st-active);
}

.evidence summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
}

.evidence .signals {
  margin-top: 6px;
}

.next {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.next-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

.next-link {
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
}

.next-link::before {
  content: "→ ";
}

.next-link:hover {
  text-decoration: underline;
}

.btn-outline {
  background: var(--paper);
  border-color: var(--blue);
  color: var(--blue);
}

.btn-outline:hover {
  background: var(--blue-wash);
}

.guide-sub {
  font-weight: 700;
  margin-bottom: 4px !important;
}

/* ---------- 07 相談 ---------- */

.consult {
  margin-top: 28px;
  padding: 22px 20px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.consult h3 {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 6px;
}

.consult > p {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.req,
.opt {
  font-size: 11px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 4px;
}

.req {
  background: var(--blue);
  color: #fff;
}

.opt {
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}

.summary {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--blue-wash);
  font-size: 13px;
}

.summary-title {
  font-weight: 700;
  color: var(--blue);
  font-size: 12px;
}

.consent {
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 1.7;
  cursor: pointer;
}

.consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  accent-color: var(--blue);
}

.hp {
  position: absolute;
  left: -9999px;
}

.thanks {
  padding: 8px 0;
  outline: none;
}

.thanks-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 6px;
}

/* ---------- motion ---------- */

.reveal {
  animation: rise 0.7s var(--ease) both;
}
.d1 {
  animation-delay: 0.08s;
}
.d2 {
  animation-delay: 0.16s;
}
.d3 {
  animation-delay: 0.26s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes grow {
  to {
    transform: translateY(-50%) scaleX(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

.nowrap {
  white-space: nowrap;
}
