/* AIコーディング実務キット（仮称）の販売サイト。外部のフォント・スクリプトは使わない（CSP: style-src 'self'）。 */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-accent: #eef4fb;
  --surface: #ffffff;
  --text: #1f2328;
  --text-muted: #59636e;
  --border: #dfe3e8;
  --accent: #0b5cad;
  --accent-strong: #084a8c;
  --accent-text: #ffffff;
  --danger: #b42318;
  --ok: #1a7f37;
  --note-bg: #fff8e6;
  --note-border: #e9c46a;
  --code-bg: #0f1720;
  --code-text: #e6edf3;
  --code-muted: #8b98a5;
  --code-key: #79c0ff;
  --radius: 10px;
  --wrap: 1080px;
  --font: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Noto Sans Mono", "Noto Sans JP", monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-soft: #131a22;
    --bg-accent: #11213a;
    --surface: #161b22;
    --text: #e6edf3;
    --text-muted: #9aa5b1;
    --border: #2d3640;
    --accent: #58a6ff;
    --accent-strong: #79b8ff;
    --accent-text: #0d1117;
    --danger: #ff7b72;
    --ok: #3fb950;
    --note-bg: #2a2410;
    --note-border: #7d6522;
    --code-bg: #0a0e13;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-strong);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

code,
pre {
  font-family: var(--mono);
  font-size: 0.92em;
}

