:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #5f6b7e;
  --line: #dbe2ee;
  --paper: #ffffff;
  --wash: #f3f6fb;
  --blue: #315fc4;
  --blue-dark: #23499d;
  --orange: #df6a43;
  --green: #237a63;
  --shadow: 0 14px 40px rgba(35, 55, 92, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.75;
}
a { color: var(--blue-dark); text-underline-offset: 3px; }
a:hover { color: var(--blue); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  color: #fff;
  background: rgba(25, 43, 79, .96);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 12px rgba(10, 25, 53, .18);
}
.header-inner {
  width: min(1100px, calc(100% - 32px));
  min-height: 64px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { color: #fff; font-weight: 800; text-decoration: none; letter-spacing: .02em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.site-nav a {
  color: #dbe7ff;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: .9rem;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.15); }

main { width: min(1100px, calc(100% - 32px)); margin: 36px auto 72px; }
.hero {
  padding: clamp(28px, 6vw, 64px);
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #1d3566, #315fc4 62%, #477bdc);
  box-shadow: var(--shadow);
}
.eyebrow { margin: 0 0 8px; color: #d6e3ff; font-size: .82rem; font-weight: 800; letter-spacing: .13em; }
h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.55rem); line-height: 1.18; }
.hero p { max-width: 720px; margin: 18px 0 0; color: #eef4ff; font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 10px;
  color: #fff;
  background: rgba(255,255,255,.12);
  font-weight: 700;
  text-decoration: none;
}
.button.primary { color: var(--blue-dark); background: #fff; }

.section { margin-top: 42px; }
.section > h2 { margin: 0 0 16px; font-size: clamp(1.4rem, 4vw, 2rem); line-height: 1.3; }
.section-intro { margin-top: -8px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 5px 20px rgba(35,55,92,.05);
}
.card h2, .card h3 { margin: 0 0 8px; line-height: 1.35; }
.card p:last-child, .card ul:last-child, .card ol:last-child { margin-bottom: 0; }
.card-link { color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.card-link:hover { color: inherit; transform: translateY(-2px); box-shadow: var(--shadow); }

.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tool-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.tool-card h3 { margin: 0 0 4px; }
.tool-card p { margin: 0; color: var(--muted); }
.tool-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--blue);
  background: #edf3ff;
}
.tool-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; min-height: 44px; padding: 4px 0 18px 50px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 35px; bottom: 1px; border-left: 2px solid #ccd8ef; }

.note, .tip, .warning { margin: 18px 0; padding: 14px 16px; border-left: 4px solid var(--blue); border-radius: 8px; background: #edf3ff; }
.tip { border-color: var(--green); background: #edf8f4; }
.warning { border-color: var(--orange); background: #fff2ed; }
.note strong, .tip strong, .warning strong { display: block; margin-bottom: 2px; }

.mode-demo { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 20px 0; }
.mode {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.mode strong { color: var(--blue-dark); }
.mode-arrow { color: var(--muted); font-size: 1.5rem; }
.curve-demo { width: 100%; height: 110px; margin-top: 10px; }
.curve-demo .curve { fill: none; stroke: var(--blue); stroke-width: 4; stroke-linecap: round; }
.curve-demo .guide { fill: none; stroke: #8a98b7; stroke-width: 1.5; stroke-dasharray: 5 4; }
.curve-demo .anchor { fill: #fff; stroke: var(--blue); stroke-width: 2; }
.curve-demo .handle { fill: #fff; stroke: var(--orange); stroke-width: 2; }

table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 12px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #edf3ff; }
.table-wrap { overflow-x: auto; border-radius: 12px; }
kbd { padding: 2px 7px; border: 1px solid #b9c3d5; border-bottom-width: 2px; border-radius: 5px; background: #fff; font: inherit; font-size: .85em; }

.page-footer { margin-top: 54px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.mini-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; }
.mini-nav a { display: block; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-decoration: none; }

@media (max-width: 760px) {
  .header-inner { align-items: flex-start; flex-direction: column; gap: 5px; padding: 12px 0; }
  .site-nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .site-nav a { white-space: nowrap; }
  main { width: min(100% - 22px, 1100px); margin-top: 20px; }
  .hero { border-radius: 18px; }
  .grid, .grid.two, .tool-grid { grid-template-columns: 1fr; }
  .mode-demo { grid-template-columns: 1fr; }
  .mode-arrow { transform: rotate(90deg); text-align: center; }
  .mini-nav { flex-direction: column; }
}

@media print {
  body { background: #fff; font-size: 10.5pt; }
  .site-header, .hero-actions, .mini-nav { display: none; }
  main { width: 100%; margin: 0; }
  .hero { padding: 20px 0; color: #000; background: none; box-shadow: none; }
  .hero p, .eyebrow { color: #333; }
  .card, .tool-card { break-inside: avoid; box-shadow: none; }
}

.tool-icon svg .icon-solid { fill: currentColor; stroke: none; }
.tool-icon svg .icon-text { fill: currentColor; stroke: none; font: 700 17px sans-serif; }
.return-bar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 16px; background: #eef6ff; border-bottom: 1px solid #cfe2f6; }
.return-button { appearance: none; border: 1px solid #2774b8; border-radius: 999px; padding: 8px 16px; background: #fff; color: #185d98; font: inherit; font-weight: 700; cursor: pointer; }
.return-button:hover { background: #dfefff; }
.return-button:focus-visible { outline: 3px solid rgba(39, 116, 184, .3); outline-offset: 2px; }
.return-message { color: #475569; font-size: .9rem; }
@media (max-width: 640px) { .return-bar { align-items: stretch; flex-direction: column; text-align: center; } .return-button { width: 100%; } }
