/* ── CRISIS Developers Portal ── */

:root {
  --bg: #f7fafc;
  --surface: #fff;
  --surface-soft: #f8fbff;
  --surface-accent: #eef7ff;
  --border: #d9e6f2;
  --border-strong: #bfd4e6;
  --text: #16324f;
  --text-soft: #49627d;
  --text-faint: #6f859d;
  --primary: #1373d1;
  --primary-soft: #e7f2ff;
  --primary-hover: #0f67bc;
  --success: #0f9f6e;
  --success-soft: #e8faf3;
  --shadow: 0 20px 50px rgb(28 72 116 / 0.08);
  --shadow-sm: 0 4px 12px rgb(28 72 116 / 0.06);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --max-width: 1200px;
  --guide-width: 820px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    "Inter", "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: linear-gradient(180deg, #f9fcff 0%, #f4f8fc 100%);
}

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

a.link {
  font-weight: 600;
  color: var(--primary);
}

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

img {
  max-width: 100%;
}

/* ── Layout ── */

.container {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
}

/* ── Header ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(247 250 252 / 0.84);
  border-bottom: 1px solid rgb(191 212 230 / 0.8);
  backdrop-filter: blur(14px);
}

body.reference-page .site-header {
  position: relative;
}

.site-header-inner {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand-kicker {
  display: inline;
  margin-right: 2px;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.brand-title {
  display: inline;
  font-size: 22px;
  font-weight: 700;
}

.brand-title a {
  color: inherit;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
  color: var(--text-soft);
}

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

.nav a.active {
  font-weight: 600;
  color: var(--primary);
}

/* ── Footer ── */

.footer {
  padding: 24px 0 48px;
  font-size: 14px;
  color: var(--text-faint);
}

/* ── Responsive ── */

@media (max-width: 720px) {
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    gap: 12px;
  }
}

/* ── Typography ── */

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin: 18px 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.2;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.3;
}

h4 {
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.4;
}

