:root {
  --bg: #FFFFFF;
  --ink: #0F0F1C;
  --ink-soft: #3C4356;
  --muted: #6B7280;
  --ink-deep: #003050;
  --indigo: #1E3E75;
  --indigo-hi: #27509A;
  --band: #111D3A;
  --accent: #C23F32;
  --accent-hover: #A3332A;
  --accent-soft: rgba(194,63,50,0.08);
  --border: rgba(0,48,80,0.11);
  --border-strong: rgba(0,48,80,0.20);
  --paper: #F7F8FA;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(31,36,48,0.06);
  --shadow-md: 0 8px 22px rgba(31,36,48,0.11);
  --shadow-lg: 0 20px 50px rgba(31,36,48,0.16);
  --ease: cubic-bezier(0.2,0,0,1);
  --font-display: 'Poppins','Inter','SF Pro Display','Noto Sans JP',sans-serif;
  --font-sans: 'Inter','Poppins','Noto Sans JP',-apple-system,BlinkMacSystemFont,sans-serif;
  --font-mono: ui-monospace,'SFMono-Regular',Menlo,Consolas,monospace;
  --measure: 70ch;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--accent); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand img { width: 32px; height: 32px; display: block; }
.brand .name {
  font-family: var(--font-display); font-weight: 600; font-size: 1.18rem;
  color: var(--ink); letter-spacing: -0.01em;
}
.brand .name small { font-weight: 600; color: var(--accent); }
.brand:hover .name { color: var(--ink); }
nav.site { display: flex; align-items: center; gap: 1.9rem; }
nav.site a {
  font-size: 0.95rem; font-weight: 500; color: var(--ink);
  letter-spacing: 0.005em;
}
nav.site a:hover { color: var(--accent); }
nav.site a.here { color: var(--accent); }
nav.site a.ext { color: var(--muted); font-size: 0.88rem; }
nav.site a.ext:hover { color: var(--indigo); }

