/* ==================================================================
   MK Oracle — screen layer (mk-ui.css), MK Design System v1.0.0
   Shared by the SPA (/) and every server-rendered page.
   Tokens: /theme.css (static/mk-tokens.css = the kit token block plus
   ORACLE's alias names). This file declares no theme colour.

   Layers: element defaults sit in @layer mk-base so any page-local
   rule overrides them; the kit components, the shell and the legacy
   class mappings are unlayered and follow normal specificity.

   Gates: iPhone Safari 390 px first, then 360/320 and desktop. The
   document never scrolls sideways, touch targets are >= 44 px, focus
   is always visible, motion respects reduced-motion, print is light.
   ================================================================== */
@layer mk-base;

/* ---------------------------------------------------------- base (kit) */
@layer mk-base {
  *, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
  html { background: var(--t-page); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background: var(--t-page); color: var(--t-ink);
    font-family: var(--font-sans); font-size: 15px; line-height: 1.5;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--dur-moderate) ease;
  }
  ::selection { background: var(--acc-soft); }
  a[href], button:not(:disabled), [role="button"]:not([aria-disabled="true"]), select:not(:disabled),
  input[type="checkbox"]:not(:disabled), input[type="radio"]:not(:disabled), summary { cursor: pointer; }
  :focus-visible { outline: 2px solid var(--mk-focus); outline-offset: 2px; }
  td :focus-visible, th:focus-visible, td:focus-visible { outline-offset: -2px; }
  /* WCAG 2.4.11: focus moved backwards (Shift+Tab) is scrolled clear of the sticky
     64px top bar. Anchors keep their 140px offset: 76 padding + 64 margin. */
  html { scroll-padding-top: 76px; }
  [id] { scroll-margin-top: 64px; }

  h1, h2, h3, h4 { color: var(--t-ink); font-family: var(--font-sans); font-weight: 600; }
  h1 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.005em; margin: 0 0 12px; }
  h2 { font-size: 1.0625rem; line-height: 1.35; margin: 24px 0 10px; }
  h3 { font-size: 0.9375rem; line-height: 1.4; margin: 16px 0 8px; }
  /* section titles directly under the page h1 are h2 for a valid outline (WCAG 1.3.1)
     but keep the compact h3 metrics of the dense engine pages */
  h2.mk-sec { font-size: 0.9375rem; line-height: 1.4; margin: 16px 0 8px; }
  p { max-width: 78ch; }
  small { font-size: 0.8125rem; }
  img, video, canvas, svg { max-width: 100%; }
  img, video { height: auto; }
  pre { white-space: pre-wrap; overflow-x: auto; max-width: 100%; }
  code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.875em; }
  a { color: var(--acc-ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
  @media (hover: hover) { a:hover { color: var(--t-ink); } }

  button, input[type="submit"], input[type="button"] {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: 2.5rem; padding: 0 0.875rem; border-radius: 999px; border: 0;
    background: var(--t-raised); color: var(--t-ink);
    font: inherit; font-size: 0.9375rem; font-weight: 500; line-height: 1.2;
    text-decoration: none; touch-action: manipulation; white-space: nowrap;
    transition: transform var(--dur-fast) var(--ease-premium), background-color var(--dur-micro) ease, color var(--dur-micro) ease;
  }
  @media (hover: hover) { button:hover:not(:disabled) { background: var(--t-raised-2); } }
  button:active:not(:disabled) { background: var(--acc-soft); transform: scale(0.97); transition-duration: 50ms; }
  button:disabled, button[aria-disabled="true"] { cursor: default; opacity: 0.6; transform: none; }

  input, select, textarea {
    min-height: 2.75rem; padding: 0.5rem 0.75rem; border-radius: 10px; max-width: 100%;
    border: 1px solid var(--t-line-strong); background: var(--t-card); color: var(--t-ink);
    font: inherit; font-size: 1rem;
  }
  input::placeholder, textarea::placeholder { color: var(--t-ink-3); opacity: 1; text-transform: none; letter-spacing: 0; }
  input[type="checkbox"], input[type="radio"] { min-height: 0; width: 1.125rem; height: 1.125rem; accent-color: var(--acc); }
  form { max-width: 100%; }

  /* tables: the kit's dense data table, as the default for every table */
  table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.9375rem; background: var(--t-card); }
  th, td {
    height: 2.75rem; padding: 0.5rem 0.875rem; border-bottom: 1px solid var(--t-line);
    text-align: left; vertical-align: middle; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
  }
  td + td, th + th { border-left: 1px solid var(--t-line); }
  th { color: var(--t-ink-3); font-weight: 500; font-size: 0.8125rem; background: var(--t-card); white-space: nowrap; }
  tbody tr:last-child > td { border-bottom: 0; }
  @media (hover: hover) { tbody tr:hover > td { background-color: color-mix(in srgb, var(--t-raised) 45%, transparent); } }

  /* Phones: 16px fields stop iOS Safari zooming on focus */
  @media (max-width: 639px) { input, select, textarea { font-size: max(16px, 1em); } }
  @media (pointer: coarse) {
    button, input[type="submit"], input[type="button"], select, summary { min-height: 2.75rem; }
  }
}

/* ---------------------------------------------------------- kit components (verbatim) */
.container { width: 100%; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-inline: 2rem; max-width: 1320px; } }

.t-card, .mk-glass-1, .mk-glass-2 { background: var(--t-card); border: 1px solid var(--t-line); border-radius: 10px; }
.t-card { overflow: hidden; }
.mk-glass-3 { background: var(--t-band); border: 1px solid var(--t-line-strong); border-radius: 14px; box-shadow: var(--t-shadow); }

.t-band {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  min-height: 3.25rem; padding: 0 1rem; background: var(--t-band); border-bottom: 1px solid var(--t-line);
}
.t-title { color: var(--acc-ink); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.005em; margin: 0; }
.t-takeaway { padding: 0.75rem 1rem; border-bottom: 1px solid var(--t-line); color: var(--t-ink); font-size: 0.9375rem; line-height: 1.45; margin: 0; max-width: none; }
.t-body { padding: 1rem; min-width: 0; }
.t-foot { padding: 0.625rem 1rem; border-top: 1px solid var(--t-line); color: var(--t-ink-3); font-size: 0.75rem; }
.t-foot b, .t-foot strong { color: var(--t-ink-2); font-weight: 500; }

