@font-face {
  font-family: "Tandem Sans";
  src: local("Segoe UI Variable"), local("Segoe UI");
  font-display: swap;
}
:root {
  color-scheme: light;
  --canvas: #f5f6fa;
  --paper: #fff;
  --ink: #23263a;
  --muted: #585f75;
  --line: #e0e4ef;
  --primary: #424db3;
  --dark-accent: #363e97;
  --signal: #196e68;
  --pale: #eff0fc;
  --danger: #992e3e;
  font: 15px/1.5 "Tandem Sans", "Roboto", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
*, *::before, *::after { box-sizing: border-box; }
body, p, h1, h2, h3 { margin: 0; }
a { color: var(--dark-accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .17em; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
input, select, textarea {
  min-width: 0; width: 100%; color: var(--ink); background: var(--paper);
  border: 1px solid #cdd3e4; border-radius: 6px; padding: 8px 10px; min-height: 41px;
}
input:disabled, select:disabled { background: var(--canvas); color: var(--muted); }
input[type=checkbox] { width: 1rem; height: 1rem; min-height: 0; accent-color: var(--primary); }
textarea { min-height: 96px; resize: vertical; }
:focus-visible { outline: 3px solid #666fd1; outline-offset: 3px; }
h1 { font-size: clamp(1.7rem, 3vw, 2.45rem); line-height: 1.17; letter-spacing: -.035em; font-weight: 720; }
h2 { font-size: 1.16rem; line-height: 1.33; font-weight: 700; }
h3 { font-size: 1rem; }
small, .muted, .description, .crumb { color: var(--muted); }
small { font-size: .82rem; }
.crumb { margin: 0 0 5px; font-size: .88rem; }
.description { max-width: 70ch; white-space: pre-wrap; margin-top: 9px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 20; transform: translateY(-180%); background: white; padding: 10px; }
.skip-link:focus { transform: none; }
.workspace { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; align-items: start; }
.sidebar { background: #fbfbfd; border-right: 1px solid var(--line); position: sticky; inset-block-start: 0; height: 100dvh; overflow-y: auto; padding: 25px 16px 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 1.25rem; font-weight: 740; line-height: 1.02; letter-spacing: -.04em; }
.brand:hover { text-decoration: none; }
.brand > span:last-child > span { display: block; font-size: .79rem; letter-spacing: .012em; color: var(--muted); margin-top: 4px; font-weight: 600; }
.sidebar .brand { margin: 0 0 26px 8px; }
.mark { position: relative; display: inline-block; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 9px; background: var(--primary); }
.mark::before, .mark::after { content: ""; position: absolute; width: 14px; height: 6px; background: white; transform: skewY(-32deg); border-radius: 1px; }
.mark::before { top: 10px; left: 8px; }
.mark::after { top: 19px; left: 14px; }
.nav-link, .nav-tree a, .nav-tree > span { display: flex; align-items: center; gap: 10px; border-radius: 6px; padding: 8px 10px; color: var(--muted); line-height: 1.26; font-size: .92rem; }
.nav-link > span { width: 1.15rem; flex: 0 0 1.15rem; text-align: center; color: var(--primary); font-size: 1.04rem; }
.nav-tree { border-left: 1px solid var(--line); margin: 1px 0 3px 19px; padding-left: 9px; }
.nav-tree a, .nav-tree > span { font-size: .85rem; padding: 7px 8px; overflow-wrap: anywhere; }
.nav-link:hover, .nav-tree a:hover, nav [aria-current=page] { background: var(--pale); color: var(--dark-accent); text-decoration: none; }
nav [aria-current=page] { font-weight: 720; }
.nav-group { margin-top: 10px; }
.nav-tools { padding-top: 10px; border-top: 1px solid var(--line); }
.surface, .main { min-width: 0; }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px clamp(17px, 3.2vw, 44px); min-height: 62px; }
.topbar-title { font-weight: 650; color: var(--muted); font-size: .9rem; }
.topbar-start, .account { display: flex; gap: 10px; align-items: center; }
.account { min-width: 0; }
.account-name { max-width: 17ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-badge { border-radius: 50%; width: 31px; min-width: 31px; height: 31px; display: grid; place-items: center; background: var(--pale); color: var(--dark-accent); font-weight: 700; }
.main { max-width: 1640px; margin: auto; padding: 30px clamp(17px, 3.2vw, 44px) 50px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; flex-wrap: wrap; margin-bottom: 22px; overflow-wrap: anywhere; }
.heading-icon { display: inline-grid; place-items: center; width: 1.14em; height: 1.14em; margin-right: .25em; color: var(--primary); vertical-align: .04em; font-size: .82em; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.button, .quiet { display: inline-flex; gap: 6px; justify-content: center; align-items: center; text-align: center; vertical-align: middle; font-weight: 670; font-size: .88rem; white-space: nowrap; text-decoration: none; }
.button { border: 1px solid #cfd4e3; border-radius: 7px; color: var(--ink); background: white; padding: 9px 13px; min-height: 41px; }
.button:hover { background: #f4f5fb; text-decoration: none; }
.button.primary { color: white; background: var(--primary); border-color: var(--primary); }
.button.primary:hover { background: var(--dark-accent); }
.button.danger { color: var(--danger); border-color: #e8bec6; }
.quiet { color: var(--dark-accent); background: transparent; padding: 4px 5px; border: 0; }
.quiet:hover { text-decoration: underline; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.filter-form { padding: 14px 16px; margin-bottom: 17px; }
.filter-top { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.filter-top .field { flex: 0 1 152px; }
.filter-top .field:first-of-type { flex-basis: 185px; }
.filter-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.filter-more { margin-top: 11px; }
.filter-more > summary, .names > summary, .archive summary { font-weight: 650; color: var(--dark-accent); }
.filter-more[open] { border-top: 1px solid var(--line); padding-top: 9px; }
.fields, .editor-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 204px), 1fr)); gap: 12px; margin: 12px 0; }
.field { min-width: 0; display: grid; align-content: start; gap: 5px; }
.field label { font-weight: 625; font-size: .86rem; }
.field small { line-height: 1.3; }
.field.checkbox { display: flex; align-items: center; align-self: start; margin-block: 12px; }
.field.checkbox input { margin: 0 6px 0 0; flex: 0 0 1rem; }
.custom-date[hidden] { display: none; }
.export-menu { position: relative; }
.export-menu summary { list-style: none; }
.export-menu summary::-webkit-details-marker { display: none; }
.export-menu summary::after { content: "⌄"; font-size: .95em; color: var(--primary); }
.export-menu > div { z-index: 3; position: absolute; top: calc(100% + 4px); right: 0; min-width: 150px; background: white; border: 1px solid var(--line); padding: 6px; border-radius: 7px; }
.export-menu a { display: block; white-space: nowrap; padding: 6px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; align-items: stretch; }
.kpi { background: white; border: 1px solid var(--line); border-radius: 9px; padding: 15px 16px; min-height: 109px; }
.kpi-primary { background: #edeffc; border-color: #d7dcfa; }
.kpi span { display: block; font-size: .89rem; font-weight: 650; color: var(--muted); }
.kpi strong { display: block; margin-top: 4px; font-size: clamp(1.5rem, 2.65vw, 2.33rem); letter-spacing: -.05em; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-primary strong { color: var(--dark-accent); }
.kpi small { display: inline-block; margin-top: 8px; }
.kpi small b { color: var(--dark-accent); margin-inline-start: .45em; }
.graph-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 14px; margin-bottom: 15px; }
.graph-wide { grid-template-columns: minmax(0, 1fr); }
.panel-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 15px 17px; }
.panel-heading.flush { padding: 0; }
.panel-heading p { color: var(--muted); font-size: .84rem; margin-top: 1px; }
.chart { height: 258px; width: calc(100% - 24px); margin: 0 12px 9px; }
.empty-chart { display: grid; align-content: center; justify-items: center; color: var(--muted); text-align: center; padding: 18px; background: #f8f9fd; border: 1px dashed #dce1f0; border-radius: 6px; height: 205px; }
.empty-chart p { font-weight: 650; }
.empty-chart span { font-size: .87rem; margin-top: 3px; }
.graph-key { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: .78rem; }
.graph-key span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: var(--primary); }
.graph-key span + span::before { background: var(--signal); }
.type-comparison { padding: 8px 16px 6px; border-top: 1px solid var(--line); }
#types-chart { height: 23px; }
.report-panel { margin-bottom: 15px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: start; font-size: .9rem; }
th, td { padding: 11px 15px; text-align: start; vertical-align: top; border-top: 1px solid var(--line); }
thead th { background: #f8f9fd; font-size: .8rem; color: var(--muted); font-weight: 710; white-space: nowrap; }
td small { display: block; margin-top: 3px; }
td a { font-weight: 620; }
.link-catalog { min-width: 1050px; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.wide-cell { min-width: 150px; max-width: 390px; overflow-wrap: anywhere; }
.break { overflow-wrap: anywhere; }
.empty { padding: 20px; color: var(--muted); text-align: center; }
.state { display: inline-block; border-radius: 50px; padding: 3px 8px; white-space: nowrap; font-size: .76rem; background: #eceef5; color: #4c5265; }
.state-live { background: #e6f4f0; color: #155750; }
.section-stat { padding: 0 17px 10px; color: var(--muted); display: flex; gap: .75rem; }
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px; color: var(--muted); }
.catalog-search { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; padding: 15px; margin-bottom: 15px; }
.catalog-search .field { flex: 0 1 180px; }
.catalog-search .grow { flex: 1 1 170px; }
.editor { padding: 20px; margin-bottom: 15px; max-width: 970px; }
.editor h2 + p { margin-top: 7px; }
.editor .panel-heading + textarea { margin-top: 10px; }
.editor-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 12px; }
.link-form + .link-form { border-top: 1px solid var(--line); padding-top: 10px; }
.instructions { padding-inline-start: 1.4em; }
.instructions li + li { margin-top: 7px; }
.button-snippet { padding-top: 11px; }
.button-snippet + .button-snippet { border-top: 1px solid var(--line); margin-top: 11px; }
.snippet { font: .85rem/1.5 Consolas, monospace; }
.copy-line { display: flex; gap: 7px; margin: 9px 0; }
.link-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); align-items: start; gap: 22px; padding: 17px; margin-bottom: 15px; }
.qr-panel { display: flex; align-items: start; gap: 12px; }
.qr-panel img { width: 150px; max-width: 45vw; height: auto; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 6px; }
.qr-options { display: grid; gap: 8px; }
dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 12px; }
dt { color: var(--muted); }
dd { margin: 0; }
.names { padding: 10px 15px; }
.settings-links { display: grid; gap: 8px; margin-top: 12px; }
.notice, .messages, .errorlist { background: #fff3e7; color: #724425; border-radius: 6px; padding: 9px 12px; }
.messages { background: #e6f4f0; color: #155750; margin-bottom: 15px; }
.errorlist { background: #fff0f2; color: var(--danger); list-style: none; margin: 0; font-size: .85rem; }
.clipboard-status:empty { display: none; }
.clipboard-status { position: fixed; bottom: 14px; right: 14px; z-index: 4; background: var(--dark-accent); color: white; padding: 10px 15px; border-radius: 7px; }
.error-page { display: grid; justify-items: start; gap: 10px; }
.menu-button { display: none; }
.guest .main { min-height: 100dvh; display: grid; place-content: center; }
.login-layout { display: grid; grid-template-columns: 300px 352px; gap: 15px; align-items: stretch; }
.login-brand { display: flex; flex-direction: column; justify-content: space-between; background: var(--pale); border: 1px solid #d7dcfa; border-radius: 11px; padding: 27px; min-height: 300px; }
.login-brand p { font-size: 1.7rem; font-weight: 700; line-height: 1.2; letter-spacing: -.03em; }
.login-panel { padding: 26px; }
.login-panel h1 { margin-bottom: 20px; font-size: 1.75rem; }
.login-panel .button { margin-top: 5px; }
@media (max-width: 1120px) {
  .workspace { grid-template-columns: 205px minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
  .graph-grid { grid-template-columns: minmax(0, 1fr); }
  .link-overview { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .workspace { display: block; }
  .sidebar { height: auto; border: 0; border-bottom: 1px solid var(--line); position: static; padding: 13px; }
  .sidebar .brand { margin-bottom: 11px; }
  .js .sidebar { display: none; }
  .js .sidebar.is-open { display: block; }
  .js .menu-button { display: inline-flex; }
  .topbar-title { display: none; }
  .main { padding-top: 23px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-layout { grid-template-columns: minmax(0, min(85vw, 390px)); }
  .login-brand { min-height: 136px; gap: 13px; }
  .login-brand p { font-size: 1.15rem; }
  .login-brand br { display: none; }
}
@media (max-width: 470px) {
  .topbar { padding-inline: 12px; }
  .main { padding-inline: 12px; }
  .filter-top .field, .filter-top .field:first-of-type { flex: 1 1 122px; }
  .filter-actions { margin-left: 0; }
  .button { padding-inline: 10px; }
  .editor-fields { grid-template-columns: minmax(0, 1fr); }
  .copy-line { flex-wrap: wrap; }
  .copy-line > input { flex: 1 1 190px; }
  .panel-heading { padding-inline: 12px; }
  .kpi { padding: 11px; }
  th, td { padding-inline: 10px; }
}
