/* =========================
   Root / Base (Docker Steel)
========================= */
:root{
  --bg: #f4f7fb;
  --card: #ffffff;

  /* Steel / Navy */
  --primary: #1f3a8a;
  --primary-dark: #172554;
  --primary-soft: #e0e7ff;

  --accent: #22d3ee;        /* cyan */
  --success: #16a34a;
  --danger: #dc2626;

  --text: #0f172a;
  --muted: #64748b;
  --border: #e5e7eb;

  --radius: 16px;
  --shadow: 0 18px 40px rgba(15,23,42,.10);
  --shadow2: 0 10px 24px rgba(15,23,42,.08);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Dark mode (JSでdata-theme="dark") */
html[data-theme="dark"]{
  --bg: #0b1220;
  --card: rgba(255,255,255,.06);
  --text: #e5e7eb;
  --muted: #a3adc2;
  --border: rgba(148,163,184,.22);

  --primary: #7aa2ff;
  --primary-dark: #b9ccff;
  --primary-soft: rgba(122,162,255,.16);

  --accent: #67e8f9;

  --shadow: 0 18px 40px rgba(0,0,0,.45);
  --shadow2: 0 10px 24px rgba(0,0,0,.35);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:"Noto Sans JP", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 800px at 10% 0%, rgba(34,211,238,.18), transparent 50%),
              radial-gradient(1000px 700px at 80% 20%, rgba(31,58,138,.18), transparent 55%),
              var(--bg);
  color:var(--text);
  line-height:1.75;
}

a{ color:inherit; }
code{ font-family: var(--mono); }

.skip-link{
  position:absolute;
  top:-40px; left:12px;
  background: var(--primary);
  color:#fff;
  padding:8px 12px;
  border-radius: 10px;
  z-index: 9999;
  transition: .2s;
}
.skip-link:focus{ top:10px; }

/* =========================
   Topbar / Breadcrumb
========================= */
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.65);
  border-bottom: 1px solid rgba(148,163,184,.22);
}
html[data-theme="dark"] .topbar{
  background: rgba(11,18,32,.65);
}

.topbar__inner{
  max-width: 1200px;
  margin:0 auto;
  padding: 12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.brand{
  display:flex;
  align-items:baseline;
  gap:10px;
  font-weight:700;
}
.brand__home{
  text-decoration:none;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}
html[data-theme="dark"] .brand__home{
  color: var(--text);
}
.brand__sep{ opacity:.55; font-weight:600; }
.brand__here{ font-weight:700; }

.topbar__actions{ display:flex; gap:10px; }

/* Buttons */
.btn{
  border: 1px solid rgba(148,163,184,.28);
  background: rgba(255,255,255,.75);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 12px;
  cursor:pointer;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
  transition: .15s transform, .15s background, .15s border;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:600;
}
html[data-theme="dark"] .btn{
  background: rgba(255,255,255,.06);
  box-shadow: 0 10px 22px rgba(0,0,0,.25);
}
.btn:hover{ transform: translateY(-1px); border-color: rgba(34,211,238,.55); }
.btn--primary{
  background: linear-gradient(135deg, rgba(31,58,138,.95), rgba(34,211,238,.75));
  border-color: rgba(34,211,238,.55);
  color:#fff;
}
.btn--ghost{
  background: rgba(255,255,255,.45);
}
html[data-theme="dark"] .btn--ghost{
  background: rgba(255,255,255,.06);
}

/* Breadcrumb */
.breadcrumb{
  border-bottom: 1px solid rgba(148,163,184,.18);
}
.breadcrumb__inner{
  max-width: 1200px;
  margin:0 auto;
  padding: 10px 16px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  color: var(--muted);
}
.breadcrumb__link{
  color: var(--muted);
  text-decoration:none;
  padding: 2px 6px;
  border-radius: 10px;
}
.breadcrumb__link:hover{
  background: rgba(34,211,238,.12);
  color: var(--text);
}
.breadcrumb__sep{ opacity:.5; }

/* =========================
   Layout
========================= */
.layout{
  max-width: 1200px;
  margin: 0 auto;
  display:flex;
  gap: 16px;
  padding: 16px;
}

.sidebar{
  width: 300px;
  position:sticky;
  top: 66px;
  align-self:flex-start;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(148,163,184,.22);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  overflow:hidden;
}
html[data-theme="dark"] .sidebar{
  background: rgba(255,255,255,.05);
}
.sidebar__head{
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(148,163,184,.18);
}
.sidebar__title{ font-weight:800; }
.sidebar__meta{ color: var(--muted); font-size: 12px; margin-top:4px; }

.sidebar__search{ padding: 12px 14px; }
.input{
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.25);
  background: rgba(255,255,255,.75);
  color: var(--text);
  outline:none;
}
html[data-theme="dark"] .input{
  background: rgba(255,255,255,.06);
}
.input:focus{
  border-color: rgba(34,211,238,.7);
  box-shadow: 0 0 0 3px rgba(34,211,238,.18);
}

