:root {
  --ink: #17140f;
  --muted: #6c6258;
  --paper: #fff8e6;
  --cream: #fffdf6;
  --line: rgba(23, 20, 15, 0.14);
  --sun: #ffd928;
  --fire: #ef3b32;
  --blue: #2458d3;
  --green: #15915a;
  --shadow: 0 14px 36px rgba(23, 20, 15, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  overflow-x: hidden;
}

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

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
dl {
  margin-top: 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 248, 230, 0.94);
  backdrop-filter: blur(14px);
}

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

.brand img {
  width: 46px;
  height: 46px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.15;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 800;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 999px;
}

.nav-links a:hover {
  background: rgba(255, 217, 40, 0.46);
}

.hero,
.dashboard,
.articles-section,
.research-template,
.archive-band,
.broker-band,
.policy-band,
.site-footer {
  padding: 56px 32px;
}

.hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 217, 40, 0.55), rgba(255, 255, 255, 0.3)),
    var(--paper);
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  gap: 28px;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
}

.hero-copy,
.hero-panel,
.chart-panel,
.report-card,
.post-card,
.broker-card {
  min-width: 0;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.hero h1 {
  max-width: 700px;
  margin-bottom: 18px;
  font-size: 3.5rem;
  line-height: 1.08;
}

.hero-lead {
  max-width: 680px;
  margin-bottom: 24px;
  color: #3b332b;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.85;
}

.hero-actions,
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
.tab,
.text-link,
.broker-card {
  border: 2px solid var(--ink);
  border-radius: 8px;
  font: inherit;
  font-weight: 900;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
}

.button:hover,
.tab:hover,
.text-link:hover,
.broker-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 0 rgba(23, 20, 15, 0.12);
}

.primary {
  background: var(--ink);
  color: white;
}

.secondary,
.text-link {
  background: var(--cream);
}

.hero-panel,
.reading-path a,
.stat-card,
.chart-panel,
.report-card,
.post-card,
.template-grid article,
.archive-table,
.broker-card,
.policy-band {
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--cream);
  box-shadow: var(--shadow);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.hero-panel::before {
  position: absolute;
  inset: 12px 12px auto auto;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(255, 217, 40, 0.28);
  content: "";
}

.hero-mascot {
  position: relative;
  display: grid;
  min-height: 218px;
  place-items: center;
  margin: -4px 0 14px;
}

.hero-mascot img {
  position: relative;
  z-index: 2;
  width: min(220px, 68%);
  filter: drop-shadow(0 18px 18px rgba(23, 20, 15, 0.22));
  transform-origin: center bottom;
  animation: mascotFlex 2.8s ease-in-out infinite;
}

.motion-ring {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 1;
  width: 170px;
  aspect-ratio: 1;
  border: 2px solid rgba(23, 20, 15, 0.22);
  border-radius: 50%;
  background: rgba(255, 217, 40, 0.22);
  transform: translate(-50%, -50%);
  animation: ringPulse 2.8s ease-in-out infinite;
}

.ring-two {
  width: 220px;
  background: rgba(239, 59, 50, 0.08);
  animation-delay: 0.42s;
}

.mascot-badge {
  position: absolute;
  z-index: 3;
  padding: 7px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 7px 0 rgba(23, 20, 15, 0.12);
  animation: badgePop 2.8s ease-in-out infinite;
}

.badge-live {
  top: 28px;
  left: 24px;
  background: var(--ink);
  color: white;
}

.badge-profit {
  right: 26px;
  bottom: 34px;
  background: var(--sun);
  animation-delay: 0.28s;
}

.hero-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-panel-head span,
.stat-card span,
.stat-card small,
.post-kicker,
.broker-card span,
.broker-card small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.hero-panel-head strong {
  display: block;
  margin-top: 4px;
  font-size: 1.2rem;
}

.metric-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.metric-list div,
.report-card dl div {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.metric-list div:last-child,
.report-card dl div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.metric-list dt,
.report-card dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.metric-list dd,
.report-card dd {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 900;
}

.hero-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.7;
}

.positive {
  color: #0b7d4a;
}

.negative {
  color: #c82e27;
}

.reading-path {
  display: grid;
  grid-template-columns: 1.35fr repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 32px 44px;
}

.reading-path a {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 178px;
  padding: 20px;
}

.reading-path span {
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(36, 88, 211, 0.12);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
}

.reading-path strong {
  font-size: 1.35rem;
  line-height: 1.25;
}

.reading-path p {
  margin-bottom: 0;
  color: #3c342c;
  font-weight: 700;
  line-height: 1.65;
}

.reading-path small {
  color: var(--muted);
  font-weight: 900;
}

.feature-story {
  background: var(--ink) !important;
  color: white;
}

.feature-story span {
  background: var(--sun);
  color: var(--ink);
}

.feature-story p,
.feature-story small {
  color: rgba(255, 255, 255, 0.78);
}

.section-heading {
  max-width: 760px;
  margin: 0 0 22px;
}

.section-heading.split {
  display: flex;
  max-width: 1120px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2,
.broker-band h2,
.policy-band h2 {
  margin-bottom: 8px;
  font-size: 2.2rem;
  line-height: 1.18;
}

.section-heading p:not(.eyebrow),
.broker-band p,
.policy-band p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.75;
}

.dashboard > .section-heading,
.stats-grid,
.performance-grid,
.articles-section > .section-heading,
.filter-tabs,
.article-list,
.research-template > .section-heading,
.template-grid,
.archive-band > .section-heading,
.archive-table,
.broker-band,
.policy-band {
  max-width: 1120px;
  margin-right: auto;
  margin-left: auto;
}

