/* Pulp2 Maintenance — plant-office navy with a safety-yellow accent. Same skeleton as the Personal reader,
   different colours so it is obvious which site is open. Numbers use tabular figures throughout. */
:root {
  --paper: #f3f5f9;
  --surface: #ffffff;
  --ink: #14213d;
  --muted: #5a6478;
  --line: #d8dee8;
  --navy: #1b3a6b;
  --navy-strong: #0f2747;
  --navy-wash: #e7edf7;
  --yellow: #f2b705;
  --yellow-ink: #7a5600;
  --yellow-wash: #fdf2cf;
  --ok-ink: #0b6b23; --ok-wash: #e2f3e5;
  --warn-ink: #7a5200; --warn-wash: #fdefc8; --warn: #e39b00;
  --bad-ink: #a51f1f; --bad-wash: #fbe2e1; --bad: #d03b3b;
  --na-ink: #5a6478; --na-wash: #eceff4;
  --guide: #9a7400;
  --font: "Sarabun", "Noto Sans Thai", "Thonburi", "Sukhumvit Set", "Leelawadee UI", "Tahoma", system-ui, sans-serif;
  --radius: 10px;
  --nav-h: 3.6rem;
  /* graph.js reads these names */
  --teal: var(--navy); --teal-strong: var(--navy); --marigold: var(--yellow);
  --g0: #2a78d6; --g1: #eb6834; --g2: #1baf7a; --g3: #c98500; --g4: #e87ba4; --g5: #6250d6; --g6: #e34948; --g7: #7b8494;
  --brand-bg: #0f2747; --brand-fg: #ffffff; --stk-routine: #7e98c6; --stk-shutdown: #b9c8e2;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1424;
    --surface: #131e35;
    --ink: #e6ebf5;
    --muted: #9ba7be;
    --line: #26355a;
    --navy: #8fb0ec;
    --navy-strong: #b9cdf4;
    --navy-wash: #1b2a4c;
    --yellow: #f5c542;
    --yellow-ink: #f5d27a;
    --yellow-wash: #3a2f0c;
    --ok-ink: #7fd98f; --ok-wash: #133a1f;
    --warn-ink: #f5cf6b; --warn-wash: #3d2f08; --warn: #f2b705;
    --bad-ink: #f39a92; --bad-wash: #451a1a; --bad: #e66767;
    --na-ink: #9ba7be; --na-wash: #1d2944;
    --guide: #e0b84a;
    --g0: #3987e5; --g1: #d95926; --g2: #199e70; --g3: #c98500; --g4: #d55181; --g5: #9085e9; --g6: #e66767; --g7: #8a93a6;
    --brand-bg: #08101f; --brand-fg: #ffffff; --stk-routine: #5b77a8; --stk-shutdown: #3c5079;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --paper: #0c1424;
    --surface: #131e35;
    --ink: #e6ebf5;
    --muted: #9ba7be;
    --line: #26355a;
    --navy: #8fb0ec;
    --navy-strong: #b9cdf4;
    --navy-wash: #1b2a4c;
    --yellow: #f5c542;
    --yellow-ink: #f5d27a;
    --yellow-wash: #3a2f0c;
    --ok-ink: #7fd98f; --ok-wash: #133a1f;
    --warn-ink: #f5cf6b; --warn-wash: #3d2f08; --warn: #f2b705;
    --bad-ink: #f39a92; --bad-wash: #451a1a; --bad: #e66767;
    --na-ink: #9ba7be; --na-wash: #1d2944;
    --guide: #e0b84a;
    --g0: #3987e5; --g1: #d95926; --g2: #199e70; --g3: #c98500; --g4: #d55181; --g5: #9085e9; --g6: #e66767; --g7: #8a93a6;
    --brand-bg: #08101f; --brand-fg: #ffffff; --stk-routine: #5b77a8; --stk-shutdown: #3c5079;
    color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.0625rem/1.7 var(--font); padding-bottom: calc(var(--nav-h) + 1rem); }