.mk-label { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--t-ink-3); margin: 0; }
.mk-num, .t-num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; letter-spacing: 0; }
.mk-rule { height: 1px; background: linear-gradient(90deg, var(--acc) 0, var(--t-line) 120px, var(--t-line) 100%); }

.mk-press {
  transition: transform var(--dur-fast) var(--ease-premium), background-color var(--dur-micro) ease,
    border-color var(--dur-micro) ease, color var(--dur-micro) ease;
}
.mk-press:active:not(:disabled) { transform: scale(0.97); transition-duration: 50ms; }
.mk-enter { animation: mk-enter var(--dur-slow) var(--ease-premium) both; }
.mk-fade { animation: mk-fade 200ms ease both; }
.mk-scroll-x { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--t-line-strong) transparent; -webkit-overflow-scrolling: touch; }
.t-no-scrollbar { scrollbar-width: none; }
.t-no-scrollbar::-webkit-scrollbar { display: none; }
.print-only { display: none; }

.t-tile { position: relative; transition: background-color var(--dur-micro) ease, color var(--dur-micro) ease, border-color var(--dur-micro) ease; }
.t-tile .t-tile-go { opacity: 0; transform: translateX(-4px); transition: opacity var(--dur-fast) ease, transform var(--dur-fast) var(--ease-premium); }
.t-tile:focus-visible .t-tile-go, .t-tile[data-pressed="true"] .t-tile-go { opacity: 1; transform: none; }
@media (hover: hover) {
  .t-tile:hover { background-color: var(--t-raised); }
  .t-tile:hover .t-tile-go { opacity: 1; transform: none; }
}
.t-tile:active, .t-tile[data-pressed="true"] { background-color: var(--acc-soft); }
.t-tile-go { color: var(--acc-ink); font-size: 0.75rem; font-weight: 500; white-space: nowrap; }

.t-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9375rem; }
.t-table th, .t-table td {
  height: 2.75rem; padding: 0 0.875rem; border-bottom: 1px solid var(--t-line); white-space: nowrap;
  text-align: right; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}
.t-table td + td, .t-table th + th { border-left: 1px solid var(--t-line); }
.t-table thead th { color: var(--t-ink-3); font-weight: 500; background: var(--t-card); }
.t-table .t-stick { position: sticky; left: 0; z-index: 1; text-align: left; background: var(--t-card); border-right: 1px solid var(--t-line-strong); }
.t-table tbody tr:hover td { background-color: color-mix(in srgb, var(--t-raised) 45%, transparent); }
.t-table tbody tr:hover td.t-stick { background-color: color-mix(in srgb, var(--t-raised) 45%, var(--t-card)); }
.t-v { color: var(--acc-ink); }
.t-e { color: var(--t-ink); }
.t-s { color: var(--t-ink-3); }

.t-chip {
  display: inline-flex; align-items: center; gap: 0.375rem; height: 2.25rem; padding: 0 0.75rem; border-radius: 0.5rem;
  background: var(--t-raised); color: var(--t-ink); font-size: 0.9375rem; white-space: nowrap; transition: background-color var(--dur-micro) ease;
}
@media (hover: hover) { .t-chip:hover { background: var(--t-raised-2); } }
.t-chip:active, .t-chip[data-state="open"] { background: var(--acc-soft); }

.t-seg { display: inline-flex; padding: 0.25rem; border-radius: 999px; background: var(--t-raised); }
.t-seg button {
  height: 2.25rem; min-height: 2.25rem; padding: 0 1rem; border-radius: 999px; color: var(--t-ink); font-size: 0.9375rem; background: transparent;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.t-seg button[aria-pressed="true"], .t-seg button[aria-selected="true"] { background: var(--t-raised-2); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18); }
:root[data-mode="light"] .t-seg button[aria-pressed="true"], :root[data-mode="light"] .t-seg button[aria-selected="true"] { background: var(--t-card); }

.t-tabs { display: flex; gap: 0.25rem; overflow-x: auto; border-bottom: 1px solid var(--t-line); scrollbar-width: none; }
.t-tabs::-webkit-scrollbar { display: none; }
.t-tab {
  position: relative; flex-shrink: 0; height: 2.875rem; min-height: 2.875rem; padding: 0 0.875rem; color: var(--t-ink-2);
  font-size: 1rem; white-space: nowrap; transition: color var(--dur-micro) ease; background: transparent; border-radius: 0;
}
.t-tab::after {
  content: ""; position: absolute; left: 0.5rem; right: 0.5rem; bottom: -1px; height: 2px; border-radius: 2px;
  background: var(--acc); transform: scaleX(0); transition: transform var(--dur-normal) var(--ease-premium);
}
@media (hover: hover) { .t-tab:hover { color: var(--t-ink); background: transparent; } }
.t-tab[aria-selected="true"], .t-tab[aria-current="page"] { color: var(--t-ink); }
.t-tab[aria-selected="true"]::after, .t-tab[aria-current="page"]::after { transform: scaleX(1); }

.t-pill {
  display: inline-flex; align-items: center; gap: 0.5rem; height: 2.5rem; padding: 0 0.875rem; border-radius: 999px;
  background: var(--t-raised); color: var(--t-ink); transition: background-color var(--dur-micro) ease;
}
@media (hover: hover) { .t-pill:hover { background: var(--t-raised-2); } }
.t-pill:active { background: var(--acc-soft); }

.t-btn-primary { background: var(--acc); color: var(--acc-on); font-weight: 600; }
@media (hover: hover) { .t-btn-primary:hover:not(:disabled) { filter: brightness(1.08); } }

.t-flag { display: inline-flex; align-items: center; gap: 0.375rem; height: 1.75rem; padding: 0 0.625rem; border-radius: 999px; font-size: 0.8125rem; border: 1px solid transparent; white-space: nowrap; }
.t-flag[data-tone="up"] { color: var(--t-up); background: color-mix(in srgb, var(--t-up) 12%, transparent); border-color: color-mix(in srgb, var(--t-up) 28%, transparent); }
.t-flag[data-tone="down"] { color: var(--t-down); background: color-mix(in srgb, var(--t-down) 12%, transparent); border-color: color-mix(in srgb, var(--t-down) 28%, transparent); }
.t-flag[data-tone="neutral"] { color: var(--t-ink-2); background: var(--t-raised); }

