/*
 * Kabukei visual system
 * Presentation only: this layer must not redefine analytical values or data grain.
 */

:root {
  color-scheme: light;
  --bg: #f2f5f3;
  --surface: #ffffff;
  --surface2: #f6f8f7;
  --surface-raised: #ffffff;
  --ink: #14211f;
  --muted: #64736f;
  --line: #dce5e1;
  --line-strong: #c7d5cf;
  --brand: #115e59;
  --brand2: #14877c;
  --brand-soft: #dff2ed;
  --accent: #c4862f;
  --accent-soft: #faefd9;
  --good: #11815e;
  --bad: #c44b4b;
  --blue: #3d78b8;
  --shadow-xs: 0 1px 2px rgba(19, 45, 40, .05);
  --shadow-sm: 0 8px 24px rgba(19, 45, 40, .07);
  --shadow: 0 18px 54px rgba(19, 45, 40, .10);
  --shadow-deep: 0 28px 80px rgba(7, 35, 33, .18);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --sans: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --chart-1: #13998b;
  --chart-2: #d49a3d;
  --chart-3: #4d83c2;
  --chart-4: #d15d57;
  --chart-5: #8a6cab;
  --chart-6: #718b51;
}

html[data-theme="moon"] {
  color-scheme: dark;
  --bg: #09111e;
  --surface: #111d2c;
  --surface2: #162435;
  --surface-raised: #18283a;
  --ink: #f0f5f7;
  --muted: #9dafbc;
  --line: #293b50;
  --line-strong: #3a5068;
  --brand: #72d4c5;
  --brand2: #8fe0d2;
  --brand-soft: #163b3b;
  --accent: #f0bd66;
  --accent-soft: #3a3021;
  --good: #72d6a7;
  --bad: #ff8e8a;
  --blue: #86b9f0;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .22);
  --shadow-sm: 0 12px 28px rgba(0, 0, 0, .22);
  --shadow: 0 22px 62px rgba(0, 0, 0, .30);
  --shadow-deep: 0 32px 90px rgba(0, 0, 0, .42);
  --chart-1: #55d5c3;
  --chart-2: #f0bd66;
  --chart-3: #82b7ef;
  --chart-4: #ff8e8a;
  --chart-5: #b99bd6;
  --chart-6: #a7c378;
}

html {
  background: var(--bg);
  scroll-padding-top: 92px;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 9% 4%, color-mix(in srgb, var(--brand2) 10%, transparent), transparent 27rem),
    radial-gradient(circle at 92% 18%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 25rem),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 42%, var(--bg)), var(--bg) 36rem);
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: .01em;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .34;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath d='M0 43.5h44M43.5 0v44' fill='none' stroke='%23869d96' stroke-opacity='.12'/%3E%3C/svg%3E");
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

::selection {
  background: color-mix(in srgb, var(--brand) 26%, transparent);
}

:where(a, button, select, input, summary):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 38%, transparent);
  outline-offset: 3px;
}

button,
select,
input {
  accent-color: var(--brand2);
}

.site-header {
  height: 74px;
  padding-inline: max(24px, calc((100% - 1280px) / 2));
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .45), 0 9px 30px rgba(25, 55, 50, .04);
  backdrop-filter: blur(22px) saturate(150%);
}

.brand {
  gap: 12px;
}

.brand-seal {
  position: relative;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, white 30%, transparent);
  border-radius: 12px;
  background: linear-gradient(145deg, var(--brand2), color-mix(in srgb, var(--brand) 72%, #0d2e2b));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 28%, transparent), inset 0 1px 0 rgba(255, 255, 255, .24);
}

.brand-seal::after {
  content: "";
  position: absolute;
  inset: -12px 15px 17px -12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .17);
}

.brand b {
  font-size: 19px;
  letter-spacing: .12em;
}

.brand small {
  margin-top: 5px;
  font-size: 7px;
  letter-spacing: .28em;
}

.header-meta {
  gap: 12px;
}