.toc{
  list-style:none;
  padding: 0 8px 12px;
  margin:0;
  max-height: calc(100vh - 210px);
  overflow:auto;
}
.toc__item{ margin: 2px 0; }
.toc__link{
  display:block;
  text-decoration:none;
  padding: 10px 10px;
  border-radius: 12px;
  color: var(--text);
  border: 1px solid transparent;
}
.toc__link:hover{
  background: rgba(34,211,238,.10);
}
.toc__link.is-active{
  border-color: rgba(34,211,238,.55);
  background: rgba(31,58,138,.10);
}

.sidebar__footer{
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(148,163,184,.18);
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.pill{
  font-size: 12px;
  color: var(--muted);
  border: 1px solid rgba(148,163,184,.25);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.65);
}
html[data-theme="dark"] .pill{
  background: rgba(255,255,255,.06);
}

.content{
  flex:1;
  min-width: 0;
}

/* mobile */
@media (max-width: 980px){
  .layout{ flex-direction:column; }
  .sidebar{
    width:100%;
    position:relative;
    top:auto;
    display:none;
  }
  .sidebar.is-open{ display:block; }
}

/* =========================
   Hero / Cards
========================= */
.hero{ margin-top: 8px; }
.hero__card{
  padding: 18px 18px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(148,163,184,.22);
  box-shadow: var(--shadow);
}
html[data-theme="dark"] .hero__card{
  background: rgba(255,255,255,.05);
}
.hero__title{
  margin: 0 0 6px;
  font-size: 34px;
  letter-spacing: .02em;
}
.hero__desc{
  margin: 0 0 14px;
  color: rgba(15,23,42,.78);
}
html[data-theme="dark"] .hero__desc{ color: var(--muted); }
.hero__grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin-top: 12px;
}
@media (max-width: 980px){
  .hero__grid{ grid-template-columns:1fr; }
}
.mini{
  border: 1px solid rgba(148,163,184,.20);
  background: rgba(255,255,255,.70);
  border-radius: 14px;
  padding: 10px 12px;
}
html[data-theme="dark"] .mini{ background: rgba(255,255,255,.05); }
.mini__k{ font-weight:800; font-size: 12px; color: var(--muted); }
.mini__v{ margin-top: 4px; font-weight:600; }

.hero__buttons{ margin-top: 14px; display:flex; gap:10px; flex-wrap:wrap; }

.card{
  margin-top: 16px;
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(148,163,184,.22);
  box-shadow: var(--shadow2);
}
html[data-theme="dark"] .card{ background: rgba(255,255,255,.05); }
.card h2{
  margin: 0 0 10px;
  font-size: 22px;
}
.card__head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.card__sub{ color: var(--muted); font-size: 12px; }

.grid2{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}
@media (max-width: 980px){
  .grid2{ grid-template-columns:1fr; }
}
.grid3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}
@media (max-width: 980px){
  .grid3{ grid-template-columns:1fr; }
}

.list{ margin: 10px 0 0; padding-left: 1.2rem; }
.muted{ color: var(--muted); }

