/* AgentPanel web panel. Aurora Glass: frosted panels over soft colour fields.
   Fonts are vendored (SIL OFL 1.1; see fonts/OFL-*.txt). No inline styles:
   the Content-Security-Policy allows only this stylesheet. */

@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/plus-jakarta-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/plus-jakarta-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/jetbrains-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/jetbrains-mono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #edf1f8;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #5b6577;
  --line: rgba(16, 24, 40, .08);
  --accent: #4a4fd8;
  --accent-dark: #3d42c4;
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .82) 0%, rgba(255, 255, 255, .58) 100%);
  --glass-edge: rgba(255, 255, 255, .72);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 0 0 1px rgba(16, 24, 40, .05), 0 30px 60px -32px rgba(16, 24, 40, .38);
  --ok-bg: rgba(63, 174, 26, .13); --ok: #236b0c;
  --alert-bg: rgba(200, 70, 126, .13); --alert: #a3215e;
  --warn-bg: rgba(214, 120, 30, .15); --warn: #874709;
  --info-bg: rgba(74, 79, 216, .11); --info: #3d42c4;
  --grey-bg: rgba(16, 24, 40, .07); --grey: #475467;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 500 14px/1.45 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
h1, h2 { margin: 0; letter-spacing: -.02em; }
h1 { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 { font-size: 15.5px; font-weight: 800; }
p { margin: 0; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(74, 79, 216, .45); outline-offset: 2px; border-radius: 8px; }

.mono { font-family: var(--mono); font-size: .92em; }
.small { font-size: 12.5px; }
.muted { color: var(--muted); }
.sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 500; }
.lbl { margin: 0; color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.t-alert { color: var(--alert); }

/* Background colour fields */
.aurora { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.blob { position: absolute; border-radius: 50%; }
.blob--1 { top: -260px; left: -180px; width: 760px; height: 760px; background: radial-gradient(closest-side, rgba(30, 150, 210, .45), rgba(30, 150, 210, 0)); }
.blob--2 { top: -160px; right: -200px; width: 800px; height: 800px; background: radial-gradient(closest-side, rgba(88, 92, 230, .38), rgba(88, 92, 230, 0)); }
.blob--3 { bottom: -340px; left: 26%; width: 860px; height: 860px; background: radial-gradient(closest-side, rgba(100, 185, 40, .26), rgba(100, 185, 40, 0)); }
.blob--4 { bottom: -220px; right: 4%; width: 640px; height: 640px; background: radial-gradient(closest-side, rgba(170, 70, 160, .30), rgba(170, 70, 160, 0)); }

.glass { border: 1px solid var(--glass-edge); border-radius: 26px; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(190%); backdrop-filter: blur(30px) saturate(190%); box-shadow: var(--shadow); }

/* Shell */
.app { position: relative; z-index: 1; display: flex; gap: 12px; min-height: 100vh; padding: 12px; }
.rail { position: sticky; top: 12px; display: flex; flex-direction: column; width: 248px; flex: none; height: calc(100vh - 24px); padding: 18px 12px 12px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 14px; color: var(--ink); font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand__mark { width: 28px; height: 28px; border-radius: 9px; background: linear-gradient(135deg, #6b70ef, var(--accent) 55%, #2d31a8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 14px -8px rgba(74, 79, 216, .9); position: relative; }
.brand__mark::after { content: ""; position: absolute; inset: 8px; border: 2px solid #fff; border-radius: 4px; border-right-color: transparent; }
.brand--large { justify-content: center; font-size: 19px; padding-bottom: 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 12px; color: var(--ink-2); font-size: 13.5px; font-weight: 700; }
.nav__item:hover { background: rgba(255, 255, 255, .62); color: var(--ink); text-decoration: none; }
.nav__item.is-on { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgba(16, 24, 40, .06), 0 6px 14px -10px rgba(16, 24, 40, .4); }
.nav__icon { width: 26px; height: 26px; flex: none; border-radius: 8px; position: relative; }
.nav__icon--overview { background: rgba(74, 79, 216, .12); }
.nav__icon--overview::after { content: ""; position: absolute; inset: 7px; border: 2px solid var(--accent-dark); border-radius: 3px; }
.nav__icon--sites { background: rgba(30, 130, 200, .13); }
.nav__icon--sites::after { content: ""; position: absolute; left: 6px; right: 6px; top: 8px; height: 10px; border: 2px solid #155f93; border-top-width: 4px; border-radius: 3px; }
.rail__note { margin: 16px 10px 0; color: var(--muted); font-size: 12px; }
.who { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; padding: 12px 6px 2px; border-top: 1px solid var(--line); }
.who form { flex-basis: 100%; }
.who form .btn { width: 100%; }
.who__text { flex: 1; min-width: 0; }
.who__text b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 800; }
.column { position: relative; display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 18px 0 22px; border-radius: 999px; }
.crumbs { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.crumbs a { color: var(--grey); font-weight: 600; }
.crumbs__sep { color: rgba(16, 24, 40, .25); }
.topbar__session { color: var(--muted); font-size: 12px; }
.content { flex: 1; padding: 22px 22px 26px; min-width: 0; }
.foot { padding: 0 18px 4px; color: var(--muted); font-size: 12px; }

/* Buttons and chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border: 1px solid rgba(16, 24, 40, .12); border-radius: 999px; background: rgba(255, 255, 255, .74); color: var(--ink); font-size: 13.5px; font-weight: 700; white-space: nowrap; cursor: pointer; box-shadow: inset 0 1px 0 #fff; }
.btn:hover { background: #fff; color: var(--ink); text-decoration: none; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn--primary { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 8px 18px -10px rgba(74, 79, 216, .8); }
.btn--primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); color: #fff; }
.btn--primary[disabled] { opacity: .6; cursor: progress; }
.btn--wide { width: 100%; height: 46px; font-size: 15px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; vertical-align: middle; background: var(--grey-bg); color: var(--grey); }
.chip--ok { background: var(--ok-bg); color: var(--ok); }
.chip--alert { background: var(--alert-bg); color: var(--alert); }
.chip--warn { background: var(--warn-bg); color: var(--warn); }
.chip--info { background: var(--info-bg); color: var(--info); }
.chip--impact-high { background: var(--alert); color: #fff; }
.chip--impact-medium { background: var(--warn-bg); color: var(--warn); }
.chip--impact-low { background: var(--grey-bg); color: var(--grey); }
h1 .chip { font-size: 12px; letter-spacing: 0; }

/* Page structure */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.page-head p { margin-top: 4px; font-size: 13.5px; }
.attention { margin-bottom: 16px; padding: 14px 18px; border: 1px solid rgba(200, 70, 126, .22); border-radius: 18px; background: rgba(200, 70, 126, .07); }
.attention ul { margin: 6px 0 0; padding-left: 18px; font-weight: 600; }
.attention li + li { margin-top: 2px; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.tiles--small { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid rgba(16, 24, 40, .06); border-radius: 18px; background: rgba(255, 255, 255, .62); box-shadow: inset 0 1px 0 #fff; min-width: 0; }
.tile b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 28px; }
.tile b small, .big small { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.tile .muted { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { padding: 16px 18px 18px; border: 1px solid rgba(16, 24, 40, .06); border-radius: 20px; background: rgba(255, 255, 255, .58); box-shadow: inset 0 1px 0 #fff; min-width: 0; }
.card--wide { grid-column: 1 / -1; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card .lbl { margin-top: 12px; margin-bottom: 4px; }
.note { margin: 14px 2px 0; font-size: 12.5px; }
.unavailable { padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.ok-line { color: var(--ok); font-weight: 600; }

/* Facts and rows */
.facts { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 6px 14px; margin: 0; }
.facts + .facts { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.rows li:first-child { border-top: 0; }
.clients li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.clients .sub { display: block; }
.card--clients { grid-column: 1 / -1; }
.viewas { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 10px 20px; border: 1px solid rgba(214, 120, 30, .35); border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.viewas b { font-weight: 800; }
.list { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; }
.meter { display: block; width: 100%; height: 8px; margin: 6px 0 2px; border: 0; border-radius: 99px; background: rgba(16, 24, 40, .08); }
.meter::-webkit-meter-bar { border: 0; border-radius: 99px; background: rgba(16, 24, 40, .08); height: 8px; }
.meter::-webkit-meter-optimum-value { border-radius: 99px; background: var(--accent); }
.meter::-moz-meter-bar { border-radius: 99px; background: var(--accent); }
.meter--warn::-webkit-meter-optimum-value { background: #d6781e; }
.meter--warn::-moz-meter-bar { background: #d6781e; }
.meter--alert::-webkit-meter-optimum-value { background: #b8306f; }
.meter--alert::-moz-meter-bar { background: #b8306f; }

/* Findings */
.findings { display: flex; flex-direction: column; gap: 6px; }
.finding { border: 1px solid rgba(16, 24, 40, .07); border-radius: 14px; background: rgba(255, 255, 255, .55); }
.finding > summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; cursor: pointer; list-style: none; }
.finding > summary::-webkit-details-marker { display: none; }
.finding > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; flex: none; }
.finding[open] > summary::before { transform: rotate(45deg); }
.finding__title { flex: 1; min-width: 180px; font-weight: 700; }
.finding__age { color: var(--muted); font-size: 12px; font-weight: 600; }
.finding__age.is-stale { color: var(--warn); }
.finding__body { padding: 2px 16px 14px 31px; display: flex; flex-direction: column; gap: 10px; }
.uncertain { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; }
.raw > summary { cursor: pointer; color: var(--accent); font-weight: 700; font-size: 12.5px; }
.raw pre { max-height: 320px; overflow: auto; margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(16, 24, 40, .045); font-size: 11.5px; line-height: 1.5; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { padding: 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid rgba(16, 24, 40, .06); vertical-align: middle; line-height: 1.35; }
.tbl tbody tr:hover td { background: rgba(255, 255, 255, .55); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl--compact td { padding: 6px 10px; font-size: 13px; }
.ttl { display: block; color: var(--ink); font-weight: 700; }
a.ttl:hover { color: var(--accent-dark); }
.search { display: flex; align-items: center; gap: 8px; flex: 0 1 380px; height: 42px; padding: 0 5px 0 16px; border: 1px solid rgba(16, 24, 40, .1); border-radius: 999px; background: rgba(255, 255, 255, .8); box-shadow: inset 0 1px 2px rgba(16, 24, 40, .05); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; }

/* Sign-in */
.auth { position: relative; z-index: 1; display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; }
.auth__card { width: 100%; max-width: 420px; padding: 30px 30px 26px; display: flex; flex-direction: column; gap: 14px; }
.auth__card h1 { justify-content: center; font-size: 26px; }
.auth__card > .muted { text-align: center; }
.auth__help { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.auth__or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.auth__or::before, .auth__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth__form { display: flex; flex-direction: column; gap: 6px; }
.auth__form .btn { margin-top: 8px; }
.field { height: 42px; padding: 0 14px; border: 1px solid rgba(16, 24, 40, .14); border-radius: 12px; background: rgba(255, 255, 255, .86); color: var(--ink); font: inherit; box-shadow: inset 0 1px 2px rgba(16, 24, 40, .05); }
.field:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.card--narrow { max-width: 560px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.nav__icon--passkey { background: rgba(23, 140, 90, .13); }
.nav__icon--passkey::after { content: ""; position: absolute; left: 8px; top: 6px; width: 8px; height: 8px; border: 2px solid #146b47; border-radius: 50%; box-shadow: 4px 9px 0 -2px #146b47; }
.status { min-height: 20px; text-align: center; font-weight: 600; font-size: 13px; }
.status.is-error { color: var(--alert); }
.status.is-ok { color: var(--ok); }

/* Changes */
.nav__icon--changes { background: rgba(170, 70, 160, .13); }
.nav__icon--changes::after { content: ""; position: absolute; left: 7px; top: 6px; width: 10px; height: 12px; border: 2px solid #7a2d74; border-radius: 3px; border-top-width: 5px; }
.plans { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.plans > .card__head { margin: 4px 2px 0; }
.plan { display: flex; flex-direction: column; gap: 10px; }
.plan__head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.plan__title { margin: 0; flex: 1; min-width: 160px; font-size: 14.5px; font-weight: 700; }
.plan__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; }
.plan__cols .lbl { margin-top: 4px; }
.plan__cols .list + .lbl, .plan__cols p + .lbl { margin-top: 14px; }
.plan .list { margin-top: 2px; font-size: 13px; }
.checks li { display: block; padding: 6px 0; }
.checks .chip { margin-right: 6px; }
.plan__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.plan__actions form { display: inline; }
.plan__hint { overflow-wrap: anywhere; }
.notice { margin-bottom: 12px; padding: 10px 14px; border-radius: 14px; background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.status--left { text-align: left; margin-bottom: 4px; }

/* People and passkeys */
.nav__icon--people { background: rgba(40, 110, 200, .13); }
.nav__icon--people::before { content: ""; position: absolute; left: 8px; top: 4px; width: 8px; height: 8px; border: 2px solid #1d4f91; border-radius: 50%; }
.nav__icon--people::after { content: ""; position: absolute; left: 5px; top: 15px; width: 14px; height: 6px; border: 2px solid #1d4f91; border-bottom: 0; border-radius: 8px 8px 0 0; }
.people { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.person { display: flex; flex-direction: column; gap: 10px; }
.person__head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.person__name { margin: 0; font-size: 16px; font-weight: 750; }
.person__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.link-once { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; border: 1px solid var(--accent); }
.link-once[hidden] { display: none; }
.nowrap { white-space: nowrap; }
.link-once__row { display: flex; gap: 8px; }
.link-once__value { flex: 1; min-width: 0; font-size: 12.5px; }

@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app { flex-direction: column; padding: 8px; }
  .rail { position: static; width: auto; height: auto; padding: 12px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .rail__note { display: none; }
  .who { margin-top: 10px; }
  .topbar { border-radius: 22px; flex-wrap: wrap; padding: 10px 14px; }
  .topbar__session { display: none; }
  .content { padding: 16px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .plan__cols { grid-template-columns: minmax(0, 1fr); }
  .link-once__row { flex-direction: column; }
  .facts dt { margin-top: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .finding > summary::before { transition: none; }
}
