:root {
  color-scheme: dark;
  --bg: #080d14;
  --bg-soft: #0d1420;
  --panel: rgba(11, 18, 29, 0.78);
  --panel-strong: rgba(13, 20, 31, 0.94);
  --line: rgba(219, 180, 112, 0.26);
  --line-cool: rgba(169, 186, 212, 0.14);
  --gold: #d7ae6b;
  --gold-soft: #f0d8aa;
  --ink: #111a2a;
  --text: #f6efe2;
  --muted: #b7bdc7;
  --quiet: #828b9a;
  --accent: #a83d32;
  --violet: #7e75ad;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.5);
  --radius: 8px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 18%, rgba(126, 117, 173, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(168, 61, 50, 0.1), transparent 30rem),
    var(--bg);
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

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

button,
select {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  overflow: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 20;
  display: flex;
  width: min(1180px, calc(100% - 32px));
  height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 0 0 var(--radius) var(--radius);
  transform: translateX(-50%);
  transition: 180ms ease;
}

.site-header[data-elevated="true"] {
  border-color: var(--line);
  background: rgba(8, 13, 20, 0.82);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border: 3px solid var(--gold);
  border-right-color: transparent;
  border-bottom-color: rgba(215, 174, 107, 0.45);
  border-radius: 50%;
  box-shadow: inset 0 0 14px rgba(215, 174, 107, 0.28);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.25rem;
  letter-spacing: 0;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font: 0.67rem/1.2 Inter, system-ui, sans-serif;
  text-transform: uppercase;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font: 0.78rem/1 Inter, system-ui, sans-serif;
}

.desktop-nav a {
  transition: color 160ms ease;
}

.desktop-nav a:hover {
  color: var(--gold-soft);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 1px;
  background: currentColor;
}

.menu-button span + span {
  margin-top: 6px;
}

.mobile-nav {
  position: fixed;
  top: 84px;
  right: 16px;
  z-index: 30;
  display: grid;
  gap: 6px;
  width: min(260px, calc(100% - 32px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.mobile-nav a {
  padding: 12px;
  border-radius: 6px;
  color: var(--muted);
  font: 0.92rem/1 Inter, system-ui, sans-serif;
}

.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--gold-soft);
}

.hero {
  position: relative;
  display: grid;
  min-height: 760px;
  align-items: center;
  padding: 120px max(24px, calc((100vw - 1180px) / 2)) 74px;
  border-bottom: 1px solid var(--line);
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: -2;
  background-image: url("/assets/ai-ink-hero.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero-overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 13, 20, 0.98) 0%, rgba(8, 13, 20, 0.7) 42%, rgba(8, 13, 20, 0.28) 100%),
    linear-gradient(0deg, rgba(8, 13, 20, 0.96) 0%, transparent 34%),
    radial-gradient(circle at 78% 32%, rgba(215, 174, 107, 0.2), transparent 24rem);
}

.hero-content {
  width: min(650px, 100%);
  padding-top: 42px;
}

.kicker {
  margin: 0 0 18px;
  color: var(--gold);
  font: 0.77rem/1.5 Inter, system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.7rem);
  font-weight: 500;
  line-height: 1.08;
}

.hero-copy {
  width: min(560px, 100%);
  margin: 28px 0 0;
  color: #d4d9e3;
  font: 1rem/2 Inter, "Yu Gothic", system-ui, sans-serif;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.primary-action,
.ghost-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 999px;
  font: 0.88rem/1 Inter, system-ui, sans-serif;
}

.primary-action {
  background: linear-gradient(135deg, #e6c58e, #b98545);
  color: #12100d;
}

.ghost-action {
  border: 1px solid var(--line);
  color: var(--gold-soft);
}

.hero-panel {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 76px;
  width: min(310px, calc(100% - 48px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 13, 20, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.panel-label,
.section-heading span {
  color: var(--gold);
  font: 0.72rem/1 Inter, system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-panel strong {
  display: block;
  margin-top: 12px;
  font-size: 1.28rem;
  font-weight: 500;
}

.hero-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  font: 0.86rem/1.7 Inter, system-ui, sans-serif;
}

.ticker-band {
  overflow: hidden;
  border-bottom: 1px solid var(--line-cool);
  background: rgba(5, 9, 15, 0.72);
}

.ticker-track {
  display: flex;
  width: max-content;
  min-height: 54px;
  align-items: center;
  gap: 18px;
  padding-inline: 24px;
  animation: drift 42s linear infinite;
}

.ticker-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font: 0.84rem/1 Inter, system-ui, sans-serif;
  white-space: nowrap;
}

.ticker-pill::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

@keyframes drift {
  to {
    transform: translateX(-50%);
  }
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 48px;
}

.article-card,
.side-card,
.archive-card,
.automation-section {
  border: 1px solid var(--line-cool);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(13, 20, 31, 0.88), rgba(9, 15, 24, 0.82));
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

.article-card {
  padding: clamp(22px, 4vw, 48px);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line-cool);
  padding-bottom: 14px;
}

.section-heading time,
.section-heading p {
  margin: 0;
  color: var(--quiet);
  font: 0.82rem/1.5 Inter, system-ui, sans-serif;
}

.article-card h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 500;
  line-height: 1.18;
}

.lead {
  margin: 22px 0 0;
  color: #d8dde7;
  font: 1.04rem/2 Inter, "Yu Gothic", system-ui, sans-serif;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.meta-pill {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid rgba(215, 174, 107, 0.22);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  font: 0.78rem/1 Inter, system-ui, sans-serif;
}

.reader-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 34px;
  padding: 14px;
  border: 1px solid var(--line-cool);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.reader-tools label {
  color: var(--quiet);
  font: 0.78rem/1 Inter, system-ui, sans-serif;
}

select {
  min-width: min(320px, 100%);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0b121d;
  color: var(--text);
  padding: 10px 12px;
}

.article-body {
  display: grid;
  gap: 34px;
}

.article-body h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  color: var(--gold-soft);
  font-size: 1.18rem;
  font-weight: 500;
}

.article-body h3::before {
  width: 22px;
  height: 1px;
  background: var(--accent);
  content: "";
}

.article-body p,
.detail-item p,
.clean-list,
.glossary,
.sources {
  color: #c8ced9;
  font: 0.98rem/2 Inter, "Yu Gothic", system-ui, sans-serif;
}

.detail-list {
  display: grid;
  gap: 18px;
}

.detail-item {
  padding: 18px;
  border: 1px solid var(--line-cool);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.detail-item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 600;
}

.detail-item p {
  margin: 0;
}

.briefing-stack {
  display: grid;
  align-content: start;
  gap: 18px;
}

.side-card {
  padding: 22px;
}

.clean-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.clean-list li {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.glossary {
  display: grid;
  gap: 14px;
  margin: 0;
}

.glossary dt {
  color: var(--text);
  font-weight: 700;
}

.glossary dd {
  margin: 4px 0 0;
  color: var(--muted);
}

.sources {
  display: grid;
  gap: 12px;
}

.source-link {
  display: block;
  padding: 12px;
  border: 1px solid var(--line-cool);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 160ms ease, transform 160ms ease;
}

.source-link:hover {
  border-color: var(--line);
  transform: translateY(-1px);
}

.source-link strong,
.source-link span {
  display: block;
}

.source-link strong {
  color: var(--text);
  font-size: 0.88rem;
}

.source-link span {
  margin-top: 6px;
  color: var(--quiet);
  font-size: 0.75rem;
}

.archive-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.section-heading.wide {
  align-items: end;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.archive-card {
  display: grid;
  min-height: 230px;
  align-content: space-between;
  padding: 20px;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease;
}

.archive-card:hover {
  border-color: var(--line);
  transform: translateY(-2px);
}

.archive-card time {
  color: var(--gold);
  font: 0.76rem/1 Inter, system-ui, sans-serif;
}

.archive-card h3 {
  margin: 16px 0 10px;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.45;
}

.archive-card p {
  margin: 0;
  color: var(--muted);
  font: 0.88rem/1.7 Inter, "Yu Gothic", system-ui, sans-serif;
}

.automation-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 80px;
  padding: clamp(22px, 4vw, 42px);
  border-color: var(--line);
  background:
    linear-gradient(135deg, rgba(215, 174, 107, 0.1), transparent 34%),
    rgba(12, 18, 29, 0.88);
}

.automation-section h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.7rem);
  font-weight: 500;
  line-height: 1.3;
}

.automation-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.automation-steps div {
  padding: 16px;
  border: 1px solid var(--line-cool);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.automation-steps span {
  color: var(--gold);
  font: 0.78rem/1 Inter, system-ui, sans-serif;
}

.automation-steps strong {
  display: block;
  margin-top: 16px;
}

.automation-steps p {
  margin: 10px 0 0;
  color: var(--muted);
  font: 0.86rem/1.75 Inter, "Yu Gothic", system-ui, sans-serif;
}

@media (max-width: 960px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: grid;
  }

  .content-grid,
  .automation-section {
    grid-template-columns: 1fr;
  }

  .archive-grid,
  .automation-steps {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 720px;
  }

  .hero-panel {
    position: static;
    margin-top: 44px;
  }
}

@media (max-width: 560px) {
  .site-header {
    width: calc(100% - 20px);
    height: 68px;
    padding: 0 12px;
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: 690px;
    padding: 102px 16px 44px;
  }

  .hero-actions a {
    width: 100%;
  }

  .content-grid,
  .archive-section,
  .automation-section {
    width: calc(100% - 20px);
  }

  .article-card,
  .side-card {
    padding: 18px;
  }

  .section-heading {
    display: grid;
    justify-content: stretch;
  }
}