.header-meta select,
.selection-toolbar select,
.condition-control-card select,
.ai-shadow-controls select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-color: var(--line);
  background: var(--surface-raised);
  box-shadow: var(--shadow-xs);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px) rotate(8deg);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  box-shadow: var(--shadow-sm);
}

main {
  max-width: 1280px;
  padding: 34px 28px 88px;
}

.kicker,
.eyebrow {
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h1,
.section-head h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: .025em;
}

.section-head em {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

/* Home — stronger information hierarchy. */
.decision-hero {
  isolation: isolate;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 28px;
  background:
    radial-gradient(circle at 81% 23%, rgba(134, 218, 203, .17), transparent 17rem),
    radial-gradient(circle at 10% 108%, rgba(214, 156, 68, .18), transparent 21rem),
    linear-gradient(125deg, #082b34 0%, #0a4f55 50%, #163f52 100%);
  box-shadow: var(--shadow-deep);
}

.decision-hero::before {
  right: 9%;
  top: 54px;
  width: 190px;
  height: 190px;
  opacity: .92;
  filter: blur(.2px);
}

.decision-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .42;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(120deg, black, transparent 78%);
}

.home-page .hero-copy {
  padding: 66px 62px 60px;
}

.home-page .hero-copy h1 {
  margin-block: 14px 18px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.27;
  text-shadow: 0 6px 28px rgba(0, 0, 0, .18);
}

.home-page .hero-copy p {
  max-width: 580px;
  font-size: 13px;
  line-height: 1.9;
}

.hero-actions a {
  min-height: 48px;
  padding-inline: 18px;
  border-radius: 12px;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.hero-actions a:first-child {
  background: rgba(255, 255, 255, .15);
  box-shadow: inset 0 1px rgba(255, 255, 255, .2), 0 12px 30px rgba(0, 0, 0, .16);
}

.hero-actions a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .2);
}

.home-page .market-temperature {
  margin: 24px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  background: rgba(4, 24, 32, .65);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 22px 52px rgba(0, 0, 0, .18);
  backdrop-filter: blur(18px) saturate(125%);
}

.market-stance {
  padding: 13px 14px;
  border-radius: 0 10px 10px 0;
}

.decision-strip {
  gap: 10px;
  margin-top: 14px;
}

.decision-strip article {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--surface-raised), color-mix(in srgb, var(--surface2) 88%, var(--brand-soft)));
  box-shadow: var(--shadow-sm);
}

.decision-strip article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--brand2);
}

.decision-strip article:nth-child(2)::before { background: var(--blue); }
.decision-strip article:nth-child(3)::before { background: var(--accent); }
.decision-strip article:nth-child(4)::before { background: var(--good); }

.decision-strip b {
  margin-block: 5px 2px;
  font-size: 20px;
}

.decision-strip .decision-kpi-card {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg, var(--surface-raised), color-mix(in srgb, var(--surface2) 88%, var(--brand-soft)));
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.decision-strip .decision-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--brand2);
}

.decision-strip .decision-kpi-card:nth-child(2)::before { background: var(--blue); }
.decision-strip .decision-kpi-card:nth-child(3)::before { background: var(--accent); }
.decision-strip .decision-kpi-card:nth-child(4)::before { background: var(--good); }
.decision-strip .decision-kpi-card:hover { transform: translateY(-2px); border-color: var(--brand2); box-shadow: var(--shadow); }
.decision-strip .decision-kpi-card > span,
.decision-strip .decision-kpi-card > b,
.decision-strip .decision-kpi-card > small { display: block; }
.decision-strip .decision-kpi-card > i { position: absolute; right: 12px; top: 10px; color: var(--brand); font-size: 8px; font-style: normal; font-weight: 800; }
.decision-strip .decision-kpi-card.underperforming { border-color: color-mix(in srgb, var(--bad) 42%, var(--line)); }

