/* MogWatch v2 UI (design refresh): a light financial dashboard. White and light grey, one accent
   (#C31252), body text #171214; a left menu, a main area that is read from top to bottom.
   Rules kept from Task 1: no gradients, no glass, no decorative or large shadows, no animation
   beyond short transitions. Colours: the text, the accent and neutral greys only. */
:root {
  color-scheme: light;
  --bg: #F5F4F4;
  --panel: #FFFFFF;
  --panel-2: #FAF9F9;
  --side: #FCFCFC;
  --border: #E8E3E5;
  --border-strong: #D7D0D3;
  --rule: #EFEAEC;
  --text: #171214;
  --text-2: #6F686B;
  --text-dim: #9D9699;
  --accent: #C31252;
  --accent-dark: #A50F45;
  --accent-light: #FCEFF4;
  --accent-line: #EFC6D6;
  --accent-soft: #F3C8D8;
  /* neutral steps for the non-highlighted marks (probability strip, history chart) */
  --neutral-1: #D8D3D5;
  --neutral-2: #EFECEF;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  --radius: 12px;
  --radius-sm: 8px;
  --side-w: 240px;
  --content-w: 1240px;
  /* Google Fonts (Inter, Noto Sans JP) with display=swap; if they do not load, the system fonts below
     are used (Task 12 decision A). No font file is kept in the repository. */
  --font: "Inter", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.mw-lock { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
}
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── App shell: the left menu and the main area ── */
.mw-app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.mw-main { min-width: 0; display: flex; flex-direction: column; }

/* Left menu: fixed beside the main area on wide screens (it scrolls on its own if it is taller) */
.mw-side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 5;
  background: var(--side); border-right: 1px solid var(--border);
  padding: 22px 12px 24px; display: flex; flex-direction: column; gap: 20px;
}
.mw-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; }
.mw-brand { display: inline-flex; flex-direction: column; line-height: 1.2; text-decoration: none; }
.mw-brand-name { font-size: 17px; font-weight: 800; letter-spacing: 0.1em; color: var(--text); }
.mw-brand-sub { margin-top: 2px; font-size: 11px; letter-spacing: 0.04em; color: var(--text-2); }
.mw-side-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.mw-side-link {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-sm);
  background: none; font: inherit; font-size: 14px; color: var(--text); text-align: left; text-decoration: none; cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
.mw-side-link .mw-icon { flex-shrink: 0; color: var(--text-2); transition: color 140ms ease; }
.mw-side-link .label { flex: 1; min-width: 0; white-space: nowrap; }
.mw-side-link:hover { background: var(--accent-light); color: var(--accent); }
.mw-side-link:hover .mw-icon { color: var(--accent); }
.mw-side-link[aria-current="page"], .mw-side-link.is-current { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.mw-side-link[aria-current="page"] .mw-icon, .mw-side-link.is-current .mw-icon { color: var(--accent); }
.mw-side-link.is-off { color: var(--text-dim); cursor: default; }
.mw-side-link.is-off:hover { background: none; color: var(--text-dim); }
.mw-side-link.is-off .mw-icon { color: var(--text-dim); }
/* the 準備中 mark takes 4px of the link's right padding, so the longest label (イベントカレンダー, 9 characters) fits in 240px */
.mw-side-link small { margin: 0 -4px 0 auto; font-size: 9.5px; color: var(--text-dim); border: 1px solid var(--border); border-radius: 4px; padding: 0 3px; white-space: nowrap; }
.mw-side-chev { margin-left: auto; transition: transform 140ms ease; }
.mw-side-link[aria-expanded="true"] .mw-side-chev { transform: rotate(180deg); }
.mw-side-sub { margin: 2px 0 6px 18px !important; padding-left: 10px !important; border-left: 1px solid var(--border); gap: 1px !important; }
.mw-side-sub a { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; font-size: 13px; color: var(--text); text-decoration: none; transition: background-color 140ms ease, color 140ms ease; }
.mw-side-sub a:hover, .mw-side-sub a[aria-current="page"] { background: var(--accent-light); color: var(--accent); }
.mw-side-sub a[aria-current="page"] { font-weight: 600; }
.mw-side-sub .flag { font-size: 14px; line-height: 1; }
.mw-side-sub .ccy { margin-left: auto; font-size: 11px; color: var(--text-2); }
.mw-side-rule { border: 0; border-top: 1px solid var(--border); margin: 14px 10px; }
.mw-backdrop { display: none; }

/* Top bar of the main area */
.mw-topbar-inner {
  width: 100%; max-width: var(--content-w); margin: 0 auto; padding: 18px 36px 0;
  display: flex; align-items: center; gap: 16px; min-height: 64px;
}
.mw-topbar-status { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.mw-topbar-status:empty { display: none; }
.mw-topbar-side { display: flex; align-items: center; gap: 12px; }
.mw-topbar-status:empty + .mw-topbar-side { margin-left: auto; }
.mw-icon-btn {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel); color: var(--text); cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease;
}
.mw-icon-btn:hover:not(:disabled) { border-color: var(--border-strong); color: var(--accent); }
.mw-icon-btn:disabled { color: var(--text-dim); cursor: not-allowed; }
/* only in the drawer layout (tablets and phones) */
.mw-menu-btn, .mw-topbar-brand, .mw-side-close { display: none; }
.mw-pro-pill {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); text-decoration: none; white-space: nowrap;
  background: var(--accent-light); border: 1px solid var(--accent-line); border-radius: 999px; padding: 6px 14px;
}
.mw-pro-pill:hover { border-color: var(--accent); }
.mw-beta-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--accent); border-radius: 999px; padding: 4px 10px; color: var(--accent); background: var(--accent-light); text-decoration: none; font-size: 12px; white-space: nowrap; }
.mw-beta-pill b { font-weight: 800; letter-spacing: 0.08em; }
.mw-beta-pill:hover { background: var(--panel); }
.mw-updated { font-size: 12px; color: var(--text-2); white-space: nowrap; }
/* the data notice: only when data is late or stopped (shape + words, never colour alone) */

