:root {
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  font-size: 16px;
  font-synthesis: none;
  color: #203b43;
  background: #f3f6f4;
  --ink: #163840;
  --secondary: #425e66;
  --muted: #526c75;
  --brand: #173e44;
  --accent: #176850;
  --accent-soft: #e8f3ed;
  --link: #125d7b;
  --line: #ccd9d5;
  --surface: #fff;
  --shadow: 0 4px 22px #163e4407;
  --sidebar-width: 248px;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid #237657;
  outline-offset: 3px;
}
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; flex-shrink: 0; vertical-align: middle; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; background: white; padding: 15px; }
.skip-link:focus { top: 10px; }
.brand { text-decoration: none; display: flex; align-items: center; gap: 12px; font-size: 23px; font-weight: 700; letter-spacing: -.7px; color: var(--brand); }
.brand-mark { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; background: var(--brand); color: white; border-radius: 12px; font-size: 27px; line-height: 1; font-weight: 650; letter-spacing: -2px; padding-right: 4px; box-shadow: 0 5px 14px #173e4414; }
.brand-mark > span { color: #a0d7ba; font-size: 24px; margin-left: 1px; }
.brand-subtitle { display: block; font-size: 12px; line-height: 1.5; letter-spacing: .1px; font-weight: 500; color: var(--secondary); margin-top: 2px; }
.boot { display: grid; place-content: center; justify-items: center; height: 100dvh; color: var(--secondary); }
.boot p { margin-top: 22px; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 18px; border: 1px solid transparent; border-radius: 10px; font-size: 14px; font-weight: 600; line-height: 1.4; transition: background .15s, border-color .15s, box-shadow .15s; }
.button .icon { width: 18px; height: 18px; }
.button-primary { background: var(--brand); color: white; box-shadow: 0 4px 10px #173e4414; }
.button-primary:hover { background: #102f34; }
.button-secondary { background: white; border-color: #8ca49f; color: var(--brand); }
.button-secondary:hover { background: var(--accent-soft); border-color: var(--accent); }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 6px; background: transparent; min-height: 40px; padding: 7px 4px; font-size: 14px; font-weight: 600; color: var(--secondary); }
.text-button:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; border: 0; border-radius: 8px; padding: 9px; background: transparent; color: var(--secondary); }
.icon-button:hover { background: var(--accent-soft); color: var(--brand); }
.small-dot { display: inline-block; width: 7px; height: 7px; flex-shrink: 0; background: #287754; border-radius: 50%; }

/* Access to Regina */
.login-screen { min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; background: white; }
.login-side { display: flex; flex-direction: column; padding: 42px 9% 26px; }
.login-brand { align-self: flex-start; }
.login-content { width: 100%; max-width: 410px; margin: auto; padding: 65px 0 75px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 1.6px; }
.login-content h1 { color: var(--ink); font-size: clamp(30px, 3vw, 38px); font-weight: 650; letter-spacing: -1.6px; line-height: 1.2; margin: 16px 0 20px; }
.login-intro { color: var(--secondary); font-size: 15px; line-height: 1.75; margin: 0 0 34px; }
.login-content label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.password-wrap { display: flex; align-items: center; padding-right: 5px; border: 1px solid #8ca49f; border-radius: 10px; background: #fbfdfb; }
.password-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px #17685014; }
.password-wrap input { width: 100%; min-width: 0; padding: 16px 15px; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 16px; }
.password-wrap input::placeholder { color: var(--muted); opacity: 1; }
.password-wrap input:focus-visible { outline: none; }
.password-wrap .icon { width: 20px; height: 20px; }
.login-submit { width: 100%; justify-content: space-between; margin-top: 20px; min-height: 53px; font-size: 16px; padding: 14px 20px; }
.login-note { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 12px; margin-top: 22px; line-height: 1.7; }
.login-note .icon { width: 14px; height: 14px; }
.form-error { color: #a02d32; font-size: 14px; line-height: 1.7; margin-bottom: 0; }
.login-footer { font-size: 12px; color: var(--muted); }
.login-visual { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; overflow: hidden; background: var(--brand); color: white; padding: 65px 42px; }
.login-orbit { position: absolute; width: 680px; height: 680px; border: 1px solid #ffffff12; border-radius: 50%; pointer-events: none; }
.orbit-one { top: -290px; right: -290px; }
.orbit-two { bottom: -380px; left: -350px; width: 820px; height: 820px; }
.visual-copy { position: relative; z-index: 1; width: 390px; max-width: 100%; margin-bottom: 48px; }
.visual-overline { color: #c4dfd5; font-size: 12px; font-weight: 650; letter-spacing: 2px; }
.visual-copy h2 { font-size: clamp(27px, 2.7vw, 36px); line-height: 1.25; letter-spacing: -1px; font-weight: 500; margin: 20px 0; }
.visual-copy p { color: #d5e8df; font-size: 15px; line-height: 1.8; }
.visual-paper { width: 390px; max-width: 90%; padding: 28px; background: #fcfefc; border-radius: 15px; box-shadow: 0 18px 65px #05292b44; }
.paper-front { position: relative; z-index: 1; transform: rotate(-4deg); margin: 0 0 55px; color: var(--ink); }
.paper-back { position: absolute; top: 60%; height: 215px; transform: rotate(7deg); background: #b2d3c4; opacity: .2; }
.paper-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; letter-spacing: 1px; }
.paper-line { height: 8px; width: 60%; background: #dbe7e1; border-radius: 3px; margin-top: 10px; }
.paper-line.long { height: 10px; width: 90%; margin-top: 22px; background: #bfd2c8; }
.paper-divider { height: 1px; background: #d8e3dd; margin: 23px 0; }
.paper-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.paper-caption { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; letter-spacing: .7px; }
.paper-value { font-size: 13px; font-weight: 600; }
.paper-tag { display: inline-flex; align-items: center; gap: 6px; background: #e6f3eb; color: #1c6148; border-radius: 20px; font-size: 11px; padding: 6px 10px; margin-top: 24px; }
.paper-tag .icon { width: 13px; height: 13px; }
.visual-bottom { position: absolute; bottom: 28px; font-size: 12px; color: #c4dfd5; }

/* Application navigation */
.workspace { display: flex; min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 25px 18px 20px; background: white; border-right: 1px solid var(--line); overflow-y: auto; }
.sidebar-brand { padding-left: 10px; margin-bottom: 34px; }
.sidebar-section-label { padding: 0 13px; margin-bottom: 12px; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; color: var(--muted); }
.second-label { margin-top: 30px; }
.nav-list { display: flex; flex-direction: column; gap: 7px; }
.nav-link { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 45px; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; text-decoration: none; color: var(--secondary); font-size: 14px; font-weight: 550; line-height: 1.5; }
.nav-link:hover { background: #f2f7f4; color: var(--brand); }
.nav-link.active { background: #e8f3ed; color: #164f3c; border-color: #cde2d5; font-weight: 650; }
.nav-count { min-width: 29px; padding: 3px 6px; border-radius: 6px; background: #edf2f0; color: #405d64; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: center; }
.active .nav-count { background: #d2e8da; color: #174e3c; }
.sidebar-bottom { margin-top: auto; padding: 30px 5px 0; }
.source-card { display: flex; align-items: center; gap: 8px; padding: 14px 10px; border: 1px solid #cedfd4; border-radius: 10px; background: #f1f7f3; text-decoration: none; }
.source-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.source-icon { display: flex; color: #286b4f; }
.source-icon .icon { width: 18px; height: 18px; }
.source-card strong { display: block; font-size: 11px; font-weight: 650; color: #275b47; white-space: nowrap; letter-spacing: -.15px; }
.source-card div > span { display: block; font-size: 12px; color: #456b57; margin-top: 3px; }
.main-shell { margin-left: var(--sidebar-width); flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding: 10px 32px; background: white; border-bottom: 1px solid var(--line); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 16px; min-width: 0; }
.topbar-label { display: flex; align-items: center; gap: 14px; color: var(--secondary); font-size: 14px; }
.topbar-label strong { color: var(--brand); font-size: 16px; font-weight: 650; }
.topbar-label > span { border-left: 1px solid #bdcfca; padding-left: 14px; }
.topbar-right .text-button { font-size: 14px; }
.topbar-right .icon { width: 17px; height: 17px; }
.menu-toggle { display: none; }
.main-content { max-width: 1320px; margin: 0 auto; padding: 26px 32px 22px; outline: none; }
.breadcrumb { display: flex; gap: 10px; margin-bottom: 13px; color: var(--muted); font-size: 11px; letter-spacing: 1.1px; font-weight: 650; }
.breadcrumb span:last-child { color: var(--accent); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.page-heading > div { min-width: 0; }
.page-heading h1 { color: var(--ink); font-size: 28px; line-height: 1.25; font-weight: 650; letter-spacing: -.7px; margin: 0; }
.page-description { max-width: 690px; color: var(--secondary); font-size: 14px; line-height: 1.75; margin: 8px 0 0; }
.page-heading > .button { flex-shrink: 0; }
.sync-row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.7; margin: 14px 0 20px; }
.sync-row.stale .small-dot { background: #96621c; }
.sample-banner { display: flex; align-items: center; gap: 10px; padding: 12px 15px; margin-bottom: 24px; border: 1px solid #bad1e2; border-radius: 9px; background: #eaf3fa; color: #255775; font-size: 13px; line-height: 1.7; }
.sample-banner .icon { width: 17px; height: 17px; }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 14px 17px; margin-bottom: 22px; border: 1px solid #ddc38c; border-radius: 9px; background: #fff6e4; color: #775019; font-size: 14px; line-height: 1.75; }
.notice .icon { width: 18px; height: 18px; margin-top: 3px; }
.loading-state { display: flex; flex-direction: column; align-items: center; padding: 100px 20px 130px; color: var(--secondary); text-align: center; }
.loading-state p { font-size: 17px; margin: 22px 0 8px; }
.loading-state > span:last-child { font-size: 14px; color: var(--muted); }
.loader { width: 30px; height: 30px; border: 3px solid #cedfd4; border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.is-loading .icon { animation: spin 1s linear infinite; }

/* Summaries and filtering */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 23px; }
.stat { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px; background: white; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.stat > div { min-width: 0; flex: 1; }
.stat-label { display: block; min-height: 24px; padding-right: 26px; font-size: 13px; line-height: 1.5; color: var(--secondary); font-weight: 550; }
.stat-number { display: block; color: var(--brand); font-size: 31px; line-height: 1.1; letter-spacing: -1px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-note { display: block; color: var(--muted); font-size: 13px; line-height: 1.6; margin-top: 7px; }
.stat-icon { position: absolute; top: 15px; right: 18px; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: #eaf2f7; color: #346382; }
.stat-icon .icon { width: 17px; height: 17px; }
.stat-icon.green { color: #226849; background: #e7f3eb; }
.stat-icon.amber { color: #8b631c; background: #fbf1dc; }
#workspace[data-current-view="excluidas"] .stats { gap: 0; margin-bottom: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; }
#workspace[data-current-view="excluidas"] .stat { min-width: 0; padding: 12px 16px; border: 0; border-right: 1px solid #dce6df; border-radius: 0; box-shadow: none; }
#workspace[data-current-view="excluidas"] .stat:last-child { border-right: 0; }
#workspace[data-current-view="excluidas"] .stat > div { display: flex; align-items: baseline; gap: 9px; }
#workspace[data-current-view="excluidas"] .stat-label { min-height: 0; padding: 0; font-size: 13px; line-height: 1.4; }
#workspace[data-current-view="excluidas"] .stat-number { order: -1; font-size: 22px; line-height: 1.2; }
#workspace[data-current-view="excluidas"] .stat-note, #workspace[data-current-view="excluidas"] .stat-icon { display: none; }
#workspace[data-current-view="excluidas"] .catalogue-heading { display: none; }
#workspace[data-current-view="excluidas"] .sync-row { margin: 12px 0 17px; }
#workspace[data-current-view="excluidas"] .reason-chips { margin-top: 11px; }
#workspace[data-current-view="excluidas"] .results-toolbar { padding: 12px 0 10px; }
.catalogue-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.catalogue-heading h2 { margin: 0 0 5px; color: var(--ink); font-size: 18px; font-weight: 600; letter-spacing: -.3px; }
.catalogue-heading > div > span { color: var(--secondary); font-size: 14px; }
.catalogue-icon { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; background: white; border: 1px solid var(--line); border-radius: 8px; color: var(--secondary); }
.catalogue-icon .icon { width: 17px; height: 17px; }
.search-toolbar { display: flex; gap: 12px; max-width: 660px; }
.search-wrap { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 15px; background: white; border: 1px solid #819c97; border-radius: 10px; }
.search-wrap > .icon { width: 19px; height: 19px; color: var(--muted); }
.search-wrap input { width: 100%; min-width: 0; border: 0; outline: none; padding: 14px 0; background: transparent; color: var(--ink); font-size: 15px; }
.search-wrap input::placeholder { color: var(--muted); opacity: 1; }
.search-wrap input:focus-visible { outline: none; }
.search-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px #17685014; }
.search-wrap kbd { padding: 1px 7px; border: 1px solid #a9bdb6; border-radius: 4px; color: var(--muted); font-size: 13px; }
.filter-button { border-color: #819c97; background: white; color: var(--brand); font-size: 15px; padding: 11px 17px; }
.filter-button:hover, .filter-button[aria-expanded="true"] { border-color: var(--accent); background: #e8f3ed; color: #164f3c; }
.filter-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px; background: #cfe5d7; color: #174e3c; font-size: 12px; }
.filters-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; background: white; border: 1px solid var(--line); border-radius: 11px; padding: 22px; margin-top: 13px; }
.filter-field { min-width: 0; }
.filter-field label { display: block; color: var(--secondary); font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.filter-field select { width: 100%; min-height: 44px; border: 1px solid #819c97; border-radius: 7px; padding: 8px 10px; background: #fafcfb; color: var(--ink); font-size: 14px; }
.clear-filters { align-self: end; justify-self: start; min-height: 44px; }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 0 14px; }
.results-left { display: flex; align-items: center; gap: 10px; color: var(--secondary); font-size: 14px; flex-wrap: wrap; }
.results-left strong { color: var(--brand); font-weight: 700; }
.results-left .text-button { font-size: 13px; }
.sort-control { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.sort-control select { max-width: 190px; min-height: 40px; background: transparent; border: 0; padding: 5px 4px; color: var(--ink); font-size: 14px; font-weight: 550; }

/* Catalogue cards */
.call-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.call-card { display: flex; flex-direction: column; min-width: 0; padding: 19px 20px 0; border: 1px solid #c4d5ce; border-radius: 13px; background: white; box-shadow: var(--shadow); transition: border-color .18s, box-shadow .18s; }
.call-card:hover { border-color: #6d9d86; box-shadow: 0 8px 26px #1b53450c; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-code { color: #465f68; font-size: 12px; letter-spacing: .4px; font-weight: 650; white-space: nowrap; }
.card-type { max-width: 57%; color: var(--muted); font-size: 12px; text-align: right; overflow-wrap: anywhere; }
.card-title { margin: 0 0 13px; min-height: 68px; color: var(--ink); font-size: 16px; font-weight: 600; letter-spacing: -.15px; line-height: 1.5; overflow-wrap: anywhere; }
.card-issuer { color: var(--secondary); font-size: 13px; line-height: 1.6; margin: 0 0 13px; overflow-wrap: anywhere; }
.card-location { display: flex; align-items: flex-start; gap: 6px; color: #365d61; font-size: 13px; margin-bottom: 15px; min-width: 0; }
.card-location > .icon { width: 15px; height: 15px; }
.card-location > span { overflow-wrap: anywhere; }
.card-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: auto; padding: 15px 0 16px; border-top: 1px solid #dae4df; }
.meta-label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .25px; margin-bottom: 8px; }
.meta-label .icon { width: 13px; height: 13px; }
.meta-value { display: block; color: var(--brand); font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.5; overflow-wrap: anywhere; }
.meta-value.small { font-size: 14px; font-weight: 550; padding-top: 4px; }
.card-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 56px; padding: 12px 0; border-top: 1px solid #dae4df; }
.badges { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; padding: 5px 8px; font-size: 12px; font-weight: 600; line-height: 1.5; max-width: 100%; overflow-wrap: anywhere; }
.badge.green { color: #165b45; background: #e7f4ed; }
.badge.amber { color: #765016; background: #fff3d9; }
.badge.blue { color: #225381; background: #eaf2fa; }
.badge.neutral { color: #435a65; background: #edf1f4; }
.badge .icon { width: 12px; height: 12px; }
.card-open { color: var(--accent); font-size: 14px; white-space: nowrap; min-height: 42px; font-weight: 650; }
.card-open .icon { width: 16px; height: 16px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 3px; margin-top: 25px; color: var(--secondary); font-size: 14px; }
.pagination-buttons { display: flex; align-items: center; gap: 6px; }
.page-button { min-width: 38px; height: 38px; border: 1px solid #8ba59b; border-radius: 8px; padding: 6px 10px; background: white; color: var(--brand); font-size: 14px; font-weight: 550; }
.page-button .icon { width: 16px; height: 16px; }
.page-button.active { background: var(--brand); color: white; border-color: var(--brand); }
.page-button:not(:disabled):hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.page-button:disabled { opacity: .45; }
.pagination-ellipsis { padding: 0 4px; }
.content-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 32px; padding: 21px 0 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.content-footer > span:last-child { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.content-footer .icon { width: 13px; height: 13px; }

/* Empty views, exclusions and changes */
.empty-state { padding: 65px 25px; background: white; border: 1px dashed #9bb6a8; border-radius: 13px; color: var(--secondary); text-align: center; }
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; background: #eaf3ed; color: #387456; border-radius: 16px; margin-bottom: 18px; }
.empty-icon .icon { width: 27px; height: 27px; }
.empty-state h2 { color: var(--ink); font-size: 22px; font-weight: 600; margin: 0 0 12px; }
.empty-state p { font-size: 15px; line-height: 1.8; max-width: 550px; margin: 0 auto; }
.empty-state .button { margin-top: 23px; }
.error-state { margin-top: 35px; }
.history-list { display: flex; flex-direction: column; gap: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.reason-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.reason-chips-label { color: var(--secondary); font-size: 13px; font-weight: 600; margin-right: 2px; }
.reason-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 35px; padding: 6px 10px; border: 1px solid #c7d7ce; border-radius: 7px; background: white; color: var(--secondary); font-size: 13px; font-weight: 550; }
.reason-chip > span:first-child { text-transform: capitalize; }
.reason-chip:hover { border-color: var(--accent); color: var(--brand); }
.reason-chip[aria-pressed="true"] { border-color: #84b49a; background: #e8f3ed; color: #164f3c; }
.reason-chip-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.excluded-table-wrap { overflow: visible; background: white; border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); }
.excluded-table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; }
.excluded-table th { padding: 10px 12px; background: #f5f8f6; border-bottom: 1px solid var(--line); color: var(--secondary); font-size: 12px; font-weight: 650; }
.excluded-table th:first-child { width: 120px; border-top-left-radius: 11px; }
.excluded-table th:nth-child(3) { width: 22%; }
.excluded-table th:nth-child(4) { width: 145px; }
.excluded-table th:last-child { width: 110px; border-top-right-radius: 11px; }
.excluded-table td { padding: 5px 12px; border-bottom: 1px solid #e1eae4; vertical-align: middle; }
.excluded-table tbody tr:last-child td { border-bottom: 0; }
.excluded-table tbody tr:hover { background: #f8fbf9; }
.excluded-description { min-width: 0; }
.excluded-title { overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.excluded-table td.excluded-issuer { overflow: hidden; color: var(--secondary); font-size: 12px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.excluded-action { text-align: right; white-space: nowrap; }
.excluded-action .card-open { min-height: 34px; padding: 5px 0; font-size: 13px; }
.excluded-reason .badge { white-space: normal; }
.reason-help { position: relative; display: inline-flex; border-radius: 6px; cursor: help; }
.reason-help .badge { border-bottom: 1px dotted #607e6f; }
.reason-help:focus-visible { outline: 3px solid #237657; outline-offset: 3px; }
.reason-tooltip { position: absolute; z-index: 30; right: 0; bottom: calc(100% + 7px); width: 250px; padding: 10px 12px; border-radius: 8px; background: #173e44; box-shadow: 0 6px 20px #173e4433; color: white; font-size: 12px; font-weight: 400; line-height: 1.55; text-align: left; white-space: normal; visibility: hidden; opacity: 0; transition: opacity .15s; }
.reason-tooltip::after { position: absolute; top: 100%; right: 0; width: 100%; height: 8px; content: ''; }
.reason-help:hover .reason-tooltip, .reason-help:focus .reason-tooltip, .reason-help:focus-within .reason-tooltip { visibility: visible; opacity: 1; }
.history-item { padding: 23px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.history-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: 16px; margin-bottom: 17px; }
.history-change { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.history-change > div { padding: 16px; background: #f2f6f3; border: 1px solid #d7e3da; border-radius: 9px; overflow-wrap: anywhere; }
.history-change span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.history-change p { margin: 0; font-size: 15px; line-height: 1.8; white-space: pre-wrap; }
.history-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; color: var(--secondary); font-size: 13px; }
.history-meta a { color: var(--link); }
.muted { color: var(--muted); }

/* Complete record, including the original source text */
.detail-dialog { width: min(940px, calc(100% - 40px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid #a9c1b6; border-radius: 16px; background: white; color: var(--ink); box-shadow: 0 25px 100px #072c3b35; }
.detail-dialog::backdrop { background: #102e3b80; backdrop-filter: blur(4px); }
.detail-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 28px; border-bottom: 1px solid #d7e1dc; background: #fffffffa; }
.detail-kicker { color: var(--secondary); font-size: 12px; letter-spacing: .7px; font-weight: 600; }
.detail-intro { padding: 23px 28px; }
.detail-intro h2 { font-size: 21px; line-height: 1.5; font-weight: 650; color: var(--ink); letter-spacing: -.4px; overflow-wrap: anywhere; margin: 0 0 20px; }
.detail-intro .badges { gap: 8px; }
.detail-intro .badge { font-size: 13px; padding: 6px 10px; }
.detail-section { padding: 0 28px 23px; }
.detail-section > h3 { color: #255d49; font-size: 16px; font-weight: 650; padding-bottom: 13px; border-bottom: 1px solid #b9d1c2; margin: 0 0 4px; }
.detail-fields { margin: 0; }
.detail-row { display: grid; grid-template-columns: 165px minmax(0, 1fr); gap: 22px; padding: 12px 0; border-bottom: 1px solid #e0e8e3; }
.detail-row:last-child { border-bottom: 0; }
.detail-row dt { font-size: 14px; line-height: 1.8; color: var(--secondary); font-weight: 550; }
.detail-row dd { margin: 0; color: #29454f; font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-row a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.field-links { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin-top: 9px; }
.field-links a { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; font-size: 14px; }
.field-links .icon { width: 15px; height: 15px; }
.attachment { display: flex; align-items: flex-start; gap: 12px; padding: 16px; margin-top: 13px; border: 1px solid #bfd3c6; border-radius: 10px; background: #f8fbf8; }
.attachment > .icon { width: 20px; height: 20px; margin-top: 4px; color: #3b735a; }
.attachment > div { min-width: 0; flex: 1; }
.attachment h4 { font-size: 15px; font-weight: 600; line-height: 1.75; margin: 0; overflow-wrap: anywhere; }
.attachment p { font-size: 14px; color: var(--secondary); line-height: 1.75; margin: 5px 0 0; }
.attachment a { display: inline-flex; align-items: center; gap: 6px; color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.attachment a .icon { width: 14px; height: 14px; }
.attachment.no-link { background: #f7f9f7; }
.attachment-original { font-size: 13px; color: var(--secondary); margin-top: 16px; }
.attachment-original summary { cursor: pointer; color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.attachment-original p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; color: var(--secondary); }
.toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); z-index: 100; max-width: calc(100% - 35px); padding: 15px 20px; border-radius: 10px; box-shadow: 0 5px 30px #173e4430; background: var(--brand); color: white; font-size: 14px; line-height: 1.7; }
.sidebar-overlay { display: none; }

/* Keep information readable as space becomes narrower. */
@media (min-width: 1760px) {
  .call-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1150px) {
  :root { --sidebar-width: 248px; }
  .sidebar { padding-left: 14px; padding-right: 14px; }
  .sidebar-brand { padding-left: 7px; }
  .main-content { padding: 24px; }
  .topbar { padding: 12px 28px; }
  .topbar-label > span { display: none; }
  .stat { padding: 15px 16px; }
  .stat-icon { width: 27px; height: 27px; right: 13px; top: 15px; }
  .stat-icon .icon { width: 16px; height: 16px; }
  .stat-label { font-size: 13px; padding-right: 23px; }
  .stat-note { font-size: 12px; }
  .call-grid { gap: 16px; }
  .call-card { padding: 18px 18px 0; }
  .card-top { flex-wrap: wrap; gap: 6px; }
  .card-type { max-width: 100%; }
  .filters-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-title { font-size: 16px; min-height: 68px; }
  .card-footer { grid-template-columns: 1fr; gap: 3px; }
  .card-open { justify-self: end; }
  .meta-value { font-size: 17px; }
  .brand { font-size: 23px; }
  .brand-subtitle { font-size: 11px; }
}
@media (min-width: 761px) and (max-width: 960px) {
  .call-grid { grid-template-columns: 1fr; }
  .card-title { min-height: 0; }
  .card-footer { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .stats { gap: 10px; }
  .stat { padding: 14px 13px; }
  .stat-icon { display: none; }
  .stat-label { padding-right: 0; min-height: 40px; }
  .stat-note { font-size: 12px; }
  .stat-number { font-size: 30px; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 26px; }
  .page-heading > .button { align-self: flex-end; }
  .results-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .login-side { padding-left: 8%; padding-right: 8%; }
  .visual-paper { padding: 22px; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); width: 278px; transition: transform .2s; padding: 28px 20px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 19; background: #163e445e; backdrop-filter: blur(2px); }
  .main-shell { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .topbar { min-height: 62px; padding: 10px 20px; gap: 12px; }
  .topbar-left { gap: 9px; }
  .topbar-right { gap: 12px; }
  .main-content { padding: 23px 22px 20px; }
  .page-heading h1 { font-size: 26px; }
  .stats { gap: 13px; }
  .stat-label { font-size: 13px; }
  .stat-note { font-size: 13px; }
  .call-grid { gap: 17px; }
  .card-title { min-height: 68px; }
  .card-footer { grid-template-columns: 1fr; }
  .pagination { align-items: flex-start; flex-wrap: wrap; }
  .pagination-buttons { margin-left: auto; }
  .login-screen { grid-template-columns: 1fr; }
  .login-side { min-height: 100dvh; padding: 30px 36px 24px; }
  .login-content { max-width: 420px; padding: 65px 0; }
  .login-visual { display: none; }
  .brand { font-size: 23px; }
  .brand-subtitle { font-size: 12px; }
}
@media (max-width: 540px) {
  .topbar { min-height: 60px; padding: 9px 16px 9px 10px; }
  .topbar-label strong { font-size: 18px; }
  .topbar-right .text-button { min-height: 44px; }
  .main-content { padding: 20px 16px 18px; }
  .breadcrumb { font-size: 11px; margin-bottom: 11px; gap: 8px; }
  .page-heading { align-items: flex-start; gap: 13px; }
  .page-heading h1 { font-size: 24px; line-height: 1.3; letter-spacing: -.7px; }
  .page-description { font-size: 14px; line-height: 1.75; margin-top: 12px; }
  .page-heading > .button { min-width: 44px; width: 44px; min-height: 44px; padding: 11px; gap: 0; margin-top: 25px; }
  .page-heading > .button span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .sync-row { font-size: 11px; line-height: 1.8; align-items: flex-start; margin: 14px 0 19px; }
  .sync-row .small-dot { margin-top: 7px; width: 6px; height: 6px; }
  .sample-banner { font-size: 12px; padding: 12px; align-items: flex-start; }
  .sample-banner .icon { margin-top: 3px; }
  .stats { gap: 8px; margin-bottom: 22px; }
  .stat { padding: 12px 10px; border-radius: 10px; }
  .stat-label { font-size: 12px; min-height: 38px; line-height: 1.5; padding: 0; }
  .stat-number { font-size: 28px; }
  .stat-note { font-size: 12px; line-height: 1.5; margin-top: 7px; }
  .stat-icon { display: none; }
  #workspace[data-current-view="excluidas"] .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
  #workspace[data-current-view="excluidas"] .stat { padding: 9px 10px; }
  #workspace[data-current-view="excluidas"] .stat:nth-child(2) { border-right: 0; }
  #workspace[data-current-view="excluidas"] .stat:last-child { grid-column: 1 / -1; border-top: 1px solid #dce6df; }
  #workspace[data-current-view="excluidas"] .stat-label { font-size: 12px; }
  #workspace[data-current-view="excluidas"] .stat-number { font-size: 19px; }
  .catalogue-heading { gap: 12px; margin-bottom: 17px; }
  .catalogue-heading h2 { font-size: 18px; }
  .catalogue-heading > div > span { font-size: 14px; line-height: 1.7; display: block; }
  .catalogue-icon { display: none; }
  .search-toolbar { gap: 8px; }
  .search-wrap { padding: 0 11px; gap: 8px; min-height: 44px; }
  .search-wrap > .icon { width: 18px; height: 18px; }
  .search-wrap input { font-size: 16px; }
  .search-wrap kbd { display: none; }
  .filter-button { font-size: 14px; gap: 6px; padding: 11px; }
  .filter-button .icon { width: 17px; height: 17px; }
  .filters-panel { grid-template-columns: 1fr; gap: 17px; padding: 18px; }
  .filter-field label { font-size: 14px; }
  .filter-field select { font-size: 16px; min-height: 46px; }
  .results-toolbar { gap: 8px; padding: 15px 0 13px; }
  .results-left { font-size: 13px; gap: 6px; }
  .results-left .text-button { font-size: 12px; }
  .sort-control { font-size: 0; gap: 0; }
  .sort-control select { font-size: 13px; max-width: 153px; padding-right: 0; min-height: 44px; }
  .call-grid { grid-template-columns: 1fr; gap: 14px; }
  .call-card { padding: 18px 18px 0; }
  .card-top { flex-wrap: nowrap; gap: 10px; }
  .card-type { max-width: 55%; font-size: 12px; }
  .card-code { font-size: 12px; }
  .card-title { font-size: 16px; min-height: 0; margin-bottom: 14px; line-height: 1.5; }
  .card-issuer, .card-location { font-size: 13px; }
  .card-meta { gap: 15px; padding: 15px 0 16px; }
  .meta-label { font-size: 11px; line-height: 1.5; align-items: flex-start; }
  .meta-label .icon { margin-top: 2px; }
  .meta-value { font-size: 17px; }
  .meta-value.small { font-size: 14px; }
  .card-footer { grid-template-columns: 1fr; gap: 5px; padding: 10px 0 8px; }
  .badge { font-size: 12px; padding: 5px 8px; }
  .card-open { min-height: 44px; font-size: 15px; justify-self: end; }
  .pagination { font-size: 13px; gap: 15px; }
  .pagination-buttons { align-self: flex-end; gap: 5px; }
  .page-button { min-width: 38px; height: 40px; }
  .content-footer { font-size: 11px; line-height: 1.7; gap: 15px; margin-top: 28px; }
  .content-footer > span:first-child { max-width: 230px; }
  .detail-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 22px); border-radius: 12px; }
  .detail-header { padding: 11px 16px; gap: 10px; }
  .detail-kicker { font-size: 11px; letter-spacing: .3px; }
  .detail-intro { padding: 20px 19px; }
  .detail-intro h2 { font-size: 20px; line-height: 1.5; }
  .detail-section { padding: 0 19px 22px; }
  .detail-section > h3 { font-size: 16px; }
  .detail-row { grid-template-columns: 1fr; gap: 7px; padding: 12px 0; }
  .detail-row dt { font-size: 14px; font-weight: 600; }
  .detail-row dd { font-size: 15px; }
  .attachment { padding: 14px; gap: 10px; }
  .attachment > .icon { width: 18px; }
  .attachment h4 { font-size: 15px; }
  .attachment p { font-size: 14px; }
  .reason-chips { gap: 7px; margin-top: 14px; }
  .reason-chip { font-size: 12px; min-height: 38px; }
  .excluded-table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .excluded-table, .excluded-table tbody { display: block; }
  .excluded-table thead { display: none; }
  .excluded-table tbody { display: grid; gap: 10px; }
  .excluded-table .excluded-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: white; }
  .excluded-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .excluded-code { grid-column: 1; grid-row: 1; align-self: center; }
  .excluded-reason { grid-column: 2; grid-row: 1; text-align: right; }
  .excluded-description { grid-column: 1 / -1; grid-row: 2; }
  .excluded-table td.excluded-issuer { grid-column: 1; grid-row: 3; align-self: center; }
  .excluded-action { grid-column: 2; grid-row: 3; text-align: right; }
  .excluded-action .card-open { min-height: 36px; }
  .excluded-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
  .reason-tooltip { width: min(250px, calc(100vw - 60px)); }
  .history-item { padding: 20px; }
  .history-top { flex-direction: column; align-items: flex-start; gap: 7px; }
  .history-change { grid-template-columns: 1fr; gap: 12px; }
  .history-meta { flex-wrap: wrap; gap: 10px; font-size: 13px; }
  .empty-state { padding: 48px 22px; }
  .empty-state h2 { font-size: 21px; }
  .empty-state p { font-size: 15px; }
  .login-side { padding: 28px 27px 21px; }
  .login-content { padding: 60px 0; }
  .login-content h1 { font-size: 32px; }
  .login-intro { font-size: 15px; }
  .login-footer { font-size: 12px; }
  .notice { padding: 14px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
