/*
 * Glass. Loaded after app.css and world.css on every page.
 *   1. two themes (dark glass is the default, light glass the option), as tokens on <html data-theme>
 *   2. the glass surfaces: frosted (blur + saturation), a 1 px light border, an inner highlight, a soft shadow
 *   3. the rail, the Overview / 3D Studio switch, the overview deck and its cards and charts
 * Contrast: text never sits on the 3D scene itself. Every surface that carries text has a tint strong enough
 * for WCAG AA whatever is behind it (white or black): tests/unit/glass.test.ts computes it from this file.
 */

/* ---------------------------------------------------------------- 1. themes */
:root { --blur: 24px; --sat: 160%; --rail-w: 64px; --mar-solid: #0B5E8E; --on-mar: #FFFFFF; --on-mar-soft: #D7ECF8; --lift: cubic-bezier(.2, .8, .2, 1); }
html[data-theme="dark"] {
  color-scheme: dark;
  --lino: #171614; --tinta: #F4EFE7; --gris: #D0CABF; --piedra: #8F897E; --mar: #9BD2F2;
  --paper: rgba(255, 255, 255, .07); --line: rgba(255, 255, 255, .18); --wash: rgba(255, 255, 255, .12);
  --danger: #FFC0B5; --warn: #F3CC84; --ok: #A4E0BD;
  --glass-bg: rgba(24, 23, 21, .84); --glass-soft: rgba(255, 255, 255, .08); --glass-border: rgba(255, 255, 255, .22); --glass-hi: rgba(255, 255, 255, .2);
  --glass-shadow: 0 28px 70px -28px rgba(0, 0, 0, .72), 0 2px 8px rgba(0, 0, 0, .25); --glass-solid: #2B2A28; --card: var(--glass-bg);
  --on-accent: #0B2230; --scrim: rgba(12, 12, 11, .3); --ground: #171614;
  --shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 14px 34px -18px rgba(0, 0, 0, .7);
}
html[data-theme="light"] {
  color-scheme: light;
  --gris: #4A5057;
  --glass-bg: rgba(250, 247, 242, .84); --glass-soft: rgba(255, 255, 255, .55); --glass-border: rgba(255, 255, 255, .78); --glass-hi: rgba(255, 255, 255, .92);
  --glass-shadow: 0 24px 60px -28px rgba(28, 27, 25, .42), 0 1px 3px rgba(28, 27, 25, .08); --glass-solid: #F4F0E9; --card: var(--glass-bg);
  --on-accent: #FFFFFF; --scrim: rgba(239, 234, 226, 0); --ground: #EFEAE2;
}
body { background: var(--ground); }
html[data-theme="dark"] body:not(.is-world):not(.is-deck) { background: radial-gradient(1200px 700px at 12% -10%, #2A2E33 0%, transparent 60%), radial-gradient(900px 600px at 100% 110%, #1B2A33 0%, transparent 55%), #171614; background-attachment: fixed; }
.ico { display: block; flex: 0 0 auto; }
.tool svg.ico { fill: none; stroke: none; }
.logo { display: block; max-width: 100%; height: auto; }
.brand { gap: 6px; align-items: flex-start; } .brand .logo { height: 24px; width: auto; }
.rail-mark { width: 48px; } .rail-mark .logo { width: 44px; height: auto; }
.login-logo { display: grid; place-items: center; margin: 0 0 var(--s3); }
.deck-logo { margin: 0 0 14px; }

/* what was written for a light page only, said again for dark glass */
html[data-theme="dark"] .pill-ok, html[data-theme="dark"] .flash-ok, html[data-theme="dark"] .chip-ok { background: rgba(164, 224, 189, .16); color: var(--ok); }
html[data-theme="dark"] .pill-warn, html[data-theme="dark"] .chip-warn { background: rgba(243, 204, 132, .16); color: var(--warn); }
html[data-theme="dark"] .pill-danger, html[data-theme="dark"] .flash-error, html[data-theme="dark"] .chip-danger { background: rgba(255, 180, 168, .16); color: var(--danger); }
html[data-theme="dark"] .chip, html[data-theme="dark"] .chip-quiet { background: var(--wash); color: var(--tinta); }
html[data-theme="dark"] .chip-mar { background: rgba(143, 203, 239, .16); color: #CFEAFA; } /* lighter than the accent: it also sits on a selected row's tint */
html[data-theme="dark"] .badge-blocked { color: #2A0E0A; }
html[data-theme="dark"] .btn-primary, html[data-theme="dark"] .places a[aria-current="page"], html[data-theme="dark"] .wstep.is-now .wstep-dot { color: var(--on-accent); }
html[data-theme="dark"] .btn-primary:hover { background: #B7DDF5; border-color: #B7DDF5; color: var(--on-accent); }
html[data-theme="dark"] .btn-danger:hover, html[data-theme="dark"] .holdbar, html[data-theme="dark"] .holdbar a { color: #2A0E0A; }
html[data-theme="dark"] .places a[aria-current="page"] .count { background: var(--on-accent); color: var(--mar); }
html[data-theme="dark"] tr.is-paused { background: rgba(255, 180, 168, .12); }
html[data-theme="dark"] .kpi, html[data-theme="dark"] .wstep-dot { background: var(--glass-soft); }
html[data-theme="dark"] .wrow[aria-current] { background: rgba(143, 203, 239, .16); }
html[data-theme="dark"] .wrow[aria-current] .wrow-s { color: var(--gris); }
html[data-theme="dark"] .tool:hover { background: rgba(255, 255, 255, .22); }
html[data-theme="dark"] .tile, html[data-theme="dark"] .column, html[data-theme="dark"] .cal, html[data-theme="dark"] .roomlist a, html[data-theme="dark"] .msg-hq, html[data-theme="dark"] .preview { background: var(--glass-soft); }
html[data-theme="dark"] .pin-n { color: #1C1B19; }
html[data-theme="dark"] .roomtag { text-shadow: none; }

/* ---------------------------------------------------------------- 2. glass surfaces */
.glass, .wcard, .top, .drawer, .hint, .roomtag, .search-pop, .me-menu, .place-label, .world-note, .tool {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--sat)); backdrop-filter: blur(var(--blur)) saturate(var(--sat));
}
.card, .login { background: var(--glass-soft); border: 1px solid var(--glass-border); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow); border-radius: var(--r3); }
html[data-theme="light"] body:not(.is-world):not(.is-deck) .card { background: rgba(255, 255, 255, .6); }
.top { border-width: 0 0 1px; border-radius: 0; }
/* a frosted bar is its own layer: it must stay above the stage, or its menus (search results, the account menu) would open underneath */
@media (max-width: 640px) { .top { position: relative; z-index: 40; } }
.drawer { border-width: 0 0 0 1px; }
.drawer-bar { background: none; }
.roomtag { padding: 2px 18px 5px; border-radius: 999px; }
.stage::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--scrim); } /* dark glass: the bright studio is dimmed a little behind the cards */
.is-film .stage::after { display: none; }
.wcard { border-radius: 22px; transition: transform 220ms var(--lift), box-shadow 220ms var(--lift); }
.no3d .wcard, .world-list .wcard { background: var(--glass-soft); border-color: var(--glass-border); }
@media (hover: hover) and (pointer: fine) {
  .is-3d .wcard:hover, .gcard:hover, .grid > .card:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 var(--glass-hi), 0 34px 70px -30px rgba(0, 0, 0, .6); }
}
.grid > .card { transition: transform 220ms var(--lift), box-shadow 220ms var(--lift); }
.mail-preview { background: #fff; color: #1C1B19; border: 1px solid #D9D2C6; border-radius: 10px; padding: 16px 18px; --mar: #0B5E8E; overflow-wrap: anywhere; } /* as the recipient sees it, whatever the theme */
.mail-preview a { color: #0B5E8E; }
.notice-ok { border-color: var(--ok); }
.checklist > li { display: grid; grid-template-columns: 86px minmax(110px, 180px) 1fr; gap: 10px; align-items: baseline; }
.checklist .pill { justify-self: start; }
.rte { min-height: 220px; padding: 12px 14px; border: 1px solid var(--piedra); border-radius: var(--r1); background: var(--paper); color: var(--tinta); line-height: 1.5; overflow-wrap: anywhere; }
.rte p { margin: 0 0 .8em; }
.rte-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.compose-start { align-items: flex-end; padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.compose-start .field { flex: 1 1 150px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 0; }
.btn-google { width: 100%; gap: 10px; background: #fff; color: #1C1B19; border-color: #C9C2B6; }
.btn-google:hover { background: #F1EFEA; color: #1C1B19; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.usercode { display: block; margin: 8px 0; font: 700 2rem/1.2 var(--mono); letter-spacing: .12em; }
.login { padding: var(--s6); }
/* the sign-in page: two panels in one sheet of glass (the logo, the way in); they stack on a narrow screen */
.login-split { width: min(100%, 820px); padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); overflow: hidden; text-align: left; border-radius: 28px; }
.login-brand { display: grid; align-content: center; justify-items: center; gap: 10px; padding: 44px 32px; text-align: center; background: var(--glass-soft); border-right: 1px solid var(--glass-border); }
.login-split .login-logo { margin: 0; }
.login-kicker { margin: 0; font: 700 .74rem var(--sans); letter-spacing: .22em; color: var(--mar); }
.login-line { margin: 6px 0 0; max-width: 28ch; font-size: .88rem; line-height: 1.45; color: var(--gris); }
.login-form { display: grid; align-content: center; gap: 12px; padding: 44px 36px; }
.login-form h1 { margin: 0; font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); line-height: 1.1; }
.login-lede { margin: 0 0 6px; color: var(--gris); }
.login-form .btn-google { min-height: 48px; font-weight: 500; }
.login-foot { margin: 4px 0 0; font-size: .8rem; }
@media (max-width: 700px) {
  .login-split { grid-template-columns: minmax(0, 1fr); width: min(100%, 420px); }
  .login-brand { padding: 26px 20px 20px; border-right: 0; border-bottom: 1px solid var(--glass-border); }
  .login-brand .logo { height: 72px; width: auto; }
  .login-form { padding: 22px 20px 26px; }
}
.login .steps { text-align: left; }

/* ---------------------------------------------------------------- 3a. rail and switch */
.rail { position: fixed; z-index: 45; left: 14px; top: 14px; bottom: 14px; width: var(--rail-w); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; border-radius: 32px; }
.rail ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.rail-mark { display: grid; place-items: center; width: 44px; height: 44px; }
.rail-link { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 15px; background: none; color: var(--tinta); cursor: pointer; text-decoration: none; transition: background 160ms var(--lift), transform 160ms var(--lift); }
.rail-link:hover { background: var(--wash); }
.rail-link:active { transform: scale(.94); }
.rail-link[aria-current="page"] { background: var(--mar-solid); color: var(--on-mar); box-shadow: 0 8px 20px -8px rgba(11, 94, 142, .8); }
.rail-label { position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%) translateX(-4px); padding: 5px 12px; border-radius: 999px; background: var(--tinta); color: var(--lino); font: 500 .82rem var(--sans); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 140ms linear, transform 140ms var(--lift); }
.rail-link:hover .rail-label, .rail-link:focus-visible .rail-label { opacity: 1; transform: translateY(-50%); }
.rail-theme { margin: 0; }
body.has-rail { padding-left: calc(var(--rail-w) + 28px); }
.has-rail .hint { bottom: 68px; }
.switcher { position: fixed; z-index: 44; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 2px; padding: 4px; border-radius: 999px; }
.switcher a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 20px; border-radius: 999px; color: var(--tinta); text-decoration: none; font: 500 .9rem var(--sans); white-space: nowrap; transition: background 160ms var(--lift); }
.switcher a:hover { background: var(--wash); }
.switcher a[aria-current="page"] { background: var(--mar-solid); color: var(--on-mar); }
.has-drawer ~ .switcher, body:has(.has-drawer) .switcher { display: none; } /* a workspace is open: the switch would sit on its buttons */

/* ---------------------------------------------------------------- 3b. the overview deck */
.deck-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--ground); }
.deck-bg canvas { width: 100%; height: 100%; display: block; filter: blur(14px) saturate(1.15); transform: scale(1.08); }
.deck-bg::after { content: ""; position: absolute; inset: 0; background: var(--scrim); }
html[data-theme="dark"] .deck-bg::after { background: rgba(14, 13, 12, .42); }
.is-deck main { position: relative; z-index: 1; max-width: 1640px; padding: 14px 14px 84px 0; }
.deck { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 14px; align-items: start; }
.deck-main, .deck-side { border-radius: 28px; padding: 22px; min-width: 0; }
.deck-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.deck-head h1 { margin: 0; font-size: clamp(1.9rem, 1.4rem + 1.4vw, 2.7rem); }
.deck-date { margin: 2px 0 0; color: var(--gris); font-size: .9rem; }
.deck-search { position: relative; margin-left: auto; flex: 0 1 340px; min-width: 180px; }
.deck-search .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--gris); pointer-events: none; }
.deck-search input { min-height: 44px; padding-left: 42px; border-radius: 999px; background: var(--glass-soft); border: 1px solid var(--glass-border); }
.deck-search input::placeholder { color: var(--gris); }
.gtool { position: relative; display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--glass-border); background: var(--glass-soft); color: var(--tinta); cursor: pointer; text-decoration: none; font: 500 1.1rem var(--sans); transition: background 160ms var(--lift), transform 160ms var(--lift); }
.gtool:hover { background: var(--wash); }
.gtool:active { transform: scale(.94); }
.gtool .ico { width: 19px; height: 19px; }
summary.gtool { list-style: none; } summary.gtool::-webkit-details-marker { display: none; }
.bell { position: relative; margin: 0; }
.bell-n { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--mar-solid); color: var(--on-mar); font: 700 .68rem/18px var(--sans); text-align: center; }
.bell-pop { position: absolute; z-index: 60; right: 0; top: 48px; width: min(400px, 86vw); max-height: 62vh; overflow: auto; padding: 16px; border-radius: 20px; }
.bell-pop h2 { font: 500 1rem var(--sans); }