/* Development bar: environment, DEMO DATA, the mock plan switch (not a production element) */
.mw-devbar { width: 100%; max-width: var(--content-w); margin: 14px auto 0; padding: 0 36px; font-size: 12px; color: var(--text-2); }
.mw-devbar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.mw-devbar strong { color: var(--accent-dark); font-weight: 600; }
.mw-refresh-note { width: 100%; max-width: var(--content-w); margin: 10px auto 0; padding: 0 36px; font-size: 12px; color: var(--accent-dark); }

/* Segmented switch (development plan switch) */
.mw-seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--panel); }
.mw-seg button { font: inherit; font-size: 12px; padding: 4px 12px; border: 0; cursor: pointer; background: var(--panel); color: var(--text); transition: background-color 140ms ease, color 140ms ease; }
.mw-seg button + button { border-left: 1px solid var(--border); }
.mw-seg button[aria-pressed="true"] { background: var(--accent-light); color: var(--accent); font-weight: 600; }

/* ── Main column ── */
.mw-shell { width: 100%; max-width: var(--content-w); margin: 0 auto; padding: 24px 36px 56px; display: flex; flex-direction: column; gap: 28px; }
.mw-row { display: grid; gap: 16px; }
.mw-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mw-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ── Sections: a white card with the title (black, a thin accent line); bare: the title on the page ── */
.mw-panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; min-width: 0; box-shadow: var(--shadow); }
.mw-panel.is-bare { background: none; border: 0; padding: 0; box-shadow: none; }
.mw-panel-head { margin-bottom: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 16px; }
.mw-panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.mw-eyebrow { margin: 0 0 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.mw-panel-title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.4; color: var(--text); border-left: 3px solid var(--accent); padding-left: 10px; }
/* a title given as phrases breaks only between them (<wbr>); a phrase wider than the screen still wraps */
.mw-panel-title.is-phrased { word-break: keep-all; overflow-wrap: anywhere; }
.mw-panel-desc { margin: 6px 0 0; font-size: 13px; color: var(--text-2); }
.mw-panel-line { display: block; }
.mw-panel-line:first-child { color: var(--text); font-weight: 600; }
.mw-placeholder { border: 1px dashed var(--border-strong); border-radius: 10px; padding: 18px; color: var(--text-2); font-size: 13px; }
.mw-placeholder-what { margin: 0; }
.mw-placeholder-list { margin: 12px 0 0; padding-left: 18px; }
.mw-placeholder-list.is-numbered { list-style: none; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: 12px; }
.mw-placeholder-list.is-numbered li { counter-increment: step; display: flex; align-items: center; gap: 12px; color: var(--text); }
.mw-placeholder-list.is-numbered li::before {
  content: counter(step); flex-shrink: 0; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--accent-light); color: var(--accent); font-size: 12px; font-weight: 700;
}
.mw-soon { display: inline-block; margin-right: 8px; font-size: 11px; font-weight: 600; color: var(--text-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 6px; }
.mw-list { list-style: none; margin: 0; padding: 0; }
.mw-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); font-size: 13px; }
.mw-list li:first-child { border-top: 0; padding-top: 0; }
.mw-list .meta { color: var(--text-dim); white-space: nowrap; }

/* ── Central bank cards: FED / ECB above (each as wide as two cards below), BOE / BOJ / BOC / RBA
   below (12-column grid: 6 + 6, then 3 x 4; same height, same gaps), 2 columns below 1280px, 1 on
   phones. No empty or dummy card. ── */
/* seven banks in rows of 2 / 3 / 2: FED and ECB first, three in the middle, two below (as wide as the first row) */
.mw-policy-grid { display: grid; gap: 14px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mw-policy-grid > * { grid-column: span 2; }
.mw-policy-grid > :nth-child(1), .mw-policy-grid > :nth-child(2), .mw-policy-grid > :nth-child(6), .mw-policy-grid > :nth-child(7) { grid-column: span 3; }
.mw-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px; min-width: 0; position: relative; transition: border-color 140ms ease;
}
.mw-card:hover { border-color: var(--border-strong); }
.mw-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.mw-card-bank { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; line-height: 24px; letter-spacing: 0.02em; color: var(--text); } /* one line height: FED / ECB (18px) and the others stay the same height */
.mw-card.is-primary .mw-card-bank { font-size: 18px; }
.mw-card-flag { font-size: 16px; line-height: 1; }
.mw-card-link { text-decoration: none; }
.mw-card-link::after { content: ""; position: absolute; inset: 0; } /* the whole card opens the detail */
.mw-card-sub { font-size: 12px; color: var(--text-2); }
.mw-ccy { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; }
.mw-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 0; }
.mw-kv dt { font-size: 12px; color: var(--text-2); }
.mw-kv dd { margin: 0; font-size: 15px; font-weight: 600; }
.mw-kv dd.big { font-size: 22px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.mw-card-move { margin: 0; }
.mw-card-move div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
.mw-card-move dt { font-size: 12px; color: var(--text-2); }
.mw-card-move dd { margin: 0; font-size: 15px; font-weight: 600; }
.mw-card-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: auto; }
.mw-card-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mw-card-note { margin: 0; font-size: 12px; color: var(--accent-dark); }

/* Probability strip: cut / hold / hike in a fixed order, 2px surface gaps; the most likely scenario in
   the accent, the others neutral grey; the values in text colours, the top one in the accent */