.question-nav,
.short-term-overview,
.monthly-overview-card,
.reports-section,
.answer-card,
.trade-card,
.selection-row,
.secondary-drawer,
.notice-drawer,
.important-warnings {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.question-nav {
  margin-top: 14px;
  padding: 19px 20px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(12px);
}

.question-card {
  position: relative;
  min-height: 96px;
  overflow: hidden;
  padding: 14px 15px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--surface2), color-mix(in srgb, var(--surface) 92%, var(--brand-soft)));
}

.question-card::after {
  content: "→";
  position: absolute;
  right: 12px;
  top: 10px;
  color: var(--brand);
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity .2s ease, transform .2s ease;
}

.question-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
  box-shadow: var(--shadow-sm);
}

.question-card:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.short-term-overview {
  border-color: color-mix(in srgb, var(--brand2) 24%, var(--line));
  background: linear-gradient(145deg, color-mix(in srgb, var(--brand-soft) 55%, var(--surface)), var(--surface));
}

.short-term-overview-card,
.report-card,
.selection-row,
.ai-stock-card,
.ai-comparison-grid article {
  border-radius: 13px;
  box-shadow: var(--shadow-xs);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.short-term-overview-card:hover,
.report-card:hover,
.selection-row:hover,
.ai-stock-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
  box-shadow: var(--shadow-sm);
}

.selection-toolbar,
.condition-control-card,
.ai-shadow-controls {
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(12px);
}

.selection-filters button,
.condition-switch button,
.forecast-switch button,
.sector-controls button,
.ai-horizon-controls button {
  border-radius: 9px;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.selection-filters button.active,
.condition-switch button.active,
.forecast-switch button.active,
.sector-controls button.active,
.ai-horizon-controls button.active {
  box-shadow: 0 7px 18px color-mix(in srgb, var(--brand) 22%, transparent);
}

/* Analysis — app-like navigation and calmer cards. */
.analysis-page main {
  max-width: 1320px;
  padding-top: 22px;
}

.analysis-page .analysis-tabs {
  top: 86px;
  z-index: 35;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 22px;
  padding: 6px;
  overflow-x: auto;
  flex-wrap: nowrap;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px) saturate(145%);
}

.analysis-page .analysis-tabs a {
  min-height: 38px;
  padding: 9px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  white-space: nowrap;
}

.analysis-page .analysis-tabs a::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--line-strong);
  vertical-align: 1px;
}

.analysis-page .analysis-tabs a.active {
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 76%, var(--blue)));
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 25%, transparent);
}

.analysis-page .analysis-tabs a.active::before {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
}

.analysis-page .analysis-view {
  scroll-margin-top: 154px;
}

.analysis-view.revealed,
.analysis-view:not([hidden]) {
  animation: view-enter .42s cubic-bezier(.2, .75, .2, 1) both;
}

.analysis-summary-card,
.condition-card,
.sector-card,
.sector-gap,
.sector-performance,
.sector-rotation,
.sector-concentration,
.validation-four-groups,
.performance-jump,
.analysis-advanced-drawer,
.research-decision-card,
.adjustment-card,
.insight-grid article,
.monthly-report-hero,
.monthly-population > *,
.monthly-horizons > * {
  border-color: var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 96%, var(--brand-soft));
  box-shadow: var(--shadow-sm);
}

.market-grid div,
.metrics div,
.holdings-summary div,
.condition-summary-grid > *,
.condition-summary > * {
  border-radius: 13px;
  box-shadow: var(--shadow-xs);
}

.market-grid div {
  position: relative;
  overflow: hidden;
}

.market-grid div::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand2), transparent);
}

.factor-list article {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
}

.analysis-advanced-drawer > summary {
  min-height: 58px;
}

.analysis-advanced-drawer[open] > summary {
  background: color-mix(in srgb, var(--brand-soft) 48%, transparent);
  border-radius: var(--radius) var(--radius) 0 0;
}

/* Charts and quantitative surfaces. */
.market-forecast-panel,
.flow-chart-card,
.chart-wrap {
  overflow: hidden;
  border-color: var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, var(--surface-raised), var(--surface2));
  box-shadow: var(--shadow-sm);
}

