/* =========================================================
   Off-Grid Life - Main Stylesheet
   アウトドア × ドキュメンタリー × データ可視化
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400;1,6..72,500&family=Zen+Kaku+Gothic+New:wght@400;500;700;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  /* Earth palette (light) */
  --bg: #F5F1E8;
  --bg-elev: #FFFDF7;
  --bg-mute: #EDE5D3;
  --ink: #2A2620;
  --ink-mute: #6B6156;
  --ink-faint: #A29684;
  --line: #DDD3BE;

  --accent: #C9782C;         /* terracotta sunset */
  --accent-hover: #B4661F;
  --accent-2: #6B8E4E;       /* moss green */
  --accent-3: #D4A94A;       /* honey highlight */
  --accent-x: #0A0A0A;       /* X (black) */

  --shadow-sm: 0 1px 2px rgba(42,38,32,.06), 0 1px 3px rgba(42,38,32,.04);
  --shadow-md: 0 4px 12px rgba(42,38,32,.08), 0 2px 6px rgba(42,38,32,.05);
  --shadow-lg: 0 12px 40px rgba(42,38,32,.12), 0 6px 16px rgba(42,38,32,.08);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --font-serif: "Newsreader", Georgia, "Yu Mincho", "游明朝", serif;
  --font-sans: "Zen Kaku Gothic New", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1200px;
  --container-narrow: 760px;
}

/* Dark mode */
[data-theme="dark"] {
  --bg: #14120E;
  --bg-elev: #1C1A16;
  --bg-mute: #23201A;
  --ink: #F0E8D8;
  --ink-mute: #A69B85;
  --ink-faint: #6B6156;
  --line: #322E26;

  --accent: #E89654;
  --accent-hover: #F0A468;
  --accent-2: #8FAD6E;
  --accent-3: #E6C46A;
  --accent-x: #FFFFFF;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.55), 0 6px 16px rgba(0,0,0,.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14120E;
    --bg-elev: #1C1A16;
    --bg-mute: #23201A;
    --ink: #F0E8D8;
    --ink-mute: #A69B85;
    --ink-faint: #6B6156;
    --line: #322E26;
    --accent: #E89654;
    --accent-hover: #F0A468;
    --accent-2: #8FAD6E;
    --accent-3: #E6C46A;
    --accent-x: #FFFFFF;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  transition: background-color .3s ease, color .3s ease;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 2em 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.35rem; }
p { text-wrap: pretty; margin: 0 0 1.2em; }

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line), transparent);
  margin: 3em 0;
}

code, pre { font-family: var(--font-mono); font-size: 0.9em; }
pre {
  background: var(--bg-mute);
  border-left: 3px solid var(--accent);
  padding: 1em 1.2em;
  border-radius: var(--radius-sm);
  overflow-x: auto;
}
blockquote {
  border-left: 3px solid var(--accent-2);
  margin: 1.5em 0;
  padding: 0.5em 1.2em;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1em;
  color: var(--ink-mute);
  position: relative;
}

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.site-logo { color: var(--ink); display: flex; align-items: center; }
.site-logo svg { height: 40px; width: auto; }
.site-logo:hover { text-decoration: none; color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  color: var(--ink);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background .2s ease, color .2s ease;
}
.site-nav a:hover { background: var(--bg-mute); color: var(--accent); text-decoration: none; }

.theme-toggle {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s ease;
}
.theme-toggle:hover { background: var(--bg-mute); border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
[data-theme="light"] .theme-toggle .moon,
:root:not([data-theme]) .theme-toggle .moon { display: block; }
[data-theme="light"] .theme-toggle .sun,
:root:not([data-theme]) .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .moon { display: none; }
  :root:not([data-theme]) .theme-toggle .sun { display: block; }
}

/* Ticker (top optional strip) */
.site-ticker {
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  padding: 6px 24px;
  display: flex;
  gap: 32px;
  overflow: hidden;
  white-space: nowrap;
}
.site-ticker .dot { color: var(--accent-3); }

/* ---------- Hero / Dashboard ---------- */
.hero {
  padding: 60px 0 40px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% -10%, color-mix(in oklch, var(--accent) 20%, transparent), transparent 55%),
    radial-gradient(circle at -10% 40%, color-mix(in oklch, var(--accent-2) 15%, transparent), transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 20px;
  max-width: 800px;
  text-wrap: balance;
}
.hero-title em { font-style: italic; color: var(--accent); font-weight: 500; }
.hero-lead {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--ink-mute);
  max-width: 640px;
  line-height: 1.6;
}