.t-reader { font-size: 1.0625rem; line-height: 1.65; color: var(--t-ink); overflow-wrap: break-word; }
.t-reader > * + * { margin-top: 0.9em; }
.t-reader :is(h2, h3, h4) { margin-top: 1.4em; font-weight: 600; line-height: 1.3; }
.t-reader a { color: var(--acc-ink); text-decoration: underline; text-underline-offset: 2px; }
.t-reader blockquote { border-left: 2px solid var(--t-line-strong); padding-left: 1em; color: var(--t-ink-2); }
.t-reader img { max-width: 100%; height: auto; border-radius: 0.75rem; }

@keyframes mk-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes mk-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes t-pop { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
.t-pop { animation: t-pop 280ms var(--ease-premium) both; }
@keyframes mk-step-next {
  0%, 100% { border-color: color-mix(in oklab, var(--acc) 45%, var(--t-line)); }
  50% { border-color: var(--acc); background-color: var(--acc-soft); }
}
.mk-step-next { border-color: color-mix(in oklab, var(--acc) 45%, var(--t-line)); animation: mk-step-next 1.4s var(--ease-premium) 160ms 2; }
@keyframes mk-spin { to { transform: rotate(360deg); } }
@keyframes mk-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------------------------------------------------------- helpers */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.mk-skip {
  position: fixed; left: 12px; top: -100px; z-index: 100;
  background: var(--acc); color: var(--acc-on); padding: 12px 16px; border-radius: 8px; font-weight: 600; text-decoration: none;
}
.mk-skip:focus { top: 12px; }
.mk-up, .pos { color: var(--t-up); }
.mk-down, .neg { color: var(--t-down); }
.mk-src { color: var(--t-ink-3); font-size: 0.75rem; }
.mk-src b { color: var(--t-ink-2); font-weight: 500; }
.mk-unavail { color: var(--t-ink-3); font-size: 0.9375rem; }
.mk-shimmer, .skeleton i, .sk-line, .sk-big {
  background: linear-gradient(90deg, var(--t-raised) 0%, var(--t-raised-2) 50%, var(--t-raised) 100%) !important;
  background-size: 200% 100% !important; animation: mk-shimmer 1.6s linear infinite;
}

/* ---------------------------------------------------------- top bar */
.mk-topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--t-page) 90%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(12px); backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--t-line);
}
@supports not (background: color-mix(in srgb, red 50%, transparent)) { .mk-topbar { background: var(--t-page); } }
.mk-topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 64px; }
.mk-topbar__left, .mk-topbar__right { display: flex; align-items: center; gap: 4px; min-width: 0; }
.mk-topbar__left { flex: 1 1 auto; gap: 8px; }
.mk-topbar__right { flex: none; }
.mk-homeid {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding-right: 4px;
  color: var(--t-ink); font-size: 0.9375rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
@media (hover: hover) { .mk-homeid:hover { color: var(--t-ink); } }
.mk-mark { display: block; flex: none; }
.mk-emblem { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: 4px; border-radius: 8px; }
html[data-page="home"] .mk-back, html[data-page="home"] .mk-searchpill { display: none; }
html[data-page="inner"] .mk-homeid { display: none; }
/* phones: the home identity already carries the emblem at top-left */
@media (max-width: 767px) { html[data-page="home"] .mk-emblem { display: none; } }

.mk-iconbtn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 999px; border: 0;
  background: transparent; color: var(--t-ink-2); text-decoration: none;
}
@media (hover: hover) { .mk-iconbtn:hover:not(:disabled) { background: var(--t-raised); color: var(--t-ink); } }
.mk-iconbtn:active:not(:disabled) { background: var(--acc-soft); }

.mk-searchpill {
  display: inline-flex; align-items: center; gap: 8px; width: 220px; min-width: 0; height: 40px; min-height: 40px;
  padding: 0 8px 0 12px; border-radius: 999px; background: var(--t-raised); color: var(--t-ink-2);
  font-size: 0.9375rem; font-weight: 400; justify-content: flex-start;
}
.mk-searchpill span { flex: 1 1 auto; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.mk-searchpill kbd, .mk-herosearch kbd {
  font-family: var(--font-sans); font-size: 0.75rem; color: var(--t-ink-3); line-height: 1;
  border: 1px solid var(--t-line-strong); border-radius: 4px; padding: 3px 6px;
}
@media (hover: hover) { .mk-searchpill:hover { background: var(--t-raised-2); color: var(--t-ink); } }

.mk-desknav { display: flex; align-items: center; gap: 4px; }
.mk-navlink {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: none;
  height: 40px; min-height: 40px; min-width: 40px; padding: 0 12px; border-radius: 999px; border: 0;
  background: transparent; color: var(--t-ink-2); font-size: 0.9375rem; font-weight: 500; text-decoration: none; white-space: nowrap;
}
@media (hover: hover) { .mk-navlink:hover { background: var(--t-raised); color: var(--t-ink); } }
.mk-navlink[aria-current="page"], .mk-navlink[data-active="true"] { background: var(--t-raised); color: var(--acc-ink); }
.mk-navlink[aria-expanded="true"] { background: var(--t-raised); color: var(--t-ink); }

/* palette picker: light/dark toggle + accent dots (one dot + popover when narrow) */
.mk-palette { position: relative; display: inline-flex; align-items: center; gap: 2px; }
.mk-dots { display: inline-flex; align-items: center; gap: 0; }
.mk-dot {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 40px; min-height: 40px; padding: 0; border-radius: 999px; border: 0; background: transparent;
}
.mk-dot i {
  display: block; width: 18px; height: 18px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t-ink) 22%, transparent);
  transition: box-shadow var(--dur-fast) ease, transform var(--dur-fast) var(--ease-premium);
}
.mk-dot[data-accent-pref="orange"] i { background: var(--mk-sw-orange); }
.mk-dot[data-accent-pref="green"] i { background: var(--mk-sw-green); }
.mk-dot[data-accent-pref="pink"] i { background: var(--mk-sw-pink); }
.mk-dot[data-accent-pref="cyan"] i { background: var(--mk-sw-cyan); }
.mk-dot[data-accent-pref="violet"] i { background: var(--mk-sw-violet); }
.mk-dot--one { width: 40px; }
.mk-dot--one i { background: var(--acc); }
.mk-dot[aria-pressed="true"] i, .mk-dot--one[aria-expanded="true"] i { box-shadow: 0 0 0 2px var(--t-page), 0 0 0 4px var(--t-ink); }
@media (hover: hover) { .mk-dot:hover { background: var(--t-raised); } .mk-dot:hover i { transform: scale(1.08); } }
.mk-dot:active { background: var(--acc-soft); }
.mk-modebtn .mk-i-moon { display: none; }
:root[data-mode="light"] .mk-modebtn .mk-i-sun { display: none; }
:root[data-mode="light"] .mk-modebtn .mk-i-moon { display: block; }
.mk-pop {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 75; width: 256px;
  display: grid; gap: 8px; padding: 12px;
  background: var(--t-band); border: 1px solid var(--t-line-strong); border-radius: 14px; box-shadow: var(--t-shadow);
}
.mk-pop[hidden] { display: none; }
.mk-pop .t-seg { display: flex; }
.mk-pop .t-seg button { flex: 1 1 0; }
.mk-pop__dots { display: grid; gap: 2px; }
.mk-dot--row {
  width: 100%; justify-content: flex-start; gap: 12px; padding: 0 10px; height: 44px; min-height: 44px;
  border-radius: 8px; color: var(--t-ink); font-size: 0.9375rem;
}
.mk-dot--row[aria-pressed="true"] { background: var(--t-raised); }
.mk-dot--row[aria-pressed="true"]::after { content: "✓"; margin-left: auto; color: var(--acc-ink); font-weight: 600; }