.market-forecast-chart,
.flow-chart-card canvas,
.chart-wrap {
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--brand2) 7%, transparent), transparent 44%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, transparent), var(--surface2));
}

.market-forecast-chart {
  height: 410px;
  padding: 10px;
  border-radius: 14px;
}

.forecast-legend {
  gap: 9px 18px;
  padding: 8px 4px 2px;
}

.forecast-legend span::before {
  border-radius: 999px;
}

.flow-chart-grid {
  gap: 16px;
}

.flow-chart-card {
  padding: 24px;
}

.flow-chart-card canvas {
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 13px;
}

.flow-chart-legend span {
  border-radius: 10px;
  box-shadow: var(--shadow-xs);
}

.donut-wrap canvas {
  filter: none;
}

.sector-legend div {
  padding: 4px 6px;
  border-radius: 7px;
}

.sector-legend div:hover {
  background: var(--surface2);
}

.sector-gap-row .bar,
.concentration-meter i {
  height: 8px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08);
}

.sector-gap-row .bar i {
  background: linear-gradient(90deg, color-mix(in srgb, var(--good) 75%, white), var(--good));
}

.sector-gap-row.negative .bar i {
  background: linear-gradient(90deg, color-mix(in srgb, var(--bad) 70%, white), var(--bad));
}

table {
  font-variant-numeric: tabular-nums;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: color-mix(in srgb, var(--surface2) 92%, var(--brand-soft));
  color: var(--muted);
  letter-spacing: .04em;
}

tbody tr {
  transition: background .15s ease;
}

tbody tr:hover {
  background: color-mix(in srgb, var(--brand-soft) 38%, transparent);
}

/* Standalone strategy pages. */
.strategy-page header,
.strategy-page main,
.strategy-page footer {
  max-width: 1220px;
}

.strategy-page > header {
  padding: 30px 28px 18px;
}

.strategy-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.strategy-page > header > a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: var(--shadow-xs);
}

.strategy-page > header h1 {
  margin-top: 24px;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 40px);
}

.strategy-page > header p {
  max-width: 770px;
  color: var(--muted);
}

.strategy-page main {
  padding: 10px 28px 90px;
}

.strategy-page .hero {
  min-height: 260px;
  align-items: stretch;
  gap: 18px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 22px;
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 255, 255, .13), transparent 17rem),
    linear-gradient(125deg, #083d43, #14665f 64%, #315f60);
  box-shadow: var(--shadow-deep);
}

.short-term-page .hero {
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 255, 255, .13), transparent 17rem),
    linear-gradient(125deg, #0b3d52, #14676e 64%, #2a6470);
}

.strategy-page .hero::before,
.strategy-page .hero::after {
  display: none;
}

.strategy-page .hero > div:first-child {
  display: grid;
  align-content: center;
}

.strategy-page .hero h2 {
  font-size: clamp(25px, 3vw, 35px);
  line-height: 1.4;
}

.strategy-page .hero-status {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  background: rgba(5, 25, 31, .52);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
  backdrop-filter: blur(14px);
}

.strategy-page .kpis article,
.strategy-page .panel,
.strategy-page .stock-detail {
  border-color: var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.strategy-page .grid,
.strategy-page .panel,
.strategy-page .table-wrap {
  min-width: 0;
  max-width: 100%;
}

.strategy-page .table-wrap {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.strategy-page .kpis article {
  position: relative;
  overflow: hidden;
  padding: 16px;
}

.strategy-page .kpis article::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand2), transparent);
}

.strategy-page .kpis span,
.strategy-page .panel > p,
.strategy-page .method,
.strategy-page footer {
  color: var(--muted);
}

.strategy-page .panel {
  padding: 21px;
}

.strategy-page .chart-wrap {
  height: 340px;
  padding: 10px;
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--brand2) 8%, transparent), transparent 44%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 90%, transparent), var(--surface2));
}

.strategy-page .legend .portfolio { color: var(--brand); }
.strategy-page .legend .topix { color: var(--accent); }
.strategy-page .legend .nikkei { color: var(--blue); }