/* Dashboard: 発電量カードのグリッド */
.dashboard {
  margin: 40px 0 20px;
  padding: 28px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.dashboard::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 300px; height: 300px;
  background: radial-gradient(circle, color-mix(in oklch, var(--accent-3) 25%, transparent), transparent 60%);
  transform: translate(30%, -30%);
  pointer-events: none;
}
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  position: relative;
}
.dashboard-header h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.dashboard-header .live {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-2);
  display: flex; align-items: center; gap: 6px;
}
.dashboard-header .live::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  position: relative;
}
.stat {
  padding: 4px 0;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--ink-mute);
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.stat-label svg { width: 14px; height: 14px; color: var(--accent); }
.stat-value {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  display: flex; align-items: baseline; gap: 4px;
}
.stat-value .unit {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-mute);
  font-weight: 400;
}
.stat-trend {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-top: 6px;
}
.stat-trend.up { color: var(--accent-2); }
.stat-trend.down { color: var(--accent); }

/* ---------- Post Grid ---------- */
.section-title {
  display: flex; align-items: center; gap: 16px;
  margin: 60px 0 24px;
}
.section-title h2 {
  margin: 0;
  font-size: 1.5rem;
  font-family: var(--font-serif);
  font-weight: 500;
}
.section-title .rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.section-title .more {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px 24px;
}
.post-card {
  display: flex; flex-direction: column;
  transition: transform .3s ease;
}
.post-card:hover { transform: translateY(-4px); }
.post-card-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  background: var(--bg-mute);
  position: relative;
}
.post-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.05); }
.post-card-meta {
  display: flex; gap: 8px; align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-mute);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.post-card h3 {
  margin: 0 0 10px;
  font-size: 1.3rem;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.3;
}
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--accent); text-decoration: none; }
.post-card-excerpt {
  color: var(--ink-mute);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* Category chip */
.cat-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--bg-mute);
  border: 1px solid var(--line);
}
.cat-chip svg { width: 12px; height: 12px; }
.cat-chip.solar { color: #B4661F; border-color: color-mix(in oklch, #C9782C 40%, var(--line)); }
.cat-chip.battery { color: #4E7A70; border-color: color-mix(in oklch, #4E7A70 40%, var(--line)); }
.cat-chip.ev { color: #5E7CB4; border-color: color-mix(in oklch, #5E7CB4 40%, var(--line)); }
.cat-chip.eco { color: #B48C1F; border-color: color-mix(in oklch, #D4A94A 40%, var(--line)); }
.cat-chip.home { color: #6B8E4E; border-color: color-mix(in oklch, #6B8E4E 40%, var(--line)); }

/* Featured (large) card for the top */
.post-featured {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--line);
}
.post-featured .post-card-thumb {
  aspect-ratio: 16/11;
  margin-bottom: 0;
}
.post-featured h2 {
  margin: 12px 0;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
}
.post-featured h2 a { color: var(--ink); }
.post-featured h2 a:hover { color: var(--accent); text-decoration: none; }
.post-featured-excerpt {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--ink-mute);
  line-height: 1.6;
  margin: 0 0 20px;
}
@media (max-width: 820px) {
  .post-featured { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Author inline (used on featured card & article meta) ---------- */
.author-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--bg-elev);
  font-size: 0.85rem;
  color: var(--ink-mute);
  margin: 6px 0 18px;
  box-shadow: var(--shadow-sm);
}
.author-inline .avatar-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.9rem;
}
.author-inline .by {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.author-inline strong {
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 600;
}
.author-inline .dot { color: var(--ink-faint); }

/* ---------- Article (single) ---------- */
.article {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.article-header { margin-bottom: 40px; }
.article-header .cat-chip { margin-bottom: 16px; }
.article-header h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.15;
  font-weight: 500;
}
.article-meta {
  display: flex; gap: 20px; align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-mute);
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.article-meta .author { display: flex; align-items: center; gap: 8px; }
.article-meta .author img {
  width: 32px; height: 32px; border-radius: 50%;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.85;
}
.article-body p { margin-bottom: 1.4em; }
.article-body h2 {
  position: relative;
  padding-left: 20px;
  margin-top: 2.2em;
}
.article-body h2::before {
  content: "";
  position: absolute;
  left: 0; top: 0.35em;
  width: 4px; height: 0.9em;
  background: var(--accent);
  border-radius: 2px;
}
.article-body img { border-radius: var(--radius-md); margin: 1.6em 0; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body li { margin-bottom: 0.5em; }

/* Heading share button */
.h-share {
  opacity: 0;
  margin-left: 10px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-mute);
  cursor: pointer;
  width: 28px; height: 28px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  vertical-align: middle;
  transition: all .2s ease;
}
h2:hover .h-share, h3:hover .h-share { opacity: 1; }
.h-share:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.h-share svg { width: 14px; height: 14px; }

/* ---------- Energy Card (shortcode / block) ---------- */
.energy-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--bg-elev), color-mix(in oklch, var(--accent-3) 8%, var(--bg-elev)));
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}
.energy-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: color-mix(in oklch, var(--accent) 15%, transparent);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.energy-card-icon svg { width: 24px; height: 24px; }
.energy-card-body .label {
  font-size: 0.85rem;
  color: var(--ink-mute);
  margin-bottom: 4px;
}
.energy-card-body .value {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
}
.energy-card-body .value .unit {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-mute);
  margin-left: 4px;
  font-weight: 400;
}
.energy-card-trend {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 6px;
  background: color-mix(in oklch, var(--accent-2) 12%, transparent);
  color: var(--accent-2);
}
.energy-card-trend.down {
  background: color-mix(in oklch, var(--accent) 12%, transparent);
  color: var(--accent);
}