.report-card h3,
.chart-panel h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
}

.dashboard {
  background: var(--paper);
}

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

.stat-card {
  min-height: 132px;
  padding: 16px;
}

.stat-card.highlight {
  background: #fff4a6;
}

.stat-card strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 1.55rem;
  line-height: 1.1;
}

.performance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  margin-top: 16px;
}

.chart-panel,
.report-card {
  padding: 18px;
}

.chart-panel {
  background: #17140f;
  color: white;
}

.chart-panel .eyebrow {
  color: var(--sun);
}

.chart-panel canvas {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--cream);
}

.report-card dl {
  display: grid;
  gap: 12px;
  margin-bottom: 0;
}

.articles-section {
  border-top: 1px solid var(--line);
  background: #fffdf6;
}

.tab {
  cursor: pointer;
  padding: 9px 13px;
  background: white;
}

.tab.active {
  background: var(--fire);
  color: white;
}

.article-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.post-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px;
}

.post-card img {
  width: 76px;
  height: 76px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  object-fit: contain;
}

.post-card h3 {
  margin: 6px 0 8px;
  font-size: 1.28rem;
}

.post-card p {
  margin-bottom: 10px;
  color: #3c342c;
  font-weight: 700;
  line-height: 1.7;
}

.post-card a {
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 900;
}

.research-template {
  border-top: 1px solid var(--line);
  background: #eef4ff;
}

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

.template-grid article {
  min-height: 190px;
  padding: 16px;
}

.template-grid span {
  color: var(--blue);
  font-weight: 900;
}

.template-grid h3 {
  margin: 8px 0;
  font-size: 1.2rem;
}

.template-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.7;
}

.archive-band {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.archive-table {
  display: grid;
  overflow: hidden;
}

.archive-table div {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.4fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.archive-table div:last-child {
  border-bottom: 0;
}

.archive-table span {
  font-weight: 900;
}

.archive-table em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.archive-table a {
  color: var(--blue);
  font-weight: 900;
}

.broker-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: center;
  border-top: 1px solid var(--line);
  background: #e9f7ef;
}

.broker-card {
  display: grid;
  gap: 8px;
  min-height: 138px;
  padding: 18px;
  background: #101820;
  color: white;
}

.broker-card span,
.broker-card small {
  color: rgba(255, 255, 255, 0.72);
}

.broker-card strong {
  font-size: 1.35rem;
}

.policy-band {
  margin-top: 0;
  padding: 24px;
}

.site-footer {
  display: grid;
  gap: 8px;
  background: var(--ink);
  color: white;
}

.site-footer p {
  max-width: 860px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.not-found {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 36px;
  padding: 56px 32px;
  background: var(--paper);
}

.not-found img {
  width: 220px;
}

.not-found h1 {
  max-width: 720px;
  font-size: 3rem;
}

.not-found p:not(.eyebrow) {
  max-width: 620px;
  margin-bottom: 24px;
  font-size: 1.05rem;
  line-height: 1.8;
  font-weight: 700;
}

.is-hidden {
  display: none;
}

@keyframes mascotFlex {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg) scale(1);
  }
  38% {
    transform: translateY(-10px) rotate(1.5deg) scale(1.045);
  }
  62% {
    transform: translateY(-4px) rotate(-0.8deg) scale(0.99);
  }
}

@keyframes ringPulse {
  0%,
  100% {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(0.92);
  }
  52% {
    opacity: 0.18;
    transform: translate(-50%, -50%) scale(1.12);
  }
}

@keyframes badgePop {
  0%,
  100% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mascot img,
  .motion-ring,
  .mascot-badge {
    animation: none;
  }
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero-shell,
  .performance-grid,
  .broker-band,
  .not-found {
    grid-template-columns: 1fr;
  }

  .reading-path,
  .stats-grid,
  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero h1 {
    font-size: 2.75rem;
  }
}

@media (max-width: 980px) {
  .site-header,
  .hero,
  .dashboard,
  .articles-section,
  .research-template,
  .archive-band,
  .broker-band,
  .policy-band,
  .site-footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero h1 {
    font-size: 2rem;
    line-height: 1.15;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .metric-list dd {
    font-size: 1rem;
  }

  .hero-mascot {
    min-height: 208px;
  }

  .hero-mascot img {
    width: 188px;
  }

  .motion-ring {
    width: 152px;
  }

  .ring-two {
    width: 204px;
  }

  .badge-profit {
    right: auto;
    left: calc(50% + 68px);
    bottom: 38px;
  }

  .section-heading h2,
  .broker-band h2,
  .policy-band h2 {
    font-size: 1.75rem;
  }

  .section-heading.split {
    align-items: flex-start;
    flex-direction: column;
  }

  .reading-path,
  .stats-grid,
  .template-grid {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero-shell,
  .performance-grid,
  .article-list,
  .archive-table,
  .broker-band,
  .policy-band {
    width: 100%;
    max-width: calc(100vw - 36px);
  }

  .hero-copy,
  .hero-panel,
  .reading-path a,
  .stat-card,
  .chart-panel,
  .report-card,
  .post-card,
  .template-grid article,
  .archive-table,
  .broker-card {
    max-width: 100%;
  }

  .hero h1,
  .hero-lead,
  .hero-panel p {
    word-break: break-all;
  }

  .post-card {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
  }

  .post-card img {
    width: 58px;
    height: 58px;
  }

  .archive-table div {
    grid-template-columns: 1fr;
  }
}