/* responsive top bar */
.mk-dot--one { display: none; }
@media (max-width: 1279px) {
  .mk-dots { display: none; }
  .mk-dot--one { display: inline-flex; }
}
@media (max-width: 1099px) {
  .mk-navlink { padding: 0; width: 40px; }
  .mk-navlink .mk-navlink__label {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
  }
}
@media (min-width: 1280px) { .mk-searchpill { width: 288px; } }
@media (max-width: 767px) {
  .mk-desknav, .mk-modebtn, .mk-topbar__right > a.mk-iconbtn { display: none; }
}
@media (max-width: 639px) {
  .mk-searchpill { display: none; }
}

/* nav progress + page-open pill */
.mk-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--acc); opacity: 0; pointer-events: none; }
html.mk-navigating .mk-progress { opacity: 1; animation: mk-progress 12s var(--ease-premium) forwards; }
@keyframes mk-progress { 0% { width: 0 } 10% { width: 35% } 60% { width: 75% } 100% { width: 92% } }
.mk-navstatus {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 85;
  display: inline-flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 999px; font-size: 0.8125rem; font-weight: 500;
  background: var(--t-band); color: var(--t-ink); border: 1px solid var(--t-line-strong); box-shadow: var(--t-shadow);
}
.mk-navstatus[hidden] { display: none; }
.mk-elapsed { color: var(--t-ink-2); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- phone tab bar */
.mk-tabbar { display: none; }
@media (max-width: 767px) {
  /* WCAG 2.4.11: a control reached by Tab is scrolled clear of the fixed tab bar */
  html { scroll-padding-bottom: calc(max(0.75rem, env(safe-area-inset-bottom), var(--mk-badge-lift, 0px)) + 80px); }
  .mk-tabbar {
    /* --mk-badge-lift: room for the host platform's corner badge, set by mk-ui.js */
    position: fixed; left: 12px; right: 12px; bottom: max(0.75rem, env(safe-area-inset-bottom), var(--mk-badge-lift, 0px)); z-index: 45;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; padding: 6px;
    background: color-mix(in srgb, var(--t-band) 95%, transparent);
    -webkit-backdrop-filter: saturate(140%) blur(12px); backdrop-filter: saturate(140%) blur(12px);
    border: 1px solid var(--t-line-strong); border-radius: 999px; box-shadow: var(--t-shadow);
  }
}
.mk-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0;
  height: 52px; min-height: 48px; padding: 0 2px; border: 0; border-radius: 999px; background: transparent;
  color: var(--t-ink-2); font-size: 11px; font-weight: 500; line-height: 1; text-decoration: none;
}
.mk-tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-tab[aria-current="page"], .mk-tab[data-active="true"] { background: var(--t-raised); color: var(--acc-ink); }
.mk-tab[aria-expanded="true"] { background: var(--t-raised); color: var(--t-ink); }
.mk-tab:active { background: var(--acc-soft); transform: none; }
@media (max-width: 359px) { .mk-tab { font-size: 10px; } .mk-tabbar { left: 8px; right: 8px; } }

/* ---------------------------------------------------------- sheets, dialogs, toasts */
.mk-scrim { position: fixed; inset: 0; z-index: 60; background: var(--t-scrim); animation: mk-fade 200ms ease both; }
.mk-scrim[hidden] { display: none; }
html.mk-locked, html.mk-locked body { overflow: hidden; }

