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

  --primary:#60a5fa;
  --accent:#f59e0b;
  --good:#22c55e;
  --bad:#ef4444;
  --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.7;
}

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

.wrap{ max-width:1100px; margin:0 auto; padding:18px; }

.muted{ color:var(--muted); }
.bad{ color:var(--bad); }
.good{ color:var(--good); }

.topbar{
  position:sticky; top:0; z-index:20;
  backdrop-filter: blur(10px);
  background: rgba(11,18,32,.6);
  border-bottom:1px solid var(--border);
}
.topbar__inner{ display:flex; align-items:center; gap:14px; justify-content:space-between; }
.brand{ display:flex; align-items:center; gap:10px; }
.brand__logo{
  width:44px; height:44px; border-radius:14px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, rgba(96,165,250,.95), rgba(245,158,11,.9));
  color:#081022;
  font-weight:900;
  box-shadow: var(--shadow);
}
.brand__name{ font-weight:800; letter-spacing:.02em; }

.topnav{ display:flex; gap:12px; flex-wrap:wrap; }
.topnav a{
  padding:8px 10px;
  border-radius:12px;
  border:1px solid transparent;
  color:var(--muted);
}
.topnav a:hover{ border-color:var(--border); color:var(--text); text-decoration:none; }
.topnav .is-active{ border-color:rgba(96,165,250,.35); color:var(--text); }

.hero{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:16px;
  margin:18px 0 10px;
}
@media (max-width: 900px){
  .hero{ grid-template-columns:1fr; }
}

.hero__txt{
  padding:18px;
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15,27,51,.9), rgba(12,23,48,.7));
  box-shadow: var(--shadow);
}
.hero h1{ margin:0 0 8px; font-size: clamp(22px, 3vw, 32px); }
.lead{ margin:0; color:var(--muted); }

.hero__meta{ margin-top:12px; display:flex; flex-wrap:wrap; gap:8px; }
.pill{
  font-size:12px;
  padding:4px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  color:var(--muted);
  background: rgba(255,255,255,.04);
}
.pill.warn{ border-color: rgba(251,113,133,.35); color:#ffd3dc; }

.hero__card{
  padding:18px;
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15,27,51,.6);
}

.search__label{ display:block; font-size:12px; color:var(--muted); margin-bottom:6px; }
.search__input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  outline:none;
  background: rgba(8,16,32,.6);
  color: var(--text);
}
.search__input:focus{ border-color: rgba(96,165,250,.55); }
.search__hint{ margin-top:8px; font-size:12px; color:var(--muted); }

.toc{ margin-top:14px; }
.toc__head{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.toc__title{ font-weight:800; }
.toc__list{ margin:10px 0 0; padding-left:18px; color:var(--muted); }
.toc__list a{ color:var(--muted); }
.toc__list a:hover{ color:var(--text); }

.grid{ display:grid; gap:14px; margin:14px 0 26px; }
.card{
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15,27,51,.62);
  box-shadow: var(--shadow);
  padding:18px;
}
.card.mini{ padding:14px; }

.lesson__head h2{ margin:0 0 6px; font-size:20px; }
.lesson__head p{ margin:0; }

.tags{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.tag{
  font-size:12px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  color:var(--muted);
}

.lesson__body{ margin-top:14px; }
.lesson__foot{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:14px;
  padding-top:12px;
  border-top:1px dashed rgba(255,255,255,.12);
}

.btn{
  appearance:none;
  border:none;
  cursor:pointer;
  padding:10px 12px;
  border-radius:14px;
  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.08); text-decoration:none; }
.btn--ghost{
  background: rgba(255,255,255,.04);
  border:1px solid var(--border);
  color: var(--muted);
}
.btn--ghost:hover{ color: var(--text); }

.content h4{ margin:16px 0 8px; }
.content p{ margin:10px 0; }
.content ul{ margin:10px 0; padding-left:18px; color: var(--muted); }
.content li{ margin:6px 0; }

pre{
  margin:10px 0;
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(8,16,32,.65);
  overflow:auto;
}
code{ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 13px; }

.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media (max-width: 900px){ .grid2{ grid-template-columns:1fr; } }

.callout{
  margin:12px 0;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(96,165,250,.35);
  background: rgba(96,165,250,.10);
  color: var(--text);
}
.callout.warn{
  border-color: rgba(251,113,133,.35);
  background: rgba(251,113,133,.10);
}
.list{ color:var(--muted); }
.footer{
  margin:26px 0 40px;
  padding:14px 0 0;
  border-top:1px solid rgba(255,255,255,.12);
}
.foot__copy{ color:var(--muted); }
.foot__note{ margin-top:6px; font-size:12px; }

.fab{
  position:fixed;
  right:16px; bottom:16px;
  width:46px; height:46px;
  display:grid; place-items:center;
  border-radius: 16px;
  border:1px solid var(--border);
  background: rgba(15,27,51,.8);
  box-shadow: var(--shadow);
}
.fab:hover{ text-decoration:none; }


/* =========================
  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;
  }
}