.mw-strip-bar { display: flex; gap: 2px; height: 8px; }
.mw-strip-seg { height: 100%; border-radius: 3px; background: var(--neutral-1); }
.mw-strip-seg.is-top { background: var(--accent); }
.mw-strip-legend { display: grid; grid-template-columns: repeat(3, 1fr); margin: 8px 0 0; padding: 0; list-style: none; }
.mw-strip-legend li { font-size: 12px; color: var(--text-2); display: flex; flex-direction: column; }
.mw-strip-legend li:nth-child(2) { text-align: center; }
.mw-strip-legend li:nth-child(3) { text-align: right; }
.mw-strip-legend b { font-size: 15px; font-weight: 600; color: var(--text); }
.mw-strip-legend .is-top b { font-weight: 700; color: var(--accent); }
.mw-strip-legend .is-top .key { color: var(--text); }
.mw-strip-legend .key { display: inline-flex; align-items: center; gap: 5px; letter-spacing: 0.04em; }
.mw-strip-legend li:nth-child(2) .key { justify-content: center; }
.mw-strip-legend li:nth-child(3) .key { justify-content: flex-end; }
.mw-strip-legend .sw { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.mw-strip.lg .mw-strip-bar { height: 12px; }
.mw-strip.lg .mw-strip-legend li { font-size: 12px; }
.mw-strip.lg .mw-strip-legend b { font-size: 20px; }

/* Data quality badge (detail page): shape + label, never colour alone */

/* ── Top page: the bank of the chart and the level table, 24-hour changes, background ── */
.mw-focus-block { display: flex; flex-direction: column; gap: 16px; }
.mw-focus { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.mw-focus-label { font-size: 13px; color: var(--text-2); }
.mw-focus ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mw-focus a {
  display: inline-block; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel);
  font-size: 13px; font-weight: 600; color: var(--text); text-decoration: none; transition: border-color 140ms ease, color 140ms ease;
}
.mw-focus a:hover { border-color: var(--border-strong); color: var(--accent); }
.mw-focus a[aria-current="true"] { background: var(--accent-light); color: var(--accent); border-color: var(--accent-line); }
.mw-card-tools { display: inline-flex; align-items: center; gap: 6px; }
/* above the card's whole-card link (.mw-card-link::after), so the star toggles instead of opening the page */
.mw-card-tools .mw-star { position: relative; z-index: 1; }
.mw-star { border: 0; background: none; padding: 2px 4px; font-size: 16px; line-height: 1; color: var(--text-dim); cursor: pointer; border-radius: 4px; }
.mw-star.is-on { color: var(--accent); }
.mw-star:hover { color: var(--accent); background: var(--accent-light); }
.mw-detail-title .mw-star { margin-left: 8px; vertical-align: middle; font-size: 18px; }
.mw-watch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mw-watch-list li { display: flex; align-items: center; gap: 8px; }
.mw-watch-item { flex: 1; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-size: 14px; }
.mw-watch-item:hover { border-color: var(--accent-line); background: var(--accent-light); }
.mw-watch-item span { color: var(--text-2); font-size: 13px; }
.mw-alert-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin: 0 0 12px; }
.mw-alert-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); }
.mw-alert-form label:has(input) { flex-direction: row; align-items: center; }
.mw-alert-form select, .mw-alert-form input { font: inherit; font-size: 14px; color: var(--text); background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 6px 8px; }
.mw-alert-form input { width: 5.5em; }
.mw-alert-error { color: var(--accent-dark); font-size: 13px; margin: 0 0 10px; }
.mw-alert-rules { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.mw-alert-rules li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; }
.mw-alert-state { font-size: 12px; color: var(--text-2); }
.mw-alert-state.met { color: var(--accent); font-weight: 700; }
.mw-link-btn { margin-left: auto; border: 0; background: none; color: var(--text-2); text-decoration: underline; cursor: pointer; font-size: 12px; padding: 2px; }
.mw-sub-title { font-size: 14px; margin: 14px 0 6px; }
.mw-alert-log { margin: 0 0 10px; padding-left: 1.2em; font-size: 13px; color: var(--text-2); display: grid; gap: 4px; }
.mw-macro th[scope="row"] { white-space: nowrap; }
.mw-macro th[scope="row"] .flag { margin-right: 6px; }
.mw-macro th[scope="row"] small, .mw-macro td small { display: block; font-size: 11px; color: var(--text-2); font-weight: 400; }
.mw-macro td b { font-weight: 600; }
.mw-decisions th[scope="row"] small, .mw-decisions td small, .mw-pairs td small { display: block; font-size: 11px; color: var(--text-2); font-weight: 400; }
.mw-decisions td small a { color: var(--text-2); }
/* 主な経済指標: the four kinds over the columns, and the value before with its direction */
.mw-macro th.mw-macro-group { text-align: center; font-size: 11px; color: var(--text-2); border-bottom: 1px solid var(--rule); }
.mw-macro td small.mw-macro-prev { display: block; font-size: 11px; color: var(--text-2); }
/* 会合カレンダー (Beta core sprint): the next meetings by date */
.mw-calendar th[scope="row"] small, .mw-calendar td small { display: block; font-size: 11px; color: var(--text-2); font-weight: 400; }
.mw-calendar th[scope="row"] a { color: var(--text); text-decoration: none; }
.mw-calendar th[scope="row"] a:hover { color: var(--accent); }
.mw-calendar .flag { margin-right: 6px; }
.mw-pairs th[scope="row"] { white-space: nowrap; }
.mw-fundamentals th[scope="row"] { white-space: nowrap; }
.mw-fundamentals th[scope="row"] .flag { margin-right: 6px; }
.mw-fundamentals th[scope="row"] small { display: block; font-size: 11px; color: var(--text-2); font-weight: 400; }
.mw-fundamentals td { white-space: nowrap; }
/* 2026-10-09: five items; the published values with their period, the column names with what they are */
.mw-fundamentals thead th small { display: block; font-size: 11px; color: var(--text-2); font-weight: 400; }
.mw-fundamentals td b { font-weight: 600; }
.mw-fundamentals .mw-fv { display: inline-block; }
.mw-fundamentals td small { display: block; font-size: 11px; color: var(--text-2); }
.mw-factor { cursor: help; border-bottom: 1px dotted var(--border-strong); }
.mw-dash { color: var(--text-dim); cursor: help; }
.mw-sources { margin-top: 8px; font-size: 12px; color: var(--text-2); }
.mw-sources ul { margin: 6px 0 0; padding-left: 1.2em; }
.mw-sources a { color: var(--text-2); }
.mw-csv-btn { border: 1px solid var(--border-strong); background: var(--panel); color: var(--text); border-radius: var(--radius-sm); padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.mw-csv-btn:hover { border-color: var(--accent); color: var(--accent); }
.mw-focus-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mw-focus-item { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; background: var(--panel); }
.mw-focus-item:hover { border-color: var(--accent-line); background: var(--accent-light); }
.mw-focus-item .kind { grid-row: span 2; align-self: start; font-size: 12px; font-weight: 600; color: var(--accent); }
.mw-focus-item .who { font-size: 13px; color: var(--text-2); }
.mw-focus-item .who b { color: var(--text); margin-right: 2px; }
.mw-focus-item .who small { margin-left: 8px; }
.mw-focus-item .what { font-size: 14px; line-height: 1.6; }
/* 24時間の変化: the next meeting now, the day before and the change (pt) per scenario */
.mw-day th[scope="row"] a { color: var(--text); text-decoration: none; }
.mw-day th[scope="row"] a:hover { color: var(--accent); }
.mw-day th[scope="row"] small, .mw-day td small { display: block; font-size: 11px; color: var(--text-2); font-weight: 400; }
.mw-day td b { font-weight: 600; }
.mw-day td small.mw-day-delta.is-big { color: var(--text); font-weight: 700; }
/* AIファンダメンタル分析 (2026-10-10): the AI's text in its own box, 根拠データ as an ordinary table under it */
.mw-ai-text { margin: 4px 0 14px; padding: 14px 16px; border: 1px solid var(--border); border-left: 3px solid var(--accent-line); border-radius: var(--radius-sm); background: var(--panel-2); }
.mw-ai-text p { margin: 0; line-height: 1.8; }
.mw-ai-text p + p { margin-top: 6px; }
.mw-ai-text .mw-ai-label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.mw-ai-text .mw-ai-meta { font-size: 12px; color: var(--text-2); }
.mw-evidence th[scope="row"] { white-space: nowrap; }
.mw-evidence td b { font-weight: 600; }
/* AIファンダメンタル分析 v2 (Macro Engine, 2026-10-10): the four parts and the kind of each evidence value */
.mw-ai-text .mw-ai-part { margin: 12px 0 4px; font-size: 13px; font-weight: 700; color: var(--text); }
.mw-ai-text .mw-ai-label + .mw-ai-part { margin-top: 6px; }
.mw-ai-list { margin: 0; padding-left: 1.2em; line-height: 1.8; }
.mw-ai-list li + li { margin-top: 4px; }
.mw-kind { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--border); border-radius: 999px; font-size: 11px; font-weight: 500; line-height: 18px; color: var(--text-2); white-space: nowrap; vertical-align: 1px; }
.mw-evidence-when { display: block; font-size: 12px; color: var(--text-2); }
.mw-env-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.mw-env-card { border: 1px solid var(--border); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mw-env-card h3 { margin: 0; font-size: 15px; font-weight: 700; }
.mw-env-card p { margin: 0; font-size: 13px; color: var(--text-2); }
.mw-env-card .mw-soon { align-self: flex-start; }
.mw-indicators td[colspan] { color: var(--text-2); padding: 18px 12px; }
.mw-bank-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.mw-bank-links a { display: block; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; text-decoration: none; color: var(--text-2); }
.mw-bank-links a:hover { color: var(--accent); border-color: var(--border-strong); }
.mw-bank-links b { color: var(--text); margin-right: 4px; }

/* ── Ad slots: white, a thin border, always labelled 広告 ── */
.mw-ad { margin: 0 auto; width: 100%; }
.mw-ad-label { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: 0.14em; color: var(--text-dim); margin-bottom: 4px; }
.mw-ad-box {
  border: 1px solid var(--border); border-radius: 10px; background: var(--panel);
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--text-dim); font-size: 12px; padding: 12px;
}
.mw-ad.leaderboard { max-width: 970px; }
.mw-ad.leaderboard .mw-ad-box { min-height: 90px; }
.mw-ad.sidebar { max-width: 300px; }
.mw-ad.sidebar .mw-ad-box { min-height: 600px; }
/* a banner: the slot is as wide as the banner (728×90), and the box gives way to the image (no frame, no fixed height) */
.mw-ad.leaderboard.is-creative { max-width: 728px; }
.mw-ad.leaderboard .mw-ad-box.is-creative { min-height: 0; padding: 0; border: 0; background: none; }
.mw-ad-creative { display: block; width: 100%; border-radius: 10px; overflow: hidden; }
.mw-ad-creative img { display: block; width: 100%; height: auto; }
.mw-ad-creative:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Buttons, PRO, gate, CTA ── */
.mw-btn {
  display: inline-block; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid var(--accent);
  background: var(--panel); color: var(--accent); text-decoration: none; white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease;
}
.mw-btn:hover { background: var(--accent); color: #FFFFFF; }
.mw-btn-quiet { border-color: var(--border); color: var(--text); }
.mw-btn-quiet:hover { background: var(--panel-2); color: var(--accent); }
.mw-pro-tag { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); background: var(--accent-light); border-radius: 4px; padding: 1px 5px; }
.mw-gate { margin-bottom: 14px; }
.mw-gate-locked { border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); padding: 18px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.mw-gate-locked p { margin: 0; color: var(--text-2); font-size: 13px; }
.mw-gate-locked strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }
.mw-gate-teaser { margin-bottom: 12px; color: var(--text-dim); font-size: 13px; }
.mw-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.mw-cta-note { margin: 0; color: var(--text-2); }
.mw-cta ul { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }

/* ── Footer ── */
.mw-footer { margin-top: auto; border-top: 1px solid var(--border); background: var(--bg); }
.mw-footer-inner { max-width: var(--content-w); margin: 0 auto; padding: 20px 36px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 12px; color: var(--text-dim); }
.mw-footer a { color: var(--text-2); text-decoration: none; }
.mw-footer a:hover { color: var(--accent); }
.mw-footer .copy { margin-left: auto; }
.mw-footer-credit { max-width: var(--content-w); margin: 0 auto; padding: 0 36px 20px; font-size: 11px; color: var(--text-dim); }
.mw-footer-credit p { margin: 0; }
.mw-footer-credit p + p { margin-top: 2px; }
.mw-pop-title { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--text); }

/* ── Honest states: loading, error, no data, restricted, research / demo tags ── */
.mw-skeleton { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.mw-skel-line { display: block; height: 10px; border-radius: 4px; background: var(--rule); }
.mw-error { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); background: var(--panel); }
.mw-error p { margin: 0; font-size: 13px; }
.mw-error span { display: block; color: var(--text-2); font-size: 12px; }
.mw-state { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); font-size: 13px; color: var(--text-2); background: var(--panel); }
.mw-state strong { color: var(--text); font-size: 13px; }
.mw-state.restricted { border-style: solid; border-left: 3px solid var(--text-2); }
.mw-tag { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.mw-tag.research { color: var(--text-2); border: 1px solid var(--text-2); }
.mw-tag.source { color: var(--text-2); border: 1px solid var(--border); font-weight: 600; letter-spacing: 0.08em; }
.mw-prod-note { font-size: 10px; color: var(--text-dim); }
.mw-tag.demo, .mw-demo-tag { color: #FFFFFF; background: var(--accent-dark); }
.mw-demo-tag { font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.mw-missing { color: var(--text-dim); cursor: help; }
.mw-zero { color: var(--text-2); }
.mw-footnote { margin: 12px 0 0; font-size: 12px; color: var(--text-2); }

/* ── Detail page ── */
.mw-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.mw-detail-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.mw-detail-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.mw-crumb { margin: 0 0 4px; font-size: 12px; color: var(--text-2); }
.mw-crumb a { color: var(--text-2); }
.mw-crumb a:hover { color: var(--accent); }
.mw-detail-title { margin: 0 0 14px; font-size: 24px; font-weight: 700; line-height: 1.3; }
.mw-detail-title small { margin-left: 8px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.mw-detail-top { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.mw-detail-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 20px; margin-bottom: 18px; }
.mw-detail-kpis > div { display: flex; flex-direction: column; min-width: 0; }
.mw-detail-kpis .k { font-size: 12px; color: var(--text-2); }
.mw-detail-kpis .v { font-size: 22px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.mw-detail-kpis .s { font-size: 11px; color: var(--text-dim); }
.mw-detail-strip { max-width: 560px; }
.mw-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 16px 0 0; font-size: 12px; color: var(--text-2); }
.mw-bank-nav { padding: 16px; }
.mw-bank-nav ul { list-style: none; margin: 0; padding: 0; }
.mw-bank-nav a { display: block; padding: 6px 10px; border-radius: 6px; font-size: 13px; color: var(--text-2); text-decoration: none; transition: background-color 140ms ease, color 140ms ease; }
.mw-bank-nav a b { display: inline-block; min-width: 44px; color: var(--text); }
.mw-bank-nav a:hover { background: var(--accent-light); color: var(--accent); }
.mw-bank-nav a:hover b { color: var(--accent); }
.mw-bank-nav a[aria-current="page"] { background: var(--accent-light); color: var(--accent); }
.mw-bank-nav a[aria-current="page"] b { color: var(--accent); }

/* Tabs */
.mw-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); }
.mw-tabs [role="tab"] {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text-2); background: none; cursor: pointer;
  border: 0; border-bottom: 2px solid transparent; padding: 10px 20px; margin-bottom: -1px; transition: color 140ms ease;
}
.mw-tabs [role="tab"]:hover { color: var(--accent); }
.mw-tabs [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.mw-tabpanel { display: flex; flex-direction: column; gap: 20px; }

/* Tables: scroll sideways inside their own box on small screens */
.mw-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; } /* relative: screen-reader text inside stays in the scroll box */
.mw-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.mw-table caption { caption-side: top; text-align: left; padding: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.mw-table th, .mw-table td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; white-space: nowrap; vertical-align: top; }
.mw-table thead th { font-size: 12px; font-weight: 600; color: var(--text-2); border-bottom-color: var(--border); vertical-align: bottom; }
.mw-table tbody th { font-weight: 600; }
.mw-table .r { text-align: right; }
.mw-table td.is-top { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.mw-table tr.is-now th, .mw-table tr.is-now td { background: var(--panel-2); }
.mw-table thead th.is-now { color: var(--text); }
.mw-now { margin-left: 6px; font-size: 10px; font-weight: 700; color: var(--accent); border: 1px solid var(--accent-line); border-radius: 4px; padding: 0 4px; }
.mw-table .bar-col { width: 40%; min-width: 120px; }
/* Task 14 policy change: the data sources table wraps its long provider and series names (the time stays on one line) */
/* データ出典・計算方法 (2026-10-09): the method and the basis side by side, then the sources; the data's state folded */
.mw-method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 28px; }
.mw-sub-title { margin: 14px 0 6px; font-size: 14px; font-weight: 700; color: var(--text); }
.mw-method-grid .mw-sub-title { margin-top: 4px; }
/* 2026-10-09 (label unification): one card per input at every width, two side by side when there is room. As table
   columns the long Japanese names had ~100px and broke inside words (「バンクレー / ト」); a card line has the full width. */
.mw-table.mw-sources { display: block; }
.mw-table.mw-sources thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mw-table.mw-sources tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 28px; }
.mw-table.mw-sources tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.mw-table.mw-sources th, .mw-table.mw-sources td { display: block; padding: 2px 0; border-bottom: 0; text-align: left; }
.mw-table.mw-sources td::before { content: attr(data-label) "："; color: var(--text-2); font-size: 12px; }
/* breaks at the spaces and around a note in brackets, not inside a word */
.mw-table.mw-sources td { white-space: normal; word-break: keep-all; overflow-wrap: break-word; }
.mw-table.mw-sources .mw-paren { display: inline-block; }
.mw-bar { display: block; height: 8px; background: var(--neutral-2); border-radius: 3px; margin-top: 6px; }
.mw-bar span { display: block; height: 100%; background: var(--neutral-1); border-radius: 3px; }
.mw-col-time, .mw-col-state { display: block; font-size: 11px; font-weight: 400; color: var(--text-dim); }
.mw-col-time { cursor: help; }
.mw-flag { margin-left: 2px; color: var(--accent); }
.mw-delta { display: block; font-size: 11px; color: var(--text-2); }
.mw-delta.flat { color: var(--text-dim); }
.mw-compare-agg { margin-bottom: 4px; }
.mw-table-title { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.mw-table-title.mw-gap-top { margin-top: 22px; }
.mw-compare-agg tbody th { font-size: 14px; }
.mw-compare-agg td { font-size: 15px; font-weight: 600; }
.mw-dl { margin: 0; }
.mw-dl div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 13px; }
.mw-dl div:first-child { border-top: 0; }
.mw-dl dt { color: var(--text-2); flex-shrink: 0; }
.mw-dl dd { margin: 0; text-align: right; flex: 1 0 auto; max-width: 100%; word-break: keep-all; overflow-wrap: break-word; } /* a value that does not fit beside its label goes under it (never squeezed to a few pixels) and breaks at its spaces */
.mw-details { margin-top: 12px; }
.mw-details summary { cursor: pointer; font-size: 12px; color: var(--text-2); padding: 4px 0; }
.mw-details summary:hover { color: var(--accent); }