.mk-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  max-height: 86vh; overflow-y: auto; overscroll-behavior: contain;
  padding: 6px 16px max(16px, env(safe-area-inset-bottom), var(--mk-badge-lift, 0px));
  background: var(--t-band); border-top: 1px solid var(--t-line-strong); border-radius: 14px 14px 0 0;
  box-shadow: var(--t-shadow); animation: mk-sheet-up var(--dur-slow) var(--ease-premium) both;
}
@keyframes mk-sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.mk-sheet[hidden] { display: none; }
.mk-sheet__handle { width: 36px; height: 4px; border-radius: 2px; background: var(--t-raised-2); margin: 4px auto 6px; }
.mk-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; }
.mk-sheet__head h2 { margin: 0; font-size: 1.0625rem; }
.mk-sheet__group { margin-top: 8px; }
.mk-sheet__group > .mk-label { padding: 8px 10px 4px; }
.mk-row {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 10px; border-radius: 10px;
  color: var(--t-ink); text-decoration: none;
}
@media (hover: hover) { .mk-row:hover { color: var(--t-ink); } }
.mk-row__icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; border-radius: 8px; background: var(--t-raised); color: var(--t-ink-2);
}
.mk-row__text { display: grid; gap: 1px; min-width: 0; flex: 1 1 auto; }
.mk-row__label { font-size: 0.9375rem; font-weight: 600; }
.mk-row__hint { font-size: 0.8125rem; color: var(--t-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-row[aria-current="page"] .mk-row__label { color: var(--acc-ink); }
.mk-row[aria-current="page"] .mk-row__icon { background: var(--acc-soft); color: var(--acc-ink); }
@media (min-width: 768px) {
  .mk-sheet {
    left: auto; bottom: auto; top: 72px; right: max(16px, calc((100vw - 1320px) / 2 + 32px));
    width: 400px; max-height: calc(100vh - 96px); padding: 6px 12px 12px;
    border: 1px solid var(--t-line-strong); border-radius: 14px;
    animation: mk-enter var(--dur-normal) var(--ease-premium) both;
  }
  .mk-sheet__handle { display: none; }
  .mk-scrim.mk-scrim--clear { background: transparent; animation: none; }
}

.mk-dialog {
  position: fixed; z-index: 80; left: 50%; top: 10vh; transform: translateX(-50%);
  width: min(640px, calc(100vw - 32px)); max-height: 80vh; display: flex; flex-direction: column; overflow: hidden;
  background: var(--t-band); border: 1px solid var(--t-line-strong); border-radius: 14px; box-shadow: var(--t-shadow);
  animation: mk-fade 200ms ease both;
}
.mk-dialog[hidden] { display: none; }
@media (max-width: 639px) { .mk-dialog { top: 8px; width: calc(100vw - 16px); max-height: calc(100vh - 16px); } }
.mk-search__form {
  display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 0 8px 0 16px;
  border-bottom: 1px solid var(--t-line); color: var(--t-ink-3);
}
.mk-search__form:focus-within { box-shadow: inset 0 -2px 0 var(--mk-focus); }
.mk-search__form input {
  flex: 1 1 auto; min-width: 0; height: 56px; border: 0; padding: 0; background: transparent; color: var(--t-ink);
  font-size: 1.0625rem; outline: none; -webkit-appearance: none; appearance: none;
}
.mk-search__form input::-webkit-search-cancel-button { display: none; }
.mk-suggest { overflow-y: auto; padding: 6px; min-height: 0; }
.mk-suggest .mk-label { padding: 10px 10px 4px; }
.mk-opt {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 10px; border-radius: 8px;
  color: var(--t-ink); text-decoration: none; cursor: pointer;
}
.mk-opt b { font-weight: 600; min-width: 4.5em; }
.mk-opt span { color: var(--t-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
.mk-opt .t-tile-go { flex: none; }
.mk-opt[aria-selected="true"] { background: var(--t-raised); }
.mk-opt[aria-selected="true"] .t-tile-go { opacity: 1; transform: none; }
.mk-search__hint { margin: 0; max-width: none; padding: 8px 16px; border-top: 1px solid var(--t-line); color: var(--t-ink-3); font-size: 0.75rem; }
@media (pointer: coarse) { .mk-search__hint { display: none; } }

.mk-toasts {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 90;
  display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none;
}
.mk-toast {
  pointer-events: auto; padding: 12px 14px; border-radius: 10px; font-size: 0.9375rem;
  background: var(--t-band); color: var(--t-ink); border: 1px solid var(--t-line-strong); box-shadow: var(--t-shadow);
  border-left: 3px solid var(--acc); animation: mk-enter var(--dur-normal) var(--ease-premium) both;
}
.mk-toast[data-kind="error"] { border-left-color: var(--t-down); }
.mk-toast[data-act] { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.mk-toast[data-act] > span { flex: 1 1 12rem; min-width: 0; }
.mk-toast__act {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; border-radius: 8px;
  background: var(--acc); color: var(--acc-on); font-weight: 600; text-decoration: none; white-space: nowrap;
}
@media (hover: hover) { .mk-toast__act:hover { color: var(--acc-on); filter: brightness(1.08); } }
/* research report PDF control: "PDF" button + live status (FIX_LOG #39) */
.mk-rpdf-row { display: flex; align-items: center; min-height: 2.75rem; margin: -4px 0 16px; }
.mk-asof + .mk-rpdf-row { margin-top: 10px; }
.mk-rpdf { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-width: 0; max-width: 100%; }
.mk-rpdf__btn, .mk-rpdf__icon { flex: none; }
.mk-rpdf__st { min-width: 0; color: var(--t-ink-3); font-size: 0.8125rem; line-height: 1.35; }
.mk-rpdf__t { font-variant-numeric: tabular-nums; }
.mk-rpdf__act a { color: var(--acc-ink); font-weight: 600; }
.mk-rpdf[data-rpdf="ready"] .mk-rpdf__st { color: var(--t-ink-2); }
.mk-rpdf[data-rpdf="ready"] .mk-rpdf__btn { box-shadow: inset 0 0 0 1px var(--acc); }
.mk-rpdf[data-rpdf="failed"] .mk-rpdf__st { color: var(--t-down); }
.mk-rpdf:is([data-rpdf="starting"], [data-rpdf="analyzing"], [data-rpdf="queued"], [data-rpdf="building"]) .mk-rpdf__icon {
  animation: mk-rpdf-pulse 1.4s ease-in-out infinite;
}
@keyframes mk-rpdf-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .mk-rpdf__icon { animation: none !important; } }
@media (pointer: coarse) {
  .mk-rpdf__btn { min-height: 2.75rem; }
  .mk-rpdf__act a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 6px; vertical-align: middle; }
}

/* ---------------------------------------------------------- page frame */
main {
  flex: 1 0 auto; width: 100%; max-width: 1320px; margin: 0 auto; min-width: 0;
  padding: 24px 2rem 48px; overflow-wrap: break-word;
}
@media (max-width: 1023px) { main { padding: 20px 1.5rem 40px; } }
@media (max-width: 639px) { main { padding: 16px 1rem 32px; } }
main:focus { outline: none; }
.mk-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin: 0 0 16px; }
.mk-pagehead h1 { margin: 0; }
.mk-pagehead__note, .mk-lede { margin: 0; color: var(--t-ink-2); font-size: 0.9375rem; max-width: 78ch; }
.mk-lede { margin: 0 0 16px; }
/* KPI figures (guide sec. 8 StatGrid): 2 columns on phones, up to 4 wide */
.mk-kpirow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: center; margin: 0 0 24px; }
@media (min-width: 900px) { .mk-kpirow { grid-template-columns: minmax(0, 1fr) auto; } }
.mk-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .mk-kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; } }
.mk-kpi { min-width: 0; background: var(--t-card); border: 1px solid var(--t-line); border-radius: 10px; padding: 14px 16px; }
.mk-kpi__label { font-size: 13px; font-weight: 500; color: var(--t-ink-3); margin: 0 0 4px; }
.mk-kpi__value { font-size: 1.5rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.mk-kpi__sub { font-size: 13px; color: var(--t-ink-2); margin-top: 4px; }
.mk-kpirow__donut { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; min-width: 0; }
.mk-kpirow__donut svg { max-width: 100%; height: auto; }
@media (max-width: 639px) { .mk-kpi { padding: 12px; } .mk-kpi__value { font-size: 1.25rem; } }
.mk-benchline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mk-asof { font-size: 0.75rem; color: var(--t-ink-3); }

.mk-footer { border-top: 1px solid var(--t-line); margin-top: 24px; color: var(--t-ink-3); font-size: 0.75rem; }
.mk-footer .container { padding-top: 16px; padding-bottom: calc(28px + var(--mk-badge-lift, 0px)); }
.mk-footer p { max-width: 78ch; margin: 0 0 8px; line-height: 1.5; }
.mk-wordmark { color: var(--t-ink-2); font-weight: 600; letter-spacing: 0.14em; margin-top: 12px !important; }
@media (max-width: 767px) { .mk-footer .container { padding-bottom: calc(104px + env(safe-area-inset-bottom) + var(--mk-badge-lift, 0px)); } }

/* ---------------------------------------------------------- home hero */
.mk-hero { position: relative; isolation: isolate; padding: 40px 0 28px; margin-bottom: 8px; }
.mk-dotfield { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; display: block; pointer-events: none; }
.mk-hero h1 { font-size: 2.5rem; line-height: 1.12; letter-spacing: -0.02em; max-width: 22ch; margin: 0 0 12px; }
.mk-hero h1 em { font-style: normal; color: var(--acc-ink); display: block; }
.mk-hero__lede { color: var(--t-ink-2); font-size: 1.0625rem; margin: 0 0 24px; max-width: 62ch; }
.mk-herosearch {
  display: flex; align-items: center; gap: 8px; max-width: 640px; height: 56px; padding: 5px 5px 5px 16px;
  background: var(--t-card); border: 1px solid var(--t-line); border-radius: 10px; color: var(--t-ink-3);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.mk-herosearch:focus-within { border-color: var(--mk-focus); box-shadow: 0 0 0 1px var(--mk-focus); }
.mk-herosearch input {
  flex: 1 1 auto; min-width: 0; height: 44px; min-height: 44px; border: 0; padding: 0; background: transparent;
  color: var(--t-ink); font-size: 1.0625rem; outline: none;
}
.mk-herosearch .mk-btn--primary { height: 44px; min-height: 44px; flex: none; }
.mk-hero__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
@media (max-width: 639px) {
  .mk-hero { padding: 24px 0 20px; }
  .mk-hero h1 { font-size: 2rem; }
  .mk-hero__lede { font-size: 0.9375rem; margin-bottom: 18px; }
  .mk-herosearch kbd { display: none; }
}
/* How it works: one closed pill; opens to three short steps */
.mk-how { margin-top: 16px; }
.mk-how > summary {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; min-height: 32px; padding: 0 12px;
  border-radius: 999px; background: var(--t-raised); color: var(--t-ink-2); font-size: 0.8125rem; font-weight: 500;
  list-style: none; user-select: none;
}
.mk-how > summary::-webkit-details-marker { display: none; }
.mk-how > summary .mk-how__dots { display: inline-flex; gap: 3px; }
.mk-how > summary .mk-how__dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--t-ink-3); }
.mk-how > summary .mk-how__dots i:first-child { background: var(--acc); }
.mk-how > summary svg { transition: transform var(--dur-normal) var(--ease-premium); }
.mk-how[open] > summary svg { transform: rotate(180deg); }
@media (hover: hover) { .mk-how > summary:hover { background: var(--t-raised-2); color: var(--t-ink); } }
@media (pointer: coarse) { .mk-how > summary { height: 44px; min-height: 44px; } }
.mk-how__steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 900px; }
.mk-how__steps li { background: var(--t-card); border: 1px solid var(--t-line); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.mk-how__steps b { display: block; font-size: 0.9375rem; margin-bottom: 2px; }
.mk-how__steps span { color: var(--t-ink-2); font-size: 0.8125rem; }
.mk-how__steps .mk-how__n { color: var(--acc-ink); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.06em; }
@media (max-width: 767px) { .mk-how__steps { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------- legacy ORACLE classes -> v1.0.0 */
.mk-eyebrow { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--t-ink-3); margin: 0 0 8px; }
.mono, .num { font-family: var(--font-sans); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
td.num, th.num, td.r, th.r, .r { text-align: right; }
td.num, td.r { white-space: nowrap; }

/* buttons: secondary = pill, primary = the one accent button per screen */
.mk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.5rem; padding: 0 0.875rem; border-radius: 999px; border: 0;
  background: var(--t-raised); color: var(--t-ink); font-size: 0.9375rem; font-weight: 500; line-height: 1.2;
  text-decoration: none; white-space: nowrap; touch-action: manipulation;
  transition: transform var(--dur-fast) var(--ease-premium), background-color var(--dur-micro) ease;
}
@media (hover: hover) { .mk-btn:hover { background: var(--t-raised-2); color: var(--t-ink); } }
.mk-btn:active { background: var(--acc-soft); transform: scale(0.97); }
.mk-btn--primary, button.mk-btn--primary, a.mk-btn--primary {
  min-height: 2.75rem; padding: 0 1rem; border-radius: 8px; background: var(--acc); color: var(--acc-on); font-weight: 600;
}
@media (hover: hover) { .mk-btn--primary:hover, button.mk-btn--primary:hover { background: var(--acc); color: var(--acc-on); filter: brightness(1.08); } }
.mk-btn--primary:active { background: var(--acc); filter: brightness(0.96); }
.mk-btn--ghost { background: transparent; color: var(--t-ink-2); }
@media (hover: hover) { .mk-btn--ghost:hover { background: transparent; color: var(--t-ink); } }

/* action lifecycle: press -> working (elapsed) -> finished | failed */
[data-state="working"] { cursor: progress; }
[data-state="working"]::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; animation: mk-spin 700ms linear infinite;
}
[data-state="done"]::before { content: "✓"; font-weight: 700; animation: t-pop 280ms var(--ease-premium) both; }
[data-state="failed"] { color: var(--t-down) !important; }
[data-state="confirm"] { color: var(--t-down) !important; box-shadow: inset 0 0 0 1px var(--t-down); }

/* working panel for long analyses: says what is happening and for how long */
.mk-working { display: grid; gap: 10px; padding: 16px; border-radius: 10px; background: var(--t-card); border: 1px solid var(--t-line); }
.mk-working__head { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 0.9375rem; }
.mk-working__head::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 2px solid var(--acc); border-right-color: transparent; animation: mk-spin 800ms linear infinite;
}
[data-state-panel="failed"] .mk-working__head::before { animation: none; border-color: var(--t-down); }
.mk-working p { margin: 0; color: var(--t-ink-2); font-size: 0.875rem; }
.mk-working ol { margin: 0; padding-left: 20px; color: var(--t-ink-3); font-size: 0.8125rem; }
.mk-working ol li[data-done="true"] { color: var(--t-ink); }

