:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #707070;
  --line: #dedede;
  --accent: #5a5a5a;
  --accent-dark: #262626;
  --soft: #f3f3f3;
  --alert: #b42318;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f3f3f3; color: var(--ink); }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 32px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
h1, h2 { margin: 0; letter-spacing: -.035em; }
h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1; }
h2 { font-size: 22px; }
.subtitle { margin: 14px 0 0; color: var(--muted); }
.status-pill { border-radius: 999px; padding: 9px 14px; font-size: 13px; font-weight: 700; white-space: nowrap; background: #edf0f5; color: var(--muted); }
.status-pill.running { background: #e7e7e7; color: #333; }
.status-pill.error { background: #fff0f0; color: var(--alert); }
.status-pill.stopped { background: #e7e7e7; color: #555; }
.panel { border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 12px 36px rgba(35, 49, 78, .05); }
.controls { padding: 22px; }
form { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.internal-control { display: none; }
label { display: flex; min-width: 190px; flex-direction: column; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
input, textarea, select { padding: 10px 12px; border: 1px solid #d7dce6; border-radius: 10px; color: var(--ink); background: #fff; font: inherit; font-size: 15px; }
input { height: 44px; }
textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
select { height: 44px; min-width: 240px; }
input:focus { outline: 3px solid #e4e4e4; border-color: var(--accent); }
button { height: 44px; border: 0; border-radius: 10px; padding: 0 18px; background: var(--accent); color: white; cursor: pointer; font: inherit; font-weight: 800; }
button:hover { background: var(--accent-dark); }
button.secondary { background: #eef1f6; color: var(--ink); }
.period-stats { display: flex; align-items: stretch; gap: 8px; margin-left: auto; }
.period-stats > div { min-width: 58px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); text-align: center; }
.period-stats span, .period-stats strong { display: block; }
.period-stats span { color: var(--muted); font-size: 11px; font-weight: 700; }
.period-stats strong { margin-top: 2px; color: var(--ink); font-size: 20px; line-height: 1.1; }
.hint, .message { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.message { min-height: 18px; color: var(--ink); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 14px 0; }
.stat-card { min-height: 124px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.stat-card span, .stat-card small { display: block; color: var(--muted); }
.stat-card span { font-size: 13px; font-weight: 700; }
.stat-card strong { display: block; margin: 8px 0 4px; font-size: 30px; letter-spacing: -.04em; }
.stat-card small { font-size: 11px; }
.table-panel { padding: 22px; }
.observation-grid { display: grid; gap: 14px; }
.prediction-grid { display: grid; gap: 14px; margin-top: 14px; }
.prediction-card { padding: 18px; }
.prediction-side-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
.prediction-side { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafafa; }
.prediction-form { display: block; }
.prediction-side h3 { margin: 0 0 10px; font-size: 16px; }
.prediction-side p { margin: 6px 0; color: var(--muted); font-size: 12px; }
.prediction-side small { color: var(--muted); }
.prediction-side.locked { background: #eeeeee; }
.lock-mark { color: var(--muted); font-size: 11px; font-weight: 600; }
.prediction-form label { min-width: 0; font-size: 11px; }
.prediction-form input { width: 100%; height: 38px; font-size: 13px; }
.group-name-label { display: flex; flex-direction: row; align-items: center; gap: 8px; min-width: 0; width: max-content; }
.group-name-input { width: 48px !important; padding: 8px 6px !important; text-align: center; }
.member-fields { margin: 10px 0 0; }
.member-head, .member-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 92px; gap: 8px; align-items: center; }
.member-head { color: var(--muted); font-size: 11px; font-weight: 700; }
.member-row + .member-row { margin-top: 8px; }
.member-table table { font-size: 12px; }
.member-table th, .member-table td { padding: 7px 8px; }
.prediction-forecast { margin: 4px 0 12px; }
.prediction-forecast h3 { margin: 0 0 8px; font-size: 15px; }
.prediction-forecast input { width: 120px; height: 34px; }
.prediction-form button { display: block; margin: 8px 0 0 auto; }
.prediction-results { margin-top: 16px; }
.prediction-generated-time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.prediction-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.prediction-header-actions button { width: auto; margin: 0; white-space: nowrap; }
.prediction-results th, .prediction-results td { font-size: 11px; }
.market-tabs { display: flex; gap: 8px; margin: 14px 0; }
.market-tabs button { height: 36px; padding: 0 20px; background: #eef1f6; color: var(--ink); }
.market-tabs button.active { background: var(--accent); color: #fff; }
.observation-card { padding: 22px; }
.target-message { min-height: 18px; margin: -8px 0 14px; color: var(--muted); font-size: 13px; }
.target-message.error { color: var(--alert); }
.target-stats { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.target-stats b { margin-left: 4px; color: var(--ink); font-size: 14px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading > span { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { color: var(--muted); font-size: 12px; font-weight: 700; text-align: left; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th small, .asset-label { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 600; }
.status-note { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; }
td:last-child { font-weight: 800; }
.empty { padding: 36px 12px; color: var(--muted); text-align: center; }
.pending-row { background: #eeeeee; color: #555; }
.pending-row td { font-weight: 700; }
footer { padding: 18px 4px; color: var(--muted); font-size: 12px; }
.production-entry { position: fixed; right: 10px; bottom: 8px; z-index: 20; width: 18px; height: 18px; border-radius: 50%; color: transparent; background: #d8d8d8; opacity: .18; }
.production-entry:hover, .production-entry:focus { opacity: .8; outline: 2px solid #999; }
.production-task-float { position: fixed; top: 18px; right: 18px; z-index: 30; }
.production-task-toggle { width: auto; min-width: 150px; padding: 9px 14px; border: 1px solid #777; border-radius: 999px; background: #3f3f3f; color: #fff; font-size: 12px; }
.production-task-toggle span { display: inline-grid; min-width: 20px; min-height: 20px; margin-left: 5px; place-items: center; border-radius: 50%; background: #fff; color: #333; }
.production-task-menu { position: absolute; top: calc(100% + 8px); right: 0; width: min(330px, calc(100vw - 32px)); padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 10px 28px rgb(0 0 0 / 14%); }
.production-task-menu-title { padding: 5px 8px 8px; color: var(--ink); font-size: 13px; font-weight: 800; }
.production-task-item { display: flex; width: 100%; flex-direction: column; align-items: flex-start; gap: 3px; padding: 9px 8px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--ink); text-align: left; }
.production-task-item:hover { background: var(--soft); }
.production-task-item small { color: var(--muted); font-size: 11px; }
.back-link { color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: none; }
.login-panel { max-width: 620px; padding: 24px; }
.login-panel h2 { margin-bottom: 18px; }
.login-form { align-items: flex-end; }
.login-form label { flex: 1 1 180px; }
.production-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 20px 22px; }
.production-toolbar label { min-width: 280px; }
.gewu-picker { position: relative; min-width: 280px; }
.gewu-picker-source { position: absolute; width: 1px; min-width: 0; height: 1px; opacity: 0; pointer-events: none; }
.gewu-picker-trigger { width: 100%; height: 44px; padding: 10px 36px 10px 12px; border: 1px solid #d7dce6; border-radius: 10px; color: var(--ink); background: #fff; font: inherit; font-size: 15px; text-align: left; position: relative; }
.gewu-picker-trigger::after { content: "⌄"; position: absolute; right: 13px; top: 6px; font-size: 22px; color: var(--muted); }
.gewu-picker-menu { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; max-height: 188px; overflow-y: auto; padding: 4px; border: 1px solid #bfc7d5; border-radius: 10px; background: #fff; box-shadow: 0 8px 22px rgba(20, 30, 50, .16); }
.gewu-picker-menu button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 7px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.gewu-picker-menu button:hover, .gewu-picker-menu button[aria-selected="true"] { background: #e9edf3; }
.production-toolbar-actions { display: flex; align-items: center; gap: 10px; }
.production-basis { margin-top: 14px; padding: 20px 22px; }
.basis-meta { display: flex; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: 13px; }
.basis-meta b { color: var(--ink); }
.basis-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0 12px; }
.basis-grid span { display: flex; min-height: 58px; flex-direction: column; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafafa; color: var(--muted); font-size: 11px; line-height: 1.35; }
.basis-grid b { color: var(--ink); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.basis-note { margin: 0 0 12px; padding: 9px 12px; border-left: 3px solid #b7b7b7; color: var(--muted); font-size: 12px; line-height: 1.45; }
.basis-lines { display: grid; gap: 0; margin: 14px 0 0; }
.basis-lines > div { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.basis-lines > div:last-child { border-bottom: 0; }
.basis-lines b { margin-right: 8px; color: var(--ink); }
.source-section { margin: 14px 0 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.subsection-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.subsection-heading h3 { margin: 0; font-size: 16px; }
.subsection-heading span { color: var(--muted); font-size: 11px; }
.basis-source-lines { display: grid; gap: 0; }
.basis-source-line { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.4; }
.basis-source-line:last-child { border-bottom: 0; }
.basis-source-line > b { color: var(--ink); }
.basis-source-line > span { overflow-wrap: anywhere; }
.basis-source-main { min-width: 0; }
.basis-source-meta-line { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.basis-source-meta-line > span { overflow-wrap: anywhere; }
.source-evidence { margin-top: 5px; color: var(--muted); font-size: 11px; }
.source-evidence summary { cursor: pointer; color: var(--ink); }
.source-evidence div { margin-top: 4px; overflow-wrap: anywhere; }
.source-version-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 0; }
.source-version-grid span { display: flex; flex-direction: column; gap: 4px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); color: var(--muted); font-size: 11px; }
.source-version-grid b { color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.source-table { min-width: 980px; }
.source-table th, .source-table td { padding: 9px 10px; vertical-align: top; line-height: 1.4; }
.source-table th { white-space: nowrap; }
.source-table td { color: var(--muted); font-size: 12px; }
.source-table td:first-child { color: var(--ink); white-space: nowrap; }
.production-source-table { min-width: 1480px; }
.production-source-table td div + div { margin-top: 3px; }
.production-source-table td b { color: var(--ink); }
.source-caption { color: var(--muted); font-size: 11px; }
.production-source-table td small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.source-link { color: var(--ink); text-decoration: underline; text-decoration-color: #b5b5b5; text-underline-offset: 2px; }
.source-link:hover { color: #000; }
.source-basis { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.source-basis summary { cursor: pointer; color: var(--ink); font-size: 13px; font-weight: 700; }
.source-basis-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0; color: var(--muted); font-size: 11px; }
.source-basis-meta b { color: var(--ink); }
.auto-generated-field { display: flex; flex-direction: column; gap: 3px; min-width: 148px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fafafa; color: var(--muted); font-size: 11px; line-height: 1.25; }
.auto-generated-field b { color: var(--ink); font-size: 12px; }
.generated-gewu-field { display: flex; flex-direction: column; gap: 4px; min-width: 230px; color: var(--muted); font-size: 11px; line-height: 1.25; }
.generated-gewu-field select { min-height: 36px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; }
.generated-time-fields { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.generated-calendar-field { display: flex; min-width: 166px; flex-direction: column; gap: 4px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fafafa; color: var(--muted); font-size: 11px; line-height: 1.25; }
.generated-calendar-field b { color: var(--ink); font-size: 12px; }
.generated-calendar-field input { min-height: 36px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; }
.group-generated-time-field { display: flex; margin-top: 12px; flex-direction: column; gap: 4px; color: var(--muted); font-size: 11px; }
.group-generated-time-field input { min-height: 36px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; }
.group-generated-time { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.basis-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.basis-list li { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); font-size: 12px; }
.basis-list li span { color: var(--muted); }
.workflow-steps { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.workflow-steps .active { color: var(--ink); }
.production-content, .check-result, .production-receipt { margin-top: 14px; padding: 20px 22px; }
.production-group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.production-group-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafafa; }
.production-group-card h3 { margin: 0 0 12px; font-size: 17px; }
.production-group-card.readonly { background: #f1f1f1; }
.production-member-head, .production-member-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 110px; gap: 8px; align-items: center; }
.production-member-head { margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.production-member-row + .production-member-row { margin-top: 8px; }
.production-member-row input { min-width: 0; height: 38px; font-size: 13px; }
.production-form .prediction-results { margin-top: 18px; }
.production-form .prediction-results input { width: 112px; height: 34px; font-size: 13px; }
.production-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.check-result h2 { margin: 0; font-size: 19px; }
.check-result p { color: var(--muted); }
.task-waiting { padding: 28px 10px; text-align: center; }
.task-waiting h2 { margin: 0 0 8px; font-size: 20px; }
.task-waiting p { margin: 0; color: var(--muted); }
.warning { color: var(--alert) !important; }
.receipt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.receipt-grid span { display: flex; flex-direction: column; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--muted); font-size: 12px; }
.receipt-grid b { color: var(--ink); overflow-wrap: anywhere; }
.production-content > .production-group-card { margin-top: 12px; }
.production-content > .prediction-results { margin-top: 16px; }
@media (max-width: 720px) {
  .shell { width: min(100% - 20px, 1120px); padding-top: 24px; }
  .hero { align-items: flex-start; flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr; }
  form > * { flex: 1 1 100%; }
  .period-stats { margin-left: 0; }
  .period-stats > div { flex: 1 1 0; min-width: 0; }
  button { width: 100%; }
  .prediction-side-grid { grid-template-columns: 1fr; }
  .member-head, .member-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 80px; }
  .prediction-forecast input { width: 100%; }
  .production-toolbar { align-items: stretch; flex-direction: column; }
  .production-toolbar label { min-width: 0; }
  .production-toolbar-actions { justify-content: space-between; }
  .production-group-grid, .basis-grid, .basis-list, .receipt-grid, .source-version-grid, .basis-source-line { grid-template-columns: 1fr; }
  .workflow-steps { justify-content: flex-start; overflow-x: auto; white-space: nowrap; }
  .production-member-head, .production-member-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 82px; }
}

/* Public page only: the shared stylesheet also serves the production page. */
.public-page [hidden] { display: none !important; }
.public-page .shell { width: min(1360px, calc(100% - 48px)); padding-top: 78px; }
.public-page .public-hero { align-items: center; gap: 38px; padding: clamp(28px, 4vw, 56px); margin-bottom: 18px;
  border: 1px solid var(--line); border-radius: 24px; background: #fff; }
.public-page .public-hero-copy { flex: 1 1 auto; min-width: 0; }
.public-page .public-hero .eyebrow { color: #666; font-size: 13px; letter-spacing: .18em; }
.public-page .public-title-row { display: flex; align-items: center; gap: 16px; max-width: 100%; }
.public-page .public-title-row h1 { min-width: 0; margin: 18px 0; font-size: clamp(44px, 5.6vw, 80px); line-height: 1.12; }
.public-page .secret-switch, .public-page .secret-switch:hover { flex: 0 0 54px; width: 54px; height: 54px;
  padding: 0; border: 0; border-radius: 50%; background: transparent; color: transparent; cursor: default; }
.public-page .secret-switch:focus-visible { outline: 2px solid #222; outline-offset: 2px; }
.public-page .public-lead { max-width: 850px; margin: 0; color: #444; font-size: clamp(17px, 1.55vw, 21px); line-height: 1.6; }
.public-page .public-principles { display: flex; flex-wrap: wrap; gap: 9px; margin: 28px 0 0; padding: 0; list-style: none; }
.public-page .public-principles li { padding: 8px 15px; border: 1px solid #aaa; border-radius: 999px;
  color: #404040; background: #fafafa; font-size: 14px; font-weight: 700; }
.public-page .public-period-card { flex: 0 0 300px; align-self: center; padding: 24px; border: 1px solid var(--line);
  border-radius: 18px; background: #f8f8f8; }
.public-page .public-period-card .eyebrow { font-size: 11px; }
.public-page .public-period-card label { margin-top: 16px; min-width: 0; color: #404040; font-size: 13px; }
.public-page .public-period-card .gewu-picker { min-width: 0; width: 100%; }
.public-page .public-period-card .gewu-picker-trigger, .public-page .public-period-card .gewu-picker-trigger:hover {
  height: 44px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.public-page .gewu-picker-menu button { height: auto; font-weight: 500; }
.public-page .controls { margin-bottom: 18px; padding: 24px; box-shadow: none; }
.public-page .internal-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.public-page .internal-heading h2 { font-size: 21px; }
.public-page .controls .subtitle { margin: 13px 0 18px; font-size: 14px; }
.public-page .controls .hint { margin-top: 16px; }
.public-page .period-stats { margin: 0 0 14px; justify-content: flex-start; gap: 12px; }
.public-page .period-stats > div { flex: 1 1 120px; min-width: 0; padding: 13px; border-radius: 14px; background: #fff; }
.public-page .period-stats strong { margin-top: 5px; font-size: 26px; }
.public-page .message { min-height: 0; margin: 0 2px 14px; color: #666; font-size: 12px; }
.public-page .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.public-page .prediction-side .internal-timestamp { display: block; }
@media (max-width: 900px) {
  .public-page .public-hero { align-items: stretch; flex-direction: column; gap: 28px; }
  .public-page .public-period-card { flex-basis: auto; align-self: stretch; }
}
@media (max-width: 600px) {
  .public-page .shell { width: min(100% - 24px, 1360px); padding-top: 62px; }
  .public-page .public-hero { padding: 22px; border-radius: 18px; }
  .public-page .public-title-row { gap: 6px; }
  .public-page .public-title-row h1 { font-size: clamp(37px, 10vw, 56px); }
  .public-page .secret-switch, .public-page .secret-switch:hover { flex-basis: 38px; width: 38px; height: 38px; }
  .public-page .public-principles li { font-size: 12px; }
  .public-page .period-stats { flex-wrap: wrap; gap: 8px; }
  .public-page .period-stats > div { flex: 1 1 28%; }
  .public-page .internal-heading { align-items: flex-start; flex-direction: column; }
  .public-page .stats-grid { grid-template-columns: 1fr; }
  .public-page .prediction-card { width: 100%; min-width: 0; overflow: hidden; }
  .public-page .section-heading,
  .public-page .prediction-side-grid,
  .public-page .prediction-side { min-width: 0; }
  .public-page .section-heading { flex-wrap: wrap; }
  .public-page .member-table,
  .public-page .prediction-results { max-width: 100%; min-width: 0; overflow-x: auto; }
}

.prediction-card .prediction-results tbody td:last-child { font-weight: 400; }
.prediction-results .accuracy-high { color: #000; font-weight: 700; }
.instrument-display {
  display: inline-block;
  max-width: 24rem;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
  vertical-align: top;
}

th .instrument-display {
  min-width: 12rem;
}

@media (max-width: 640px) {
  .instrument-display {
    max-width: 16rem;
  }
}


/* mobile prediction results: no horizontal scrolling */
@media (max-width: 900px) {
  .public-page .prediction-results { overflow-x: visible; }
  .public-page .prediction-results table,
  .public-page .prediction-results tbody { display: block; width: 100%; }
  .public-page .prediction-results thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .public-page .prediction-results tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .public-page .prediction-results tbody td { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; padding: 8px 0; border: 0; white-space: normal; text-align: right; }
  .public-page .prediction-results tbody td::before { content: attr(data-label); flex: 0 1 auto; color: var(--muted); font-size: 10px; font-weight: 600; text-align: left; }
  .public-page .prediction-results tbody td:first-child { grid-column: 1 / -1; display: block; padding: 4px 0 10px; text-align: left; }
  .public-page .prediction-results tbody td:first-child::before { display: none; }
  .public-page .prediction-results .instrument-display { display: block; max-width: none; overflow-wrap: normal; word-break: normal; white-space: normal; text-align: left; }
}
@media (max-width: 480px) {
  .public-page .prediction-results tbody tr { grid-template-columns: 1fr; gap: 0; }
  .public-page .prediction-results tbody td:first-child { grid-column: 1; }
}


/* mobile actual close: align with instrument heading */
@media (max-width: 900px) {
  .public-page .prediction-results tbody tr { position: relative; }
  .public-page .prediction-results tbody td:first-child {
    grid-column: 1;
    grid-row: 1;
    padding: 4px 10px 10px 0;
  }
  .public-page .prediction-results tbody td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    padding: 4px 0 10px;
  }
}
@media (max-width: 480px) {
  .public-page .prediction-results tbody td:first-child {
    min-height: 42px;
    padding-right: 128px;
  }
  .public-page .prediction-results tbody td:nth-child(2) {
    position: absolute;
    top: 0;
    right: 0;
    width: 118px;
    padding: 0;
  }
}


/* mobile prediction pairing fix */
@media (max-width: 900px) {
  .public-page .prediction-results tbody td:nth-child(3) { grid-column: 1; grid-row: 2; }
  .public-page .prediction-results tbody td:nth-child(6) { grid-column: 2; grid-row: 2; }
  .public-page .prediction-results tbody td:nth-child(4) { grid-column: 1; grid-row: 3; }
  .public-page .prediction-results tbody td:nth-child(7) { grid-column: 2; grid-row: 3; }
  .public-page .prediction-results tbody td:nth-child(5) { grid-column: 1; grid-row: 4; }
  .public-page .prediction-results tbody td:nth-child(8) { grid-column: 2; grid-row: 4; }
}
@media (max-width: 480px) {
  .public-page .prediction-results tbody td:nth-child(n+3) { grid-column: 1; grid-row: auto; }
}