.chart-accessible-summary {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.strategy-page .holding-open-label,
.strategy-page .flow-badge {
  border-radius: 999px;
}

.strategy-page .holding-detail-row > td,
.strategy-page .detail-group,
.strategy-page .detail-lead,
.strategy-page .flow-summary,
.strategy-page .notice,
.strategy-page .history article {
  border-color: var(--line);
  background: var(--surface2);
  color: var(--muted);
}

/* AI shadow page. */
.ai-shadow-hero {
  min-height: 380px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 82% 24%, rgba(189, 156, 255, .22), transparent 17rem),
    linear-gradient(125deg, #192c4a, #3d3a68 62%, #6d4f58);
  box-shadow: var(--shadow-deep);
}

.ai-shadow-contract {
  margin: 24px;
  border-radius: 17px;
  background: rgba(12, 21, 42, .56);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
  backdrop-filter: blur(16px);
}

.ai-shadow-summary,
.ai-policy-limits,
.ai-policy-weights,
.ai-method {
  border-radius: var(--radius);
}

footer {
  border-color: var(--line);
}

@keyframes view-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  main,
  .analysis-page main {
    padding-inline: 18px;
  }

  .decision-hero {
    grid-template-columns: 1fr;
  }

  .home-page .market-temperature {
    margin-top: 0;
  }

  .strategy-page .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  html { scroll-padding-top: 76px; }

  .site-header {
    height: 62px;
    padding-inline: 12px;
  }

  .brand-seal {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  main,
  .analysis-page main {
    padding: 14px 12px 60px;
  }

  .decision-hero {
    border-radius: 19px;
  }

  .home-page .hero-copy {
    padding: 34px 25px 28px;
  }

  .home-page .hero-copy h1 {
    font-size: 34px;
  }

  .home-page .market-temperature {
    display: flex;
    flex-direction: column;
    margin: 0 10px 10px;
    padding: 17px;
    border-radius: 14px;
  }

  .decision-strip article {
    padding: 13px 14px;
  }

  .question-nav {
    padding: 14px 12px;
  }

  .question-card {
    min-height: 88px;
  }

  .analysis-page .analysis-tabs {
    top: 68px;
    width: calc(100% + 24px);
    max-width: none;
    margin-inline: -12px;
    padding-inline: 12px;
    border-inline: 0;
    border-radius: 0;
  }

  .analysis-page .analysis-tabs a {
    flex: 0 0 auto;
  }

  .analysis-page .analysis-view {
    scroll-margin-top: 132px;
  }

  .market-forecast-chart {
    height: 330px;
  }

  .flow-chart-card {
    padding: 14px 10px;
  }

  .strategy-page > header {
    padding: 20px 14px 12px;
  }

  .strategy-page main {
    padding: 8px 14px 64px;
  }

  .strategy-page .hero {
    min-height: 0;
    padding: 20px;
    border-radius: 18px;
  }

  .strategy-page .panel {
    padding: 15px;
  }

  .strategy-page .chart-wrap {
    height: 280px;
  }

  .ai-shadow-hero {
    border-radius: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Home usability repair — compact navigation and expandable stock rows. */
.home-page .decision-hero {
  min-height: 330px;
}

.home-page .hero-copy {
  padding: 46px 48px 42px;
}

.home-page .hero-copy h1 {
  margin-block: 10px 14px;
  font-size: clamp(35px, 4.5vw, 52px);
}

.home-page .market-temperature {
  margin: 18px;
  padding: 20px;
}

.home-jump-nav {
  position: sticky;
  top: 82px;
  z-index: 30;
  display: flex;
  gap: 6px;
  margin: 12px 0;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px) saturate(140%);
  scrollbar-width: none;
}

.home-jump-nav::-webkit-scrollbar { display: none; }

.home-jump-nav a {
  flex: 0 0 auto;
  padding: 9px 13px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.home-jump-nav a:first-child {
  background: var(--brand);
  color: #fff;
}

.home-jump-nav a:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.deep-dive-hub {
  margin-top: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 95%, var(--brand-soft)), var(--surface));
  box-shadow: var(--shadow-sm);
}

.deep-dive-hub .section-head {
  margin-bottom: 10px;
}

.deep-dive-hub .section-head h2 {
  font-size: 23px;
}

.report-cards-compact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.report-cards-compact .report-card {
  min-height: 68px;
  padding: 10px 12px;
  gap: 9px;
}

.report-cards-compact .report-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 8px;
}