.section-kicker {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.lead,
.muted {
  color: var(--text-soft);
}

.hero-subtitle {
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.small {
  font-size: 14px;
  color: var(--text-faint);
}

/* ── Buttons ── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 18px;
  transition: 0.2s ease;
}

.button-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 28px rgb(19 115 209 / 0.22);
}

.button-primary:hover {
  background: var(--primary-hover);
}

.button-secondary {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
}

.button-secondary:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ── Badges & Pills ── */

.badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid #cde2fb;
  border-radius: 999px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
  background: var(--success-soft);
  border: 1px solid #bee8d7;
  border-radius: 999px;
}

.chip {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid #cee2fb;
  border-radius: 999px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  margin-bottom: 8px;
}

/* ── Panels & Cards ── */

.panel,
.card,
.step,
.check-item,
.support-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.panel {
  min-width: 0;
  padding: 28px;
}

.card,
.step,
.check-item,
.support-item {
  min-width: 0;
  padding: 22px;
}

.panel-soft,
.card-soft {
  background: var(--surface-soft);
}

.surface-accent {
  background: linear-gradient(180deg, #fafdff 0%, #eef7ff 100%);
}

/* ── Grids ── */

.hero-grid,
.split-grid,
.two-col,
.support-grid {
  display: grid;
  gap: 24px;
  align-items: start;
}

.hero-grid {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
}

.split-grid,
.support-grid {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.map-grid .panel {
  padding: 22px;
}

.map-grid .section-kicker {
  margin-bottom: 8px;
}

.map-grid h3 {
  margin-bottom: 8px;
}

.map-grid .muted {
  margin: 0;
}

.check-grid {
  display: grid;
  gap: 12px;
}

.support-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* ── Hero ── */

main section {
  padding: 32px 0;
}

.hero {
  display: flex;
  align-items: center;
  min-height: 95vh;
  padding: 56px 0 80px;
  margin-bottom: 40px;
  color: #fff;
  background:
    linear-gradient(
      170deg,
      rgb(10 15 30 / 0.92) 0%,
      rgb(10 15 30 / 0.87) 50%,
      rgb(10 15 30 / 0.93) 100%
    ),
    url("../images/hero-bg.jpg") center / cover no-repeat;
}

.hero h1 {
  font-feature-settings: "palt";
  line-height: 1.2;
  color: #fff;
  letter-spacing: 0.01em;
}

.hero h1 span {
  color: #6db3f8;
}

.hero h1 .accent {
  color: #6db3f8;
}

.hero p {
  color: rgb(255 255 255 / 0.75);
}

.hero .hero-subtitle {
  color: rgb(255 255 255 / 0.9);
}

.hero .badge {
  color: #fff;
  background: rgb(255 255 255 / 0.12);
  border-color: rgb(255 255 255 / 0.15);
}

.hero .button-primary {
  color: #fff;
  background: var(--primary);
}

.hero .button-secondary {
  color: #fff;
  background: rgb(255 255 255 / 0.1);
  border-color: rgb(255 255 255 / 0.25);
}

.hero .button-secondary:hover {
  background: rgb(255 255 255 / 0.18);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 24px;
}

.hero-service-link {
  font-size: 14px;
  color: rgb(255 255 255 / 0.55);
}

.hero-service-link a {
  color: rgb(255 255 255 / 0.8);
  text-decoration: underline;
}

.hero-service-link a:hover {
  color: #fff;
  text-decoration: underline;
}

.hero-highlight {
  display: grid;
  gap: 16px;
}

.hero-feature {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  background: rgb(255 255 255 / 0.88);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.hero-feature-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.hero-feature-text {
  margin: 0;
  font-size: 14px;
  color: var(--text-soft);
}

.quickstart-shell {
  background: linear-gradient(180deg, #fff 0%, #f7fbff 100%);
}

/* ── Endpoints ── */

.endpoint-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.endpoint {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-width: 0;
  padding: 16px;
  background: #fcfeff;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid #cfe3fb;
  border-radius: 12px;
}

.path {
  font-family: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 14px;
  word-break: break-word;
}

/* ── Code ── */

.code-block {
  max-width: 100%;
  padding: 16px;
  margin: 18px 0 0;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.65;
  color: #1a4268;
  background: #f4f9ff;
  border: 1px solid #d5e6f6;
  border-radius: 18px;
}

code {
  font-family: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
}

p code,
li code {
  padding: 2px 7px;
  color: #0e5faa;
  overflow-wrap: break-word;
  background: var(--primary-soft);
  border-radius: 6px;
}

/* ── Lists ── */

ul.clean {
  padding: 0;
  margin: 0;
  list-style: none;
}

ul.clean li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  font-size: 15px;
  color: var(--text-soft);
}

ul.clean li::before {
  position: absolute;
  top: 9px;
  left: 0;
  width: 8px;
  height: 8px;
  content: "";
  background: var(--primary);
  border-radius: 50%;
}

/* ── Section head ── */

.section-head {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
}

/* ── Support ── */

.support-wrap {
  padding: 32px;
  background: linear-gradient(135deg, #edf6ff 0%, #f7fbff 100%);
  border: 1px solid var(--border-strong);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.check-grid {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.check-item {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  background: var(--surface);
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

.check-item:last-child {
  border-bottom: none;
}

/* ── Guide pages ── */

body.guide-page {
  background: #fff;
}

.guide-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  max-width: calc(var(--guide-width) + 220px + 48px);
  padding: 48px 16px 80px;
  margin: 0 auto;
}

.guide-sidebar {
  position: sticky;
  top: 80px;
}

.guide-toc {
  padding: 0;
  margin: 0;
  list-style: none;
}

.guide-toc li {
  margin-bottom: 6px;
}

.guide-toc a {
  display: block;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-faint);
  border-left: 2px solid transparent;
  border-radius: 8px;
  transition: 0.15s;
}

.guide-toc a:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.guide-toc a.active {
  font-weight: 600;
  color: var(--primary);
  border-left-color: var(--primary);
}

.guide-content {
  min-width: 0;
  max-width: var(--guide-width);
}

.guide-content h1 {
  margin: 0 0 12px;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.guide-content h2 {
  padding-top: 24px;
  margin: 48px 0 16px;
  font-size: 26px;
  scroll-margin-top: 80px;
  border-top: 1px solid var(--border);
}

.guide-content h2:first-of-type {
  padding-top: 0;
  margin-top: 32px;
  border-top: none;
}

.guide-content h3 {
  margin: 32px 0 12px;
  font-size: 20px;
  scroll-margin-top: 80px;
}

.guide-content p {
  margin-bottom: 16px;
}

.guide-content .code-block {
  margin: 16px 0 24px;
  border-radius: 14px;
}

.guide-content > .panel {
  margin: 24px 0;
}

.guide-content > .two-col {
  margin: 24px 0;
}

.guide-content > .check-grid {
  margin: 16px 0 24px;
}

/* ── Tables ── */

.guide-content .table-wrap {
  margin: 16px 0 24px;
  overflow-x: auto;
}

.guide-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.6;
}

.guide-content thead th {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  text-align: left;
  white-space: nowrap;
  background: var(--surface-soft);
  border-bottom: 2px solid var(--border-strong);
}

.guide-content tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.guide-content tbody tr:last-child td {
  border-bottom: none;
}

.guide-content tbody tr:hover {
  background: var(--surface-accent);
}

.guide-hero-kicker {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.guide-hero-desc {
  margin-bottom: 32px;
  font-size: 17px;
  color: var(--text-soft);
}

/* ── Guide nav cards ── */

.guide-card {
  display: block;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: 0.2s ease;
}

.guide-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

a.guide-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

div.guide-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  transform: none;
}

.guide-card h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

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

.guide-card .section-kicker {
  margin-bottom: 10px;
}

/* Steps (numbered) */

.numbered-steps {
  counter-reset: step;
}

.numbered-step {
  position: relative;
  padding-left: 48px;
  margin-bottom: 32px;
  counter-increment: step;
}

.numbered-step::before {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  content: counter(step);
  background: var(--primary);
  border-radius: 50%;
}

.numbered-step h3 {
  margin-top: 4px;
}

/* ── Responsive ── */

@media (max-width: 980px) {
  .hero-grid,
  .support-grid,
  .two-col,
  .card-grid,
  .step-grid,
  .map-grid,
  .support-list {
    grid-template-columns: 1fr 1fr;
  }

  .split-grid,
  .check-grid {
    grid-template-columns: 1fr;
  }

  .guide-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .guide-sidebar {
    display: none;
  }
}

@media (max-width: 720px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-grid,
  .split-grid,
  .support-grid,
  .two-col,
  .card-grid,
  .step-grid,
  .map-grid,
  .check-grid,
  .support-list {
    grid-template-columns: 1fr;
  }

  .support-wrap,
  .panel {
    padding: 22px;
  }
}
