/* Machhar method page. Tokens from ui.css (paper, ink, rules) and chrome.css (fonts);
   the reading colours are the map's own (workspace.css), repeated so this page
   does not load the map's layout. */
:root {
  --lv-top: #0d366b; --lv-high: #3987e5; --lv-usual: #d3d1ca; --lv-low: #cde2fb; --lv-none: #ecebe7;
  --c-dengue: #2a6fd0; --c-chik: #178a60; --c-mal: #7a4fc4; --c-warm: #c24a1c; --c-muted: #8f8d86;
  --band: #efeee9; --grid: #e6e4de;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --lv-top: #9ec5f4; --lv-high: #3987e5; --lv-usual: #4a4a47; --lv-low: #1d3a5f; --lv-none: #26272a;
    --c-dengue: #5fa0f0; --c-chik: #3cc08d; --c-mal: #a888e8; --c-warm: #ec7a4c; --c-muted: #8a8983;
    --band: #232529; --grid: #2c2d31;
  }
}
:root[data-theme="dark"] {
  --lv-top: #9ec5f4; --lv-high: #3987e5; --lv-usual: #4a4a47; --lv-low: #1d3a5f; --lv-none: #26272a;
  --c-dengue: #5fa0f0; --c-chik: #3cc08d; --c-mal: #a888e8; --c-warm: #ec7a4c; --c-muted: #8a8983;
  --band: #232529; --grid: #2c2d31;
}

