/* ── Reset & variables ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:          #FF4433;
  --orange:       #FF6C1A;
  --grad:         linear-gradient(135deg, #FF4433 0%, #FF6C1A 100%);
  --grad-subtle:  linear-gradient(135deg, #fff5f3 0%, #fff8f2 100%);

  --bg:           #f5f6f8;
  --surface:      #ffffff;
  --border:       #e8eaed;
  --border-soft:  #f0f1f4;

  --text:         #111827;
  --text-muted:   #6b7280;
  --text-light:   #9ca3af;

  --sidebar-w:    230px;
  --header-h:     64px;
  --radius:       12px;
  --radius-sm:    8px;

  --shadow-xs:    0 1px 2px rgba(0,0,0,.06);
  --shadow-sm:    0 2px 6px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:    0 6px 20px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-glow:  0 4px 20px rgba(255,68,51,.18);

  --font: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Base ──────────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; transition: color .15s; }
a:hover { color: var(--orange); }

/* ── Header ────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}
.logo-link:hover { text-decoration: none; }
.logo-link:hover .site-name { opacity: .85; }

.logo-img {
  height: 38px;
  width:  38px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
}

.site-branding {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}

.site-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.4px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity .15s;
}

.site-desc {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: .1px;
}

.valuelens-link {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.valuelens-link:hover {
  border-color: var(--red);
  background: var(--grad-subtle);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.valuelens-name {
  font-size: 13.5px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.2px;
}
.valuelens-desc {
  font-size: 10.5px;
  color: var(--text-light);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .valuelens-desc { display: none; }
  .valuelens-link { padding: 5px 10px; }
  .valuelens-name { font-size: 12.5px; }
}

/* ── Page layout ───────────────────────────────────────────────────────────── */
.page-layout {
  flex: 1;
  display: flex;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 28px;
  gap: 36px;
}

/* ── Sidebar ───────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  padding-top: 32px;
}

.sidebar-inner {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
  padding-right: 4px;
  padding-bottom: 32px;
}

/* thin custom scrollbar */
.sidebar-inner::-webkit-scrollbar { width: 3px; }
.sidebar-inner::-webkit-scrollbar-track { background: transparent; }
.sidebar-inner::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.sidebar-inner::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

.sidebar-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-light);
  margin-bottom: 10px;
  padding-left: 4px;
}

.archive-list { list-style: none; display: flex; flex-direction: column; gap: 1px; }

.archive-list li a {
  display: block;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  transition: background .12s, color .12s, box-shadow .12s;
  white-space: nowrap;
}

.archive-list li a:hover {
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.archive-list li.active a {
  background: var(--grad);
  color: #fff;
  font-weight: 500;
  box-shadow: var(--shadow-glow);
  pointer-events: none;
}

/* ── Main content ──────────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 36px 0 48px;
}

.content-inner { max-width: 800px; }

/* ── Date heading ──────────────────────────────────────────────────────────── */
.date-heading {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.6px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.2;
}

.intro {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-soft);
}

/* ── Section jump nav ─────────────────────────────────────────────────────── */
.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-soft);
}

.section-nav a {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: #374151;
  background: var(--surface);
  white-space: nowrap;
  transition: all .15s;
}

.section-nav a:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--grad-subtle);
  box-shadow: var(--shadow-xs);
  text-decoration: none;
}

/* ── News sections ─────────────────────────────────────────────────────────── */
.news-section { margin-bottom: 44px; }

.section-heading {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #fff;
  background: var(--grad);
  padding: 5px 14px 5px 12px;
  border-radius: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-glow);
}

/* ── News items ────────────────────────────────────────────────────────────── */
.news-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
  transition: box-shadow .18s, transform .18s, border-color .18s;
  position: relative;
}

.news-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--grad);
  opacity: 0;
  transition: opacity .18s;
}

.news-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: transparent;
}

.news-item:hover::before { opacity: 1; }

.news-title {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.55;
  margin-bottom: 9px;
  color: var(--text);
}

.news-title a {
  color: var(--text);
  text-decoration: none;
  transition: color .15s;
}

.news-title a:hover { color: var(--red); }

/* external link arrow */
.news-title a::after {
  content: '↗';
  display: inline-block;
  font-size: 10px;
  font-weight: 400;
  color: var(--red);
  margin-left: 5px;
  opacity: .65;
  vertical-align: super;
  transition: opacity .15s, transform .15s;
}

.news-title a:hover::after { opacity: 1; transform: translate(1px, -1px); }

.news-body {
  font-size: 13.5px;
  color: #1f2937;
  line-height: 1.8;
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 22px 28px;
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: .2px;
}

.footer-inner { max-width: 1280px; margin: 0 auto; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .page-layout {
    flex-direction: column;
    padding: 0 16px;
    gap: 0;
  }

  .sidebar {
    width: 100%;
    padding-top: 20px;
    order: 2;
    border-top: 1px solid var(--border-soft);
    margin-top: 24px;
  }

  .sidebar-inner {
    position: static;
    max-height: none;
    padding-right: 0;
  }

  .archive-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .archive-list li a {
    font-size: 12px;
    padding: 5px 10px;
  }

  .main-content {
    order: 1;
    padding: 24px 0;
  }

  .date-heading { font-size: 22px; }
  .news-item { padding: 16px 18px; }
  .header-inner { padding: 0 16px; }
  .site-desc { display: none; }
  .site-name { font-size: 17px; }
}

@media (max-width: 480px) {
  .news-title { font-size: 14.5px; }
  .news-body  { font-size: 13px; }
}