code {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.05em 0.35em;
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3 {
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 6px;
}

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

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand__mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.brand__mark rect {
  fill: var(--accent);
}

.brand__mark .brand__glyph {
  fill: none;
  stroke: var(--accent-text);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand__name {
  font-size: 15px;
}

.site-nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

.site-nav .site-nav__cta {
  color: var(--accent);
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 28px 0 36px;
  font-size: 13px;
  color: var(--text-muted);
}

.site-footer__links {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.site-footer__links a {
  color: var(--text-muted);
}

.site-footer__notice {
  margin: 0;
  max-width: 760px;
  line-height: 1.7;
}

.preview-banner {
  background: var(--note-bg);
  border-bottom: 1px solid var(--note-border);
  font-size: 13px;
  padding: 8px 0;
}

.preview-banner p {
  margin: 0;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 22px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}

.button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--accent-text);
}

.button--secondary {
  background: transparent;
  color: var(--accent);
}

.button--secondary:hover {
  background: var(--bg-accent);
  color: var(--accent-strong);
}

.button--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.button--danger:hover {
  background: var(--danger);
  filter: brightness(0.92);
  color: #ffffff;
}

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

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

.form label {
  font-weight: 600;
}

.form input[type="email"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.form input[type="email"]:focus {
  border-color: var(--accent);
}

.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  font-weight: 400 !important;
  font-size: 14px;
  line-height: 1.7;
}

.check input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.fine {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

.callout {
  border: 1px solid var(--note-border);
  background: var(--note-bg);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 6px;
}

/* ------------------------------------------------------------------ landing page */

.hero {
  padding: 56px 0 48px;
  background: linear-gradient(180deg, var(--bg-accent), var(--bg) 85%);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: center;
}

.hero__eyebrow {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.hero__title {
  margin: 0 0 16px;
  font-size: clamp(28px, 4.2vw, 42px);
  line-height: 1.35;
  word-break: auto-phrase;
}

.hero__lead {
  margin: 0 0 22px;
  font-size: 17px;
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.hero__note {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.tree {
  margin: 0;
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 12px;
  padding: 18px 20px;
  font-size: 13px;
  line-height: 1.75;
  overflow-x: auto;
  box-shadow: 0 10px 30px rgba(15, 23, 32, 0.18);
}

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

.tree__dir {
  color: var(--code-key);
}

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

.section {
  padding: 56px 0;
}

.section--soft {
  background: var(--bg-soft);
}

.section__title {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 28px);
}

.section__lead {
  margin: 0 0 28px;
  color: var(--text-muted);
  max-width: 760px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.checklist li {
  position: relative;
  padding-left: 30px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 12px;
  height: 7px;
  border-left: 2.5px solid var(--ok);
  border-bottom: 2.5px solid var(--ok);
  transform: rotate(-45deg);
}

.contents {
  display: grid;
  gap: 18px;
}

.contents details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 18px;
}

.contents summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 700;
  list-style-position: outside;
}

.contents summary span {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 14px;
  margin-left: 6px;
}

.items {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.items li {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.items strong {
  display: block;
  font-size: 15px;
}

.items code {
  font-size: 12px;
}

.items p {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.excerpt {
  margin: 0;
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 12px;
  padding: 18px 20px;
  font-size: 13px;
  line-height: 1.7;
  max-height: 560px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.excerpt__caption {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.steps-flow {
  counter-reset: flow;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.steps-flow li {
  counter-increment: flow;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 14px;
}

.steps-flow li::before {
  content: counter(flow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 13px;
}

.steps-flow strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.pricing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.price-card,
.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.order-card {
  border: 2px solid var(--accent);
}

.price {
  margin: 0;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.price small {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 6px;
}

.terms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 16px;
}

.terms-table th,
.terms-table td {
  text-align: left;
  vertical-align: top;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.terms-table th {
  width: 7.5em;
  color: var(--text-muted);
  font-weight: 600;
  padding-right: 12px;
}

.returns {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  font-size: 14px;
  line-height: 1.7;
}

.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2px 18px;
}

.faq summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 700;
}

.faq details p {
  margin: 0 0 14px;
  font-size: 15px;
}

.lite-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.lite-band h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.lite-band p {
  margin: 0;
  color: var(--text-muted);
}

.cards--spaced {
  margin-top: 24px;
}

.checklist--spaced {
  margin-top: 14px;
}

.fine--spaced {
  margin-top: 18px;
}

.order-card__title {
  margin: 0 0 14px;
  font-size: 18px;
}

/* ------------------------------------------------------------------ documents (legal, changelog) */

.doc {
  padding: 40px 0 64px;
}

.doc .wrap {
  max-width: 820px;
}

.doc h1 {
  font-size: clamp(24px, 3.4vw, 30px);
  margin: 0 0 8px;
}

.doc h2 {
  font-size: 20px;
  margin: 36px 0 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.doc h3 {
  font-size: 17px;
  margin: 24px 0 8px;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--border);
  padding: 10px 12px 10px 0;
}

.doc th {
  width: 11em;
  color: var(--text-muted);
  font-weight: 600;
}

.doc__meta {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 24px;
}

/* ------------------------------------------------------------------ message pages (Functions) */

.notice {
  padding: 48px 20px 72px;
}

.notice__panel {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
}

.notice--wide .notice__panel {
  max-width: 760px;
}

.notice__title {
  margin: 0 0 12px;
  font-size: 24px;
}

.notice__subtitle {
  margin: 24px 0 8px;
  font-size: 18px;
}

.notice__lead {
  margin: 0 0 18px;
}

.notice__actions {
  margin: 20px 0;
}

.notice__form {
  margin: 20px 0;
}

.notice__small {
  font-size: 14px;
  color: var(--text-muted);
  margin: 12px 0 0;
}

.facts {
  margin: 18px 0;
  display: grid;
  gap: 8px;
  font-size: 15px;
}

.facts div {
  display: grid;
  grid-template-columns: 8em 1fr;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.facts dt {
  color: var(--text-muted);
}

.facts dd {
  margin: 0;
}

.steps {
  margin: 0;
  padding-left: 1.4em;
}

@media (min-width: 861px) {
  .items--two {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 28px;
  }
}

/* ------------------------------------------------------------------ small screens */

@media (max-width: 860px) {
  .hero {
    padding: 36px 0 32px;
  }

  .hero__grid,
  .pricing {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .site-nav {
    display: none;
  }

  .lite-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .section {
    padding: 44px 0;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .wrap {
    padding: 0 16px;
  }

  .hero__actions .button {
    width: 100%;
  }

  .tree {
    font-size: 12px;
    padding: 14px 16px;
  }

  .tree__note {
    display: none;
  }

  .notice {
    padding: 28px 12px 56px;
  }

  .notice__panel,
  .price-card,
  .order-card {
    padding: 20px;
  }

  .facts div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .doc th,
  .doc td {
    display: block;
    width: auto;
    padding: 6px 0;
  }

  .doc th {
    border-top: 1px solid var(--border);
    padding-top: 10px;
  }

  .doc td {
    border-top: none;
  }
}