body { margin: 0; background: var(--ui-paper); color: var(--ui-ink); font-family: var(--mlc-sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }

/* Same article format as Tiddi's guide: content starts where the Maplore logo starts,
   a 720 px column, text at 66ch. */
.m { margin: 0; padding-block: 48px 64px; }
.m > * { max-width: 720px; }
.m p, .m li { max-width: 66ch; }
.m h1, .m h2 { font-family: var(--mlc-serif); font-weight: 400; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
.m h1 { font-style: italic; font-size: clamp(2.2rem, 4vw, 2.9rem); line-height: 1.08; }
.m h2 { font-family: var(--mlc-sans); font-size: 1.05rem; font-weight: 500; letter-spacing: 0; line-height: 1.35; }
.m a { color: inherit; text-underline-offset: 3px; }

.m-eye, .m-num { font-family: "Space Mono", ui-monospace, monospace; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ui-muted); margin: 0; }
.m-top { display: flex; flex-direction: column; gap: 12px; }
.m-top h1 { margin-bottom: 8px; }
.m-lede { font-size: 1.05rem; color: var(--ui-ink-2); margin: 0; }
.m-meta { font-family: "Space Mono", monospace; font-size: 0.74rem; color: var(--ui-muted); margin: 0; }

.m-toc { display: flex; flex-wrap: wrap; gap: 6px 0; margin-top: 20px; font-size: 14px; }
.m-toc a { color: var(--ui-muted); text-decoration: none; }
.m-toc a + a::before { content: "·"; margin: 0 10px; color: var(--ui-muted); }
.m-toc a:hover { color: var(--ui-ink); text-decoration: underline; }

.m section { margin-top: 2.6rem; padding-top: 1.1rem; border-top: 1px solid var(--ui-rule); display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 24px; }
.m section > p { margin: 0; }
.m-note { font-size: 0.9rem; color: var(--ui-muted); margin: 0; }

.m-bands { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.m-bands li { display: grid; grid-template-columns: 14px 11.5em 1fr; align-items: baseline; gap: 10px; font-size: 0.94rem; color: var(--ui-ink-2); }
.m-bands i { width: 14px; height: 14px; border-radius: 3px; transform: translateY(2px); }
.m-bands b { color: var(--ui-ink); font-weight: 600; }
/* phones: the swatch and the name on one line, the explanation beneath the name */
@media (max-width: 560px) { .m-bands li { grid-template-columns: 14px 1fr; row-gap: 2px; } .m-bands li span { grid-column: 2; } }
.m-live { border-left: 3px solid var(--lv-top); padding: 2px 0 2px 14px; margin: 0; }

.m-fig { margin: 4px 0 0; background: var(--ui-surface); border: 1px solid var(--ui-rule); border-radius: var(--ui-r); padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.m-fh { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 18px; font-size: 0.92rem; font-weight: 600; }
.m-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-weight: 400; font-size: 0.8rem; color: var(--ui-ink-2); }
.m-key span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.m-key i { width: 14px; height: 3px; border-radius: 2px; background: var(--c-muted); }
.m-key i.k-dash { background: none; border-top: 2px dashed var(--c-muted); height: 0; }
.m-key i.k-bar { height: 9px; width: 9px; border-radius: 1px; background: var(--band); box-shadow: inset 0 0 0 1px var(--ui-rule-strong); }
.k-dengue { background: var(--c-dengue) !important; } .k-chik { background: var(--c-chik) !important; } .k-mal { background: var(--c-mal) !important; }
.k-warm { background: var(--c-warm) !important; } .k-muted { background: var(--c-muted); }
.m-chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.m-chart text { font-family: "Space Mono", monospace; font-size: 11px; fill: var(--ui-muted); }
.m-read { font-family: "Space Mono", monospace; font-size: 0.74rem; color: var(--ui-ink-2); min-height: 1.5em; margin: 0; display: flex; flex-wrap: wrap; gap: 2px 16px; }
.m-read b { color: var(--ui-ink); font-weight: 700; }

.m-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.m-stat { border: 1px solid var(--ui-rule); border-radius: var(--ui-r); padding: 12px 14px; background: var(--ui-surface); display: flex; flex-direction: column; gap: 4px; }
.m-stat .k { font-family: "Space Mono", monospace; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ui-muted); display: flex; align-items: center; gap: 7px; }
.m-stat .k i { width: 10px; height: 3px; border-radius: 2px; }
.m-stat .v { font-family: var(--mlc-serif); font-size: 1.7rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.m-stat .v small { font-family: var(--mlc-sans); font-size: 0.8rem; color: var(--ui-muted); }
.m-stat .d { font-size: 0.82rem; color: var(--ui-ink-2); }

.m-call { border-left: 3px solid var(--c-warm); padding: 2px 0 2px 14px; display: flex; flex-direction: column; gap: 8px; }
.m-call p { margin: 0; }

.m-tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.m-table { border-collapse: collapse; width: 100%; font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.m-table th, .m-table td { padding: 7px 8px; border-bottom: 1px solid var(--ui-rule); text-align: right; white-space: nowrap; }
.m-table th:first-child, .m-table td:first-child { text-align: left; position: sticky; left: 0; background: var(--ui-paper); }
.m-table thead th { font-family: "Space Mono", monospace; font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ui-muted); font-weight: 400; border-bottom-color: var(--ui-rule-strong); }
.m-table td.z { color: var(--ui-muted); }
.m-table tr.hi td { font-weight: 600; }
.m-table.m-left td, .m-table.m-left th { text-align: left; white-space: normal; min-width: 7.5em; }
.m-table.m-left td:first-child { font-weight: 600; min-width: 10em; }
.m-table small { color: var(--ui-muted); font-weight: 400; }

.m-limits { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; color: var(--ui-ink-2); }
.m-limits b { color: var(--ui-ink); }

.m-src { margin-top: 2.6rem; padding-top: 1.1rem; border-top: 1px solid var(--ui-rule); display: flex; flex-direction: column; gap: 14px; }
.m-src ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 0.86rem; color: var(--ui-ink-2); }
.m-src a { word-break: break-word; }

#tt { position: fixed; pointer-events: none; opacity: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
#synthetic:not([hidden]) { display: flex; flex-direction: column; gap: 12px; }
#synthetic p { margin: 0; }
.m-table thead th { white-space: normal; vertical-align: bottom; }
#t-syn td:first-child, #t-syn th:first-child { white-space: normal; min-width: 0; }
@media (max-width: 480px) { #t-syn th, #t-syn td { padding-inline: 5px; } #t-syn { font-size: 0.8rem; } }
.m-table td small { display: block; font-size: 0.74rem; }
@media (max-width: 600px) {
  .m-table.m-left thead { display: none; }
  .m-table.m-left, .m-table.m-left tbody, .m-table.m-left tr, .m-table.m-left td { display: block; width: auto; }
  .m-table.m-left tr { padding: 10px 0; border-bottom: 1px solid var(--ui-rule); }
  .m-table.m-left td { border: 0; padding: 2px 0; min-width: 0; position: static; background: none; }
  .m-table.m-left td:first-child { font-size: 0.95rem; padding-bottom: 4px; }
  .m-table.m-left td:not(:first-child)::before { content: attr(data-label) " · "; font-family: "Space Mono", monospace; font-size: 0.68rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ui-muted); }
}
#t-months th, #t-months td { padding-inline: 6px; }
#t-syn th { min-width: 5.2em; }