/* ---------- Spec Table ---------- */
.spec-table-wrap {
  margin: 32px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elev);
}
.spec-table-title {
  padding: 14px 20px;
  background: var(--bg-mute);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}
.spec-table-title svg { width: 16px; height: 16px; color: var(--accent); }
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.spec-table tr:not(:last-child) { border-bottom: 1px solid var(--line); }
.spec-table th, .spec-table td {
  padding: 12px 20px;
  text-align: left;
  vertical-align: top;
}
.spec-table th {
  width: 30%;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--ink-mute);
  background: color-mix(in oklch, var(--bg-mute) 40%, transparent);
}
.spec-table td { color: var(--ink); font-family: var(--font-mono); font-size: 0.9rem; }

/* ---------- Before / After ---------- */
.before-after {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
  margin: 32px 0;
}
.before-after > div {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  border: 1px solid var(--line);
}
.before-after .before { border-left: 3px solid var(--ink-faint); }
.before-after .after { border-left: 3px solid var(--accent-2); }
.before-after .label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.before-after .value {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.before-after .after .value { color: var(--accent-2); }
.before-after .arrow {
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-size: 1.5rem;
}
@media (max-width: 640px) {
  .before-after { grid-template-columns: 1fr; }
  .before-after .arrow { transform: rotate(90deg); }
}

/* ---------- Share Buttons ---------- */
.share-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 30px 0;
}
.share-bar .label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-right: 8px;
}
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  transition: all .2s ease;
  text-decoration: none;
}
.share-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); text-decoration: none; }
.share-btn.x {
  background: var(--accent-x);
  color: var(--bg);
  border-color: var(--accent-x);
}
.share-btn.x:hover { background: var(--ink); color: var(--bg); }
.share-btn svg { width: 14px; height: 14px; }

/* ---------- Sidebar / X timeline widget ---------- */
.with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px;
}
@media (max-width: 960px) {
  .with-sidebar { grid-template-columns: 1fr; }
}
.sidebar { position: sticky; top: 90px; align-self: start; }
.widget {
  margin-bottom: 32px;
  padding: 20px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.widget-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 6px 0; font-size: 0.9rem; }
.widget li a { color: var(--ink); }
.widget li a:hover { color: var(--accent); }
.widget .x-timeline {
  min-height: 240px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: color-mix(in oklch, var(--bg) 70%, var(--ink-mute));
  padding: 60px 24px 30px;
  margin-top: 80px;
}
[data-theme="dark"] .site-footer { background: #0A0906; }
.site-footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
}
@media (max-width: 780px) {
  .site-footer-inner { grid-template-columns: 1fr 1fr; }
}
.site-footer h4 {
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0 0 16px;
  font-weight: 700;
}
.site-footer a { color: color-mix(in oklch, var(--bg) 80%, var(--ink-mute)); }
.site-footer a:hover { color: var(--accent-3); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 4px 0; font-size: 0.9rem; }
.site-footer .brand { max-width: 340px; font-size: 0.9rem; line-height: 1.65; }
.site-footer .brand svg { color: var(--bg); margin-bottom: 16px; height: 36px; }
.site-footer .brand-author {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed rgba(255,255,255,.14);
  font-size: 0.85rem;
  line-height: 1.6;
}
.site-footer .brand-author .by-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--accent-3);
  margin-right: 8px;
  vertical-align: 1px;
}
.site-footer .brand-author strong {
  color: var(--bg);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.site-footer-bottom {
  max-width: var(--container);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: color-mix(in oklch, var(--bg) 50%, var(--ink-mute));
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  transition: all .2s ease;
  text-decoration: none;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); text-decoration: none; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--bg); }

/* ---------- Toast (copy notification) ---------- */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 100;
  font-family: var(--font-sans);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Utilities ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
