* { box-sizing: border-box; }
:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #182630;
  background: #f4f6f7;
  --ink: #182630;
  --muted: #526575;
  --line: #dce4e8;
  --accent: #1b5b51;
  --surface: #fff;
}
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .16em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #568f86; outline-offset: 3px; }
.shell { margin: 0 auto; width: calc(100% - 56px); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.nav-shell { display: flex; align-items: center; min-height: 68px; gap: 35px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; color: var(--ink); white-space: nowrap; text-decoration: none; }
.brand-icon { flex: none; }
.nav-shell nav { display: flex; align-self: stretch; gap: 22px; }
.nav-shell nav a { display: flex; align-items: center; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; font-size: .92rem; }
.nav-shell nav a[aria-current] { color: var(--accent); font-weight: 700; border-bottom-color: var(--accent); }
.header-action, .record-actions { display: flex; align-items: center; gap: 8px; }
.header-action { margin-left: auto; }
main { padding: 38px 0 64px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 18px; }
h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.055em; line-height: 1.15; }
h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.025em; }
p { line-height: 1.55; }
.page-head p { margin: 9px 0 0; }
.muted, small, .help { color: var(--muted); }
small { display: block; margin-top: 4px; font-size: .83rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 1px solid transparent; border-radius: 7px; background: var(--accent); color: white; padding: 8px 14px; font-weight: 650; font-size: .92rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.button:hover { background: #14473f; }
.button.secondary { color: #24443f; background: var(--surface); border-color: #cbd8d8; }
.button.secondary:hover { background: #eef5f2; }
.button.compact { min-height: 36px; padding: 5px 11px; }
.button:disabled { opacity: .55; cursor: default; }
.button.danger { color: #913c3f; background: #fff; border-color: #e4cccd; }
.panel, .stat { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { color: inherit; display: block; padding: 19px 21px; text-decoration: none; }
.stat:hover { border-color: #7caba2; }
.stat span { display: block; color: var(--muted); font-size: .9rem; }
.stat strong { display: block; margin-top: 8px; font-size: 2rem; letter-spacing: -.06em; line-height: 1.15; }
.critical-stat strong { color: #a33e3f; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 21px; gap: 12px; }
.panel-head a { font-size: .88rem; }
.panel-copy { padding: 0 21px 17px; margin: 0; }
.empty { padding: 33px 25px; text-align: center; }
.empty p { margin: 9px auto 18px; color: var(--muted); max-width: 460px; }
.examples, .actions, .pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.examples, .pagination { justify-content: center; }
.presets { justify-content: flex-start; margin-bottom: 15px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; text-align: left; border-collapse: collapse; font-size: .9rem; }
th { color: #465a69; font-size: .81rem; font-weight: 680; white-space: nowrap; background: #f8fafb; }
td, th { padding: 13px 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
td:first-child, th:first-child { padding-left: 21px; }
td:last-child, th:last-child { padding-right: 21px; }
tbody tr:last-child td { border-bottom: 0; }
td .summary { max-width: 36ch; }
td:last-child { overflow-wrap: anywhere; min-width: 120px; }
td.right { text-align: right; white-space: nowrap; }
.watch-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.advisory { font-weight: 670; white-space: nowrap; font-family: "Cascadia Code", Consolas, monospace; }
details { margin-top: 6px; color: var(--muted); font-size: .78rem; }
details small { overflow-wrap: anywhere; max-width: 42ch; }
summary { cursor: pointer; }
.badge { display: inline-block; white-space: nowrap; border-radius: 4px; padding: 3px 7px; background: #edf1f3; color: #475b68; font-size: .77rem; font-weight: 700; }
.badge.critical { background: #f9e5e6; color: #953538; }
.badge.high { background: #ffeedf; color: #8a4a17; }
.badge.medium { background: #f8f0d5; color: #725a16; }
.badge.ok { background: #e6f3ec; color: #226044; }
.padded { padding: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.wide { grid-column: 1 / -1; }
label { display: block; font-size: .9rem; font-weight: 620; }
input:not([type="checkbox"]), select, textarea { display: block; width: 100%; border: 1px solid #b9c8cf; border-radius: 6px; min-height: 41px; padding: 8px 10px; margin-top: 5px; color: var(--ink); background: white; }
textarea { resize: vertical; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); }
label small, .help { font-weight: 400; margin-top: 5px; }
.choice { display: flex; align-items: center; gap: 6px; }
.form-panel .actions, .email-actions, .remove, .pagination { margin-top: 17px; }
.email-actions { margin-bottom: 22px; }
.back { display: inline-block; margin-bottom: 10px; font-size: .87rem; }
.standalone { max-width: 220px; margin-top: 12px; }
.divide { border-top: 1px solid var(--line); margin-top: 23px; padding-top: 21px; }
.help { align-self: end; font-size: .85rem; line-height: 1.5; }
.filters { margin-bottom: 15px; padding: 15px; display: grid; grid-template-columns: minmax(0, 1.35fr) repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end; }
.filter-actions { grid-column: -3 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.finding-date { white-space: nowrap; }
.watch-targets { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.watch-targets a, .watch-targets strong { display: inline-block; margin-right: 6px; }
.notice { padding: 12px 15px; border: 1px solid #bcdad1; border-radius: 7px; background: #edf8f4; margin-bottom: 17px; }
.notice.error { border-color: #eac8c9; background: #fff1f1; color: #8b363a; }
.error-text { color: #8b363a; }
@media (max-width: 760px) {
  .shell { width: calc(100% - 30px); }
  main { padding-top: 23px; }
  .stats, .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
  .page-head { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .stat { padding: 14px; }
}

.schedule-options { margin-top: 12px; }
.cleanup-panel { margin-bottom: 22px; }
.cleanup-panel h3 { margin: 0 0 12px; font-size: 1rem; }
.cleanup-panel .aligned-choice { align-self: end; min-height: 41px; }
.sort-link { color: inherit; text-decoration-style: dotted; }

.auth-panel { margin: 28px 0; }
.auth-panel .auth-form { max-width: 32rem; }
.auth-form { display: grid; gap: 13px; margin-top: 15px; }
.auth-form > .button { justify-self: start; }
.auth-cancel, .account-panel + .account-panel { margin-top: 16px; }
.qr-setup { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.qr-setup img { width: 172px; height: 172px; }
.qr-setup code { overflow-wrap: anywhere; }
@media (max-width: 960px) {
  .nav-shell { flex-wrap: wrap; gap: 0 15px; padding-top: 11px; }
  .nav-shell nav { width: 100%; order: 3; gap: 8px 15px; flex-wrap: wrap; }
  .nav-shell nav a { padding: 10px 0; }
}
