/* Mitani Web Improvement Studio — Quiet, Confident, Editorial. */

:root {
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --surface-muted: #F2F2EE;
  --ink: #0E0E10;
  --ink-2: #52525B;
  --ink-3: #A1A1AA;
  --line: rgba(14, 14, 16, 0.10);
  --line-strong: rgba(14, 14, 16, 0.18);
  --accent: #4B5CC3;
  --accent-deep: #2E3A8C;
  --accent-soft: rgba(75, 92, 195, 0.08);
  --signal: #C77700;
  --success: #1F9D55;

  --font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-en: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  --container: 1200px;
  --reading: 760px;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-en), var(--font-jp);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "palt" 1;
}

body, p, h1, h2, h3, h4, h5, h6, li, a, span, div, input, textarea, select, button, label {
  font-family: var(--font-en), var(--font-jp);
}

.num, .tabular { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

hr { border: none; border-top: 0.5px solid var(--line); margin: 0; }

/* Layout primitives */
.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.reading { max-width: var(--reading); margin: 0 auto; padding: 0 32px; }
@media (max-width: 1023px) {
  .container, .reading { padding: 0 24px; }
}

.section { padding: 120px 0; }
.section-tight { padding: 80px 0; }

@media (max-width: 767px) {
  .section { padding: 64px 0; }
  .section-tight { padding: 48px 0; }
  .container, .reading { padding: 0 20px; }
}

/* Typography */
.display {
  font-size: clamp(32px, 6.4vw, 76px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
  overflow-wrap: break-word;
  word-break: keep-all;
  line-break: strict;
}
.phrase-title span {
  display: inline;
}
.phrase-title span::after {
  content: "\A";
  white-space: pre;
}
.phrase-title span:last-child::after {
  content: "";
}
@media (min-width: 1024px) {
  .phrase-title span {
    display: inline;
  }
  .phrase-title span::after {
    content: " ";
    white-space: normal;
  }
}
.h1 { font-size: clamp(26px, 4vw, 44px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; margin: 0; text-wrap: balance; overflow-wrap: break-word; word-break: keep-all; line-break: strict; }
.h2 { font-size: clamp(22px, 3vw, 32px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; margin: 0; text-wrap: balance; overflow-wrap: break-word; word-break: keep-all; line-break: strict; }
.h3 { font-size: clamp(18px, 2.2vw, 22px); font-weight: 600; letter-spacing: -0.005em; line-height: 1.4; margin: 0; text-wrap: balance; overflow-wrap: break-word; word-break: keep-all; line-break: strict; }
.lead, .body, p { overflow-wrap: break-word; word-break: keep-all; line-break: strict; }
.lead { font-size: 18px; line-height: 1.7; color: var(--ink-2); margin: 0; }
.body { font-size: 15.5px; line-height: 1.8; color: var(--ink-2); margin: 0; }
.caption { font-size: 12.5px; font-weight: 500; letter-spacing: 0.02em; color: var(--ink-3); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-block;
}

@media (max-width: 767px) {
  .display { font-size: clamp(30px, 8vw, 44px); }
  .display, .h1, .h2, .h3 {
    overflow-wrap: anywhere;
    word-break: normal;
  }
  .lead, .body, p, li {
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

/* Hide hard line breaks inside scaling headings on narrow viewports — let CSS balance handle it. */
@media (max-width: 767px) {
  .display br, .h1 br, .h2 br { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  padding: 14px 22px;
  border-radius: 6px;
  border: 0.5px solid transparent;
  transition: transform 120ms ease-out, background 120ms ease-out, color 120ms ease-out, border-color 120ms ease-out;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn:hover { transform: translateY(-1px); }
.btn.is-loading {
  opacity: 0.68;
  pointer-events: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-deep); }
.btn-secondary {
  background: transparent;
  border: 0.5px solid var(--ink);
  color: var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--bg); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 14px 0;
}
.btn-ghost:hover { color: var(--accent); }
.btn-ghost .arrow { transition: transform 160ms ease-out; }
.btn-ghost:hover .arrow { transform: translateX(4px); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  background: rgba(250, 250, 247, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 0.5px solid transparent;
  transition: border-color 200ms ease-out;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-family: var(--font-en);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface);
  border: 0.5px solid var(--line);
  box-shadow: 0 1px 2px rgba(14,14,16,0.04);
}
.brand-mark img {
  width: 26px;
  height: 26px;
  display: block;
}
.brand-text {
  min-width: 0;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a.nav-link {
  font-size: 13.5px;
  color: var(--ink-2);
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  padding: 4px 0;
  transition: color 120ms;
}
.nav a.nav-link:hover { color: var(--ink); }
.nav a.nav-link.active { color: var(--ink); }
.nav a.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
}
.menu-toggle .bar { display: block; width: 22px; height: 1px; background: var(--ink); margin: 5px 0; }

/* Tablet: keep nav, drop only the CTA button to save space */
@media (max-width: 1023px) and (min-width: 768px) {
  .header-cta { display: none; }
  .nav.nav-links { gap: 20px; }
  .nav.nav-links a.nav-link { font-size: 13px; }
}
@media (max-width: 767px) {
  .site-header .inner { padding: 0 20px; }
  .brand { gap: 8px; font-size: 16px; }
  .brand-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
  .brand-mark img { width: 24px; height: 24px; }
  .nav-links, .header-cta { display: none; }
  .menu-toggle { display: block; }
}

.mobile-nav {
  position: fixed;
  inset: 64px 0 0 0;
  background: var(--bg);
  z-index: 40;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 0.5px solid var(--line);
}
.mobile-nav a {
  font-size: 22px;
  font-weight: 500;
  padding: 14px 0;
  border-bottom: 0.5px solid var(--line);
  color: var(--ink);
}
.mobile-nav .btn { margin-top: 16px; justify-content: center; }

/* Footer */
.site-footer {
  border-top: 0.5px solid var(--line);
  padding: 80px 0 40px;
  margin-top: 80px;
}
.footer-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 48px; flex-wrap: wrap; }
.footer-tagline { max-width: 420px; }
.footer-tagline .body { margin-top: 12px; }
.newsletter { display: flex; gap: 0; align-items: stretch; }
.newsletter input {
  border: 0.5px solid var(--line-strong);
  border-right: none;
  background: var(--surface);
  padding: 12px 14px;
  font-size: 13.5px;
  border-radius: 6px 0 0 6px;
  width: 240px;
  outline: none;
  font-family: inherit;
}
.newsletter input:focus { border-color: var(--accent); }
.newsletter button {
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 0 18px;
  font-size: 13px;
  border-radius: 0 6px 6px 0;
  font-weight: 500;
}

.footer-contact {
  min-width: 260px;
}
.footer-contact a {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}
.footer-contact p {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: var(--ink-2);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 64px;
  padding-top: 48px;
  border-top: 0.5px solid var(--line);
}
.footer-col h5 { font-size: 11.5px; font-family: var(--font-mono); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13.5px; color: var(--ink-2); }
.footer-col a:hover { color: var(--ink); }

.footer-base {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 0.5px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  flex-wrap: wrap;
  gap: 16px;
}

.text-link {
  color: var(--accent);
  border-bottom: 0.5px solid currentColor;
}
.text-link:hover { color: var(--accent-deep); }

.legal-stack {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.legal-stack section {
  border-top: 0.5px solid var(--line);
  padding-top: 24px;
}
.legal-stack h2 { margin-bottom: 12px; }

.info-panel {
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: 12px;
  padding: 32px;
}

@media (max-width: 767px) {
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .newsletter input { width: 100%; }
  .newsletter { width: 100%; }
}

/* Section header pattern */
.section-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 64px;
  padding-bottom: 16px;
  border-bottom: 0.5px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
@media (max-width: 767px) {
  .section-label { margin-bottom: 40px; font-size: 10.5px; letter-spacing: 0.1em; }
}
.section-label .right { color: var(--ink-3); }

/* Eyebrow */
.eyebrow-block { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.eyebrow-block::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--ink-3);
  display: inline-block;
}

/* Hairline divider that animates */
.divider-anim {
  position: relative;
  height: 0.5px;
  background: var(--line);
  overflow: hidden;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.divider-anim.in { transform: scaleX(1); }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms ease-out, transform 500ms ease-out;
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 100ms; }
.reveal.delay-2 { transition-delay: 200ms; }
.reveal.delay-3 { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .divider-anim { transform: scaleX(1); transition: none; }
}

/* Audit tag */
.audit-tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  font-family: var(--font-en), var(--font-jp);
  white-space: nowrap;
}
.audit-tag.muted { background: rgba(14, 14, 16, 0.04); color: var(--ink-2); }

/* Stat block */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 0.5px solid var(--line);
  border-bottom: 0.5px solid var(--line);
}
.stat-grid .stat {
  padding: 40px 28px;
  border-right: 0.5px solid var(--line);
}
.stat-grid .stat:last-child { border-right: none; }
.stat .num-big {
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.stat .num-suffix { font-size: 0.55em; color: var(--ink-2); margin-left: 4px; font-weight: 500; }
.stat .stat-label {
  margin-top: 14px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  font-family: var(--font-mono);
}
@media (max-width: 767px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid .stat { padding: 28px 20px; border-bottom: 0.5px solid var(--line); }
  .stat-grid .stat:nth-child(2) { border-right: none; }
  .stat-grid .stat:nth-child(odd) { border-right: 0.5px solid var(--line); }
  .stat-grid .stat:nth-child(n+3) { border-bottom: none; }
}

/* Card */
.card {
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: 12px;
  padding: 32px;
}

/* Service flow */
.service-flow-grid {
  border: 0.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.service-flow-card {
  min-height: 164px;
  padding: 28px 20px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: start;
  gap: 10px;
}
.service-flow-num,
.service-flow-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.35;
}
.service-flow-num { color: var(--ink-3); }
.service-flow-title {
  align-self: end;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0;
  word-break: keep-all;
}
.service-flow-sub { color: var(--accent); }
@media (max-width: 599px) {
  .service-flow-card {
    min-height: 136px !important;
    padding: 22px 16px !important;
  }
  .service-flow-title { font-size: 15px; }
  .service-flow-num,
  .service-flow-sub { font-size: 10px; }
}

/* Report checklist */
.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 0.5px solid var(--line);
}
.check-item {
  padding: 20px 24px;
  border-bottom: 0.5px solid var(--line);
  display: grid;
  grid-template-columns: 28px 18px minmax(0, 1fr);
  column-gap: 14px;
  align-items: flex-start;
}
.check-item:nth-child(odd) { border-right: 0.5px solid var(--line); }
.check-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}
.check-mark {
  color: var(--accent);
  font-size: 14px;
  padding-top: 2px;
}
.check-text {
  min-width: 0;
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.7;
  word-break: auto-phrase;
  overflow-wrap: anywhere;
}
@media (max-width: 767px) {
  .check-grid { grid-template-columns: 1fr; }
  .check-item {
    border-right: none !important;
    grid-template-columns: 30px 18px minmax(0, 1fr);
    column-gap: 12px;
    padding: 18px 0;
  }
  .check-text { font-size: 14px; line-height: 1.75; }
}

/* Step indicator */
.step-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 0.5px solid var(--line);
}
.step-row:last-child { border-bottom: 0.5px solid var(--line); }
.step-num {
  font-family: var(--font-en);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.step-content h4 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.step-content p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.7; }

/* Before / After */
.ba-frame-pair {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.ba-frame-pair.horizontal {
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.ba-arrow {
  position: absolute;
  left: 50%;
  top: calc(50% - 14px);
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: var(--bg);
  border: 0.5px solid var(--line-strong);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(14,14,16,0.06);
  z-index: 2;
}
@media (max-width: 767px) {
  .ba-frame-pair.horizontal {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .ba-arrow,
  .ba-home > [aria-hidden="true"] {
    top: 50% !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
  }
  .ba-home {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
}
.ba-card {
  display: grid;
  grid-template-columns: 1fr 0.5px 1fr;
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.ba-card .ba-divider { background: var(--line); }
.ba-side { padding: 28px; }
.ba-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.ba-label .pin {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.ba-label.before .pin { background: var(--signal); }
.ba-label.after .pin { background: var(--success); }
.ba-frame {
  border: 0.5px solid var(--line);
  border-radius: 6px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-muted);
  position: relative;
}
.ba-frame.before { filter: grayscale(1); }
.ba-points { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.ba-points .pt {
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.6;
}
.ba-points .pt .dot {
  flex-shrink: 0;
  width: 6px; height: 6px; border-radius: 50%;
  margin-top: 8px;
}
.ba-points.before .pt .dot { background: var(--signal); }
.ba-points.after .pt .dot { background: var(--success); }

@media (max-width: 767px) {
  .ba-card { grid-template-columns: 1fr; }
  .ba-card .ba-divider { width: 100%; height: 0.5px; }
}

/* Form */
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.form-field label {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  font-family: var(--font-mono);
  text-transform: uppercase;
}
.form-field label .req { color: var(--accent); margin-left: 4px; }
.form-field input,
.form-field textarea,
.form-field select {
  font-family: inherit;
  font-size: 15px;
  background: var(--surface);
  border: 0.5px solid var(--line-strong);
  border-radius: 6px;
  padding: 14px 16px;
  color: var(--ink);
  outline: none;
  transition: border-color 120ms;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--accent);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.checkbox-row { display: flex; flex-direction: column; gap: 10px; }
.checkbox-row label {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-en), var(--font-jp);
  text-transform: none;
  letter-spacing: 0;
  font-size: 14.5px;
  color: var(--ink);
  cursor: pointer;
}
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.turnstile-wrap {
  margin: 8px 0 20px;
}
.form-error {
  margin: 16px 0 0;
  color: #A33A2A;
  font-size: 13.5px;
  line-height: 1.7;
}

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Accordion */
.accordion-item {
  border-bottom: 0.5px solid var(--line);
}
.accordion-item:first-child { border-top: 0.5px solid var(--line); }
.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 24px 0;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.accordion-trigger .ico {
  width: 16px; height: 16px;
  position: relative;
  flex-shrink: 0;
  transition: transform 200ms ease-out;
}
.accordion-trigger .ico::before, .accordion-trigger .ico::after {
  content: "";
  position: absolute;
  background: var(--ink);
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}
.accordion-trigger .ico::before { width: 12px; height: 1px; }
.accordion-trigger .ico::after { width: 1px; height: 12px; transition: transform 200ms; }
.accordion-item.open .ico::after { transform: translate(-50%, -50%) scaleY(0); }
.accordion-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 240ms ease-out;
}
.accordion-content .inner { padding: 0 0 24px; color: var(--ink-2); font-size: 14.5px; line-height: 1.8; }

/* Trust bar */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 0;
  border-top: 0.5px solid var(--line);
  border-bottom: 0.5px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.trust-bar .label { color: var(--ink-2); font-weight: 600; }
.trust-bar .sep { width: 4px; height: 4px; background: var(--ink-3); border-radius: 50%; opacity: 0.4; }
.trust-bar .items { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

/* Quote */
.quote {
  background: var(--accent-soft);
  border-left: 0.5px solid var(--accent);
  padding: 28px 32px;
  border-radius: 0 6px 6px 0;
}
.quote p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 16px;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.quote .attribution {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

/* Marginalia */
.with-margin {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 48px;
}
.marginalia {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  border-left: 0.5px solid var(--line);
  padding-left: 16px;
}
@media (max-width: 1023px) {
  .with-margin { grid-template-columns: 1fr; }
}

/* Page transitions */
.page {
  animation: pageIn 320ms ease-out;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .page { animation: none; }
}

/* Mock report (Hero visual) */
.mock-report {
  position: relative;
  aspect-ratio: 1 / 1.05;
  width: 100%;
  max-width: 520px;
  margin-left: auto;
}
.mock-report::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(14,14,16,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14,14,16,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.mock-paper {
  position: absolute;
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 24px 60px -30px rgba(14, 14, 16, 0.18);
  overflow: hidden;
  aspect-ratio: 1 / 1.414;
}
.mock-paper.back {
  width: 60%;
  top: 0;
  right: 0;
  transform: rotate(4deg);
  transform-origin: top right;
  opacity: 0.85;
}
.mock-paper.front {
  width: 65%;
  bottom: 0;
  left: 4%;
  transform: rotate(-3deg);
  transform-origin: bottom left;
}
.mock-cover {
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  font-size: 11px;
}
.mock-cover .top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--ink-3);
  font-size: 9px;
  border-bottom: 0.5px solid var(--line);
  padding-bottom: 12px;
  text-transform: uppercase;
}
.mock-cover .title { margin-top: auto; }
.mock-cover .title .target { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.mock-cover .title .sub { font-size: 11px; color: var(--ink-2); margin-top: 4px; }
.mock-cover .ba-mini {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border-top: 0.5px solid var(--line);
  padding-top: 12px;
}
.mock-cover .ba-mini .frame {
  aspect-ratio: 4/3;
  background: var(--surface-muted);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.mock-cover .ba-mini .frame.before {
  background:
    linear-gradient(transparent, rgba(0,0,0,0.05)),
    repeating-linear-gradient(45deg, var(--surface-muted), var(--surface-muted) 4px, rgba(14,14,16,0.04) 4px, rgba(14,14,16,0.04) 8px);
}
.mock-cover .ba-mini .frame.after {
  background:
    linear-gradient(135deg, rgba(75,92,195,0.18), rgba(75,92,195,0.04)),
    var(--surface-muted);
}
.mock-cover .ba-mini .frame .lbl {
  position: absolute; top: 4px; left: 4px;
  font-family: var(--font-mono); font-size: 7px; letter-spacing: 0.1em;
  background: rgba(255,255,255,0.85); padding: 1px 4px; border-radius: 2px;
  color: var(--ink-2);
}
.mock-cover .scores {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
}
.mock-cover .scores .score {
  border: 0.5px solid var(--line);
  padding: 6px 4px;
  border-radius: 2px;
  text-align: center;
}
.mock-cover .scores .score .v { font-size: 14px; font-weight: 600; color: var(--ink); display: block; }
.mock-cover .scores .score .l { color: var(--ink-3); letter-spacing: 0.08em; }

/* Mock browser frames for Before/After */
.mock-browser {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.mock-browser .bar {
  height: 22px;
  background: var(--surface);
  border-bottom: 0.5px solid var(--line);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  flex-shrink: 0;
}
.mock-browser .bar .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.mock-browser .body { flex: 1; padding: 12px; overflow: hidden; position: relative; }

/* Pricing card */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1023px) and (min-width: 768px) {
  .pricing { grid-template-columns: 1fr; gap: 20px; }
}
.plan {
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  display: flex;
  flex-direction: column;
}
.plan.featured {
  border-color: var(--accent);
  position: relative;
}
.plan.featured::before {
  content: "推奨 — Recommended";
  position: absolute;
  top: -10px; left: 24px;
  background: var(--accent);
  color: white;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}
.plan h3 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.plan .plan-en { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; }
.plan .price { margin: 24px 0; padding: 16px 0; border-top: 0.5px solid var(--line); border-bottom: 0.5px solid var(--line); display: flex; align-items: baseline; gap: 6px; }
.plan .price .v { font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
.plan .price .u { font-size: 12px; color: var(--ink-2); font-family: var(--font-mono); letter-spacing: 0.08em; }
.plan ul.features { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 10px; }
.plan ul.features li { font-size: 13.5px; color: var(--ink-2); display: flex; gap: 10px; align-items: flex-start; line-height: 1.6; }
.plan ul.features li::before {
  content: "";
  flex-shrink: 0;
  width: 12px; height: 12px;
  margin-top: 4px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%234B5CC3' stroke-width='1.5'><path d='M2 6.5L4.5 9L10 3'/></svg>");
  background-repeat: no-repeat;
}
.plan .btn { margin-top: auto; justify-content: center; }
@media (max-width: 1023px) {
  .pricing { grid-template-columns: 1fr; }
}

/* Sitemap visual */
.sitemap-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 767px) { .sitemap-cards { grid-template-columns: 1fr; } }

/* Misc helpers */
.kv-table {
  border-top: 0.5px solid var(--line);
}
.kv-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 0.5px solid var(--line);
}
.kv-row .k {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 2px;
}
.kv-row .v { font-size: 14.5px; color: var(--ink); line-height: 1.7; }
@media (max-width: 767px) {
  .kv-row { grid-template-columns: 1fr; gap: 4px; }
}

/* Selection */
::selection { background: var(--accent); color: white; }

/* Mobile layout helpers */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 1023px) {
  .cols-2 { grid-template-columns: 1fr; gap: 40px; }
  .cols-3 { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .cols-4 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 767px) {
  .cols-3 { grid-template-columns: 1fr; gap: 28px; }
  .cols-4 { grid-template-columns: 1fr; gap: 20px; }
}

.spacer-32 { height: 32px; }
.spacer-48 { height: 48px; }
.spacer-64 { height: 64px; }
.spacer-96 { height: 96px; }

/* Inline link with arrow */
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500; color: var(--accent);
  border-bottom: 0.5px solid currentColor;
  padding-bottom: 1px;
  transition: gap 160ms ease-out, color 120ms;
}
.link-arrow:hover { gap: 10px; color: var(--accent-deep); }

/* Five-column horizontal grids — collapse responsively */
.five-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.five-grid > * { border-right: 0.5px solid var(--line); }
.five-grid > *:last-child { border-right: none !important; }

@media (max-width: 1023px) {
  .five-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .five-grid > * { border-right: 0.5px solid var(--line) !important; border-bottom: 0.5px solid var(--line); }
  .five-grid > *:nth-child(3n) { border-right: none !important; }
  .five-grid > *:nth-last-child(-n+2) { border-bottom: none; }
}
@media (max-width: 599px) {
  .five-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .five-grid > * { border-right: 0.5px solid var(--line) !important; border-bottom: 0.5px solid var(--line); min-height: 130px !important; padding: 22px 16px !important; }
  .five-grid > *:nth-child(2n) { border-right: none !important; }
  .five-grid > *:nth-child(2n + 1):not(:last-child) { border-right: 0.5px solid var(--line) !important; }
  .five-grid > *:last-child { border-right: none !important; }
  .five-grid:not(.service-flow-grid) > *:last-child { border-bottom: none !important; }
}
@media (max-width: 767px) {
  .service-flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .service-flow-grid > * {
    border-right: 0.5px solid var(--line) !important;
    border-bottom: 0.5px solid var(--line) !important;
  }
  .service-flow-grid > *:nth-child(2n) {
    border-right: none !important;
  }
  .service-flow-grid > *:nth-child(2n + 1):not(:last-child) {
    border-right: 0.5px solid var(--line) !important;
  }
  .service-flow-grid > *:last-child {
    border-right: none !important;
    border-bottom: none !important;
  }
}

/* News rows responsive */
@media (max-width: 767px) {
  .news-row { grid-template-columns: 1fr !important; gap: 8px !important; }
  .news-row > span:last-child { display: none; }
}

/* Mock report — center on narrow */
@media (max-width: 1023px) {
  .mock-report { margin: 0 auto; }
}

/* Header tablet polish */
@media (max-width: 1023px) and (min-width: 768px) {
  .nav.nav-links a.nav-link { padding: 4px 0; }
}

/* Pricing recommended ribbon — keep readable on narrow */
@media (max-width: 599px) {
  .plan.featured::before { font-size: 9px; padding: 2px 8px; left: 16px; }
}

/* Stats block — three+ break to 2 cols on tablet, 1 on mobile already handled */
@media (max-width: 1023px) and (min-width: 768px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid .stat:nth-child(odd) { border-right: 0.5px solid var(--line); }
  .stat-grid .stat:nth-child(even) { border-right: none; }
  .stat-grid .stat:nth-child(-n+2) { border-bottom: 0.5px solid var(--line); }
}

/* Process showcase tab buttons stay legible */
@media (max-width: 599px) {
  .audit-tag { font-size: 10.5px; padding: 3px 8px; }
}

/* Section headers — wrap balance */
.section { overflow-x: clip; }

/* Display headings — leave room on narrow viewports */
@media (max-width: 767px) {
  .display { hyphens: auto; }
}

/* Hero stack on tablet — keep mock-report from going huge */
@media (max-width: 1023px) {
  .mock-report { max-width: 420px; }
}

/* Before/After horizontal frames — collapse to vertical on narrow screens, rotate the arrow */
@media (max-width: 767px) {
  .ba-arrow, .ba-home > [aria-hidden="true"] {
    transform: translate(-50%, -50%) rotate(90deg) !important;
  }
}
@media (max-width: 599px) {
  .works-grid .ba-arrow {
    transform: translate(-50%, -50%) rotate(90deg) !important;
    width: 32px !important; height: 32px !important; font-size: 13px !important;
  }
}