.tiles4 { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gcard { position: relative; min-width: 0; padding: 14px 16px; border-radius: 20px; background: var(--glass-soft); border: 1px solid var(--glass-border); box-shadow: inset 0 1px 0 var(--glass-hi); transition: transform 220ms var(--lift), box-shadow 220ms var(--lift); }
.gcard:focus-visible { outline: 3px solid var(--mar); outline-offset: 2px; }
.gcard h3 { margin: 0 0 4px; font: 500 1rem/1.3 var(--sans); padding-right: 84px; overflow-wrap: anywhere; }
.gcard .eyebrow { padding-right: 84px; }
.gcard .meta { margin: 0 0 8px; font-size: .74rem; }
.gcard-tools { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 4px; }
.gcard-tools .gtool { width: 34px; height: 34px; }
.gcard-tools .gtool .ico { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .gcard-tools { opacity: 0; transition: opacity 140ms linear; } .gcard:hover .gcard-tools, .gcard:focus-within .gcard-tools, .gcard:focus .gcard-tools { opacity: 1; } }
@media (pointer: coarse) { .gcard-tools .gtool, .gtool, .seg a, .switcher a { min-width: 44px; min-height: 44px; } .gcard-tools .gtool { width: 44px; height: 44px; } }
/* a finger or a narrow screen: the card's tools get their own row, so they never sit on its words */
@media (pointer: coarse), (max-width: 899px) {
  .gcard-tools { position: static; justify-content: flex-end; margin: -4px -6px 4px 0; }
  .tile4 .gcard-tools { grid-column: 1 / -1; }
  .gcard h3, .gcard .eyebrow, .tile4-label, .chart-head { padding-right: 0; }
}
.gmenu { position: relative; margin: 0; }
.gmenu-pop { position: absolute; z-index: 30; right: 0; top: calc(100% + 6px); display: grid; min-width: 160px; padding: 6px; border-radius: 14px; }
.gmenu-pop button { min-height: 44px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--tinta); font: 500 .88rem var(--sans); text-align: left; cursor: pointer; }
.gmenu-pop button:hover { background: var(--wash); }
.gcard:has(.gmenu[open]) { z-index: 25; } /* a card whose menu is open stands above its neighbours */
.gcard-more { display: none; margin-top: 10px; }
.gcard.is-pinned { border-color: var(--mar); }
.gcard.is-pinned::before { content: "pinned"; position: absolute; left: 14px; bottom: 100%; transform: translateY(50%); padding: 0 8px; border-radius: 999px; background: var(--mar-solid); color: var(--on-mar); font: 700 .62rem/16px var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.gcard.is-dragging { z-index: 20; cursor: grabbing; opacity: .92; box-shadow: inset 0 1px 0 var(--glass-hi), 0 30px 60px -20px rgba(0, 0, 0, .6); transition: none; }
[data-reorder] > .gcard { touch-action: pan-y; }
.gcard.is-expanded { position: fixed; z-index: 90; left: 50%; top: 50%; width: min(760px, 94vw); max-height: 86dvh; overflow: auto; transform: translate(-50%, -50%); padding: 24px; background: var(--glass-bg); -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--sat)); backdrop-filter: blur(var(--blur)) saturate(var(--sat)); box-shadow: inset 0 1px 0 var(--glass-hi), var(--glass-shadow); }
.gcard.is-expanded .gcard-more { display: block; }
.gcard.is-expanded .gcard-tools { opacity: 1; }
.gcard.is-expanded:hover { transform: translate(-50%, -50%); }
.gscrim { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .5); }
.gholder { border-radius: 20px; border: 1px dashed var(--glass-border); }

