:root{
  --bg:#0b1220;
  --card:#0f1b33;
  --card2:#0c1730;
  --text:#e7eefc;
  --muted:#9fb0d3;

  --primary:#60a5fa;
  --accent:#f59e0b;
  --good:#22c55e;
  --warn:#fb7185;

  --border:rgba(255,255,255,.12);
  --radius:16px;
  --shadow:0 18px 44px 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, Segoe UI, sans-serif;
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(96,165,250,.25), transparent 60%),
    radial-gradient(900px 500px at 80% 0%, rgba(245,158,11,.18), transparent 60%),
    var(--bg);
  color:var(--text);
  line-height:1.75;
}

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

.wrap{ max-width:1120px; margin:0 auto; padding:0 18px; }
.main{ padding:18px 0 60px; }

.card{
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  backdrop-filter: blur(8px);
}

.card--sub{
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  box-shadow:none;
}

/* topbar */
.topbar{
  position:sticky; top:0; z-index:40;
  backdrop-filter: blur(10px);
  background:rgba(11,18,32,.65);
  border-bottom:1px solid var(--border);
}
.topbar__inner{ display:flex; align-items:center; justify-content:space-between; padding:12px 18px; }
.brand{ display:flex; align-items:center; gap:10px; }
.brand__logo{
  width:34px; height:34px; display:grid; place-items:center;
  border-radius:12px;
  background:rgba(96,165,250,.18);
  border:1px solid rgba(96,165,250,.35);
  font-weight:800;
}
.brand__name{ font-weight:700; letter-spacing:.02em; }
.topnav{ display:flex; gap:8px; align-items:center; }

.btn{
  appearance:none; border:none; cursor:pointer;
  padding:10px 12px;
  border-radius:12px;
  font-weight:700;
  color:var(--text);
  background:rgba(96,165,250,.18);
  border:1px solid rgba(96,165,250,.35);
}
.btn:hover{ filter:brightness(1.05); }
.btn:active{ transform:translateY(1px); }
.btn--ghost{
  background:rgba(255,255,255,.06);
  border:1px solid var(--border);
  font-weight:600;
}

/* breadcrumb */
.breadcrumb{
  display:flex; gap:10px; align-items:center;
  color:var(--muted);
  padding:10px 2px 16px;
  flex-wrap:wrap;
}
.breadcrumb span{ opacity:.85; }

/* hero */
.hero{ display:grid; grid-template-columns: 1.2fr .8fr; gap:14px; padding:18px; }
.kicker{
  display:inline-flex; gap:8px; align-items:center;
  color:var(--muted);
  letter-spacing:.16em;
  font-size:12px;
}
.hero__title{ margin:8px 0 6px; font-size:34px; line-height:1.2; }
.hero__lead{ margin:0; color:var(--muted); }
.hero__chips{ display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.chip{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--muted);
  font-size:12px;
}
.mini{ padding:14px; }
.mini__title{ font-weight:800; margin-bottom:8px; }
.mini__list{ margin:0; padding-left:18px; color:var(--muted); }

.notice{
  padding:12px 14px; border-radius:14px;
  border:1px solid var(--border);
  margin-bottom:14px;
}
.notice--warn{
  background:rgba(251,113,133,.12);
  border-color:rgba(251,113,133,.35);
}

/* layout */
.grid{ display:grid; grid-template-columns: 1fr 320px; gap:14px; margin-top:14px; }
.col{ min-width:0; }
.side{ position:sticky; top:74px; align-self:start; display:flex; flex-direction:column; gap:14px; }

.section{ padding:16px; margin-bottom:14px; }
.section__head{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  border-bottom:1px dashed var(--border);
  padding-bottom:10px;
  margin-bottom:12px;
}
.section__title{ margin:0; font-size:22px; }
.section__anchor{ color:var(--muted); font-weight:800; }
.section__p{ margin:0 0 12px; color:var(--muted); }

.list{ margin:0 0 10px; padding-left:18px; color:var(--muted); }
.list li{ margin:6px 0; }

.codebox{
  margin:12px 0 0;
  border-radius:14px;
  border:1px solid var(--border);
  background:linear-gradient(180deg, rgba(0,0,0,.26), rgba(0,0,0,.12));
  overflow:hidden;
}
.codebox__head{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  padding:10px 10px;
  border-bottom:1px solid var(--border);
}
.codebox__meta{ display:flex; gap:10px; align-items:baseline; min-width:0; }
.codebox__title{ font-weight:800; }
.codebox__lang{
  font-size:12px; color:var(--muted);
  border:1px solid var(--border);
  padding:2px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.05);
}
.codebox__pre{
  margin:0;
  padding:12px;
  overflow:auto;
  max-height:420px;
}
.codebox__code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size:13px;
  white-space:pre;
  color:#eaf2ff;
}