.report-cards-compact .report-card h3 { font-size: 12px; }
.report-cards-compact .report-card p { margin-top: 2px; font-size: 8px; line-height: 1.45; }
.report-cards-compact .report-card > b { font-size: 8px; }
.report-card.disabled { opacity: .52; cursor: default; }
.report-card.disabled:hover { transform: none; border-color: var(--line); box-shadow: var(--shadow-xs); }

.report-availability {
  margin: 7px 2px 0;
  color: var(--muted);
  font-size: 8px;
}

.decision-links-compact {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.decision-links-compact a {
  min-height: 53px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface2);
  text-decoration: none;
}

.decision-links-compact b,
.decision-links-compact small { display: block; }
.decision-links-compact b { color: var(--ink); font-size: 10px; }
.decision-links-compact small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.decision-links-compact a:hover { border-color: var(--brand2); background: var(--brand-soft); }

.monthly-overview-compact {
  min-height: 0;
  margin-top: 8px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
}

.monthly-overview-compact span > * { display: block; }
.monthly-overview-compact small { color: var(--muted); font-size: 8px; }
.monthly-overview-compact b { margin-top: 2px; color: var(--ink); font-size: 10px; }
.monthly-overview-compact em { color: var(--brand); font-size: 9px; font-style: normal; }

.deep-dive-date-reports {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 15px 2px 7px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.deep-dive-date-reports .kicker { font-size: 8px; }
.deep-dive-date-reports b { font: 600 11px var(--serif); }

.compact-selection-section,
.short-term-overview,
.review-section,
.research-stock-drawer {
  scroll-margin-top: 142px;
}

.section-head-actions {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 7px;
}

.section-text-link {
  color: var(--brand);
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}

.selection-summary-compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 240px));
  gap: 7px;
  margin-bottom: 8px;
}

.selection-summary-compact div {
  padding: 9px 12px;
  border-radius: 10px;
}

.selection-summary-compact b { font-size: 16px; }

.stock-compact-list,
.short-stock-list {
  display: grid;
  gap: 5px;
}

.stock-compact-row {
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand2);
  border-radius: 11px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-xs);
}

.stock-compact-row.near-miss { border-left-color: var(--accent); }
.stock-compact-row.shallow { border-left-color: var(--blue); }
.stock-compact-row[open] { border-color: color-mix(in srgb, var(--brand2) 45%, var(--line)); box-shadow: var(--shadow-sm); }
.stock-compact-row > summary::-webkit-details-marker,
.stock-population-drawer > summary::-webkit-details-marker,
.research-stock-drawer > summary::-webkit-details-marker { display: none; }

.stock-compact-row > summary {
  min-height: 64px;
  padding: 8px 12px 8px 10px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) minmax(140px, 210px) 56px 18px;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.stock-compact-row > summary:hover { background: color-mix(in srgb, var(--brand-soft) 42%, var(--surface)); }

.stock-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--surface2);
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.stock-identity,
.stock-state,
.stock-score { min-width: 0; }
.stock-identity > small,
.stock-identity > b,
.stock-identity > em,
.stock-state > b,
.stock-state > small,
.stock-score > small,
.stock-score > b { display: block; }
.stock-identity > small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.stock-identity > b { margin-top: 1px; overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.stock-identity > em { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.stock-state { text-align: right; }
.stock-state > b { color: var(--brand); font-size: 9px; }
.stock-state > small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.stock-score { text-align: right; }
.stock-score > small { color: var(--muted); font-size: 7px; letter-spacing: .08em; }
.stock-score > b { margin-top: 1px; color: var(--ink); font-size: 14px; }
.stock-compact-row > summary > i {
  color: var(--muted);
  font-size: 15px;
  font-style: normal;
  transition: transform .2s ease;
}
.stock-compact-row[open] > summary > i { transform: rotate(45deg); }

.stock-quick-detail {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface2) 86%, var(--surface));
}