.tile4 { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: end; }
.tile4-label { grid-column: 1 / -1; margin: 0 0 8px; padding-right: 78px; font-size: .84rem; font-weight: 500; color: var(--gris); }
.tile4-value { margin: 0; line-height: 1.15; min-width: 0; }
.tile4-value strong { display: block; font: 400 2.2rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.tile4-unit { font-size: .76rem; color: var(--gris); }
.tile4-none { margin: 0; font-size: .72rem; color: var(--gris); }
.tile4 .gcard-more { grid-column: 1 / -1; }
.spark { display: block; max-width: 100%; }
.spark-base { stroke: var(--line); stroke-width: 1; }
.spark-line { fill: none; stroke: var(--mar); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-dot { fill: var(--mar); }
table.mini { font-size: .84rem; }

.deck-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; margin-bottom: 14px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-right: 84px; margin-bottom: 6px; }
.chart-head h2 { margin: 0; font: 500 1.05rem var(--sans); }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--glass-soft); border: 1px solid var(--glass-border); }
.seg a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px; color: var(--tinta); text-decoration: none; font: 500 .84rem var(--sans); }
.seg a[aria-current] { background: var(--mar-solid); color: var(--on-mar); }
.chart { margin: 0; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.tick path { stroke: var(--line); stroke-width: 1; }
.tick text, .xlabel, .axis-title { fill: var(--gris); font: 400 11px var(--sans); }
.series-outreach { --c: var(--mar); } .series-replies { --c: var(--warn); } .series-meetings { --c: var(--ok); }
.series polyline { fill: none; stroke: var(--c); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.series-replies polyline { stroke-dasharray: 7 4; } .series-meetings polyline { stroke-dasharray: 2 5; }
.pt { outline: none; }
.pt > circle:not(.pt-hit), .pt > rect, .pt > path { fill: var(--c); stroke: var(--glass-solid); stroke-width: 1.5; }
.pt-hit { fill: transparent; }
.pt:focus-visible .pt-hit { stroke: var(--tinta); stroke-width: 2; }
.tip { opacity: 0; pointer-events: none; transition: opacity 120ms linear; }
.pt:hover .tip, .pt:focus .tip { opacity: 1; }
.tip rect { fill: var(--tinta); } .tip text { fill: var(--lino); font: 500 11px var(--sans); }
.legend { list-style: none; display: flex; gap: 16px; flex-wrap: wrap; padding: 0; margin: 8px 0 4px; font-size: .82rem; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend svg path:first-child { stroke: var(--c); stroke-width: 2; fill: none; }
.legend svg circle, .legend svg rect, .legend svg path:not(:first-child) { fill: var(--c); }
.series-replies.legend svg path:first-child, .legend .series-replies svg path:first-child { stroke-dasharray: 7 4; } .legend .series-meetings svg path:first-child { stroke-dasharray: 2 5; }
.chart-table { margin: 4px 0; font-size: .86rem; } .chart-table summary { min-height: 36px; color: var(--mar); }
.chart figcaption .meta { margin: 6px 0 2px; }

.feature { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 20px; border-radius: 20px; background: linear-gradient(160deg, #0E6DA4 0%, var(--mar-solid) 55%, #084A70 100%); color: var(--on-mar); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 24px 50px -26px rgba(11, 94, 142, .9); }
.feature .eyebrow { color: var(--on-mar-soft); }
.feature h2 { margin: 0; color: var(--on-mar); font-size: clamp(1.5rem, 1.2rem + .9vw, 2rem); overflow-wrap: anywhere; }
.feature-text { margin: 0; color: var(--on-mar); overflow-wrap: anywhere; }
.feature-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: auto 0 0; padding-top: 10px; }
.btn-onmar { background: #fff; border-color: #fff; color: #0B5E8E; } .btn-onmar:hover { background: var(--on-mar-soft); border-color: var(--on-mar-soft); color: #084A70; }
.btn-onmar-quiet { border-color: rgba(255, 255, 255, .75); color: #fff; } .btn-onmar-quiet:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.feature-src { margin: 0; font-size: .74rem; color: var(--on-mar-soft); overflow-wrap: anywhere; }
.feature .badge { color: #fff; background: none; border-color: #fff; }
.feature :focus-visible { outline-color: #fff; }

.deck-section { margin-top: 4px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 6px 0 10px; padding-left: 10px; border-left: 3px solid var(--mar); }
.section-head h2 { margin: 0; font: 500 1.05rem var(--sans); }
.section-head a { font-size: .84rem; }
.cards-row { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr)); gap: 12px; }
.decision-sub { margin: 0; font-size: .86rem; color: var(--gris); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.is-expanded .decision-sub { display: block; }
.source-rows { margin: 0; font-size: .88rem; }
.source-card:not(.is-expanded) .source-rows > li:nth-child(n+4) { display: none; }

.profile { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.avatar-img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 1px solid var(--glass-border); }
.avatar-lg { width: 48px; height: 48px; flex: 0 0 auto; }
.profile-name { margin: 0; min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.profile-menu { margin: 0; }
.profile-menu .me-menu { top: calc(100% + 8px); }
.mini3 { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini3 a { display: grid; gap: 2px; min-height: 64px; padding: 10px 4px; border-radius: 16px; background: var(--glass-soft); border: 1px solid var(--glass-border); color: var(--tinta); text-decoration: none; text-align: center; }
.mini3 strong { font: 400 1.6rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.mini3 span { font-size: .72rem; color: var(--gris); line-height: 1.2; }
.cal-month { margin-bottom: 14px; padding: 14px; border-radius: 20px; background: var(--glass-soft); border: 1px solid var(--glass-border); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-head h2 { margin: 0; font: 500 1rem var(--sans); }
.cal-nav { display: flex; gap: 6px; margin: 0; } .cal-nav .gtool { width: 32px; height: 32px; }
.cal-grid { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 2px; font-size: .84rem; }
.cal-grid th { padding: 4px 0; border: 0; text-align: center; font: 500 .7rem var(--sans); letter-spacing: .04em; color: var(--gris); text-transform: none; }
.cal-grid td { height: 46px; padding: 3px 0; border: 0; border-radius: 10px; text-align: center; vertical-align: top; }
.cal-grid td.is-out .cal-day { color: var(--gris); }
.cal-grid td.has-marks { background: var(--wash); }
.cal-day { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-variant-numeric: tabular-nums; }
.is-today .cal-day { background: var(--mar-solid); color: var(--on-mar); font-weight: 700; }
.cal-marks { display: flex; justify-content: center; gap: 2px; flex-wrap: wrap; }
.mark { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 5px; font: 700 .64rem/1 var(--sans); }
.mark-bookings { background: #0B5E8E; color: #fff; } .mark-visits { background: #1F5F3F; color: #fff; } .mark-posts { background: #7A4B00; color: #fff; } .mark-runs { background: var(--tinta); color: var(--lino); }
.cal-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 0; margin: 8px 0 0; font-size: .74rem; }
.cal-big .cal-grid td { height: 104px; padding: 6px; text-align: left; }
.cal-big .cal-marks { justify-content: flex-start; }
.cal-items { list-style: none; padding: 0; margin: 4px 0 0; font-size: .72rem; line-height: 1.3; overflow-wrap: anywhere; }
.sched { list-style: none; padding: 0; margin: 0; }
.sched li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; margin-bottom: 8px; border-radius: 16px; background: var(--glass-soft); border: 1px solid var(--glass-border); }
.sched-text { min-width: 0; overflow-wrap: anywhere; font-size: .9rem; }
.sched-when { font-size: .76rem; color: var(--gris); white-space: nowrap; }
.keys { max-width: min(520px, 92vw); padding: 22px; border-radius: 22px; color: var(--tinta); }
.keys::backdrop { background: rgba(0, 0, 0, .5); }
.keylist { margin: 0 0 14px; } .keylist div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); } .keylist dd { margin: 0; }
kbd { font: 500 .8rem var(--mono); padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- 3c. the overview as one screen (13 Oct, addendum 2) */
.deck-one { display: block; }
.deck-one .deck-head { flex-wrap: nowrap; margin-bottom: 0; }
.deck-one .deck-logo { margin: 0 6px 0 0; flex: 0 0 auto; }
.deck-one .deck-logo .logo { height: 44px; width: auto; }
.deck-hello { min-width: 0; }
.deck-one .deck-head h1 { font-size: clamp(1.5rem, 1.1rem + 1.1vw, 2.15rem); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-one .deck-date { font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-sum { display: block; list-style: none; border-radius: 50%; cursor: pointer; } .profile-sum::-webkit-details-marker { display: none; }
.profile-sum .avatar-img, .profile-sum .avatar-lg { display: grid; width: 40px; height: 40px; }
.deck-one .profile-menu { position: relative; }
.deck-one .profile-menu .me-menu { right: 0; left: auto; min-width: 220px; }
.deck-one .profile-name { padding: 4px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.deck-one .tiles4 { margin: 0; }
.deck-one .deck-main { display: grid; gap: 12px; grid-template-rows: auto auto auto auto; }

.viz-row { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); min-height: 0; }
.viz-card { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 6px; min-height: 0; padding: 12px 14px 10px; }
.viz-head { padding-right: 44px; min-width: 0; }
.viz-head h2 { margin: 0; font: 500 1rem/1.25 var(--sans); }
.viz-sub { margin: 1px 0 0; font-size: .76rem; line-height: 1.3; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viz-plot { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.viz-bars, .viz-heat { overflow: visible; } /* their tooltips may leave the plot; the grid column keeps them from widening the card */
.viz-bars { height: 190px; } .viz-heat { height: 200px; } .viz-rings { width: 132px; height: 132px; flex: 0 0 auto; }
.viz-wait { margin: 0; padding: 12px; font-size: .8rem; color: var(--gris); }
.viz-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0; font-size: .7rem; line-height: 1.3; color: var(--gris); }
.viz-axes { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkish { flex: 0 0 auto; padding: 0; border: 0; background: none; color: var(--mar); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.viz-legend { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 0; margin: 0; font-size: .74rem; color: var(--gris); }
.viz-legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; flex: 0 0 auto; border: 1px solid var(--line); }
.swatch-1 { background: var(--mar); } .swatch-2 { background: var(--tinta); } .swatch-3 { background: var(--piedra); }
.viz-scale { gap: 3px; } .viz-scale > span:first-child { margin-right: 3px; } .viz-scale .swatch + span { margin-left: 3px; }
.scale-1 { background: var(--wash); } .scale-2 { background: color-mix(in srgb, var(--mar) 34%, transparent); } .scale-3 { background: color-mix(in srgb, var(--mar) 56%, transparent); } .scale-4 { background: color-mix(in srgb, var(--mar) 78%, transparent); } .scale-5 { background: var(--mar); }
.viz-gap { margin-left: auto; }
.viz-target { display: flex; align-items: center; gap: 14px; min-height: 0; }
.viz-ringlist { display: grid; gap: 6px; font-size: .8rem; color: var(--tinta); }
.viz-ringlist strong { font: 400 1.35rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.viz-rings { container-type: size; }
.hq-ring-value { display: block; font: 400 clamp(1rem, 24cqw, 2rem)/1 var(--serif); color: var(--tinta); font-variant-numeric: tabular-nums; }
.hq-ring-done { margin: 3px auto 0; color: var(--ok); }
.hq-ring-of { display: block; margin-top: 2px; font: 500 clamp(.6rem, 9cqw, .8rem)/1 var(--sans); color: var(--gris); }
.viz-card:not(.is-expanded) .viz-plot ~ .gcard-more { display: none; }
.viz-card:has(.viz-wait) .gcard-more { display: block; } /* no script: the table is the chart */
.viz-card.is-expanded { grid-template-rows: auto auto auto auto; }
.viz-card.is-expanded .viz-sub, .viz-card.is-expanded .viz-axes { white-space: normal; }
.viz-card.is-expanded .viz-foot .linkish { display: none; }
.viz-card.is-expanded .viz-bars { height: 280px; } .viz-card.is-expanded .viz-heat { height: 300px; }
.deck-one .feature { padding: 14px 16px; gap: 4px; }
.deck-one .feature h2 { font-size: clamp(1.15rem, 1rem + .5vw, 1.5rem); line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deck-one .feature-text { font-size: .84rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deck-one .feature-actions { padding-top: 4px; }
.deck-one .feature-src { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.deck-more ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0; padding: 0; }
.more-btn { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 14px; border-radius: 16px; background: var(--glass-soft); border: 1px solid var(--glass-border); color: var(--tinta); text-decoration: none; font: 500 .84rem/1.2 var(--sans); transition: background 160ms var(--lift), transform 160ms var(--lift); }
.more-btn:hover { background: var(--wash); transform: translateY(-1px); }
.more-btn strong { font: 400 1.5rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.more-sub { display: block; font-weight: 400; font-size: .7rem; color: var(--gris); }

.sheet { width: min(620px, 94vw); max-height: 88dvh; padding: 20px 22px; border-radius: 24px; color: var(--tinta); overflow: auto; }
.sheet-wide { width: min(980px, 94vw); }
.sheet::backdrop { background: rgba(0, 0, 0, .5); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sheet-head h2 { margin: 0; font-size: 1.7rem; }
.sheet-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.sheet-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.sheet-two { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.sheet-two h3 { margin: 0 0 10px; font: 500 1rem var(--sans); }
.sheet-foot { margin: 12px 0 0; font-size: .86rem; }
.gcard.is-plain .gcard-more, .gcard.is-plain .decision-sub { display: block; }
.gcard.is-plain h3, .gcard.is-plain .eyebrow { padding-right: 0; }
.source-card.is-plain .source-rows > li:nth-child(n+4) { display: list-item; }
@media (max-width: 760px) { .sheet-two { grid-template-columns: minmax(0, 1fr); } }

/* a desktop screen: the page is exactly the screen, and never scrolls; the chart row takes what is left */
@media (min-width: 1100px) and (min-height: 620px) {
  body.is-deck:has(.deck-one) { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
  body.is-deck:has(.deck-one) main { flex: 1 1 auto; min-height: 0; width: 100%; box-sizing: border-box; padding-bottom: 72px; }
  .deck-one { height: 100%; }
  .deck-one .deck-main { height: 100%; box-sizing: border-box; padding: 16px 18px 14px; grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .deck-one .tile4 { padding: 10px 14px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .deck-one .tile4-label { margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .deck-one .tile4-value strong { font-size: 1.9rem; }
  .deck-one .tile4-unit { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .deck-one .spark { width: 104px; height: auto; }
  .viz-row { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1.12fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  .viz-row > .viz-card { grid-row: 1 / span 2; }
  .viz-row > .viz-card[data-card="target"] { grid-row: 1; grid-column: 3; }
  .viz-row > .feature { grid-row: 2; grid-column: 3; min-height: 0; overflow: hidden; }
  .viz-card:not(.is-expanded) .viz-bars, .viz-card:not(.is-expanded) .viz-heat { height: auto; }
  .viz-card:not(.is-expanded) .viz-rings { width: auto; height: 100%; min-height: 96px; max-height: 168px; aspect-ratio: 1; }
  .viz-card:not(.is-expanded) .viz-target { height: 100%; }
  .viz-card:not(.is-expanded) > .empty { align-self: center; }
}
@media (min-width: 1100px) and (min-height: 620px) and (max-height: 760px) {
  .deck-one .deck-main { gap: 10px; padding-top: 12px; }
  .deck-one .deck-logo .logo { height: 36px; }
  .deck-one .tile4-value strong { font-size: 1.6rem; }
  .deck-one .feature-text { -webkit-line-clamp: 1; }
  .more-btn { min-height: 44px; }
}

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1220px) { .deck { grid-template-columns: minmax(0, 1fr); } .deck-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 18px; } .deck-side .profile, .deck-side .mini3 { grid-column: 1 / -1; } }
@media (max-width: 1099px) { .deck-one .deck-head { flex-wrap: wrap; } .viz-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); } }
@media (max-width: 1000px) { .tiles4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .deck-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 899px) {
  /* a phone: the rail lies down at the bottom; its first two entries are the Overview / 3D Studio switch */
  body.has-rail { padding-left: 0; padding-bottom: 76px; }
  .rail { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; height: 62px; flex-direction: row; justify-content: flex-start; padding: 0 8px; border-radius: 22px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail ul { flex-direction: row; margin: 0; gap: 2px; }
  .rail-mark { display: none; }
  .rail-link { width: 62px; height: 54px; grid-template-rows: 26px auto; gap: 1px; border-radius: 14px; }
  .rail-label { position: static; transform: none; opacity: 1; padding: 0; background: none; color: inherit; font-size: .62rem; font-weight: 500; }
  .rail-link:hover .rail-label, .rail-link:focus-visible .rail-label { transform: none; }
  .switcher { display: none; }
  .has-rail .hint { bottom: 12px; }
  .is-deck main { padding: 8px 8px 16px; }
  .deck-main, .deck-side { padding: 14px; border-radius: 22px; }
  .deck-search { flex: 1 1 100%; order: 5; margin-left: 0; }
  .tile4-value strong { font-size: 1.8rem; }
  .spark { width: 84px; height: auto; }
  .checklist > li { grid-template-columns: 1fr; gap: 2px; }
  .toast { bottom: 84px; }
  body.is-world.has-rail { padding-bottom: 76px; }
}
/* a finger: every control is at least 44 px (said last, so that it wins over the sizes above) */
@media (pointer: coarse), (max-width: 899px) { .seg a, .gtool, .cal-nav .gtool, .gcard-tools .gtool { min-width: 44px; min-height: 44px; } .cal-nav .gtool, .gcard-tools .gtool { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { .gcard:hover, .is-3d .wcard:hover, .grid > .card:hover { transform: none; } .gcard.is-expanded:hover { transform: translate(-50%, -50%); } .deck-bg canvas { transform: none; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { html[data-theme="dark"] { --glass-bg: rgba(24, 23, 21, .96); } html[data-theme="light"] { --glass-bg: rgba(250, 247, 242, .97); } }