.sidecard{ padding:14px; }
.sidecard__title{ font-weight:900; margin-bottom:10px; }
.check{ margin:0; padding:0; list-style:none; color:var(--muted); }
.check li{ display:flex; gap:10px; align-items:center; margin:10px 0; }
.dot{ width:10px; height:10px; border-radius:50%; display:inline-block; }
.dot--good{ background:rgba(34,197,94,.9); }
.dot--warn{ background:rgba(245,158,11,.9); }
.muted{ color:var(--muted); }

/* toc panel */
.toc{
  position:fixed; inset:72px 18px auto auto;
  width:min(420px, calc(100vw - 36px));
  max-height: calc(100vh - 90px);
  display:none;
  overflow:auto;
  padding:14px;
  z-index:60;
}
.toc.is-open{ display:block; }
.toc__head{ display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; }
.toc__title{ font-weight:900; font-size:16px; }
.toc__list{ margin:0; padding-left:18px; color:var(--muted); }
.toc__list li{ margin:8px 0; }
.toc__foot{ margin-top:10px; padding-top:10px; border-top:1px dashed var(--border); }

/* footer */
.footer{
  margin-top:18px;
  padding:16px 0 0;
  color:var(--muted);
}
.foot__copy{ padding:10px 2px; }
.foot__nav{ display:flex; flex-wrap:wrap; gap:10px; padding:10px 2px 0; }
.foot__nav a{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.05);
}

/* responsive */
@media (max-width: 980px){
  .hero{ grid-template-columns:1fr; }
  .grid{ grid-template-columns:1fr; }
  .side{ position:static; }
  .toc{ inset:72px 18px auto 18px; }
}

/* theme toggle (simple) */
body.is-light{
  --bg:#f6f8ff;
  --card:#ffffff;
  --card2:#ffffff;
  --text:#0c1730;
  --muted:#3b4b69;
  --border:rgba(12,23,48,.12);
  --shadow:0 18px 44px rgba(10,18,44,.12);
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(96,165,250,.22), transparent 60%),
    radial-gradient(900px 500px at 80% 0%, rgba(245,158,11,.14), transparent 60%),
    var(--bg);
}



/* =========================
  Footer (SunStripe / Programming Lab)
  対象HTML:
  <footer class="footer">
    <div class="foot__copy">...</div>
    <nav class="foot__nav"><ul>...</ul></nav>
  </footer>
========================= */

footer{
  margin-top:18px;
  padding:18px 14px;
  border:1px solid rgba(33,115,70,.22);
  border-radius:14px;
  background:
    radial-gradient(900px 200px at 20% 0%, rgba(33,115,70,.18), transparent 65%),
    radial-gradient(700px 200px at 85% 10%, rgba(15,123,108,.12), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.06));
  box-shadow:0 14px 34px rgba(0,0,0,.25);
  color:var(--muted);
}

.foot__copy{
  font-size:12px;
  color:var(--muted);
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
  justify-content:flex-start;
  padding-bottom:12px;
  border-bottom:1px solid rgba(255,255,255,.10);
}

.foot__copy a{
  color:var(--excelWhite2, #d9ffe9);
  text-decoration:none;
  font-weight:800;
  border-bottom:1px solid rgba(33,115,70,.35);
}

.foot__copy a:hover{
  filter:brightness(1.08);
  border-bottom-color:rgba(33,115,70,.60);
}

.foot__nav{
  margin-top:12px;
}

.foot__nav ul{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.foot__nav li{
  margin:0;
}

/* Excel風リンクチップ */
.foot__nav a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(33,115,70,.26);
  background:
    linear-gradient(180deg, rgba(33,115,70,.18), rgba(0,0,0,.06));
  color:var(--excelWhite, #f3fff8);
  font-size:12px;
  letter-spacing:.02em;
  text-decoration:none;
  transition:transform .12s ease, filter .12s ease, border-color .12s ease;
  box-shadow:0 10px 22px rgba(0,0,0,.18);
  white-space:nowrap;
}

.foot__nav a:hover{
  filter:brightness(1.08);
  border-color:rgba(33,115,70,.55);
  transform:translateY(-1px);
}

.foot__nav a:active{
  transform:translateY(0);
}

/* 今いるページが分かるように（任意：bodyにdata-current="/programming/xlsx/"とか付けると便利） */
/*
body[data-current="/programming/xlsx/"] .foot__nav a[href="/programming/xlsx/"]{
  border-color:rgba(33,115,70,.75);
  background:linear-gradient(180deg, rgba(33,115,70,.40), rgba(33,115,70,.18));
  color:var(--excelWhite2, #d9ffe9);
}
*/

/* スマホで詰まりすぎないように */
@media (max-width:560px){
  footer{
    padding:16px 12px;
  }
  .foot__nav a{
    padding:7px 9px;
    font-size:12px;
  }
}