a { color: var(--navy); text-underline-offset: .2em; }
a:hover { color: var(--navy-strong); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 20; }
.skip:focus { left: .5rem; top: .5rem; }
h1, h2, h3 { line-height: 1.4; margin: 0; font-weight: 700; }
h1 { font-size: 1.55rem; margin-bottom: .25rem; }
h2 { font-size: 1.15rem; margin: 1.75rem 0 .5rem; }
h3 { font-size: 1.02rem; }
p { margin: .45rem 0; }
.muted { color: var(--muted); }
.small { font-size: .92rem; }
.lead { color: var(--muted); margin: 0 0 1rem; }
.row-meta { color: var(--muted); font-size: .92rem; margin: .1rem 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kpi-num, .num-table td, .facts dd, .counts b { font-variant-numeric: tabular-nums; }

/* brand + shell */
.brandbar { background: var(--brand-bg); color: var(--brand-fg); padding: .45rem 1rem; }
.brand { color: var(--brand-fg); text-decoration: none; font-weight: 600; letter-spacing: .01em; }
.brand b { color: var(--yellow); font-weight: 700; }
.brand:hover { color: var(--brand-fg); }
.solo-brand { color: var(--ink); font-size: 1.1rem; }
.solo-brand b { color: var(--yellow-ink); }
.shell { max-width: 60rem; margin: 0 auto; }
main { padding: 1.1rem 1rem 2rem; min-width: 0; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; height: var(--nav-h); z-index: 10; display: flex; background: var(--surface); border-top: 1px solid var(--line); }
.nav a { flex: 1; display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--muted); font-size: .88rem; font-weight: 600; border-top: 3px solid transparent; min-width: 0; }
.nav a[aria-current="page"] { color: var(--navy); border-top-color: var(--yellow); background: var(--navy-wash); }
@media (min-width: 920px) {
  body { padding-bottom: 0; }
  .brandbar { padding: .55rem 1.5rem; }
  .shell { display: grid; grid-template-columns: 11rem minmax(0, 1fr); max-width: 78rem; gap: 1rem; }
  .nav { position: sticky; top: 0; height: calc(100vh - 2.6rem); flex-direction: column; justify-content: flex-start; gap: .2rem; padding: 1.5rem .6rem; border-top: 0; border-right: 1px solid var(--line); background: transparent; }
  .nav a { flex: none; justify-content: flex-start; padding: .55rem .9rem; border-top: 0; border-left: 4px solid transparent; font-size: 1rem; }
  .nav a[aria-current="page"] { border-left-color: var(--yellow); }
  main { padding: 1.75rem 1.5rem 3rem; }
}

/* segmented tabs, chips, badges */
.seg { display: inline-flex; max-width: 100%; margin: .25rem 0 .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); overflow-x: auto; scrollbar-width: none; }
.seg a { padding: .35rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; white-space: nowrap; }
.seg a + a { border-left: 1px solid var(--line); }
.seg a[aria-current="page"] { background: var(--navy); color: var(--surface); }
.seg a:not([aria-current]):hover { background: var(--navy-wash); color: var(--navy); }

.chip { display: inline-block; padding: 0 .6rem; border-radius: 999px; font-size: .84rem; line-height: 1.65; background: var(--navy-wash); color: var(--navy); white-space: nowrap; text-decoration: none; }
.chip.muted { background: var(--na-wash); color: var(--na-ink); }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0 .9rem; }
.chips.filter .chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: .15rem .8rem; }
.chips.filter .chip.on { background: var(--navy); color: var(--surface); border-color: var(--navy); }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: 0 .6rem; border-radius: 999px; font-size: .86rem; font-weight: 600; line-height: 1.7; white-space: nowrap; }
.badge.ok { background: var(--ok-wash); color: var(--ok-ink); }
.badge.warn { background: var(--warn-wash); color: var(--warn-ink); }
.badge.bad { background: var(--bad-wash); color: var(--bad-ink); }
.badge.na { background: var(--na-wash); color: var(--na-ink); }

