/* msdyn365 wave site. Palette derived from the Business Central icon's teals and blues.
   Tokens first, everything else uses them; a redesign touches this file and the SVG classes. */
:root {
  /* colors, fonts, radii and motion come from tokens.css (generated from design/tokens.json); only non-token helpers live here */
  --status-ga: var(--text); --status-preview: #b35c00; --status-announced: #6f42c1; --status-unclear: #7a8b94;
  --shadow: 0 2px 12px rgba(10, 40, 50, .08);
}
:root[data-theme="dark"] { --status-preview: #ffb15e; --status-announced: #c3a2ff; --status-unclear: #93a6ae; --shadow: 0 2px 12px rgba(0, 0, 0, .4); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --status-preview: #ffb15e; --status-announced: #c3a2ff; --status-unclear: #93a6ae; --shadow: 0 2px 12px rgba(0, 0, 0, .4); } }
* { box-sizing: border-box; }
html { font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
code, .mono { font-family: var(--mono); font-size: .92em; }
img { max-width: 100%; height: auto; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
p, li { max-width: 72ch; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 70ch; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 1440px; }
header.top { border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 20; }
header.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 56px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: .72rem; line-height: 1.1; }
nav.main { display: flex; gap: 2px; flex-wrap: wrap; margin-left: auto; }
nav.main a { padding: 6px 10px; border-radius: 8px; color: var(--text); font-size: .93rem; }
nav.main a[aria-current="page"], nav.main a:hover { background: var(--surface-2); text-decoration: none; }
.theme-toggle { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 10px; cursor: pointer; font: inherit; font-size: .85rem; }
main { flex: 1; padding: 24px 0 48px; }
footer.bottom { border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; padding: 20px 0 32px; }
footer.bottom p { margin: .25rem 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.card h3 { margin: 0; font-size: 1rem; line-height: 1.3; }
.card .thumb { aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; width: 100%; background: var(--surface-2); }
.meta { color: var(--muted); font-size: .85rem; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--chip-bg); color: var(--chip-text); border-radius: 999px; padding: 1px 9px; font-size: .78rem; font-family: var(--mono); white-space: nowrap; }
a.chip:hover { text-decoration: none; filter: brightness(1.08); }
.chip.t::after { content: "\25B6"; font-size: .6em; opacity: .8; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: .75rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; border: 1px solid currentColor; }
.badge.status-ga { color: var(--status-ga); }
.badge.status-preview { color: var(--status-preview); border-style: dashed; }
.badge.status-announced { color: var(--status-announced); border-style: dotted; }
.badge.status-unclear { color: var(--status-unclear); }
.badge.implied { opacity: .8; font-weight: 500; } .badge.implied small { font-size: .7em; font-weight: 400; text-transform: none; letter-spacing: 0; }
.badge.conf-high { color: #1b7f3b; } .badge.conf-medium { color: #b35c00; } .badge.conf-low { color: #8a6d00; } .badge.conf-none { color: var(--muted); }
:root[data-theme="dark"] .badge.conf-high { color: #6fd38d; }
.area-dot { display: inline-block; width: .7em; height: .7em; border-radius: 2px; transform: rotate(45deg); margin-right: 6px; background: var(--area-color, var(--muted)); vertical-align: -1px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); position: sticky; top: 0; font-weight: 600; cursor: pointer; white-space: nowrap; }
th[aria-sort="ascending"]::after { content: " \25B2"; } th[aria-sort="descending"]::after { content: " \25BC"; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0 16px; }
.filters label { font-size: .88rem; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.filters select, .filters input[type=search], .filters input[type=text] { font: inherit; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; margin: 16px 0 24px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.stat b { display: block; font-size: 1.6rem; line-height: 1.1; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .82rem; }
.quote { border-left: 3px solid var(--accent); padding: 6px 12px; margin: 10px 0; background: var(--surface); border-radius: 0 8px 8px 0; }
.quote .why { color: var(--muted); font-size: .9rem; display: block; margin-top: 4px; }
blockquote { margin: 0 0 1rem; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 8px 8px 0; }
details { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; background: var(--surface); margin: 12px 0; }
summary { cursor: pointer; font-weight: 600; }
.transcript p { margin: .6rem 0; max-width: 90ch; }
.transcript a.t { font-family: var(--mono); font-size: .8em; margin-right: 6px; }
.prose h2 { border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: .35rem 0; }
.prose table { font-size: .88rem; }
.two { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 900px) { .two { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.notice { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: .9rem; color: var(--muted); }
/* timeline strip */
.strip { width: 100%; height: auto; display: block; background: var(--surface); border-radius: 8px; border: 1px solid var(--border); }
.strip .ch:nth-child(odd) { fill: var(--surface-2); } .strip .ch:nth-child(even) { fill: var(--bg); }
.strip .ch:hover { fill: var(--chip-bg); }
.strip .demo { fill: var(--accent); opacity: .45; }
.strip .feat { fill: var(--area-color, var(--accent)); }
.strip .disc { stroke: var(--status-preview); stroke-width: 2; }
.strip text { font-family: var(--mono); font-size: 10px; fill: var(--muted); }
.strip .axis { stroke: var(--border); }
/* map page: see map.css */
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .85rem; color: var(--muted); margin: 10px 0; }
.legend .sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; border: 1px solid var(--border); }
/* bingo */
.bingo { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; max-width: 560px; margin: 12px 0; }
.bingo div { aspect-ratio: 1; min-width: 0; overflow-wrap: anywhere; hyphens: auto; display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px; border: 2px solid var(--accent); border-radius: 8px; font-size: clamp(.6rem, 1.8vw, .95rem); font-weight: 600; background: var(--surface); }
.bingo .free { background: var(--accent); color: #fff; }
.heat td { text-align: center; font-variant-numeric: tabular-nums; }
.heat td.h { color: #fff; }
/* search */
.search-box { display: flex; gap: 8px; margin: 12px 0; }
.search-box input { flex: 1; font: inherit; font-size: 1.05rem; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.result { padding: 10px 0; border-bottom: 1px solid var(--border); }
.result mark { background: var(--focus); color: #111; border-radius: 3px; padding: 0 2px; }
.result .src { color: var(--muted); font-size: .85rem; }
button.btn { font: inherit; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
button.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.answer { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin: 12px 0; white-space: pre-wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media print { header.top, footer.bottom, .no-print { display: none !important; } body { background: #fff; color: #000; } .bingo div { border-color: #000; } .bingo .free { background: #000; } }
/* nav dropdown (Digests) */
nav.main details.nav-menu { position: relative; border: 0; padding: 0; margin: 0; background: none; }
nav.main details.nav-menu summary { list-style: none; padding: 6px 10px; border-radius: 8px; font-weight: 400; font-size: .93rem; cursor: pointer; color: var(--text); white-space: nowrap; }
nav.main details.nav-menu summary::-webkit-details-marker { display: none; }
nav.main details.nav-menu summary::after { content: " \25BE"; font-size: .8em; opacity: .7; }
nav.main details.nav-menu summary[aria-current="page"], nav.main details.nav-menu summary:hover, nav.main details.nav-menu[open] summary { background: var(--surface-2); }
nav.main .nav-menu__panel { position: absolute; top: calc(100% + 4px); left: 0; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; z-index: 30; }
nav.main details.nav-menu:not([open]) .nav-menu__panel { display: none; } /* an explicit display would otherwise keep the closed box in layout */
nav.main .nav-menu__panel a { display: block; white-space: nowrap; }
nav.main .nav-menu__panel a:last-child { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px; color: var(--muted); }
@media (max-width: 700px) { nav.main .nav-menu__panel { position: static; box-shadow: none; border: 0; padding: 0 0 0 10px; } }
/* footnote on the GA label */
footer.bottom .status-note { max-width: 90ch; }
footer.bottom .status-note code { font-size: .85em; }
/* tip box (Ask page) */
.tip { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 10px; padding: 12px 14px; margin: 16px 0; }
.tip p { margin: 0 0 8px; max-width: none; }
.tip p:last-child { margin-bottom: 0; }
.tip pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0; font-size: .88rem; font-family: var(--mono); background: var(--surface-2); padding: 10px 12px; border-radius: 8px; }