/* cards: solid module surfaces; a leading heading becomes the title band */
.card {
  background: var(--t-card); border: 1px solid var(--t-line); border-radius: 10px;
  padding: 16px; margin: 16px 0; min-width: 0; box-shadow: none;
}
.card > h2:first-child, .card > h3:first-child {
  display: flex; align-items: center; gap: 0.75rem; min-height: 3.25rem; margin: -16px -16px 16px; padding: 0.625rem 1rem;
  background: var(--t-band); border-bottom: 1px solid var(--t-line); border-radius: 10px 10px 0 0;
  color: var(--acc-ink); font-size: 0.9375rem; font-weight: 600; line-height: 1.35;
}
.kv { display: block; font-size: 0.9375rem; margin: 8px 0; min-width: 0; overflow-wrap: anywhere; }
.kv b { display: inline-block; vertical-align: top; margin-right: 10px; min-width: min(180px, 42%); color: var(--t-ink-2); font-size: 0.8125rem; font-weight: 500; }
.disclaimer { font-style: normal; font-size: 0.75rem; color: var(--t-ink-3); margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--t-line); max-width: 78ch; }
/* inputs and coverage (2026-11-20): problems first; the state is written
   out in words, colour only reinforces it */
.mk-cov__sum { margin: 0 0 10px; font-size: 0.875rem; color: var(--t-ink-2); font-variant-numeric: tabular-nums; }
.mk-cov__list { list-style: none; margin: 0; padding: 0; }
.mk-cov__row { display: grid; grid-template-columns: 7.25rem minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--t-line); break-inside: avoid; }
.mk-cov__row:first-child { border-top: 0; padding-top: 2px; }
.mk-cov__state { justify-self: start; padding: 2px 8px; border: 1px solid var(--t-line-strong); border-radius: 999px; font-size: 0.75rem; font-weight: 600; line-height: 1.4; color: var(--t-ink-3); white-space: nowrap; }
.mk-cov__row[data-status="not_checked"] .mk-cov__state { color: var(--t-fed); border-color: currentColor; }
.mk-cov__row[data-status="partial"] .mk-cov__state { color: var(--t-ink); border-style: dashed; border-color: var(--t-ink-3); }
.mk-cov__body { min-width: 0; overflow-wrap: anywhere; font-size: 0.875rem; line-height: 1.45; }
.mk-cov__body b { display: block; color: var(--t-ink); font-weight: 600; }
.mk-cov__detail { display: block; color: var(--t-ink-2); font-variant-numeric: tabular-nums; }
.mk-cov__needs { display: block; margin-top: 2px; color: var(--t-ink-3); font-size: 0.8125rem; }
.mk-cov__ok { margin-top: 6px; border-top: 1px solid var(--t-line); }
.mk-cov__ok > summary { display: flex; align-items: center; min-height: 2.75rem; padding: 0 2px; color: var(--acc-ink); font-size: 0.875rem; font-weight: 500; list-style: none; }
.mk-cov__ok > summary::-webkit-details-marker { display: none; }
.mk-cov__ok > summary::after { content: ""; width: 7px; height: 7px; margin-left: 10px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform var(--dur-normal) var(--ease-premium); }
.mk-cov__ok[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.mk-cov__ok .mk-cov__row:first-child { border-top: 1px solid var(--t-line); padding-top: 10px; }
.mk-limits { margin-top: 24px; max-width: 78ch; }
.mk-limits :is(h2, h3) { margin: 0 0 6px; font-size: 0.8125rem; font-weight: 600; color: var(--t-ink-2); }
.mk-limits ul { margin: 0; padding-left: 18px; font-size: 0.8125rem; line-height: 1.5; color: var(--t-ink-3); }
@media (max-width: 479px) { .mk-cov__row { grid-template-columns: minmax(0, 1fr); } }
.emptystate { padding: 24px 20px; text-align: center; color: var(--t-ink-2); font-size: 0.9375rem; border: 1px dashed var(--t-line-strong); border-radius: 10px; }

/* tables: every table scrolls inside its own labelled region */
.mk-scroll {
  position: relative; max-width: 100%; overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: var(--t-line-strong) transparent;
  border: 1px solid var(--t-line); border-radius: 10px; margin: 16px 0; background: var(--t-card);
}
.mk-scroll.mk-scroll--tall { max-height: min(78vh, 920px); overflow-y: auto; }
.mk-scroll > table { margin: 0 !important; border: 0 !important; border-radius: 0; min-width: 100%; }
.mk-scroll--tall thead th, .mk-scroll--tall tr:first-child > th { position: sticky; top: 0; z-index: 2; }
.mk-scroll-hint { display: none; margin: -10px 0 12px; font-size: 0.75rem; color: var(--t-ink-3); }
.mk-scroll[data-overflow="true"] + .mk-scroll-hint { display: block; }
@media (hover: hover) and (pointer: fine) { .mk-scroll[data-overflow="true"] + .mk-scroll-hint { display: none; } }

/* SPA symbol lookup page (bare /symbol, /omsscreen, /tearsheet) */
.mk-lookup { display: flex; gap: 8px; max-width: 480px; }
.mk-lookup input { flex: 1 1 auto; min-width: 0; }

/* ---------------------------------------------------------- responsive content */
@media (max-width: 639px) {
  .card { padding: 14px; }
  .card > h2:first-child, .card > h3:first-child { margin: -14px -14px 14px; padding: 0.625rem 0.875rem; }
  .kv b { display: block; min-width: 0; margin: 0 0 2px; }
  th, td { padding: 0.5rem 0.75rem; }
}
@media (pointer: coarse) {
  .mk-iconbtn, .mk-navlink, .mk-searchpill { width: 44px; height: 44px; min-height: 44px; }
  .mk-searchpill { width: 220px; }
  .mk-dot { width: 36px; height: 44px; min-height: 44px; }
  .mk-dot--one { width: 44px; }
  .mk-btn, .t-pill, .t-chip, .t-seg button { min-height: 44px; }
  .t-seg button { height: 44px; }
  td a, .mk-actions a, .mk-tap { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
}
@media (pointer: coarse) and (min-width: 1280px) { .mk-searchpill { width: 288px; } }

/* ---------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  html.mk-navigating .mk-progress { animation: none; width: 60%; }
  .mk-shimmer, .skeleton i, .sk-line, .sk-big { animation: none !important; }
}

/* ---------------------------------------------------------- print: a light, chrome-free research note */
@media print {
  :root { --mk-badge-lift: 0px !important; }
  :root, :root[data-mode="dark"], :root[data-mode="light"] {
    --t-page: #ffffff; --t-card: #ffffff; --t-band: #f5f5f5; --t-raised: #eeeeee; --t-raised-2: #e2e2e2;
    --t-line: #d6d6d6; --t-line-strong: #b5b5b5; --t-ink: #111111; --t-ink-2: #3a3a3a; --t-ink-3: #5a5a5a;
    --t-up: #137a2c; --t-down: #b42318; --acc-ink: #8a4b00; --acc: #8a4b00; --acc-on: #ffffff;
    --t-chart-fill: rgba(37, 99, 235, 0.14); --t-chart-line: #1d3f8f; --t-fed: #8a5a00; --mk-brand: #8a6d1a;
  }
  @page { margin: 12mm 12mm 16mm; @bottom-right { content: counter(page) " / " counter(pages); font: 8pt Inter, sans-serif; color: #5a5a5a; } }
  html, body { background: #ffffff !important; color: #111111 !important; color-scheme: light; }
  body { display: block; font-size: 10.5pt; }
  [data-print="hide"], .mk-skip, .mk-scroll-hint, .mk-toasts, .mk-navstatus, .mk-scrim, .no-print,
  button, .mk-btn, form, .mk-how { display: none !important; }
  .print-only { display: block !important; }
  main { max-width: none; padding: 0; }
  .t-card, .card, .mk-scroll, .cc-card, .mk-glass-1, .mk-glass-2, .mk-glass-3 { box-shadow: none !important; break-inside: avoid; }
  .mk-scroll { overflow: visible !important; max-height: none !important; }
  table, .t-table { font-size: 9pt; }
  th, td, .t-table th, .t-table td { height: auto; padding: 3pt 5pt; }
  .t-table .t-stick, .sticky, .mk-scroll--tall thead th { position: static !important; }
  thead { display: table-header-group; }
  tr, img, svg { break-inside: avoid; }
  section, .mk-avoid-break { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
  .mk-chart-container, img.chart { max-height: 400px !important; width: auto; break-inside: avoid; }
  a { color: inherit !important; text-decoration: none !important; }
  .mk-dotfield { display: none !important; }
  .mk-printhead { border-bottom: 1px solid #b5b5b5; padding-bottom: 6pt; margin-bottom: 10pt; font-size: 9pt; color: #3a3a3a; }
  .mk-printhead p { margin: 0; max-width: none; }
  .mk-printhead__title { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 20pt; color: #111111; }
  .mk-printfoot { position: fixed; left: 0; bottom: 0; font-size: 7.5pt; letter-spacing: 0.04em; color: #5a5a5a; }
  .mk-footer { border-top: 1px solid #d6d6d6; }
  .mk-footer .container { padding: 6pt 0 0; }
}

/* ---------------------------------------------------------- accessibility (2026-11-20 audit) */
/* Sortable table headers: the header text is a real button (keyboard + screen reader),
   styled to look exactly like the header it replaces. aria-sort sits on the th. */
.mk-sortbtn {
  appearance: none; -webkit-appearance: none; display: inline-flex; align-items: center; gap: 4px;
  min-height: 24px; max-width: 100%; margin: 0; padding: 0; border: 0; border-radius: 4px;
  background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit;
  text-align: inherit; cursor: pointer;
}
.mk-sortbtn:focus-visible { outline: 2px solid var(--mk-focus); outline-offset: 2px; }
/* the arrow is decoration (alt text ""): the state is announced from aria-sort */
th[aria-sort] .mk-sortbtn::after { content: "\25B2"; content: "\25B2" / ""; font-size: 0.5625rem; color: var(--t-ink-3); }
th[aria-sort="descending"] .mk-sortbtn::after { content: "\25BC"; content: "\25BC" / ""; }
/* print hides every button; a sortable header's text lives in one, so it must stay */
@media print { th .mk-sortbtn { display: inline !important; } }
/* Auto-refresh control (WCAG 2.2.1 / 2.2.2): replaces the old uncontrollable meta refresh */
.mk-autorf { display: flex; flex-wrap: wrap; align-items: center; align-self: center; gap: 8px; margin: -4px 0 12px;
  font-size: 0.75rem; color: var(--t-ink-2); font-variant-numeric: tabular-nums; }
.mk-autorf__btn {
  min-height: 32px; padding: 0 12px; border: 1px solid var(--t-line-strong); border-radius: 999px;
  background: var(--t-card); color: var(--t-ink); font: 600 0.75rem/1 var(--font-sans); cursor: pointer;
}
@media (hover: hover) { .mk-autorf__btn:hover { border-color: var(--mk-accent); } }
@media (pointer: coarse) { .mk-autorf__btn { min-height: 44px; min-width: 76px; } }