.stock-quick-detail > section {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
}

.stock-quick-detail > section > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
}

.stock-detail-reason p { margin: 0; color: var(--ink); font-size: 10px; font-weight: 700; line-height: 1.65; }
.stock-detail-reason ul { margin: 7px 0 0; padding-left: 16px; color: var(--muted); font-size: 8px; line-height: 1.65; }
.stock-warning { display: block; margin-top: 7px; color: var(--bad) !important; }

.stock-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.stock-detail-metrics div {
  padding: 6px 7px;
  border-radius: 7px;
  background: var(--surface2);
}
.stock-detail-metrics span,
.stock-detail-metrics b { display: block; }
.stock-detail-metrics span { color: var(--muted); font-size: 7px; }
.stock-detail-metrics b { margin-top: 2px; overflow-wrap: anywhere; color: var(--ink); font-size: 9px; }
.stock-quick-detail section > small { display: block; margin-top: 7px; color: var(--muted); font-size: 8px; line-height: 1.55; }
.stock-quick-detail > footer {
  grid-column: 1 / -1;
  padding: 2px 2px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.stock-quick-detail > footer small { color: var(--muted); font-size: 8px; }
.stock-quick-detail > footer a { color: var(--brand); font-size: 9px; font-weight: 800; text-decoration: none; }

.stock-population-drawer,
.stock-population-drawer.near-miss-section {
  margin-top: 7px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface2);
  box-shadow: none;
}

.stock-population-drawer > summary,
.stock-population-drawer.near-miss-section > summary {
  min-height: 56px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.stock-population-drawer > summary span > b,
.stock-population-drawer > summary span > small { display: block; }
.stock-population-drawer > summary span > b { font-size: 11px; }
.stock-population-drawer > summary span > small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.stock-population-drawer > summary > em { margin-left: auto; color: var(--brand); font-size: 10px; font-style: normal; font-weight: 800; }
.stock-population-drawer > summary::after { content: "＋"; color: var(--muted); }
.stock-population-drawer[open] > summary::after { content: "−"; }
.stock-population-drawer > .stock-compact-list { padding: 0 7px 7px; }

.short-stock-row {
  min-height: 62px;
  padding: 8px 12px 8px 10px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) minmax(150px, 210px) minmax(90px, 130px) 18px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 11px;
  background: var(--surface-raised);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}
.short-stock-row:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.short-stock-plan { display: flex; justify-content: flex-end; gap: 12px; }
.short-stock-plan small { color: var(--muted); font-size: 8px; }
.short-stock-plan b { color: var(--ink); font-size: 9px; }
.short-stock-row > i { color: var(--accent); font-size: 13px; font-style: normal; }