/* ---------- hero ---------- */
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 3rem; align-items: center;
  padding: 5rem 1.5rem 4.5rem;
}
.kicker {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1.4rem;
}
.kicker .jp { font-family: 'Noto Sans JP',sans-serif; font-weight: 500; letter-spacing: 0.2em; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  font-weight: 700; line-height: 1.08; letter-spacing: -0.025em;
  color: var(--ink); max-width: 16ch;
}
.hero .sub {
  margin-top: 1.6rem; font-family: var(--font-display);
  font-size: 1.28rem; font-weight: 600; line-height: 1.45; color: var(--ink);
  max-width: 34ch;
}
.hero .sub .jp { font-family: 'Noto Sans JP',sans-serif; font-weight: 500; }
.hero p.lede {
  margin-top: 1rem; font-size: 1.02rem; color: var(--ink-soft); max-width: 52ch;
}
.hero .cta { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.85rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 50px; padding: 0 1.7rem; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn.primary { background: var(--indigo); color: #fff; }
.btn.primary:hover { background: var(--indigo-hi); color: #fff; transform: translateY(-1px); }
.btn.ghost { border: 2px solid var(--indigo); color: var(--indigo); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.hero .art { display: flex; justify-content: center; }
.hero .art img { width: min(100%, 360px); height: auto; }

/* ---------- section label ---------- */
.label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.5rem;
}
.label h2 {
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
}
.label a { font-size: 0.88rem; font-weight: 600; }

/* ---------- cards ---------- */
.sections { padding: 1rem 0 2rem; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.card {
  display: block; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.7rem 1.6rem 1.5rem; box-shadow: var(--shadow-sm);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-md); transform: translateY(-3px);
  border-color: var(--border-strong);
}
.card .cat {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
}
.card h3 {
  font-family: var(--font-display); font-size: 1.22rem; font-weight: 600;
  color: var(--ink); margin: 0.55rem 0 0.5rem; letter-spacing: -0.01em;
}
.card p { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.6; }
.card .more { display: inline-block; margin-top: 1rem; font-size: 0.88rem; font-weight: 600; color: var(--indigo); }
.card:hover .more { color: var(--accent); }

/* ---------- latest / entries ---------- */
.latest { padding: 3rem 0 5rem; }
.entry {
  display: grid; grid-template-columns: 10.5rem 1fr; gap: 1.25rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.entry:first-of-type { border-top: 1px solid var(--border); }
.entry .when { font-size: 0.92rem; color: var(--muted); white-space: nowrap; }
.entry .when .id { display: block; font-weight: 600; color: var(--ink); font-size: 0.85rem; }
.entry h3 { font-family: var(--font-display); font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.4; }
.entry h3 a { color: var(--ink); }
.entry h3 a:hover { color: var(--accent); }
.entry p { font-size: 0.94rem; color: var(--ink-soft); margin-top: 0.45rem; max-width: var(--measure); }
.pill {
  display: inline-block; font-size: 0.74rem; font-weight: 600;
  border: 1px solid rgba(194,63,50,0.35); background: var(--accent-soft);
  color: var(--accent); border-radius: 999px; padding: 0.1rem 0.7rem;
  margin-left: 0.6rem; vertical-align: 0.12em;
}

/* ---------- course units ---------- */
ol.units {
  list-style: none; margin: 1.1rem 0 0.4rem; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 0.45rem 2.5rem; counter-reset: unit;
}
ol.units li {
  counter-increment: unit; font-size: 0.93rem; color: var(--ink-soft);
  padding-left: 2rem; position: relative; line-height: 1.5;
}
ol.units li::before {
  content: counter(unit, decimal-leading-zero);
  position: absolute; left: 0; top: 0.05rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.8rem;
  color: var(--accent);
}
@media (max-width: 640px) { ol.units { grid-template-columns: 1fr; } }

/* ---------- interior pages ---------- */
.page-hero { border-bottom: 1px solid var(--border); background: var(--paper); }
.page-hero .wrap { padding: 3.5rem 1.5rem 3rem; }
.page-hero .kicker { margin-bottom: 0.9rem; }
.page-hero h1 {
  font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 700; letter-spacing: -0.02em; color: var(--ink);
}
.page-hero p.lede { margin-top: 0.9rem; max-width: 62ch; color: var(--ink-soft); font-size: 1.04rem; }
main.page { padding: 3rem 0 6rem; }

.empty {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--paper); padding: 2.2rem 2rem; max-width: 46rem;
  color: var(--ink-soft); font-size: 0.98rem;
}
.empty strong { color: var(--ink); }

/* ---------- article ---------- */
article.bulletin { max-width: var(--measure); }
article.bulletin .kicker { margin-bottom: 1rem; }
article.bulletin h1 {
  font-family: var(--font-display); font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 700; line-height: 1.2; letter-spacing: -0.02em;
}
article.bulletin .byline {
  margin: 1.1rem 0 2.5rem; font-size: 0.9rem; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem;
  padding-bottom: 1.4rem; border-bottom: 1px solid var(--border);
}
article.bulletin h2 {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 650;
  letter-spacing: -0.01em; margin: 2.6rem 0 0.8rem;
  padding-top: 0.4rem;
}
article.bulletin h2::before {
  content: ""; display: block; width: 2.2rem; height: 3px;
  background: var(--accent); border-radius: 2px; margin-bottom: 0.8rem;
}
article.bulletin p { margin: 0.95rem 0; font-size: 1.02rem; color: var(--ink-soft); }
article.bulletin ul, article.bulletin ol { margin: 0.95rem 0 0.95rem 1.5rem; color: var(--ink-soft); }
article.bulletin li { margin: 0.45rem 0; font-size: 1rem; }
article.bulletin strong { color: var(--ink); font-weight: 650; }
.callout {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem; margin: 1.6rem 0; font-size: 0.98rem; color: var(--ink);
}
code {
  font-family: var(--font-mono); font-size: 0.86em;
  background: var(--paper); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.12rem 0.42rem; color: var(--ink-deep);
}
pre {
  font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.65;
  background: var(--band); color: #DCE4F2;
  border-radius: var(--radius); padding: 1.1rem 1.3rem;
  overflow-x: auto; margin: 1.4rem 0; box-shadow: var(--shadow-sm);
}
pre code { border: 0; padding: 0; background: none; color: inherit; }

/* ---------- footer ---------- */
footer.site { background: var(--band); color: rgba(255,255,255,0.75); margin-top: 2rem; }
footer.site .wrap {
  padding: 2.4rem 1.5rem; display: flex; flex-wrap: wrap;
  gap: 1rem 2.5rem; align-items: center; justify-content: space-between;
  font-size: 0.9rem;
}
footer.site .fbrand { display: flex; align-items: center; gap: 0.65rem; color: #fff; font-family: var(--font-display); font-weight: 600; }
footer.site .fbrand img { width: 26px; height: 26px; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
footer.site a { color: rgba(255,255,255,0.75); }
footer.site a:hover { color: #fff; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding: 3.25rem 1.5rem 3rem; }
  .hero .art { display: none; }
  nav.site { gap: 1.1rem; }
  nav.site a { font-size: 0.88rem; }
  .entry { grid-template-columns: 1fr; gap: 0.3rem; }
  header.site .wrap { height: 62px; }
  .brand .name { font-size: 1.05rem; }
}
