/* PrevWORKS portal. Brand: prevworks.com blue/navy, logo cyan/orange, spec support colors. */
:root {
  --blue: #0557BC;
  --blue-2: #1F5AA6;
  --navy: #0B1341;
  --navy-2: #123B63;
  --cyan: #1AA0DB;
  --orange: #F7A21B;
  --teal: #2F8F9D;
  --green: #3C8D5A;
  --amber: #C98A1B;
  --red: #B0413E;
  --ink: #1C2440;
  --muted: #5D6684;
  --line: #E2E6EF;
  --bg: #F1F3F4;
  --card: #FFFFFF;
  --tint: #EEF3FB;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(11, 19, 65, .06), 0 4px 16px rgba(11, 19, 65, .05);
  font-size: 15px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; }
h1, h2, h3, h4 { font-family: Inter, "Open Sans", system-ui, sans-serif; color: var(--blue); line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.75rem; color: var(--navy); letter-spacing: -.01em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; color: var(--navy-2); }
a { color: var(--blue); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .5rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; }
.muted { color: var(--muted); }
small, .small { font-size: .85rem; }

.demo-banner { background: var(--orange); color: var(--navy); text-align: center; font-size: .86rem; padding: .35rem 1rem; }

/* Shell */
.shell { display: flex; min-height: calc(100vh - 30px); background: linear-gradient(to right, #fff 272px, #E4E7EC 272px, #E4E7EC 273px, var(--bg) 273px); }
.sidebar { width: 273px; flex: 0 0 273px; background: #fff; border-right: 1px solid #E4E7EC; color: #344054; display: flex; flex-direction: column; padding: 1rem .8rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: block; background: #fff; padding: 1.1rem .9rem 1.2rem; margin: -.2rem -.2rem .2rem; border-bottom: 1px solid #EEF1F5; }
.brand img { width: 100%; display: block; }
.brand-sub { font-family: Inter, sans-serif; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #667085; margin: .9rem .7rem .8rem; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar nav a { display: flex; align-items: center; gap: .65rem; color: #344054; text-decoration: none; padding: .52rem .7rem; border-radius: 8px; font-size: .93rem; }
.sidebar nav a:hover { background: var(--tint); color: var(--navy); }
.sidebar nav a.active { background: var(--tint); color: var(--blue); font-weight: 600; box-shadow: inset 3px 0 0 var(--orange); }
.sidebar nav a.flagged { color: #98A2B3; }
.sidebar nav a.preview .pill { background: #E8F1FC; color: var(--blue); }
.ni { width: 18px; height: 18px; fill: currentColor; flex: 0 0 18px; }
.pill { margin-left: auto; font-style: normal; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; background: #FEF0D9; color: #B54708; border-radius: 99px; padding: .05rem .45rem; }
.nav-group { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #98A2B3; margin: 1.1rem .7rem .3rem; }
.side-foot { margin-top: auto; padding: 1rem .6rem 0; font-size: .8rem; }
.side-foot a { color: var(--blue); }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 1rem; background: #fff; border-bottom: 1px solid var(--line); padding: .6rem 1.6rem; position: sticky; top: 0; z-index: 5; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 1.2rem; padding: .2rem .6rem; }
.org { display: flex; align-items: center; gap: .7rem; }
.org-name, .org select { font-family: Inter, sans-serif; font-weight: 600; color: var(--navy); font-size: 1rem; }
.org select { border: 1px solid var(--line); border-radius: 8px; padding: .35rem .6rem; background: #fff; }
.tz { font-size: .78rem; color: var(--muted); background: var(--bg); border-radius: 99px; padding: .1rem .55rem; }
.user { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.who { display: flex; flex-direction: column; text-align: right; line-height: 1.2; margin-right: .3rem; }
.who small { color: var(--muted); }
main { padding: 1.6rem; flex: 1; max-width: 1400px; width: 100%; }
.foot { padding: 1rem 1.6rem 1.4rem; color: var(--muted); font-size: .8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

/* Page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.page-head p { margin: .1rem 0 0; color: var(--muted); max-width: 70ch; }
.eyebrow { font-family: Inter, sans-serif; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; color: var(--blue); font-weight: 600; margin-bottom: .2rem; }

/* Cards & grid */
.grid { display: grid; gap: 1.1rem; }
.grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.3rem; min-width: 0; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .6rem; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.section { margin-top: 1.4rem; }

.kpi { position: relative; overflow: hidden; }
.kpi .label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kpi .value { font-family: Inter, sans-serif; font-size: 2.1rem; font-weight: 700; color: var(--navy); line-height: 1.1; margin: .25rem 0; }
.kpi .value small { font-size: .95rem; color: var(--muted); font-weight: 600; }
.kpi .sub { font-size: .85rem; color: var(--muted); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--blue); }
.kpi.k-orange::before { background: var(--orange); }
.kpi.k-teal::before { background: var(--teal); }
.kpi.k-cyan::before { background: var(--cyan); }
.kpi.k-navy::before { background: var(--navy); }

/* Badges & trends */
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 600; padding: .14rem .55rem; border-radius: 99px; border: 1px solid transparent; white-space: nowrap; }
.conf-high { background: #E7F3EC; color: #24653C; border-color: #BFDDCB; }
.conf-mod { background: #FFF4E0; color: #7A5208; border-color: #F0D9A8; }
.conf-low { background: #FBEAEA; color: #8A2F2C; border-color: #EDC6C5; }
.conf-nc { background: #EEF0F5; color: #464E6B; border-color: #D5D9E5; }
.sev-priority { background: #FBEAEA; color: #8A2F2C; border-color: #EDC6C5; }
.sev-watch { background: #FFF4E0; color: #7A5208; border-color: #F0D9A8; }
.sev-info { background: #E7F1FB; color: #0B4A8F; border-color: #C3DAF2; }
.badge[class*="st-"] { background: #EEF0F5; color: #3B4466; border-color: #D5D9E5; }
.st-new { background: #E7F1FB !important; color: #0B4A8F !important; }
.st-action_planned, .st-in_progress { background: #E6F4F5 !important; color: #1E6670 !important; }
.st-monitoring { background: #F1ECF9 !important; color: #533A85 !important; }
.st-resolved, .st-completed { background: #E7F3EC !important; color: #24653C !important; }
.badge.synthetic { background: var(--orange); color: var(--navy); }
.trend { font-size: .82rem; font-weight: 600; white-space: nowrap; }
.trend.up { color: var(--green); }
.trend.down { color: var(--amber); }
.trend.flat { color: var(--muted); }
a.trend-link { text-decoration: none; }
a.trend-link:hover .trend { text-decoration: underline; }
.gap-neg { color: #8A5A00; font-weight: 600; }
.gap-pos { color: #24653C; font-weight: 600; }
.supp-cell { color: var(--muted); font-style: italic; font-size: .85rem; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; gap: .4rem; font: 600 .9rem Inter, sans-serif; background: var(--blue); color: #fff; border: 1px solid var(--blue); border-radius: 8px; padding: .55rem 1rem; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.ghost { background: #fff; color: var(--blue); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--blue); background: var(--tint); color: var(--navy); }
.btn.orange { background: var(--orange); border-color: var(--orange); color: var(--navy); }
.btn.danger { background: #fff; color: var(--red); border-color: #EDC6C5; }
.btn.sm { padding: .3rem .7rem; font-size: .82rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label { display: block; font-weight: 600; font-size: .86rem; color: var(--navy-2); margin-bottom: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=file], select, textarea {
  width: 100%; font: inherit; border: 1px solid #CCD3E2; border-radius: 8px; padding: .5rem .65rem; background: #fff; color: var(--ink); }
textarea { min-height: 90px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid rgba(5, 87, 188, .18); }
.field { margin-bottom: .9rem; }
.help { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.form-row { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.filters { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1.2rem; }
.filters .field { margin: 0; min-width: 160px; }
.checks { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.checks label { font-weight: 400; display: flex; gap: .35rem; align-items: center; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: Inter, sans-serif; font-weight: 600; color: var(--navy-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; background: #F7F9FC; }
th[data-sort] { cursor: pointer; }
th[data-sort]::after { content: " ↕"; color: #A3ACC6; }
td.nowrap, th.nowrap { white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:hover td { background: #FAFBFE; }
.heat td.cell { text-align: center; font-variant-numeric: tabular-nums; }
.heat .cell .v { font-weight: 700; font-size: 1rem; display: block; }
.heat .cell .g { font-size: .78rem; }

/* Charts */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #E6EAF2; stroke-width: 1; }
.chart .axis { font: 11px "Open Sans", sans-serif; fill: #6A7391; }
.chart .band-label { font: 600 11px Inter, sans-serif; fill: #44507A; }
.chart .event-line { stroke: var(--orange); stroke-width: 1.5; stroke-dasharray: 3 4; }
.chart .event-mark circle { fill: var(--orange); }
.chart .event-mark text { font: 700 10px Inter, sans-serif; fill: var(--navy); }
.chart .supp { font: italic 10px "Open Sans", sans-serif; fill: #8A2F2C; }
.chart .bar-label { font: 13px "Open Sans", sans-serif; fill: var(--ink); }
.chart .bar-value { font: 600 12px Inter, sans-serif; fill: var(--navy); }
.chart .zero { stroke: #6A7391; stroke-width: 1.2; }
.chart .ci { stroke: var(--navy); stroke-width: 2; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; padding: 0; margin: .5rem 0 0; font-size: .84rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: .4rem; }
.swatch { width: 18px; height: 4px; border-radius: 2px; background: var(--c); display: inline-block; }
.swatch.dashed { background: repeating-linear-gradient(90deg, var(--c) 0 5px, transparent 5px 9px); }
.swatch.event { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
.spark { width: 110px; height: 30px; }
details.data-table { margin-top: .8rem; }
details.data-table summary, details.drawer summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: .88rem; }
details.drawer { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; background: #FBFCFE; margin-top: 1rem; }
.meta-line { font-size: .8rem; color: var(--muted); margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.meta-line b { color: var(--navy-2); font-weight: 600; }

/* Lists */
.signal-list { list-style: none; margin: 0; padding: 0; }
.signal-list li { padding: .75rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: start; }
.signal-list li:last-child { border-bottom: 0; }
.signal-list .t { font-weight: 600; color: var(--navy); text-decoration: none; }
.signal-list .t:hover { text-decoration: underline; }
.signal-list .d { font-size: .84rem; color: var(--muted); }
.cycle { display: flex; gap: .4rem; flex-wrap: wrap; margin: .3rem 0 0; padding: 0; list-style: none; }
.cycle li { font: 600 .78rem Inter, sans-serif; padding: .25rem .7rem; border-radius: 99px; background: var(--tint); color: var(--blue); }
.cycle li.on { background: var(--blue); color: #fff; }
.cycle li:has(a) { padding: 0; }
.cycle li a { display: block; padding: .25rem .7rem; border-radius: 99px; color: inherit; text-decoration: none; }
.cycle li a:hover, .cycle li a:focus-visible { background: var(--blue); color: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--cyan, #20A4D8); }
.timeline-list { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline-list li { padding: 0 0 1rem 1rem; position: relative; }
.timeline-list li::before { content: ""; position: absolute; left: -7px; top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); border: 2px solid #fff; }
.callout { border-left: 4px solid var(--teal); background: #F0F7F8; padding: .8rem 1rem; border-radius: 0 8px 8px 0; font-size: .9rem; }
.callout.warn { border-color: var(--amber); background: #FFF8EC; }
.flash { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.flash.success { background: #E7F3EC; border-color: #BFDDCB; color: #1F5A36; }
.flash.error { background: #FBEAEA; border-color: #EDC6C5; color: #7C2926; }
.flash.info { background: #E7F1FB; border-color: #C3DAF2; color: #0B4A8F; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; flex-wrap: wrap; }
.tabs a { padding: .6rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--blue); border-color: var(--blue); }
.driver-card .r { font-family: Inter, sans-serif; font-size: 1.6rem; font-weight: 700; color: var(--navy); }
.empty { text-align: center; padding: 2rem; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; font-size: .9rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* Login */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; }
.login-hero { background: var(--blue); color: #fff; padding: 3rem 4rem; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.login-hero::after { content: ""; position: absolute; right: -180px; top: -180px; width: 520px; height: 520px; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.login-hero h1 { color: #fff; font-size: 2.6rem; font-weight: 600; max-width: 18ch; }
.login-hero p { font-size: 1.05rem; max-width: 46ch; opacity: .95; }
.login-hero .cycle li { background: rgba(255, 255, 255, .14); color: #fff; }
.login-box { display: flex; flex-direction: column; justify-content: center; padding: 3rem; max-width: 480px; margin: 0 auto; width: 100%; }
.login-box .logo { width: 290px; margin-bottom: 1.6rem; }
.login-box h2 { color: var(--navy); font-size: 1.4rem; }

/* Report / print */
.report { max-width: 980px; margin: 0 auto; background: #fff; padding: 2.2rem 2.6rem; }
.report .rhead { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid var(--blue); padding-bottom: 1rem; margin-bottom: 1.2rem; }
.report .rhead img { width: 220px; }
.report h2 { margin-top: 1.6rem; border-bottom: 1px solid var(--line); padding-bottom: .3rem; }
.report .toolbar { position: sticky; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; display: flex; justify-content: space-between; align-items: center; margin: -2.2rem -2.6rem 1.6rem; }
@media print {
  .report .toolbar, .no-print { display: none !important; }
  body { background: #fff; }
  .report { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  h2 { break-after: avoid; }
}

/* Responsive */
@media (max-width: 1180px) { .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 920px) {
  .shell { background: var(--bg); }
  .sidebar { position: fixed; left: -280px; top: 0; z-index: 30; transition: left .2s; height: 100vh; }
  .sidebar.open { left: 0; box-shadow: 0 0 0 100vmax rgba(11, 19, 65, .35); }
  .menu-btn { display: inline-block; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .login-page { grid-template-columns: 1fr; }
  .login-hero { padding: 2rem; }
  .who { display: none; }
}
@media (max-width: 600px) { .tz { display: none; } .org { flex: 1; min-width: 0; } .org-switch, .org select { width: 100%; } .user .btn { padding: .3rem .5rem; } .g4, .g5 { grid-template-columns: 1fr 1fr; } main { padding: 1rem; } .topbar { padding: .5rem 1rem; } }
.preview td, .preview th { white-space: nowrap; }
/* Wellness score bands */
.band-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #EEF1F5; min-width: 120px; }
.band-bar span { display: block; height: 100%; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .4rem; vertical-align: middle; }
.legend span { margin-right: .9rem; }
/* Public pricing page */
body.public { background: #fff; }
.pub-head { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 2.4rem; border-bottom: 1px solid #EEF1F5; }
.pub-logo { height: 58px; display: block; }
.pub-head nav { display: flex; gap: 1.2rem; align-items: center; }
.pub-head nav a:not(.btn) { color: var(--ink); text-decoration: none; font-family: Inter, sans-serif; font-weight: 600; }
.pub-head nav a.on { color: var(--blue); }
.pub-main { max-width: 1180px; margin: 0 auto; padding: 2.6rem 1.6rem 3rem; }
.pub-main h1 { font-size: 2.3rem; margin-bottom: .6rem; }
.pub-main .lead { font-size: 1.1rem; color: var(--muted); max-width: 760px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; margin-top: 2rem; }
.plan { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem 1.3rem; display: flex; flex-direction: column; background: #fff; }
.plan.featured { border: 2px solid var(--blue); box-shadow: 0 8px 28px rgba(5, 87, 188, .12); }
.plan .ribbon { position: absolute; top: -12px; left: 1.2rem; background: var(--orange); color: var(--navy); font: 700 .72rem Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; padding: .2rem .6rem; border-radius: 99px; }
.plan h2 { color: var(--navy); font-size: 1.25rem; }
.plan .tag { color: var(--muted); font-size: .9rem; min-height: 2.6em; }
.plan .price { font: 700 2rem Inter, sans-serif; color: var(--navy); margin: .6rem 0 0; }
.plan .price small { font-size: .85rem; color: var(--muted); font-weight: 600; }
.plan .setup { font-size: .82rem; color: var(--muted); margin: .2rem 0 1rem; }
.plan ul { padding-left: 1.1rem; margin: 0 0 1.4rem; flex: 1; font-size: .9rem; }
.plan ul li { margin-bottom: .45rem; }
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.4rem; border-top: 1px solid var(--line); padding-top: 1.6rem; }
.trust strong { display: block; color: var(--navy); font-family: Inter, sans-serif; }
.trust span { font-size: .86rem; color: var(--muted); }
.pub-foot { text-align: center; padding: 1.4rem; }
@media (max-width: 700px) { .trust { grid-template-columns: 1fr 1fr; } .pub-head { padding: 1rem; } .pub-logo { height: 44px; } }

/* Clickable KPI cards and signal titles */
a.kpi-link-card { display: block; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
a.kpi-link-card:hover, a.kpi-link-card:focus-visible { box-shadow: 0 4px 14px rgba(16, 24, 40, .12); transform: translateY(-1px); }
a.kpi-link-card .label::after { content: " →"; color: var(--blue); opacity: 0; transition: opacity .15s; }
a.kpi-link-card:hover .label::after, a.kpi-link-card:focus-visible .label::after { opacity: 1; }
.signal-list a.t { color: var(--navy); text-decoration: none; }
.signal-list a.t:hover, .signal-list a.t:focus-visible { color: var(--blue); text-decoration: underline; }
.badge, .trend, .pill, .tz { cursor: default; }
.inline-form { display: flex; gap: .5rem; align-items: center; }
.inline-form select { max-width: 320px; }
.dl-pair { font-size: .85rem; white-space: nowrap; color: var(--muted); }
.dl-pair a { color: var(--blue); font-weight: 600; text-decoration: none; }
.dl-pair a:hover, .dl-pair a:focus-visible { text-decoration: underline; }
/* CSV | PDF download pair: one joined control */
.dl-group { display: inline-flex; align-items: center; gap: 0; white-space: nowrap; vertical-align: middle; }
.dl-group .dl-label { font: 600 .82rem Inter, sans-serif; color: var(--muted); margin-right: .5rem; }
.dl-group .btn { border-radius: 0; }
.dl-group .btn + .btn { margin-left: -1px; }
.dl-group .btn:first-of-type { border-radius: 8px 0 0 8px; }
.dl-group .btn:last-of-type { border-radius: 0 8px 8px 0; }
.dl-group .btn:hover { position: relative; z-index: 1; }
.btn + .dl-group { margin-left: 1rem; }
/* Time range (1.2.4): preset chips plus a newest-first custom picker */
.range-filters { align-items: center; gap: 1rem 1.4rem; }
.range-block { display: flex; flex-direction: column; gap: .35rem; }
.range-head { display: flex; align-items: baseline; gap: .6rem; }
.range-title { font: 600 .82rem Inter, sans-serif; color: var(--navy); }
.range-desc { font-size: .8rem; color: var(--muted); }
.range-chips { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px; background: var(--tint, #EEF4FC); border: 1px solid var(--line); border-radius: 999px; }
.range-chip { display: inline-flex; align-items: center; gap: .3rem; font: 600 .84rem Inter, sans-serif; color: var(--navy); text-decoration: none; padding: .42rem .95rem; border-radius: 999px; cursor: pointer; list-style: none; transition: background .15s, color .15s, box-shadow .15s; }
.range-chip::-webkit-details-marker { display: none; }
.range-chip:hover, .range-chip:focus-visible { background: #fff; color: var(--blue); }
.range-chip.on { background: var(--blue); color: #fff; box-shadow: 0 2px 6px rgba(5, 87, 188, .28); }
.range-chip.on:hover { background: var(--navy); color: #fff; }
.range-custom { position: relative; }
.range-custom[open] > summary { background: #fff; color: var(--blue); box-shadow: 0 0 0 2px var(--blue) inset; }
.range-pop { position: absolute; z-index: 30; top: calc(100% + 10px); left: 0; width: 330px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; box-shadow: 0 14px 40px rgba(11, 19, 65, .16); }
.range-pop-t { font-size: .8rem; color: var(--muted); margin: 0 0 .7rem; }
.range-pop fieldset { border: 0; padding: 0; margin: 0 0 .8rem; }
.range-pop legend { font: 600 .75rem Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.year-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.year-pill { position: relative; margin: 0; }
.year-pill input { position: absolute; opacity: 0; pointer-events: none; }
.year-pill span { display: block; text-align: center; padding: .38rem 0; border: 1px solid var(--line); border-radius: 8px; font: 600 .85rem Inter, sans-serif; color: var(--navy); cursor: pointer; background: #fff; }
.year-pill span:hover { border-color: var(--blue); color: var(--blue); }
.year-pill input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.year-pill input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.range-asof { margin-left: auto; }
@media (max-width: 700px) { .range-pop { width: min(330px, 86vw); } .range-asof { margin-left: 0; } }
/* Date range (1.2.5) */
a.year-pill { text-decoration: none; }
.year-pill.on span { background: var(--blue); border-color: var(--blue); color: #fff; }
.date-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .7rem; }
.date-pair label { display: flex; flex-direction: column; gap: .25rem; font: 600 .75rem Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0; }
.date-pair input { font: 500 .9rem Inter, sans-serif; padding: .45rem .5rem; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); width: 100%; box-sizing: border-box; }
.date-pair input:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.range-pop .btn + .range-pop-t { margin-top: .9rem; }
.range-pop { width: 360px; }
.range-note { flex-basis: 100%; margin: 0; font-size: .85rem; padding: .55rem .8rem; border-radius: 8px; }
.range-note.warn { background: #FFF6E5; color: #7A4B00; border: 1px solid #F3D9A4; }
.range-note.info { background: var(--tint); color: var(--navy); border: 1px solid var(--line); }
/* Date range dropdown (1.2.6) */
.range-field { min-width: 260px; }
.range-select { position: relative; display: flex; align-items: center; }
.range-select svg { position: absolute; left: .7rem; width: 17px; height: 17px; fill: var(--blue); pointer-events: none; }
.range-select select { appearance: none; -webkit-appearance: none; width: 100%; min-width: 230px; font: 600 .95rem Inter, sans-serif; color: var(--navy); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230557BC' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right .6rem center / 22px; border: 1px solid var(--line); border-radius: 10px; padding: .6rem 2.4rem .6rem 2.3rem; cursor: pointer; box-shadow: 0 1px 2px rgba(11, 19, 65, .05); }
.range-select select:hover { border-color: var(--blue); }
.range-select select:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.range-field .range-desc { display: block; margin-top: .3rem; }
.range-customrow { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: flex-end; gap: .8rem 1.4rem; padding: .8rem 1rem; background: var(--tint); border: 1px solid var(--line); border-radius: 12px; }
.range-customrow[hidden] { display: none; }
.range-customrow .date-pair { display: flex; align-items: flex-end; gap: .6rem; margin: 0; }
.range-customrow .date-pair label { min-width: 160px; }
.year-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.year-jump > span { font: 600 .75rem Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: .3rem; }
.year-jump .year-pill span { padding: .35rem .7rem; }

/* ===== 1.3.0: PrevWORKS 10 AI features + friendlier visuals (same theme, more colour) ===== */
:root { --t-blue: #E8F1FC; --t-cyan: #E4F5FC; --t-teal: #E3F3F4; --t-green: #E6F4EC; --t-amber: #FFF3DF; --t-violet: #F1EDF9; }
.ai-pill { margin-left: auto; font-style: normal; font-size: .6rem; font-weight: 700; letter-spacing: .06em; color: #fff; background: linear-gradient(135deg, var(--blue), var(--cyan)); border-radius: 99px; padding: .08rem .42rem; }
.eyebrow .ai-pill { margin: 0 .35rem 0 0; vertical-align: 1px; }
.ai-hero { background: linear-gradient(120deg, #FFFFFF 0%, #F2F8FE 55%, #E6F5FC 100%); border: 1px solid #DCEAF8; border-radius: 14px; padding: 1.2rem 1.4rem; position: relative; overflow: hidden; }
.ai-hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(26,160,219,.18), rgba(26,160,219,0) 70%); pointer-events: none; }
.ai-hero h1 { margin-bottom: .2rem; }

/* Glance tiles: big friendly numbers first, details on request */
.glance { display: grid; gap: 1rem; margin-bottom: 1.2rem; }
.glance.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.glance.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { display: flex; flex-direction: column; gap: .2rem; border-radius: 14px; padding: 1rem 1.1rem; border: 1px solid transparent; text-decoration: none; color: var(--ink); min-width: 0; position: relative; transition: transform .12s ease, box-shadow .12s ease; }
a.tile:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(11,19,65,.08); color: var(--ink); }
.tile.t-blue { background: var(--t-blue); border-color: #CFE0F6; }
.tile.t-cyan { background: var(--t-cyan); border-color: #C6E8F6; }
.tile.t-green { background: var(--t-green); border-color: #CBE6D5; }
.tile.t-amber { background: var(--t-amber); border-color: #F6DDB0; }
.tile.t-teal { background: var(--t-teal); border-color: #C5E3E6; }
.tile-ico { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; margin-bottom: .3rem; font-size: .95rem; }
.t-blue .tile-ico { background: var(--blue); } .t-cyan .tile-ico { background: var(--cyan); } .t-green .tile-ico { background: var(--green); } .t-amber .tile-ico { background: var(--orange); color: var(--navy); } .t-teal .tile-ico { background: var(--teal); }
.tile-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.tile-num { font-family: Inter, sans-serif; font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1.15; overflow-wrap: anywhere; }
.tile-num.sm { font-size: 1.15rem; padding: .35rem 0 .2rem; }
.tile-num small { font-size: .9rem; color: var(--muted); }
.mood { display: inline-block; align-self: flex-start; font-size: .78rem; font-weight: 600; border-radius: 99px; padding: .12rem .55rem; background: rgba(255,255,255,.75); color: var(--navy-2); }
.mood.up { color: #1F6B3E; background: #DDF1E4; } .mood.down { color: #8A4B00; background: #FCE9C8; } .mood.flat { color: #31507A; background: rgba(255,255,255,.8); } .mood.muted { color: var(--muted); }

/* Progressive disclosure */
details.reveal > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; font: 600 .88rem Inter, sans-serif; color: var(--blue); background: var(--tint); border: 1px solid #D6E4F7; border-radius: 99px; padding: .35rem .9rem; }
details.reveal > summary::-webkit-details-marker { display: none; }
details.reveal > summary::after { content: "▾"; font-size: .8rem; transition: transform .15s; }
details.reveal[open] > summary::after { transform: rotate(180deg); }
details.reveal[open] > summary { margin-bottom: .8rem; }
details.reveal > summary:hover { background: #DFEBFA; }
details.reveal.card > summary { margin: 0; }
details.reveal.card[open] > summary { margin-bottom: .9rem; }
details.reveal + details.reveal { margin-top: .6rem; }

/* AI draft card */
.ai-card { border-top: 3px solid transparent; border-image: linear-gradient(90deg, var(--blue), var(--cyan)) 1; border-image-slice: 1; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ai-spark { color: var(--cyan); }
.ai-head-right { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.ai-badge { display: inline-flex; align-items: center; font: 700 .7rem Inter, sans-serif; letter-spacing: .05em; border-radius: 99px; padding: .18rem .6rem; text-transform: uppercase; }
.ai-badge.draft { background: #E4F5FC; color: #0B6E99; border: 1px solid #B9E2F4; }
.ai-badge.demo { background: #FFF3DF; color: #8A4B00; border: 1px solid #F6DDB0; }
.ai-badge.ok { background: #E6F4EC; color: #1F6B3E; border: 1px solid #CBE6D5; text-transform: none; letter-spacing: 0; font-size: .78rem; }
.ai-body { font-size: .98rem; }
.ai-body h3 { color: var(--blue); font-size: 1rem; margin: 1rem 0 .35rem; }
.ai-body h3:first-child { margin-top: .2rem; }
.ai-body ul { margin: .2rem 0 .6rem; padding-left: 1.2rem; }
.ai-body li { margin: .2rem 0; }
.ai-body p { margin: .3rem 0 .5rem; }
.ai-prov { font-size: .78rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: .6rem; margin-top: .9rem; }
.ai-actions { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; justify-content: space-between; }
.ai-controls { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-start; }
.ai-controls form { margin: 0; }
.ai-edit[open] { flex-basis: 100%; }
.ai-edit > summary { list-style: none; }
.ai-edit > summary::-webkit-details-marker { display: none; }
.ai-edit textarea { margin: .6rem 0; min-height: 260px; font-size: .92rem; }
.ai-empty { background: linear-gradient(120deg, #F7FBFF, #EEF7FC); border: 1px dashed #BFDCF2; border-radius: 12px; padding: 1rem 1.2rem; }
.ai-empty p { margin: .2rem 0; }
.btn.ai-btn { background: linear-gradient(135deg, var(--blue), var(--cyan)); border-color: transparent; color: #fff; }
.btn.ai-btn:hover { background: var(--navy); color: #fff; }
.btn.ghost.ai-btn { background: #fff; color: var(--blue); border-color: #BFDCF2; }
.inline-form { display: inline-flex; gap: .4rem; align-items: center; margin: 0; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .7rem; align-items: center; }
.span3 { grid-column: 1 / -1; }
.callout { background: #FFF8EC; border: 1px solid #F6DDB0; border-radius: 10px; padding: .7rem 1rem; }

/* Topbar ask */
.top-ask { flex: 1; max-width: 520px; display: flex; align-items: center; gap: .5rem; background: #F4F8FD; border: 1px solid #D6E4F7; border-radius: 99px; padding: .15rem .9rem; margin: 0 auto; }
.top-ask span { color: var(--cyan); font-weight: 700; }
.top-ask input { border: 0 !important; background: transparent !important; outline: none !important; padding: .4rem 0 !important; width: 100%; font-size: .9rem; box-shadow: none !important; }
.top-ask:focus-within { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(5,87,188,.12); }
@media (max-width: 1100px) { .top-ask { max-width: 300px; } }
@media (max-width: 920px) { .top-ask { display: none; } }

/* Ask page */
.ask-box { display: flex; align-items: center; gap: .6rem; background: #fff; border: 2px solid #CFE0F6; border-radius: 16px; padding: .5rem .6rem .5rem 1rem; box-shadow: var(--shadow); }
.ask-box:focus-within { border-color: var(--blue); }
.ask-box input { border: 0 !important; outline: none !important; box-shadow: none !important; font-size: 1.05rem; flex: 1; padding: .5rem 0 !important; }
.ask-ico { color: var(--cyan); font-size: 1.2rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .8rem 0 1rem; }
.chip { display: inline-block; background: #fff; border: 1px solid #D6E4F7; color: var(--blue); border-radius: 99px; padding: .3rem .8rem; font-size: .84rem; text-decoration: none; }
a.chip:hover { background: var(--tint); }
.chip.static { color: var(--navy-2); background: var(--tint); }
.chip-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.ask-q-bubble { margin: 1rem 0 0 auto; max-width: 70%; background: var(--blue); color: #fff; border-radius: 16px 16px 4px 16px; padding: .7rem 1rem; width: fit-content; }
.ask-q-bubble .who-you { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.ask-answer { font-size: 1.05rem; }
.ask-links { display: flex; gap: .5rem; flex-wrap: wrap; margin: .6rem 0 1rem; }
.ask-empty { display: flex; gap: 1.2rem; align-items: center; }
.ask-empty-art { flex: 0 0 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--cyan)); display: flex; align-items: center; justify-content: center; color: #fff; font: 700 2rem Inter, sans-serif; }
.kv-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; font-size: .9rem; }

/* Comments */
.seg { display: inline-flex; background: #fff; border: 1px solid #D6E4F7; border-radius: 99px; padding: .2rem; position: relative; z-index: 1; }
.seg a { padding: .35rem .95rem; border-radius: 99px; text-decoration: none; font: 600 .86rem Inter, sans-serif; color: var(--blue); }
.seg a.on { background: var(--blue); color: #fff; }
.theme-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.theme-bars li { display: grid; grid-template-columns: minmax(130px, 1.3fr) 2fr 2.5rem 3.6rem; gap: .6rem; align-items: center; padding: .25rem .4rem; border-radius: 8px; }
.theme-bars li.on { background: var(--tint); }
.tb-label { font-size: .9rem; text-decoration: none; }
.tb-supp { grid-column: 2 / -1; font-size: .8rem; color: var(--muted); font-style: italic; }
.tb-bar { height: 12px; background: #EEF2F7; border-radius: 99px; overflow: hidden; }
.tb-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); border-radius: 99px; }
.tb-n { font-weight: 700; text-align: right; font-size: .9rem; }
.sent { font-size: .78rem; font-weight: 700; text-align: center; border-radius: 99px; padding: .1rem .3rem; }
.sent.up { background: #DDF1E4; color: #1F6B3E; } .sent.down { background: #FCE9C8; color: #8A4B00; } .sent.flat { background: #EEF2F7; color: #31507A; }
.quotes { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }
.quotes li { background: #F7F9FC; border-left: 4px solid var(--cyan); border-radius: 6px; padding: .55rem .8rem; font-style: italic; }
.quotes li.down { border-left-color: var(--orange); } .quotes li.up { border-left-color: var(--green); }

/* Copilot */
.pick-grid, .opt-grid, .watch-grid, .int-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.pick-card { display: flex; flex-direction: column; gap: .35rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.pick-card:hover { border-color: var(--blue); color: var(--ink); }
.pick-card .badge { align-self: flex-start; }
.pick-go { margin-top: auto; color: var(--blue); font-weight: 600; font-size: .85rem; }
.opt-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; gap: .3rem; box-shadow: var(--shadow); }
.opt-card.on { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(5,87,188,.12); }
.opt-card.worked { background: var(--t-green); border-color: #CBE6D5; }
.opt-card h3 { margin: .2rem 0 0; font-size: 1rem; }
.opt-card p { margin: 0; font-size: .9rem; }
.opt-card .btn { align-self: flex-start; margin-top: auto; }
.opt-top { display: flex; justify-content: space-between; align-items: center; }
.opt-num { width: 28px; height: 28px; border-radius: 50%; background: var(--tint); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.plan-card { border-left: 4px solid var(--cyan); }

/* Early warning */
.watch-card { display: flex; flex-direction: column; gap: .25rem; border-radius: 12px; padding: .9rem 1rem; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: #fff; position: relative; padding-left: 1.2rem; }
.watch-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; border-radius: 12px 0 0 12px; background: var(--cyan); }
.watch-card.high { background: #FFF8EC; } .watch-card.high::before { background: var(--orange); }
.watch-card:hover { box-shadow: 0 6px 18px rgba(11,19,65,.08); color: var(--ink); }
.watch-level { font: 700 .7rem Inter, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.watch-fig { font: 700 1.25rem Inter, sans-serif; color: var(--navy); margin-top: .2rem; }
.watch-fig small { font-size: .78rem; color: var(--muted); font-weight: 600; }

/* APE + sources */
.sources { display: flex; gap: .6rem; flex-wrap: wrap; }
.src { background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: .3rem .8rem; font-size: .82rem; }
.src.ok { border-color: #CBE6D5; background: var(--t-green); } .src.off { color: var(--muted); }
.src b { margin-right: .3rem; }
.bubble-label { font: 600 11px Inter, sans-serif; fill: var(--navy-2); }

/* Benchmarks */
.bench-key { list-style: none; display: flex; flex-wrap: wrap; gap: 1rem; padding: 0; margin: 0 0 1rem; font-size: .84rem; }
.bench-key .k { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: 0; }
.k.you, .bb.you .bb-fill { background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.k.med, .bb.median .bb-fill { background: #9FB3CF; }
.k.top, .bb.top .bb-fill { background: var(--green); }
.k.tea, .bb.teaching .bb-fill { background: var(--orange); }
.bench-list { display: grid; gap: 1.1rem; }
.bench-row { display: grid; grid-template-columns: minmax(180px, 1fr) 2.4fr; gap: 1rem; align-items: center; padding-bottom: 1rem; border-bottom: 1px solid #EEF1F5; }
.bench-name { display: flex; flex-direction: column; gap: .2rem; }
.bench-bars { display: grid; gap: .3rem; }
.bb { position: relative; height: 18px; background: #F2F5F9; border-radius: 99px; }
.bb-fill { display: block; height: 100%; border-radius: 99px; }
.bb.you { height: 24px; }
.bb-val { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); font-size: .75rem; font-weight: 700; color: var(--navy); }
@media (max-width: 700px) { .bench-row { grid-template-columns: 1fr; } }

/* Wording Guard */
.wg-flags { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.wg-flags li { border-radius: 8px; padding: .5rem .7rem; background: #F7F9FC; border-left: 4px solid var(--cyan); }
.wg-flags li.wg-blame, .wg-flags li.wg-person { border-left-color: var(--orange); }
.wg-flags li.wg-claim { border-left-color: var(--red); }
mark.wg-causal { background: #D8EEFA; } mark.wg-blame, mark.wg-person { background: #FCE3B6; } mark.wg-claim { background: #F6CFCE; }
.wg-hl, .wg-suggest { background: #F7F9FC; border-radius: 8px; padding: .8rem 1rem; line-height: 1.7; }
.wg-ok { color: #1F6B3E; font-weight: 600; background: var(--t-green); border-radius: 8px; padding: .6rem .9rem; }

/* Trust Center */
.tc-engine { display: flex; gap: .9rem; align-items: flex-start; background: var(--t-amber); border: 1px solid #F6DDB0; border-radius: 12px; padding: .9rem 1.1rem; }
.tc-engine.on { background: var(--t-green); border-color: #CBE6D5; }
.tc-dot { flex: 0 0 14px; height: 14px; border-radius: 50%; background: var(--orange); margin-top: .3rem; box-shadow: 0 0 0 4px rgba(247,162,27,.2); }
.tc-engine.on .tc-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(60,141,90,.2); }
.tc-engine p { margin: .2rem 0 0; }
.tc-features { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tc-feat { border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .4rem; }
.tc-feat.off { background: #F7F8FA; }
.tc-feat p { margin: 0; font-size: .88rem; }
.tc-feat-head { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.tc-feat form { margin: 0; }
.tc-status, .tc-activity { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.tc-status li, .tc-activity li { display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; }
.tc-status .ok { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--t-green); color: var(--green); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }

/* Integrations */
.int-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; gap: .35rem; box-shadow: var(--shadow); }
.int-card.live { border-color: #CBE6D5; }
.int-card p { margin: 0; font-size: .88rem; }
.int-card .btn { align-self: flex-start; margin-top: .3rem; }
.int-head { display: flex; gap: .6rem; align-items: center; }
.int-head .badge { margin-left: auto; }
.int-logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font: 700 1rem Inter, sans-serif; }
.int-card.planned .int-logo { background: #C9D3E3; }
tr.map-bad td { background: #FDECEC; }

/* Owner console checks */
.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; margin: .3rem 0; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .2rem 1rem; }

/* Overview: friendlier first screen */
.ov-brief { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; background: linear-gradient(120deg, #F2F8FE, #E4F5FC); border: 1px solid #CFE6F6; border-radius: 14px; padding: 1rem 1.2rem; margin-bottom: 1.2rem; }
.ov-brief p { margin: .15rem 0 0; color: var(--navy-2); }
.dom-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; margin-bottom: .9rem; }
.dom-chip { display: flex; flex-direction: column; gap: .15rem; border-radius: 12px; padding: .7rem .85rem; text-decoration: none; color: var(--ink); background: #F7F9FC; border: 1px solid #E6EBF2; }
.dom-chip:hover { border-color: var(--blue); color: var(--ink); }
.dom-chip strong { font: 700 1.3rem Inter, sans-serif; color: var(--navy); }
.dom-chip.up { background: var(--t-green); border-color: #CBE6D5; } .dom-chip.down { background: var(--t-amber); border-color: #F6DDB0; }

@media (max-width: 1100px) { .glance.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .glance.g3, .glance.g4 { grid-template-columns: 1fr; } .theme-bars li { grid-template-columns: 1fr 2.4rem 3.4rem; } .theme-bars .tb-bar { grid-column: 1 / -1; grid-row: 2; } .ask-q-bubble { max-width: 100%; } }
@media print { .top-ask, .ai-controls, .ai-btn, details.reveal > summary { display: none !important; } details.reveal > * { display: block; } }

/* 1.3.2: Ask PrevWORKS easy to find */
.sidebar nav a.nav-ask { display: flex; align-items: center; gap: .6rem; margin: .2rem 0 .8rem; padding: .62rem .8rem; border-radius: 10px; background: linear-gradient(120deg, #0557BC, #1C9FD6); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(5,87,188,.22); }
.sidebar nav a.nav-ask:hover, .sidebar nav a.nav-ask.active { background: linear-gradient(120deg, #04479B, #1689BA); color: #fff; }
.sidebar nav a.nav-ask .ai-spark { color: #fff; font-size: 1.05rem; width: 20px; text-align: center; }
.sidebar nav a.nav-ask .ai-pill { margin-left: auto; background: rgba(255,255,255,.22); color: #fff; }
.ov-ai { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1.2rem; align-items: stretch; }
.ov-ai .ov-brief { margin-bottom: 0; flex-direction: column; align-items: flex-start; justify-content: space-between; }
.ov-ask { background: linear-gradient(120deg, #EAF3FE, #E0F4FB); border: 1px solid #C7E0F5; border-radius: 14px; padding: 1rem 1.2rem; }
.ov-ask h2 { margin: 0; font-size: 1.1rem; color: var(--navy); display: flex; align-items: center; gap: .45rem; }
.ov-ask h2 .ai-spark { color: var(--cyan); }
.ov-ask p { margin: .25rem 0 .7rem; color: var(--navy-2); }
.ov-ask-form { display: flex; gap: .5rem; }
.ov-ask-form input[type=text] { flex: 1; min-width: 0; border-radius: 99px !important; padding: .55rem 1rem !important; background: #fff; }
.ov-ask .chips { margin: .7rem 0 0; }
@media (max-width: 1100px) { .ov-ai { grid-template-columns: 1fr; } }

/* Floating Ask PrevWORKS chat (bottom right, every page) */
.askw { position: fixed; right: 22px; bottom: 22px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: .7rem; }
.askw-btn { display: inline-flex; align-items: center; gap: .5rem; border: 0; cursor: pointer; padding: .8rem 1.15rem; border-radius: 99px; background: linear-gradient(120deg, #0557BC, #1C9FD6); color: #fff; font: 600 .95rem Inter, sans-serif; box-shadow: 0 8px 24px rgba(5,87,188,.35); }
.askw-btn:hover { filter: brightness(1.07); }
.askw-btn:focus-visible { outline: 3px solid #FFB347; outline-offset: 2px; }
.askw-btn span[aria-hidden] { font-size: 1.15rem; }
.askw-panel { width: min(400px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px)); background: #fff; border: 1px solid #D6E4F7; border-radius: 16px; box-shadow: 0 18px 48px rgba(11,19,65,.22); display: flex; flex-direction: column; overflow: hidden; }
.askw-panel[hidden] { display: none; }
.askw-head { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; background: linear-gradient(120deg, #0557BC, #1C9FD6); color: #fff; }
.askw-head strong { flex: 1; font-family: Inter, sans-serif; }
.askw-full { color: #fff; font-size: .82rem; opacity: .9; }
.askw-x { background: transparent; border: 0; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 .2rem; }
.askw-log { flex: 1; overflow-y: auto; padding: .9rem; background: #F7FAFE; display: flex; flex-direction: column; gap: .6rem; }
.askw-msg { max-width: 92%; padding: .6rem .8rem; border-radius: 12px; font-size: .9rem; line-height: 1.45; }
.askw-msg.bot { background: #fff; border: 1px solid #DCE8F7; color: #1D2939; align-self: flex-start; }
.askw-msg.me { background: var(--blue); color: #fff; align-self: flex-end; }
.askw-msg svg { width: 100%; height: auto; margin-top: .4rem; }
.askw-msg .askw-more { display: inline-block; margin-top: .4rem; font-size: .82rem; }
.askw-msg.wait { color: #667085; font-style: italic; }
.askw-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.askw-chips button { border: 1px solid #C7E0F5; background: #EAF3FE; color: var(--blue); border-radius: 99px; padding: .3rem .7rem; font-size: .8rem; cursor: pointer; text-align: left; }
.askw-chips button:hover { background: #DCEBFD; }
.askw-form { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid #E4ECF7; }
.askw-form input { flex: 1; min-width: 0; border-radius: 99px !important; padding: .5rem .9rem !important; }
main { padding-bottom: 5rem; }
@media (max-width: 600px) { .askw { right: 14px; bottom: 14px; } .askw-lbl { display: none; } .askw-btn { padding: .85rem; } }
@media print { .askw { display: none !important; } }

.ask-hero { background: linear-gradient(120deg, #F2F8FE, #E4F5FC); border: 1px solid #CFE6F6; border-radius: 16px; padding: 1.3rem 1.4rem 1.1rem; margin-bottom: 1.2rem; }
.ask-hero h1 { margin: .2rem 0 .9rem; }
.ask-hero .ask-box { box-shadow: 0 4px 14px rgba(5,87,188,.10); }
.ask-hint { margin: .7rem 0 .2rem; color: var(--navy-2); font-size: .92rem; }
.ask-hero .chips { margin: .5rem 0 0; }

/* 1.3.2: module data pages */
.mod-empty { display: flex; gap: 1.2rem; align-items: center; }
.mod-upload label { font-weight: 600; font-size: .9rem; }
.mod-upload input[type=file] { flex: 1; min-width: 0; }