.research-stock-drawer {
  margin-top: 14px;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--blue) 34%, var(--line));
  border-radius: var(--radius);
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 92%, var(--blue) 8%), var(--surface));
  box-shadow: var(--shadow-sm);
}
.research-stock-drawer > summary {
  min-height: 86px;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  list-style: none;
}
.research-stock-drawer > summary span > * { display: block; }
.research-stock-drawer > summary .kicker { color: var(--blue); font-size: 8px; }
.research-stock-drawer > summary b { margin-top: 4px; color: var(--ink); font-size: 17px; }
.research-stock-drawer > summary small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.research-drawer-meta { text-align: right; }
.research-drawer-meta em,
.research-drawer-meta i { display: block; font-size: 9px; font-style: normal; }
.research-drawer-meta em { color: var(--muted); }
.research-drawer-meta i { margin-top: 5px; color: var(--blue); font-weight: 800; }
.research-stock-drawer[open] .research-drawer-meta i { font-size: 0; }
.research-stock-drawer[open] .research-drawer-meta i::after { content: "閉じる"; font-size: 9px; }
.research-stock-body { padding: 0 14px 14px; }
.research-stock-body .section-lead { margin: 0 0 9px; }
.shallow-performance { margin-bottom: 9px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.shallow-performance-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.shallow-performance-head h3 { margin: 0; font-size: 12px; }
.shallow-performance-head small, .shallow-performance-note { color: var(--muted); font-size: 8px; }
.shallow-performance-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.shallow-performance-table th, .shallow-performance-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; font-size: 9px; white-space: nowrap; }
.shallow-performance-table th:nth-child(-n+2), .shallow-performance-table td:nth-child(-n+2) { text-align: left; }
.shallow-performance-table small { color: var(--muted); font-size: 7px; }
.shallow-performance-note { margin: 7px 0 0; line-height: 1.6; }
.shallow-strategy-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 9px;
}
.shallow-strategy-summary div { padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface2); }
.shallow-strategy-summary span { color: var(--blue); font-size: 8px; font-weight: 900; }
.shallow-strategy-summary p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.6; }

@media (max-width: 900px) {
  .decision-links-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stock-quick-detail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .home-page .decision-hero { min-height: 0; }
  .home-page .hero-copy { padding: 26px 22px 22px; }
  .home-page .hero-copy h1 { margin-block: 8px 11px; font-size: 30px; }
  .home-page .hero-copy p { font-size: 10px; line-height: 1.7; }
  .home-page .market-temperature { padding: 13px; }
  .home-jump-nav { top: 68px; margin-inline: -2px; }
  .deep-dive-hub { padding: 14px; }
  .report-cards-compact { grid-template-columns: 1fr; }
  .report-cards-compact .report-card { min-height: 58px; }
  .decision-links-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .decision-links-compact a { min-height: 50px; padding: 8px; }
  .selection-summary-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head-actions { align-items: flex-end; }
  .stock-compact-row > summary {
    min-height: 72px;
    padding: 8px 9px;
    grid-template-columns: 28px minmax(0, 1fr) 45px 15px;
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 2px;
  }
  .stock-compact-row .stock-rank { grid-row: 1 / 3; }
  .stock-compact-row .stock-identity { grid-column: 2; grid-row: 1; }
  .stock-compact-row .stock-state { grid-column: 2 / 4; grid-row: 2; text-align: left; }
  .stock-compact-row .stock-state > b,
  .stock-compact-row .stock-state > small { display: inline; }
  .stock-compact-row .stock-state > small { margin-left: 7px; }
  .stock-compact-row .stock-score { grid-column: 3; grid-row: 1; }
  .stock-compact-row > summary > i { grid-column: 4; grid-row: 1 / 3; }
  .stock-quick-detail { grid-template-columns: 1fr; }
  .stock-quick-detail > footer { align-items: flex-start; flex-direction: column; gap: 6px; }
  .short-stock-row {
    min-height: 76px;
    grid-template-columns: 28px minmax(0, 1fr) auto 15px;
    grid-template-rows: auto auto;
    padding: 8px 9px;
    column-gap: 8px;
  }
  .short-stock-row .stock-rank { grid-row: 1 / 3; }
  .short-stock-row .stock-identity { grid-column: 2; grid-row: 1; }
  .short-stock-row .short-stock-plan { grid-column: 2 / 4; grid-row: 2; justify-content: flex-start; }
  .short-stock-row .stock-state { grid-column: 3; grid-row: 1; text-align: right; }
  .short-stock-row > i { grid-column: 4; grid-row: 1 / 3; }
  .research-stock-drawer > summary { min-height: 78px; padding: 14px; }
  .research-stock-drawer > summary b { font-size: 14px; }
  .research-drawer-meta em { display: none; }
  .shallow-strategy-summary { grid-template-columns: 1fr; }
  .shallow-performance-head { display: block; }
  .shallow-performance-head small { display: block; margin-top: 4px; }
}