/* chips */
.chips{ display:flex; flex-wrap:wrap; gap:8px; margin: 10px 0; }
.chip{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(31,58,138,.08);
}

/* features / kv */
.feature{
  border: 1px solid rgba(148,163,184,.20);
  border-radius: 14px;
  background: rgba(255,255,255,.65);
  padding: 12px 12px;
}
html[data-theme="dark"] .feature{ background: rgba(255,255,255,.04); }
.feature__t{ font-weight:800; }
.feature__d{ margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.kv{
  border: 1px solid rgba(148,163,184,.20);
  border-radius: 14px;
  background: rgba(255,255,255,.65);
  padding: 12px;
}
html[data-theme="dark"] .kv{ background: rgba(255,255,255,.04); }
.kv__k{ font-weight:900; letter-spacing:.02em; }
.kv__v{ margin-top: 6px; color: var(--muted); font-size: 14px; }

/* callout */
.callout{
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(34,211,238,.30);
  background: rgba(34,211,238,.08);
  padding: 12px 12px;
}
.callout__title{ font-weight:900; margin-bottom:6px; }
.callout--warn{
  border-color: rgba(220,38,38,.30);
  background: rgba(220,38,38,.08);
}
.callout--tip{
  border-color: rgba(22,163,74,.30);
  background: rgba(22,163,74,.08);
}

/* table */
.table-wrap{ overflow:auto; border-radius: 14px; border: 1px solid rgba(148,163,184,.22); }
.table{
  width:100%;
  border-collapse:collapse;
  min-width: 640px;
  background: rgba(255,255,255,.72);
}
html[data-theme="dark"] .table{ background: rgba(255,255,255,.03); }
.table th, .table td{
  padding: 12px;
  border-bottom: 1px solid rgba(148,163,184,.18);
  vertical-align:top;
}
.table th{
  text-align:left;
  font-size: 12px;
  color: var(--muted);
  letter-spacing:.06em;
}
.table tr:hover td{ background: rgba(34,211,238,.06); }

/* =========================
   Codeblock + Copy
========================= */
.codeblock{
  margin-top: 12px;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid rgba(148,163,184,.20);
  background: rgba(2,6,23,.92);
}
.codeblock__bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.codeblock__lang{
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(255,255,255,.72);
}
.codeblock__copy{
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.88);
  padding: 7px 10px;
  border-radius: 12px;
  cursor:pointer;
  font-weight:700;
}
.codeblock__copy:hover{
  background: rgba(34,211,238,.16);
  border-color: rgba(34,211,238,.35);
}
.codeblock__pre{
  margin:0;
  padding: 12px;
  overflow:auto;
  color: rgba(255,255,255,.92);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
}

/* =========================
   Accordion / FAQ
========================= */
.accordion{ margin-top: 10px; display:flex; flex-direction:column; gap:10px; }
.acc{
  width:100%;
  text-align:left;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(255,255,255,.65);
  cursor:pointer;
  font-weight:800;
}
html[data-theme="dark"] .acc{ background: rgba(255,255,255,.04); }
.acc__i{ font-weight:900; color: var(--muted); }
.acc__p{
  display:none;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(255,255,255,.50);
}
html[data-theme="dark"] .acc__p{ background: rgba(255,255,255,.03); }
.acc__p.is-open{ display:block; }

.faq{ margin-top: 10px; display:grid; gap:10px; }
.faq__q{
  font-weight:900;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(31,58,138,.10);
  border: 1px solid rgba(31,58,138,.18);
}
.faq__a{
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(148,163,184,.18);
}
html[data-theme="dark"] .faq__a{ background: rgba(255,255,255,.03); }

/* =========================
   Footer
========================= */
.footer{
  margin: 18px 0 28px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(148,163,184,.22);
  box-shadow: var(--shadow2);
}
html[data-theme="dark"] .footer{ background: rgba(255,255,255,.05); }
.footer a{ color: var(--primary); text-decoration:none; }
.footer a:hover{ text-decoration:underline; }
