/* =========================
   Hub pages (MorEnglish etc)
   Dark mode + IM Fell English
   ========================= */

:root{
  --bg:#0b0b0c;
  --panel:#101015;
  --panel2:#0d0d12;
  --text:#f1f1f1;
  --muted:#b7b7c0;
  --line:#2a2a33;
  --accent:#b9b7ff;
  --max:1100px;
}

*{ box-sizing:border-box; }

html, body{ height:100%; }

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:"IM Fell English","Noto Serif JP",serif;
  font-size:18px;
  line-height:1.55;
  letter-spacing:.2px;
}

/* links */
a{ color:inherit; text-decoration:none; }
a:hover{ color:var(--accent); }

/* layout */
.container{
  max-width:var(--max);
  margin:0 auto;
  padding:22px 18px 40px;
}

/* header */
.page-header{
  margin-bottom:18px;
  padding:6px 0 12px;
  border-bottom:1px solid var(--line);
}

.header-top{
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom:10px;
}

.back-link{
  color:var(--muted);
  text-decoration:underline;
  text-underline-offset:3px;
  opacity:.9;
}

.back-link:hover{
  color:var(--text);
  opacity:1;
}

.page-header h1{
  font-size:44px;
  font-weight:400;
  margin:0 0 8px;
}

.subtitle{
  margin:0;
  color:var(--muted);
  max-width:70ch;
}

/* pills row under title */
.hub-meta{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.pill{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  background:#1b1b22;
  border:1px solid rgba(255,255,255,.10);
  color:#cfcfe6;
}

/* ---- Civ-ish TOC tabs (reused) ---- */
.toc-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:16px 0 18px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:16px;
  background:linear-gradient(180deg,#0f0f14,#0b0b0c);
  position:sticky;
  top:0;
  z-index:50;
}

.toc-tab{
  display:inline-block;
  padding:9px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#12121a;
  color:var(--muted);
  font-size:16px;
  line-height:1;
}

.toc-tab:hover{
  background:#171724;
  color:var(--text);
}

/* sections/panels spacing */
.panel{ margin:28px 0; }

/* ==============================
   Pixel / Civ-style panel
   ============================== */

.pixel-panel{
  position:relative;
  background:linear-gradient(180deg,var(--panel),var(--panel2));
  border-radius:14px;
  padding:22px 22px 18px;
  border:2px solid #2e2e3a;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.04),
    0 12px 40px rgba(0,0,0,.55);
}

/* gold bevel */
.pixel-panel::before{
  content:"";
  position:absolute;
  inset:-6px;
  border-radius:18px;
  border:2px solid transparent;
  background:
    linear-gradient(180deg,
      #c7a35a,
      #7b6234 45%,
      #3a2c14 55%,
      #b8964e
    );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
          mask-composite:exclude;
  pointer-events:none;
}

.pixel-panel::after{
  content:"";
  position:absolute;
  inset:4px;
  border-radius:12px;
  box-shadow:inset 0 0 18px rgba(185,183,255,.08);
  pointer-events:none;
}

.pixel-panel .ornament{
  position:absolute;
  top:-14px;
  right:18px;
  font-size:14px;
  color:var(--accent);
  opacity:.75;
  text-shadow:0 0 6px rgba(185,183,255,.4);
}

.pixel-panel h2{
  margin:0 0 12px;
  font-size:26px;
  font-weight:400;
  letter-spacing:.4px;
  color:#f3f3f6;
  text-shadow:0 1px 0 #000, 0 0 8px rgba(185,183,255,.15);
}

.note{
  margin:0 0 12px;
  color:var(--muted);
}

/* bullets list */
.bullets{
  margin:0;
  padding-left:22px;
  color:#c9c9d8;
}

.bullets li{ margin:10px 0; }

/* links grid/cards */
.link-grid{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:14px;
}

.link-card{
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  background:rgba(0,0,0,.35);
  overflow:hidden;
}

.link-main{
  display:block;
  padding:14px 14px 10px;
}

.link-title{
  display:block;
  font-size:18px;
  letter-spacing:.2px;
}

.link-desc{
  display:block;
  margin-top:6px;
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
}

.link-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:0 14px 14px;
  align-items:center;
}

.meta-link{
  font-size:12px;
  color:var(--text);
  opacity:.85;
  text-decoration:underline;
  text-underline-offset:3px;
}

.meta-link:hover{ opacity:1; }

/* footer */
.page-footer{
  margin-top:18px;
  color:var(--muted);
  font-size:16px;
  border-top:1px solid var(--line);
  padding-top:14px;
}

/* selection */
::selection{ background:rgba(185,183,255,.25); }

/* mobile */
@media (max-width:520px){
  .page-header h1{ font-size:38px; }
  .toc-tabs{ padding:10px; gap:8px; }
  .toc-tab{ padding:8px 10px; font-size:15px; }
  .pixel-panel{ padding:16px 16px 14px; }
  .pixel-panel h2{ font-size:22px; }
}