/* Controls */
.mw-select { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.mw-select select {
  font: inherit; font-size: 12px; color: var(--text); background: var(--panel);
  border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px;
}
.mw-toggles { display: flex; flex-wrap: wrap; gap: 6px 14px; border: 0; margin: 0; padding: 0; }
.mw-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.mw-check input { accent-color: var(--accent); margin: 0; }
/* the history range: separate buttons; the chosen one in the light accent */
.mw-seg.mw-ranges { display: flex; flex-wrap: wrap; gap: 6px; border: 0; border-radius: 0; overflow: visible; background: none; }
.mw-seg.mw-ranges button { padding: 5px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel); color: var(--text); }
.mw-seg.mw-ranges button + button { border-left: 1px solid var(--border); }
.mw-seg.mw-ranges button[aria-pressed="true"] { background: var(--accent-light); color: var(--accent); border-color: var(--accent-line); font-weight: 600; }
.mw-ranges .mw-pro-tag { margin-left: 4px; font-size: 9px; padding: 0 3px; }

/* Rate path chart (SVG). Series differ by line style too, never by colour alone. */
.mw-chart { margin: 0; overflow-x: auto; position: relative; }
.mw-chart svg { display: block; width: 100%; height: auto; min-width: 560px; }
.mw-grid { stroke: var(--rule); stroke-width: 1; }
.mw-axis { fill: var(--text-2); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.mw-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mw-rp-current { stroke: var(--accent); stroke-width: 2.5; }
.mw-rp-1w { stroke: var(--text-2); stroke-dasharray: 6 4; }
.mw-rp-1m { stroke: var(--text-dim); stroke-dasharray: 1 4; stroke-width: 2.5; }
.mw-dot { stroke: none; }
.mw-dot.mw-rp-current { fill: var(--accent); } .mw-dot.mw-rp-1w { fill: var(--text-2); } .mw-dot.mw-rp-1m { fill: var(--text-dim); }
.mw-ref { stroke: var(--text-dim); stroke-dasharray: 3 3; }
.mw-ref-label { fill: var(--text-dim); font-size: 10px; }
.mw-legend-line { display: inline-block; width: 22px; height: 0; border-top: 2px solid var(--text-2); }
.mw-legend-line.mw-rp-current { border-top: 3px solid var(--accent); }
.mw-legend-line.mw-rp-1w { border-top: 2px dashed var(--text-2); }
.mw-legend-line.mw-rp-1m { border-top: 3px dotted var(--text-dim); }

/* History chart (織り込み推移): a 100% stacked area, cut at the bottom, hike on top. The SVG plot is
   stretched to a fixed height; axes, latest values and the tooltip are HTML, so nothing scrolls or
   distorts. One colour per scenario, never swapped by rank: 据え置き the accent, 利下げ a light accent,
   利上げ grey, split by 2px white gaps; the most likely one is marked by its label (weight, a light
   background). Missing stretches: one faint band each, never a stripe per day (weekends are carried). */
.mw-hchart { margin: 0; --hchart-h: 340px; }
.mw-hchart-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; margin-bottom: 12px; }
.mw-hlegend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; font-size: 12px; color: var(--text-2); }
.mw-hlegend li { display: inline-flex; align-items: center; gap: 6px; }
.mw-hkey { display: inline-block; width: 12px; height: 10px; border-radius: 2px; flex-shrink: 0; background: var(--neutral-2); }
.mw-hkey.cut { background: var(--accent-soft); }
.mw-hkey.hold { background: var(--accent); }
.mw-hkey.hike { background: var(--neutral-1); }
.mw-hlatest-label { font-size: 12px; color: var(--text-2); }
.mw-hchart-frame { display: grid; grid-template-columns: 36px minmax(0, 1fr) 92px; column-gap: 10px; }
.mw-hchart-y { position: relative; height: var(--hchart-h); }
.mw-hchart-y span { position: absolute; right: 0; transform: translateY(-50%); font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.mw-hchart-plot { position: relative; height: var(--hchart-h); cursor: crosshair; touch-action: pan-y; border-radius: 4px; }
.mw-hchart-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mw-hgrid { stroke: rgba(255, 255, 255, 0.7); stroke-width: 1; }
.mw-harea { fill: var(--neutral-2); }
.mw-harea.cut { fill: var(--accent-soft); }
.mw-harea.hold { fill: var(--accent); }
.mw-harea.hike { fill: var(--neutral-1); }
.mw-hedge { fill: none; stroke: #FFFFFF; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mw-hevent { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; }
.mw-hevents { position: absolute; inset: 0; pointer-events: none; }
.mw-hevent-label { position: absolute; bottom: 4px; transform: translateX(-50%); font-size: 10px; line-height: 1.4; color: var(--text-2); background: var(--panel); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; white-space: nowrap; }
.mw-hkey.event { width: 0; height: 12px; border-left: 1px dashed var(--text-2); border-radius: 0; background: none; }
.mw-hcross { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--text); pointer-events: none; }
.mw-htip {
  position: absolute; top: 8px; transform: translateX(10px); min-width: 150px; padding: 10px 12px; z-index: 2; pointer-events: none;
  background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; box-shadow: var(--shadow);
}
.mw-htip.flip { transform: translateX(calc(-100% - 10px)); }
.mw-htip p { margin: 0; }
.mw-htip .head { color: var(--text-2); margin-bottom: 6px; white-space: nowrap; }
.mw-htip .row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 8px; white-space: nowrap; }
.mw-htip .row + .row { margin-top: 2px; }
.mw-htip .row .name { color: var(--text-2); }
.mw-htip .row b { color: var(--text); font-weight: 700; text-align: right; }
.mw-htip .empty { color: var(--text-2); }
.mw-htip .sub { margin: -2px 0 6px; font-size: 11px; color: var(--text-2); }
.mw-htip .row.is-top b { color: var(--accent); }
.mw-htip .row.is-top .name { color: var(--text); font-weight: 600; }
.mw-hline { display: inline-block; width: 12px; height: 0; border-top: 3px solid var(--neutral-1); border-radius: 2px; }
.mw-hline.cut { border-color: var(--accent-soft); }
.mw-hline.hold { border-color: var(--accent); }
.mw-hline.hike { border-color: #BDB5B8; }
.mw-hlatest { position: relative; list-style: none; margin: 0; padding: 0; height: var(--hchart-h); }
.mw-hlatest li { position: absolute; left: 0; right: 0; transform: translateY(-50%); display: grid; grid-template-columns: 10px minmax(0, 1fr); column-gap: 6px; align-items: center; line-height: 1.25; }
.mw-hlatest .mw-hkey { grid-row: 1 / span 2; width: 10px; }
.mw-hlatest .name { font-size: 11px; color: var(--text-2); white-space: nowrap; }
.mw-hlatest b { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; }
.mw-hlatest li.is-top { left: -6px; right: -4px; padding: 3px 6px; background: var(--accent-light); border: 1px solid var(--accent-line); border-radius: 6px; }
.mw-hlatest li.is-top b { font-weight: 700; color: var(--accent); }
.mw-hchart-x { position: relative; height: 18px; margin: 6px 102px 0 46px; }
.mw-hchart-x span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mw-hchart-x span.first { transform: none; }
.mw-hchart-x span.last { transform: translateX(-100%); }
.mw-keypoints { margin-top: 18px; max-width: 560px; }
.mw-keypoints th .mw-hkey { margin-right: 6px; vertical-align: -1px; }
.mw-keypoints small { margin-left: 4px; font-size: 11px; font-weight: 400; color: var(--text-2); }

/* Keyboard focus: always visible */
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.mw-card-link:focus-visible { outline: none; }
.mw-card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Responsive ── */
@media (max-width: 1279px) {
  .mw-policy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mw-policy-grid > *, .mw-policy-grid > :nth-child(1), .mw-policy-grid > :nth-child(2), .mw-policy-grid > :nth-child(6), .mw-policy-grid > :nth-child(7) { grid-column: auto; grid-row: auto; }
  .mw-row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mw-env-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mw-detail-layout { grid-template-columns: minmax(0, 1fr); }
  .mw-detail-side { position: static; display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .mw-ad.sidebar .mw-ad-box { min-height: 250px; }
}
/* tablets and phones: the left menu becomes a drawer behind the menu button */
@media (max-width: 959px) {
  .mw-app { display: block; }
  .mw-side {
    position: fixed; top: 0; bottom: 0; left: 0; width: 280px; max-width: 86vw; height: auto; z-index: 40;
    transform: translateX(-100%); visibility: hidden; transition: transform 160ms ease, visibility 0s linear 160ms;
  }
  .mw-side.is-open { transform: none; visibility: visible; transition: transform 160ms ease; }
  .mw-side-close { display: inline-flex; }
  .mw-backdrop { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(23, 18, 20, 0.28); }
  .mw-menu-btn, .mw-topbar-brand { display: inline-flex; }
  .mw-topbar-inner { padding: 12px 20px 0; gap: 10px; min-height: 56px; }
  .mw-topbar-side { gap: 8px; }
  .mw-shell { padding: 20px 20px 48px; gap: 24px; }
  .mw-devbar, .mw-refresh-note { padding: 0 20px; }
  .mw-footer-inner { padding: 20px; }
  .mw-footer-credit { padding: 0 20px 20px; }
  .mw-row-2, .mw-row-3 { grid-template-columns: minmax(0, 1fr); }
  .mw-detail-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mw-detail-side { grid-template-columns: minmax(0, 1fr); }
  .mw-ad.sidebar { max-width: 300px; }
}
@media (max-width: 639px) {
  .mw-policy-grid { grid-template-columns: minmax(0, 1fr); }
  .mw-env-grid { grid-template-columns: minmax(0, 1fr); }
  /* phones: menu, MOGWATCH, search / PRO / account on the first line; the notice and 「更新 16:10」 below */
  .mw-topbar-inner { padding: 10px 16px 0; flex-wrap: wrap; row-gap: 6px; }
  .mw-topbar-brand .mw-brand-name { font-size: 15px; }
  .mw-topbar-side { margin-left: auto; }
  .mw-topbar-status { order: 5; flex-basis: 100%; margin-left: 0; justify-content: flex-end; gap: 10px; }
  .mw-shell { padding: 16px 16px 40px; gap: 20px; }
  .mw-devbar, .mw-refresh-note { padding: 0 16px; }
  .mw-panel, .mw-detail-top { padding: 18px; }
  .mw-pro-pill, .mw-beta-pill { padding: 5px 10px; }
  .mw-focus-item { grid-template-columns: minmax(0, 1fr); }
  .mw-watch-item { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .mw-focus-item .kind { grid-row: auto; }
  .mw-beta-pill span { display: none; }
  .mw-detail-title { font-size: 20px; }
  .mw-detail-title small { display: block; margin: 2px 0 0; font-size: 13px; }
  .mw-detail-kpis .v { font-size: 18px; }
  .mw-tabs [role="tab"] { flex: 1; padding: 10px 8px; }
  .mw-hchart { --hchart-h: 240px; }
  /* the latest values: 72px, so 「据え置き」 and 「68.8%」 fit inside the highlighted one */
  .mw-hchart-frame { grid-template-columns: 30px minmax(0, 1fr) 72px; column-gap: 8px; }
  .mw-hchart-x { margin: 6px 80px 0 38px; }
  .mw-hchart-x span.minor { display: none; }
  .mw-keypoints { max-width: none; }
  .mw-ad.leaderboard .mw-ad-box { min-height: 100px; }
  .mw-footer .copy { margin-left: 0; }
  /* 24時間の変化 on phones: one card per bank, each scenario on one line (now, the day before, the change) */
  .mw-table.mw-day { display: block; }
  .mw-table.mw-day thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mw-table.mw-day tbody { display: block; }
  .mw-table.mw-day tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .mw-table.mw-day th[scope="row"] { display: block; padding: 0 0 4px; border-bottom: 0; }
  .mw-table.mw-day th[scope="row"] small { display: inline; margin-left: 6px; }
  .mw-table.mw-day td { display: flex; justify-content: flex-end; align-items: baseline; gap: 10px; padding: 3px 0; border-bottom: 0; }
  .mw-table.mw-day td::before { content: attr(data-label); margin-right: auto; color: var(--text-2); font-size: 12px; }
  .mw-table.mw-day td small { display: inline; }
  .mw-table.mw-evidence { display: block; }
  .mw-table.mw-evidence thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mw-table.mw-evidence tbody { display: block; }
  .mw-table.mw-evidence tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .mw-table.mw-evidence th[scope="row"] { display: block; padding: 0 0 4px; border-bottom: 0; white-space: normal; }
  .mw-table.mw-evidence td { display: flex; justify-content: flex-end; align-items: baseline; gap: 10px; padding: 3px 0; border-bottom: 0; text-align: right; }
  .mw-table.mw-evidence td::before { content: attr(data-label); margin-right: auto; color: var(--text-2); font-size: 12px; flex: none; }
  /* ファンダメンタル状態 on phones: one card per economy, each item with its name */
  .mw-table.mw-fundamentals { display: block; }
  .mw-table.mw-fundamentals thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mw-table.mw-fundamentals tbody { display: block; }
  .mw-table.mw-fundamentals tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .mw-table.mw-fundamentals th[scope="row"] { display: block; padding: 0 0 4px; border-bottom: 0; }
  .mw-table.mw-fundamentals th[scope="row"] small { display: inline; margin-left: 6px; }
  .mw-table.mw-fundamentals td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 3px 0; border-bottom: 0; white-space: normal; }
  .mw-table.mw-fundamentals td::before { content: attr(data-label); color: var(--text-2); font-size: 12px; }
  .mw-table.mw-fundamentals td small { display: inline; margin-left: 6px; }
}

/* AIファンダメンタル分析 v2 (Macro Engine, 2026-10-10): 根拠データ in four columns — a table on wide screens (its item
   names and notes wrap); up to 1279px each item is a card of labelled lines, as on phones */
.mw-table.mw-evidence-macro th[scope="row"] { white-space: normal; min-width: 10em; }
.mw-table.mw-evidence-macro td { white-space: normal; }
.mw-table.mw-evidence-macro .mw-kind { white-space: normal; }
@media (max-width: 1279px) {
  .mw-table.mw-evidence-macro { display: block; }
  .mw-table.mw-evidence-macro thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mw-table.mw-evidence-macro tbody { display: block; }
  .mw-table.mw-evidence-macro tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .mw-table.mw-evidence-macro th[scope="row"] { display: block; padding: 0 0 4px; border-bottom: 0; min-width: 0; }
  .mw-table.mw-evidence-macro td { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 2px 10px; padding: 3px 0; border-bottom: 0; text-align: right; }
  .mw-table.mw-evidence-macro td .mw-evidence-when { flex-basis: 100%; }
  .mw-table.mw-evidence-macro td::before { content: attr(data-label); margin-right: auto; color: var(--text-2); font-size: 12px; flex: none; }
}

/* The same explanation is visible in initial HTML and the interactive view. */
.mw-seo-heading { font-size:clamp(20px,3vw,28px); line-height:1.6; margin:0 0 20px; }
.mw-seo-copy p { line-height:1.9; }
.mw-seo-copy nav { line-height:2; overflow-wrap:anywhere; }