/* panels + lists */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1.1rem 1.1rem; min-width: 0; margin: 0 0 1rem; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin-bottom: .5rem; padding-bottom: .45rem; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 1.12rem; }
.panel > h2:first-child { margin-top: 0; }
.panel-head a, .panel-head > span { font-size: .92rem; }
.subhead { margin: 1rem 0 .2rem; font-size: .92rem; font-weight: 600; color: var(--muted); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { padding: .6rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.rows > li:last-child { border-bottom: 0; }
.rows a.title, .card .title { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.rows a.title:hover { text-decoration: underline; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .75rem 1rem; min-width: 0; }
.card.closed, .card.task.closed { opacity: .8; }
.task-head, .cat-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem .75rem; }
.status-line { font-size: .92rem; margin: .25rem 0 0; }
.history { list-style: none; margin: 0; padding: 0 0 0 .75rem; border-left: 2px solid var(--line); }
.history li { margin: .4rem 0; }
.empty { color: var(--muted); padding: .6rem 0; }
.notice { background: var(--yellow-wash); color: var(--yellow-ink); padding: .6rem .85rem; border-radius: var(--radius); margin: .75rem 0; }
.notice.slim { padding: .35rem .8rem; font-size: .93rem; }
.error { background: var(--bad-wash); color: var(--bad-ink); padding: .6rem .8rem; border-radius: var(--radius); margin: 1rem 0; }
.callout { border-radius: var(--radius); padding: .6rem .9rem; margin: .75rem 0; }
.callout.warn { background: var(--warn-wash); color: var(--ink); }
.callout.warn strong { color: var(--warn-ink); }
.crumbs { color: var(--muted); font-size: .92rem; margin-bottom: .4rem; }

/* forms + buttons */
.btn { display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; padding: .5rem 1.05rem; border-radius: var(--radius); border: 1px solid var(--navy); background: var(--navy); color: var(--surface); min-height: 44px; }
.btn:hover { background: var(--navy-strong); color: var(--surface); }
.btn.quiet { background: transparent; color: var(--navy); }
.btn.quiet:hover { background: var(--navy-wash); color: var(--navy); }
.btn.disabled { opacity: .35; pointer-events: none; }
label { display: block; font-weight: 600; margin: 1rem 0 .25rem; }
input[type=text], input[type=password], input[type=search] { width: 100%; font: inherit; padding: .55rem .75rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-height: 44px; }
.search { display: flex; gap: .5rem; margin: .5rem 0 1rem; }
.search input { flex: 1; min-width: 0; }
.solo { max-width: 24rem; margin: 0 auto; padding-top: 12vh; }
body.auth { padding-bottom: 0; }
details > summary { cursor: pointer; font-weight: 600; margin: .75rem 0 .4rem; }
details.table-view > summary, .panel details > summary { font-size: .93rem; color: var(--navy); }

/* today */
.today-grid { display: grid; gap: 0 1rem; grid-template-columns: minmax(0, 1fr); margin-top: .75rem; }
@media (min-width: 1100px) { .today-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; } }
.p-brief { border-color: var(--yellow); box-shadow: inset 0 0 0 1px var(--yellow); }
.brief { font-size: 1.02rem; line-height: 1.75; max-width: none; }
.brief p { margin: .35rem 0; }
.kpi { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; margin: .25rem 0; }
.kpi-num { font-size: 2rem; font-weight: 700; line-height: 1.2; color: var(--ink); }
.kpi-txt { color: var(--muted); font-size: .95rem; }
.counts { display: flex; flex-wrap: wrap; gap: .5rem; margin: .25rem 0 .5rem; }
.count { flex: 1 1 6.5rem; text-decoration: none; color: var(--ink); background: var(--na-wash); border-radius: var(--radius); padding: .45rem .7rem; line-height: 1.35; }
.count b { display: block; font-size: 1.6rem; }
.count.bad { background: var(--bad-wash); color: var(--bad-ink); }
.count.warn { background: var(--warn-wash); color: var(--warn-ink); }

/* budget */
.month-bar { display: flex; align-items: center; gap: .75rem; margin: .25rem 0 .5rem; }
.month-title { margin: 0; font-size: 1.25rem; }
.control-grid { display: grid; gap: 0 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .control-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.hero h2 { margin: 0 0 .25rem; }
.hero-nums { display: flex; flex-wrap: wrap; gap: .5rem 2.5rem; margin-bottom: .4rem; }
.hero-nums p { display: flex; flex-direction: column; margin: 0; }
.cat-rows { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .6rem; }
@media (min-width: 1100px) { .cat-rows { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .3rem 1rem; margin: .4rem 0 0; }
.facts div { min-width: 0; }
.facts dt { color: var(--muted); font-size: .86rem; }
.facts dd { margin: 0; font-weight: 700; }
.track { display: block; width: 100%; height: 1.4rem; margin: .4rem 0 .2rem; }
.track-bg { fill: var(--na-wash); }
.track-fill.ok, .stk.s-actual { fill: var(--navy); }
.track-fill.warn { fill: var(--warn); }
.track-fill.bad { fill: var(--bad); }
.track-mark { stroke: var(--ink); stroke-width: 2.5; }
.stk.s-routine { fill: var(--stk-routine); }
.stk.s-shutdown { fill: var(--stk-shutdown); }
.legend-line { font-size: .9rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.key { display: inline-block; width: 1.4rem; height: .55rem; border-radius: 3px; vertical-align: middle; margin-left: .3rem; }
.key.actual, .key.s-actual { background: var(--navy); }
.key.bg { background: repeating-linear-gradient(90deg, var(--muted) 0 5px, transparent 5px 9px); height: 3px; }
.key.guide { background: repeating-linear-gradient(90deg, var(--guide) 0 3px, transparent 3px 6px); height: 3px; }
.key.s-routine { background: var(--stk-routine); } .key.s-shutdown { background: var(--stk-shutdown); }
.fig { margin: .5rem 0; }
.fig figcaption { font-size: .88rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; }
.chart { width: 100%; max-width: 40rem; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 13px var(--font); }
.chart .ln { stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart .ln.actual { stroke: var(--navy); }
.chart .ln.bg { stroke: var(--muted); stroke-dasharray: 6 5; }
.chart .ln.guide { stroke: var(--guide); stroke-dasharray: 3 4; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot.actual { fill: var(--navy); }
.chart .dot:hover { r: 6; }
.chart .end-label { fill: var(--ink); font: 600 13px var(--font); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.num-table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.num-table th, .num-table td { padding: .35rem .55rem; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.num-table th:first-child, .num-table th[scope=row] { text-align: left; white-space: normal; }
.num-table thead th { color: var(--muted); font-weight: 600; font-size: .86rem; }
.num-table tr.total th, .num-table tr.total td { font-weight: 700; border-top: 2px solid var(--line); }
.num-table.kv td { text-align: left; white-space: normal; }
.matrix td .of { color: var(--muted); font-size: .85em; }
.matrix td.cell.bad { background: var(--bad-wash); color: var(--bad-ink); }
.matrix td.cell.zero { color: var(--muted); }
.table-wrap { overflow-x: auto; margin: .5rem 0; }

/* reading */
.prose { max-width: 44rem; font-size: 1.08rem; line-height: 1.85; overflow-wrap: anywhere; }
.prose.small { font-size: .95rem; line-height: 1.65; }
.prose h1, .prose h2, .prose h3 { margin: 1.6rem 0 .4rem; }
.prose h1 { font-size: 1.35rem; } .prose h2 { font-size: 1.18rem; } .prose h3 { font-size: 1.05rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin: .2rem 0; }
.prose blockquote { margin: 1rem 0; padding: .1rem 1rem; border-left: 3px solid var(--line); color: var(--muted); }
.prose code { font-size: .92em; background: var(--navy-wash); padding: .05rem .3rem; border-radius: 4px; }
.prose a.dead { color: var(--muted); text-decoration: none; cursor: default; }
.prose table { border-collapse: collapse; min-width: 100%; font-size: .96rem; line-height: 1.55; }
.prose th, .prose td { border: 1px solid var(--line); padding: .35rem .55rem; text-align: left; vertical-align: top; }
.prose th { background: var(--navy-wash); }
.toc ol { margin: 0; padding-left: 1.4rem; }
.panel .prose { max-width: none; }

/* knowledge */
.tiles { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.tile { padding: .8rem 1rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; overflow: hidden; }
.tile-title { font-size: 1.12rem; font-weight: 700; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.tile-title::before { content: ""; display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--c); margin-right: .5rem; vertical-align: .05em; }
.tile-title:hover { text-decoration: underline; }
.tile-recent { list-style: none; margin: .45rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .1rem; }
.tile-recent a { font-size: .94rem; color: var(--muted); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-recent a:hover { color: var(--navy); text-decoration: underline; }
.g0 { --c: var(--g0); } .g1 { --c: var(--g1); } .g2 { --c: var(--g2); } .g3 { --c: var(--g3); }
.g4 { --c: var(--g4); } .g5 { --c: var(--g5); } .g6 { --c: var(--g6); } .g7 { --c: var(--g7); }

/* graph (graph.js) */
.graph-tools { display: flex; flex-wrap: nowrap; gap: .5rem; align-items: center; margin: .5rem 0 .75rem; }
.graph-tools input[type=search] { flex: 1 1 8rem; min-width: 0; width: auto; }
.graph-tools .btn { flex: none; white-space: nowrap; min-width: 44px; padding: .4rem .8rem; }
.graph-box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; touch-action: manipulation; height: min(68vh, 640px); min-height: 320px; position: relative; }
.graph-box canvas { display: block; width: 100%; height: 100%; }
.graph-opts { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: .6rem 0 0; }
.check { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-weight: 400; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem .6rem; margin: .75rem 0; align-items: center; }
.legend-item { font: inherit; font-size: .92rem; display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; padding: .1rem .7rem .1rem .5rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-height: 36px; }
.legend-item .dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--c); }
.legend-item[aria-pressed="false"] { opacity: .6; text-decoration: line-through; }
.graph-info { margin: .5rem 0 1rem; min-height: 5rem; }
.graph-info h2 { margin: 0 0 .25rem; font-size: 1.1rem; }
.graph-info h3 { margin: 1rem 0 .25rem; font-size: .95rem; color: var(--muted); }
.linklike { font: inherit; background: none; border: 0; padding: 0; color: var(--navy); cursor: pointer; text-decoration: underline; text-underline-offset: .2em; text-align: left; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* Budget: รวม / Routine / Shutdown switch and ranked type tables (คุณพันธ์ 23 พ.ย. 2026) */
.seg.scope { margin-top: -.35rem; }
.seg.scope a { padding: .25rem .9rem; font-size: .9rem; }
.seg.scope a[aria-current="page"] { background: var(--yellow); color: var(--brand-bg); }
.num-table.types .bar-col { width: 8rem; padding-left: .2rem; }
.hbar { display: block; width: 100%; max-width: 8rem; height: .65rem; }
.hbar-bg { fill: var(--na-wash); }
.hbar-fill { fill: var(--navy); }
.num-table.types tr.rest th, .num-table.types tr.unclassified th { color: var(--muted); font-weight: 600; }
.num-table.types tr.unclassified td { color: var(--muted); }
.rest-list { margin: .35rem 0 .2rem; }
.rest-list > summary { cursor: pointer; color: var(--navy); font-weight: 600; font-size: .92rem; }
.warn-text { color: var(--warn-ink); }
@media (max-width: 560px) { .num-table.types .bar-col { display: none; } }
/* previous-year column and Specific (คุณพันธ์ 23 พ.ย. 2026) */
.num-table td.prev { color: var(--muted); }
.num-table td.diff.up { color: var(--bad-ink); }
.num-table td.diff.down { color: var(--ok-ink); }
.num-table.spec td.unknown { color: var(--muted); font-style: italic; }
.prev-line { margin: .5rem 0 0; }
/* ใช้จริง tab (คุณพันธ์ 23 พ.ย. 2026) */
.col.c-other { fill: var(--stk-shutdown); }
.col.c-mat { fill: var(--navy); }
.col.c-spec { fill: var(--yellow); }
.key.c-other { background: var(--stk-shutdown); } .key.c-mat { background: var(--navy); } .key.c-spec { background: var(--yellow); }
.unknown-mark { font-weight: 700; }
.num-table .unknown { color: var(--muted); font-style: italic; }
.num-table.spend-years tr.sub th, .num-table.spend-years tr.sub td { font-weight: 700; }
.num-table.spend-years tr.spec th { color: var(--yellow-ink); }
.num-table.spend-years tr.foh-total th, .num-table.spend-years tr.foh-total td { border-top: 2px solid var(--line); }
.num-table.spend-years tr.total th, .num-table.spend-years tr.total td { font-weight: 700; border-top: 2px solid var(--line); }

/* phone: every Budget view tab and every scope button visible, no sideways scrolling, equal cells (owner 24 Nov 2026) */
@media (max-width: 560px) {
  .seg { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; border-radius: 12px; overflow: hidden; }
  .seg a { padding: .45rem .3rem; font-size: .85rem; text-align: center; white-space: normal; line-height: 1.25;
           display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--line); }
  .seg a + a { border-left: 0; }
  .seg a:not(:nth-child(3n+1)) { border-left: 1px solid var(--line); }
  .seg a:nth-child(-n+3) { border-top: 0; }
  .seg a:last-child:nth-child(3n+2) { grid-column: span 2; }
  .seg.scope { border-radius: 999px; }
  .seg.scope a { padding: .3rem .3rem; font-size: .85rem; }
}
.lg { display: inline-block; white-space: nowrap; margin-right: .5rem; }

/* equipment watch (Knowledge > เฝ้าระวัง, Today panel) */
.p-watch-new { border-color: var(--yellow); box-shadow: inset 0 0 0 1px var(--yellow); }
.watch-page > h1:first-child { font-size: 1.3rem; margin-top: 0; }
.watch-page table { display: block; overflow-x: auto; }
