:root {
  color-scheme: light;
  --bg: #f3f6f7;
  --surface: #ffffff;
  --surface-soft: #f7f9fa;
  --surface-strong: #eaf0f1;
  --sidebar: #10232c;
  --sidebar-soft: #17313c;
  --sidebar-text: #dce8ec;
  --text: #17242b;
  --text-soft: #62727b;
  --text-faint: #8a989f;
  --border: #dce4e7;
  --border-strong: #cbd7db;
  --accent: #409877;
  --accent-strong: #2f7d60;
  --accent-soft: #e6f5ef;
  --accent-ink: #174b39;
  --ok: #38a575;
  --slow: #dfaa45;
  --down: #dc6969;
  --info: #5f8fc2;
  --focus: rgba(64, 152, 119, .25);
  --shadow-sm: 0 1px 2px rgba(25, 43, 51, .04), 0 8px 24px rgba(25, 43, 51, .04);
  --shadow-md: 0 18px 50px rgba(22, 42, 50, .12);
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 20px;
  --sidebar-width: 248px;
  --topbar-height: 72px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1217;
  --surface: #111b22;
  --surface-soft: #152129;
  --surface-strong: #1c2b34;
  --sidebar: #0c1b22;
  --sidebar-soft: #142a34;
  --sidebar-text: #dbe8ec;
  --text: #e4ecef;
  --text-soft: #96a6ae;
  --text-faint: #71838c;
  --border: #24343d;
  --border-strong: #344650;
  --accent: #62bc98;
  --accent-strong: #80d0ae;
  --accent-soft: #17382c;
  --accent-ink: #b4ead2;
  --ok: #55bd8a;
  --slow: #e5b654;
  --down: #e97b7b;
  --info: #79a8d8;
  --focus: rgba(98, 188, 152, .26);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .18), 0 10px 30px rgba(0, 0, 0, .12);
  --shadow-md: 0 20px 60px rgba(0, 0, 0, .4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1217;
    --surface: #111b22;
    --surface-soft: #152129;
    --surface-strong: #1c2b34;
    --sidebar: #0c1b22;
    --sidebar-soft: #142a34;
    --sidebar-text: #dbe8ec;
    --text: #e4ecef;
    --text-soft: #96a6ae;
    --text-faint: #71838c;
    --border: #24343d;
    --border-strong: #344650;
    --accent: #62bc98;
    --accent-strong: #80d0ae;
    --accent-soft: #17382c;
    --accent-ink: #b4ead2;
    --ok: #55bd8a;
    --slow: #e5b654;
    --down: #e97b7b;
    --info: #79a8d8;
    --focus: rgba(98, 188, 152, .26);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .18), 0 10px 30px rgba(0, 0, 0, .12);
    --shadow-md: 0 20px 60px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }

html { min-width: 320px; scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
svg { display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--accent-soft); color: var(--accent-ink); }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: fixed; z-index: 1000; top: 10px; left: 10px; transform: translateY(-150%); border-radius: 8px; padding: 9px 13px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-md); text-decoration: none; }
.skip-link:focus { transform: none; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.clipboard-helper { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; overflow: auto; padding: 22px 15px 18px; background: var(--sidebar); color: var(--sidebar-text); }
.sidebar::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 10% -5%, rgba(111, 207, 168, .10), transparent 27%), linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .08)); }
.brand, .nav-list, .sidebar-footer { position: relative; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 8px 28px; color: #f1f7f9; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 12px; background: #a7e7cb; color: #113328; font-size: 17px; font-weight: 800; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.brand-copy { display: grid; line-height: 1.2; }
.brand-copy strong { font-size: 15px; letter-spacing: -.02em; }
.brand-copy small { margin-top: 3px; color: #849aa4; font-size: 10px; letter-spacing: .02em; }
.nav-list { display: grid; gap: 4px; }
.nav-item { min-height: 43px; display: flex; align-items: center; gap: 12px; border-radius: 10px; padding: 9px 11px; color: #9fb2ba; font-size: 13px; font-weight: 520; text-decoration: none; transition: color .16s ease, background .16s ease, transform .16s ease; }
.nav-item svg { width: 19px; height: 19px; flex: 0 0 auto; stroke-width: 1.7; }
.nav-item:hover { background: rgba(255, 255, 255, .045); color: #edf5f7; }
.nav-item:active { transform: scale(.985); }
.nav-item.is-active { background: var(--sidebar-soft); color: #fff; box-shadow: inset 3px 0 0 #9fe2c5; }
.nav-indicator { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: #657d87; }
.nav-indicator.ok { background: #68d49f; box-shadow: 0 0 0 4px rgba(104, 212, 159, .10); }
.nav-indicator.issue { background: #ecbf62; box-shadow: 0 0 0 4px rgba(236, 191, 98, .10); }
.sidebar-footer { display: grid; gap: 13px; margin-top: auto; padding: 20px 7px 0; }
.privacy-note { display: flex; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px; background: rgba(255, 255, 255, .035); color: #78909a; font-size: 10px; line-height: 1.45; }
.privacy-note svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; color: #8ecdb2; }
.privacy-note span { display: grid; }
.privacy-note strong { margin-bottom: 2px; color: #b9c8ce; font-size: 11px; font-weight: 600; }
.version-label { color: #516a75; font-size: 9px; text-align: center; text-transform: uppercase; letter-spacing: .1em; }
.sidebar-scrim { display: none; }

.workspace { grid-column: 2; min-width: 0; }
.topbar { position: sticky; z-index: 20; top: 0; height: var(--topbar-height); display: flex; align-items: center; gap: 18px; border-bottom: 1px solid color-mix(in srgb, var(--border) 85%, transparent); padding: 0 clamp(20px, 4vw, 48px); background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.global-search { width: min(470px, 56vw); height: 39px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 11px; padding: 0 10px 0 12px; background: var(--surface); color: var(--text-soft); box-shadow: 0 1px 0 rgba(255, 255, 255, .03); text-align: left; }
.global-search:hover { border-color: var(--border-strong); color: var(--text); }
.global-search svg { width: 17px; height: 17px; color: var(--text-faint); }
.global-search > span { flex: 1; font-size: 12px; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; min-height: 19px; border: 1px solid var(--border); border-bottom-color: var(--border-strong); border-radius: 5px; padding: 1px 5px; background: var(--surface-soft); color: var(--text-faint); font-family: var(--font); font-size: 9px; line-height: 1; box-shadow: 0 1px 0 var(--border); }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-soft); }
.icon-button:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface-soft); }
.icon-button svg { width: 17px; height: 17px; }
.mobile-menu { display: none; }
.session-button { height: 38px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; background: var(--surface); color: var(--text-soft); font-size: 11px; font-weight: 650; }
.session-button svg { display: none; width: 16px; height: 16px; }
.session-button:hover { border-color: var(--border-strong); color: var(--text); }
.session-button.is-authenticated { color: var(--accent-ink); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.session-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-faint) 14%, transparent); }
.is-authenticated .session-dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 14%, transparent); }

.content { width: min(1240px, 100%); margin-inline: auto; padding: 34px clamp(20px, 4vw, 48px) 60px; }
.view { animation: view-in .22s ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading h1 { margin: 2px 0 7px; font-size: clamp(25px, 3vw, 34px); line-height: 1.15; letter-spacing: -.045em; }
.page-heading p:not(.eyebrow) { max-width: 650px; margin: 0; color: var(--text-soft); font-size: 13px; }
.eyebrow, .section-kicker { margin: 0; color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.current-date { flex: 0 0 auto; margin-bottom: 5px; color: var(--text-faint); font-size: 11px; text-transform: capitalize; }
.heading-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 16px; }
.dashboard-wide { grid-column: 1 / -1; }
.card { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.card-heading, .panel-title, .table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-heading { margin-bottom: 15px; }
.card-heading h2, .table-toolbar h2 { margin: 3px 0 0; font-size: 15px; line-height: 1.25; letter-spacing: -.025em; }
.text-link { border-radius: 5px; color: var(--accent); font-size: 11px; font-weight: 650; text-decoration: none; }
.text-link:hover { color: var(--accent-strong); text-decoration: underline; }
.muted { color: var(--text-soft); }
.small { font-size: 11px; }
.secure-chip, .local-badge, .private-label { display: inline-flex; align-items: center; gap: 5px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border)); border-radius: 999px; padding: 4px 8px; background: var(--accent-soft); color: var(--accent-ink); font-family: var(--mono); font-size: 9px; }
.secure-chip svg, .local-badge svg, .private-label svg { width: 11px; height: 11px; }
.local-badge { padding: 7px 10px; font-family: var(--font); font-weight: 650; }

.service-summary { display: grid; gap: 8px; }
.overview-service { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 41px; border-radius: 9px; padding: 8px 10px; background: var(--surface-soft); }
.overview-service strong { overflow: hidden; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.overview-service time { color: var(--text-faint); font-family: var(--mono); font-size: 9px; font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 13%, transparent); }
.dot.slow { background: var(--slow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--slow) 13%, transparent); }
.dot.down { background: var(--down); box-shadow: 0 0 0 3px color-mix(in srgb, var(--down) 13%, transparent); }
.note-callout { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; border: 1px solid var(--border); border-radius: 11px; margin-top: 14px; padding: 11px; background: var(--surface-soft); text-align: left; }
.note-callout:hover { border-color: color-mix(in srgb, var(--accent) 38%, var(--border)); background: var(--accent-soft); }
.note-callout-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); color: var(--accent); }
.note-callout-icon svg { width: 17px; height: 17px; }
.note-callout > span:nth-child(2) { min-width: 0; display: grid; }
.note-callout strong { font-size: 11px; }
.note-callout small { overflow: hidden; margin-top: 2px; color: var(--text-faint); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.chevron { width: 15px; height: 15px; color: var(--text-faint); }

.quick-tools { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.quick-tools button { min-width: 0; display: flex; align-items: center; gap: 9px; border: 1px solid var(--border); border-radius: 11px; padding: 11px 10px; background: var(--surface-soft); color: var(--text); text-align: left; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.quick-tools button:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 46%, var(--border)); background: var(--accent-soft); }
.quick-tools button > span:last-child { min-width: 0; display: grid; }
.quick-tools strong { font-size: 10px; }
.quick-tools small { overflow: hidden; margin-top: 1px; color: var(--text-faint); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.tool-glyph { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; background: var(--surface); color: var(--accent); font-family: var(--mono); font-size: 10px; font-weight: 700; }
.qr-glyph { font-size: 15px; }
.feed-preview { display: grid; gap: 12px; }
.preview-story { display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 10px; align-items: start; }
.source-avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.preview-story > div { min-width: 0; }
.preview-story a { display: block; overflow: hidden; color: var(--text); font-size: 11px; font-weight: 650; line-height: 1.35; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.preview-story a:hover { color: var(--accent); }
.preview-story small { display: block; margin-top: 3px; color: var(--text-faint); font-size: 9px; }
.reference-preview { display: grid; gap: 7px; }
.reference-preview button { display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 0; border-radius: 9px; padding: 8px 10px; background: var(--surface-soft); color: var(--text); text-align: left; }
.reference-preview button:hover { background: var(--surface-strong); }
.reference-preview button > span:nth-child(2) { min-width: 0; display: grid; }
.reference-preview strong { font-size: 10px; }
.reference-preview small { overflow: hidden; color: var(--text-faint); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.reference-preview svg { width: 14px; height: 14px; color: var(--text-faint); }
.ref-icon { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--accent); font-family: var(--mono); font-size: 10px; font-weight: 700; }

.skeleton-row, .skeleton-story { position: relative; overflow: hidden; border-radius: 9px; background: var(--surface-soft); }
.skeleton-row { height: 41px; }
.skeleton-story { height: 35px; }
.skeleton-row::after, .skeleton-story::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface-strong) 65%, transparent), transparent); animation: shimmer 1.5s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 9px; padding: 8px 13px; font-size: 11px; font-weight: 700; }
.button svg { width: 15px; height: 15px; }
.button.primary { border-color: var(--accent-strong); background: var(--accent); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 16%, transparent); }
.button.primary:hover { background: var(--accent-strong); }
.button.secondary { border-color: var(--border); background: var(--surface); color: var(--text); }
.button.secondary:hover { border-color: var(--border-strong); background: var(--surface-soft); }
.button.ghost { background: transparent; color: var(--text-soft); }
.button.ghost:hover { background: var(--surface-soft); color: var(--text); }
.button:disabled, .icon-button:disabled { cursor: not-allowed; opacity: .45; }
.full-width { width: 100%; }
.small-button { min-height: 32px; padding: 6px 10px; font-size: 10px; }

.status-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.summary-card { min-height: 100px; display: flex; flex-direction: column; justify-content: space-between; }
.summary-card > span { color: var(--text-soft); font-size: 10px; font-weight: 650; }
.summary-card strong { font-size: 25px; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.summary-card small { color: var(--text-faint); font-size: 9px; }
.summary-card .summary-status { display: flex; align-items: center; gap: 8px; font-size: 15px; letter-spacing: -.02em; }
.inline-form { margin-bottom: 16px; background: var(--surface-soft); }
label { display: grid; gap: 6px; color: var(--text-soft); font-size: 10px; font-weight: 650; }
label > span small { color: var(--text-faint); font-weight: 500; }
input, select, textarea { width: 100%; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); font-size: 12px; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
input, select { height: 40px; padding: 0 11px; }
textarea { min-height: 110px; resize: vertical; padding: 10px 11px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--text-faint); opacity: .78; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.form-grid { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(280px, 1.4fr); gap: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 13px; }
.table-card { padding: 0; overflow: hidden; }
.table-toolbar { min-height: 70px; border-bottom: 1px solid var(--border); padding: 14px 18px; }
.table-toolbar p { margin: 4px 0 0; color: var(--text-faint); font-size: 9px; }
.legend { display: flex; align-items: center; gap: 13px; color: var(--text-faint); font-size: 9px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.service-table { overflow-x: auto; }
.service-row { min-width: 650px; display: grid; grid-template-columns: minmax(160px, 1.4fr) minmax(200px, 2fr) 110px 100px 40px; align-items: center; gap: 12px; min-height: 60px; border-bottom: 1px solid var(--border); padding: 9px 18px; }
.service-row:last-child { border-bottom: 0; }
.service-row.header { min-height: 38px; background: var(--surface-soft); color: var(--text-faint); font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.service-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.service-name strong, .service-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-name strong { font-size: 11px; }
.service-url { color: var(--text-soft); font-family: var(--mono); font-size: 9px; }
.service-latency, .service-time { color: var(--text-soft); font-family: var(--mono); font-size: 9px; font-variant-numeric: tabular-nums; }
.row-action { width: 30px; height: 30px; border: 0; border-radius: 7px; display: grid; place-items: center; background: transparent; color: var(--text-faint); }
.row-action:hover { background: var(--surface-strong); color: var(--down); }
.row-action svg { width: 14px; height: 14px; }

.tools-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 14px; align-items: start; }
.tool-tabs { position: sticky; top: calc(var(--topbar-height) + 18px); display: grid; gap: 4px; }
.tool-tabs button { width: 100%; display: grid; grid-template-columns: 31px minmax(0, 1fr); align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 10px; padding: 8px; background: transparent; color: var(--text-soft); text-align: left; }
.tool-tabs button > span:first-child { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: var(--surface); color: var(--accent); box-shadow: inset 0 0 0 1px var(--border); font-family: var(--mono); font-size: 10px; }
.tool-tabs button > span:last-child { display: grid; }
.tool-tabs strong { font-size: 10px; }
.tool-tabs small { color: var(--text-faint); font-size: 8px; }
.tool-tabs button:hover { background: var(--surface-soft); color: var(--text); }
.tool-tabs button[aria-selected="true"] { border-color: var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tool-tabs button[aria-selected="true"] > span:first-child { border-color: transparent; background: var(--accent-soft); color: var(--accent-ink); box-shadow: none; }
.tool-workspace { min-height: 460px; padding: 22px; }
.panel-title { align-items: flex-start; border-bottom: 1px solid var(--border); margin: -2px -2px 18px; padding: 0 2px 17px; }
.panel-title h2 { margin: 0 0 4px; font-size: 17px; letter-spacing: -.03em; }
.panel-title p { margin: 0; color: var(--text-soft); font-size: 10px; }
.icon-text-button { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 7px; padding: 6px 8px; background: transparent; color: var(--text-soft); font-size: 9px; font-weight: 650; }
.icon-text-button:hover { background: var(--surface-soft); color: var(--text); }
.icon-text-button svg { width: 14px; height: 14px; }
.dual-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.dual-editor textarea { min-height: 265px; font-family: var(--mono); font-size: 10px; tab-size: 2; }
.dual-editor textarea[readonly] { background: var(--surface-soft); }
.tool-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tool-message { margin-left: auto; color: var(--text-soft); font-size: 9px; }
.tool-message.error { color: var(--down); }
.tool-message.success { color: var(--ok); }
.simple-tool { max-width: 760px; }
.result-field { margin-top: 30px; }
.result-field > div { min-height: 62px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 11px; padding: 10px 11px 10px 16px; background: var(--surface-soft); }
.result-field output { flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--text); font-family: var(--mono); font-size: 15px; }
.inline-select { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.inline-select select { width: 70px; height: 34px; }
.timestamp-now { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 11px; padding: 12px 13px; background: var(--surface-soft); }
.timestamp-now > span { color: var(--text-soft); font-size: 10px; }
.timestamp-now strong { font-family: var(--mono); font-size: 18px; font-variant-numeric: tabular-nums; }
.input-action { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; margin-top: 18px; }
.conversion-result { display: grid; gap: 8px; margin-top: 14px; }
.conversion-line { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); padding: 8px 0; }
.conversion-line span { color: var(--text-faint); font-size: 9px; }
.conversion-line code { overflow-wrap: anywhere; color: var(--text); font-family: var(--mono); font-size: 10px; }
.password-options { display: grid; grid-template-columns: minmax(180px, 1fr) repeat(3, auto); align-items: end; gap: 14px; margin-top: 18px; }
.password-options input[type="range"] { height: auto; padding: 0; accent-color: var(--accent); }
.check-label { display: flex; align-items: center; gap: 6px; height: 35px; }
.check-label input { width: 15px; height: 15px; padding: 0; accent-color: var(--accent); }
.strength-label { margin-left: auto; color: var(--accent); font-size: 9px; }
.qr-builder { display: grid; grid-template-columns: minmax(0, 1fr) 245px; gap: 24px; align-items: start; }
.qr-output { width: min(100%, 245px); aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 13px; padding: 15px; background: #fff; color: #17242b; }
.qr-output svg { width: 100%; height: 100%; fill: none; stroke: none; stroke-width: 0; shape-rendering: crispEdges; }
.qr-output.empty { align-content: center; gap: 2px; border-style: dashed; background: var(--surface-soft); color: var(--text-faint); }
.qr-output.empty span { font-family: var(--mono); font-size: 28px; font-weight: 700; }
.qr-output.empty small { font-size: 9px; }

.notes-unlock { min-height: 430px; display: grid; place-items: center; }
.unlock-card { width: min(440px, 100%); padding: 28px; text-align: center; }
.unlock-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 17px; margin: 0 auto 15px; background: var(--accent-soft); color: var(--accent); }
.unlock-icon svg { width: 24px; height: 24px; }
.unlock-card h2 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.03em; }
.unlock-card > p { margin: 0 auto 19px; color: var(--text-soft); font-size: 10px; }
.unlock-card form { display: grid; gap: 11px; text-align: left; }
.unlock-card .vault-mode { display: flex; gap: 6px; border-radius: 9px; padding: 3px; background: var(--surface-soft); }
.vault-mode button { flex: 1; border: 0; border-radius: 7px; padding: 7px; background: transparent; color: var(--text-soft); font-size: 9px; font-weight: 700; }
.vault-mode button.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.vault-help { display: flex; align-items: flex-start; gap: 7px; border-radius: 9px; padding: 9px; background: var(--surface-soft); color: var(--text-faint); font-size: 8px; text-align: left; }
.vault-help svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--accent); }
.notes-workspace { height: calc(100vh - 215px); min-height: 480px; display: grid; grid-template-columns: 260px minmax(0, 1fr); padding: 0; overflow: hidden; }
.notes-list-pane { min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--border); background: var(--surface-soft); }
.notes-list-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); padding: 13px; }
.notes-list-head strong { font-size: 11px; }
.notes-list { overflow: auto; padding: 7px; }
.note-list-item { width: 100%; display: grid; gap: 3px; border: 1px solid transparent; border-radius: 9px; padding: 10px; background: transparent; color: var(--text); text-align: left; }
.note-list-item:hover { background: var(--surface-strong); }
.note-list-item.is-active { border-color: var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.note-list-item strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.note-list-item span { overflow: hidden; color: var(--text-faint); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.note-list-item time { color: var(--text-faint); font-family: var(--mono); font-size: 7px; }
.note-editor { min-width: 0; display: grid; grid-template-rows: auto 1fr auto; }
.note-editor-head { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); padding: 10px 13px; }
.note-title-input { height: 38px; flex: 1; border: 0; border-radius: 0; padding: 0; background: transparent; font-size: 15px; font-weight: 700; letter-spacing: -.02em; box-shadow: none !important; }
.note-body-input { min-height: 0; resize: none; border: 0; border-radius: 0; padding: 18px; background: var(--surface); font-family: var(--mono); font-size: 11px; line-height: 1.7; box-shadow: none !important; }
.note-editor-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding: 8px 13px; color: var(--text-faint); font-size: 8px; }
.save-state { display: flex; align-items: center; gap: 5px; }
.save-state svg { width: 12px; height: 12px; color: var(--ok); }

.feed-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 15px; align-items: start; }
.feed-sources { position: sticky; top: calc(var(--topbar-height) + 18px); }
.stack-form { display: grid; gap: 9px; border-bottom: 1px solid var(--border); margin: 0 -3px 12px; padding: 0 3px 14px; }
.source-list { display: grid; gap: 3px; }
.source-item { display: grid; grid-template-columns: 29px minmax(0, 1fr) auto; align-items: center; gap: 8px; border-radius: 8px; padding: 7px; color: var(--text); }
.source-item:hover { background: var(--surface-soft); }
.source-item > span:nth-child(2) { min-width: 0; display: grid; }
.source-item strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.source-item small { overflow: hidden; color: var(--text-faint); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.source-item button { width: 25px; height: 25px; visibility: hidden; border: 0; border-radius: 6px; display: grid; place-items: center; background: transparent; color: var(--text-faint); }
.source-item:hover button, .source-item button:focus-visible { visibility: visible; }
.source-item button:hover { background: var(--surface-strong); color: var(--down); }
.source-item button svg { width: 12px; height: 12px; }
.feed-toolbar { min-height: 36px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: var(--text-faint); font-size: 9px; }
.segmented { display: flex; gap: 3px; border: 1px solid var(--border); border-radius: 9px; padding: 3px; background: var(--surface); }
.segmented button { border: 0; border-radius: 6px; padding: 5px 10px; background: transparent; color: var(--text-soft); font-size: 9px; font-weight: 650; }
.segmented button.is-active { background: var(--accent-soft); color: var(--accent-ink); }
.feed-list { display: grid; gap: 9px; }
.feed-item { display: grid; grid-template-columns: 39px minmax(0, 1fr) auto; gap: 12px; padding: 15px; }
.feed-item-content { min-width: 0; }
.feed-item h2 { margin: 0 0 5px; font-size: 13px; line-height: 1.35; letter-spacing: -.015em; }
.feed-item h2 a { text-decoration: none; }
.feed-item h2 a:hover { color: var(--accent); }
.feed-item p { display: -webkit-box; overflow: hidden; margin: 0 0 7px; color: var(--text-soft); font-size: 10px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--text-faint); font-size: 8px; }
.feed-meta span + span::before { content: "·"; margin-right: 8px; }
.external-button { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; color: var(--text-faint); text-decoration: none; }
.external-button:hover { color: var(--accent); border-color: var(--accent); }
.external-button svg { width: 13px; height: 13px; }

.links-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.link-builder-card form { display: grid; gap: 13px; }
.slug-input { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--surface); }
.slug-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.slug-input > span { height: 38px; display: grid; place-items: center; border-right: 1px solid var(--border); padding: 0 10px; background: var(--surface-soft); color: var(--text-faint); font-family: var(--mono); font-size: 10px; }
.slug-input input { border: 0; border-radius: 0; box-shadow: none !important; }
.short-result { display: grid; gap: 8px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: 11px; margin-top: 14px; padding: 12px; background: var(--accent-soft); }
.short-result > span { color: var(--accent-ink); font-size: 9px; font-weight: 700; }
.short-result-row { display: flex; align-items: center; gap: 8px; }
.short-result-row a { flex: 1; overflow-wrap: anywhere; color: var(--accent-ink); font-family: var(--mono); font-size: 11px; font-weight: 700; }
.qr-side-card { display: flex; flex-direction: column; }
.qr-side-card .qr-output { width: min(100%, 220px); margin: 3px auto 13px; }
.links-list { overflow-x: auto; }
.link-row { min-width: 660px; display: grid; grid-template-columns: 140px minmax(240px, 1fr) 75px 100px 72px; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--border); padding: 9px 18px; }
.link-row:last-child { border-bottom: 0; }
.link-row.header { min-height: 37px; background: var(--surface-soft); color: var(--text-faint); font-size: 8px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.short-code { color: var(--accent); font-family: var(--mono); font-size: 10px; font-weight: 700; text-decoration: none; }
.target-link { overflow: hidden; color: var(--text-soft); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.link-stat, .link-date { color: var(--text-faint); font-family: var(--mono); font-size: 8px; }
.link-actions { display: flex; gap: 3px; }

.reference-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 15px; align-items: start; }
.reference-sidebar { position: sticky; top: calc(var(--topbar-height) + 18px); padding: 11px; }
.reference-search { position: relative; display: block; }
.reference-search svg { position: absolute; z-index: 1; top: 12px; left: 11px; width: 15px; height: 15px; color: var(--text-faint); }
.reference-search input { padding-left: 34px; background: var(--surface-soft); }
.reference-list { display: grid; gap: 3px; margin-top: 9px; }
.reference-item { width: 100%; display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 9px; border: 1px solid transparent; border-radius: 9px; padding: 7px; background: transparent; color: var(--text); text-align: left; }
.reference-item:hover { background: var(--surface-soft); }
.reference-item.is-active { border-color: var(--border); background: var(--accent-soft); }
.reference-item > span:last-child { min-width: 0; display: grid; }
.reference-item strong { font-size: 9px; }
.reference-item small { overflow: hidden; color: var(--text-faint); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.reference-article { min-height: 560px; padding: clamp(22px, 4vw, 44px); }
.article-head { border-bottom: 1px solid var(--border); margin-bottom: 24px; padding-bottom: 20px; }
.article-head h2 { margin: 4px 0 7px; font-size: 25px; letter-spacing: -.045em; }
.article-head p { margin: 0; color: var(--text-soft); font-size: 11px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.article-tags span { border-radius: 999px; padding: 3px 7px; background: var(--surface-soft); color: var(--text-faint); font-family: var(--mono); font-size: 7px; }
.markdown { color: var(--text-soft); font-size: 11px; line-height: 1.7; }
.markdown h1 { display: none; }
.markdown h2 { margin: 28px 0 9px; color: var(--text); font-size: 16px; letter-spacing: -.025em; }
.markdown h3 { margin: 22px 0 7px; color: var(--text); font-size: 13px; }
.markdown p { margin: 0 0 12px; }
.markdown ul, .markdown ol { margin: 0 0 13px; padding-left: 20px; }
.markdown li { margin: 4px 0; }
.markdown a { color: var(--accent); }
.markdown code { border: 1px solid var(--border); border-radius: 4px; padding: 1px 4px; background: var(--surface-soft); color: var(--text); font-family: var(--mono); font-size: .92em; }
.markdown pre { position: relative; overflow: auto; border: 1px solid var(--border); border-radius: 10px; margin: 10px 0 16px; padding: 13px 14px; background: #0d171d; color: #dce8ec; }
.markdown pre code { border: 0; padding: 0; background: transparent; color: inherit; font-size: 10px; line-height: 1.65; }
.markdown blockquote { border-left: 3px solid var(--accent); margin: 12px 0; padding: 8px 12px; background: var(--accent-soft); color: var(--accent-ink); }
.markdown table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: 10px; }
.markdown th, .markdown td { border-bottom: 1px solid var(--border); padding: 7px; text-align: left; }
.markdown th { color: var(--text); background: var(--surface-soft); }

.empty-state { min-height: 220px; display: grid; align-content: center; justify-items: center; gap: 8px; color: var(--text-faint); text-align: center; }
.empty-state.compact { min-height: 130px; }
.empty-state p { max-width: 320px; margin: 0; font-size: 10px; }
.empty-state strong { color: var(--text); font-size: 13px; }
.empty-state .button { margin-top: 5px; }
.spinner { width: 19px; height: 19px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

dialog { color: var(--text); }
dialog::backdrop { background: rgba(5, 12, 16, .6); backdrop-filter: blur(5px); }
.modal, .command-dialog { border: 0; padding: 0; background: transparent; }
.modal-card { position: relative; width: min(420px, calc(100vw - 30px)); display: grid; gap: 13px; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 27px; background: var(--surface); box-shadow: var(--shadow-md); }
.modal-close { position: absolute; top: 13px; right: 13px; width: 32px; height: 32px; }
.modal-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--accent-soft); color: var(--accent); }
.modal-icon svg { width: 22px; height: 22px; }
.modal-heading { margin-bottom: 3px; }
.modal-heading h2 { margin: 0 0 5px; font-size: 20px; letter-spacing: -.035em; }
.modal-heading p { margin: 0; color: var(--text-soft); font-size: 10px; }
.form-error { min-height: 15px; margin: -3px 0; color: var(--down); font-size: 9px; }
.modal-footnote { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 0; color: var(--text-faint); font-size: 8px; }
.modal-footnote svg { width: 11px; height: 11px; }
.command-dialog { margin-top: max(8vh, 40px); }
.command-card { width: min(580px, calc(100vw - 24px)); overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-md); }
.command-input { height: 58px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); padding: 0 15px; }
.command-input svg { width: 19px; height: 19px; color: var(--text-faint); }
.command-input input { flex: 1; border: 0; border-radius: 0; padding: 0; background: transparent; font-size: 13px; box-shadow: none !important; }
.command-results { max-height: 370px; overflow: auto; padding: 8px; }
.command-group-label { padding: 7px 9px 4px; color: var(--text-faint); font-size: 8px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.command-result { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 9px; padding: 9px; background: transparent; color: var(--text); text-align: left; }
.command-result:hover, .command-result.is-selected { background: var(--accent-soft); }
.command-result > span:first-child { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-soft); color: var(--accent); font-family: var(--mono); font-size: 9px; font-weight: 700; }
.command-result > span:nth-child(2) { display: grid; }
.command-result strong { font-size: 10px; }
.command-result small { color: var(--text-faint); font-size: 8px; }
.command-footer { display: flex; justify-content: flex-end; gap: 14px; border-top: 1px solid var(--border); padding: 8px 12px; background: var(--surface-soft); color: var(--text-faint); font-size: 8px; }
.command-footer span { display: flex; align-items: center; gap: 3px; }

.toast-region { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 240px; max-width: min(360px, calc(100vw - 36px)); display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 9px; border: 1px solid var(--border); border-radius: 11px; padding: 11px 13px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-md); animation: toast-in .22s ease both; pointer-events: auto; }
.toast[data-leaving] { opacity: 0; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease; }
.toast svg { width: 16px; height: 16px; color: var(--ok); }
.toast.error svg { color: var(--down); }
.toast strong { display: block; font-size: 10px; }
.toast span { display: block; margin-top: 2px; color: var(--text-soft); font-size: 8px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.noscript { position: fixed; z-index: 200; inset: auto 20px 20px; border-radius: 10px; padding: 12px; background: #fff0ca; color: #503c0a; font-size: 12px; text-align: center; }

@media (max-width: 1040px) {
  :root { --sidebar-width: 78px; }
  .sidebar { padding-inline: 11px; }
  .brand { justify-content: center; margin-inline: 0; }
  .brand-copy, .nav-item span:not(.nav-indicator), .sidebar-footer { display: none; }
  .nav-item { justify-content: center; padding-inline: 0; }
  .nav-item.is-active { box-shadow: inset 0 -3px 0 #9fe2c5; }
  .nav-indicator { position: absolute; top: 8px; right: 9px; width: 6px; height: 6px; }
  .quick-tools { grid-template-columns: repeat(3, 1fr); }
  .links-grid { grid-template-columns: minmax(0, 1fr) 260px; }
}

@media (max-width: 820px) {
  :root { --sidebar-width: 252px; }
  .app-shell { display: block; }
  .workspace { grid-column: auto; }
  .sidebar { width: var(--sidebar-width); transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow-md); }
  .app-shell[data-sidebar="open"] .sidebar { transform: none; }
  .sidebar-scrim { position: fixed; z-index: 25; inset: 0; width: auto; height: auto; border: 0; background: rgba(5, 12, 16, .55); }
  .app-shell[data-sidebar="open"] .sidebar-scrim { display: block; }
  .brand { justify-content: flex-start; margin-inline: 8px; }
  .brand-copy, .nav-item span:not(.nav-indicator), .sidebar-footer { display: initial; }
  .nav-item { justify-content: flex-start; padding-inline: 11px; }
  .nav-item.is-active { box-shadow: inset 3px 0 0 #9fe2c5; }
  .nav-indicator { position: static; width: 7px; height: 7px; }
  .sidebar-footer { display: grid; }
  .mobile-menu { display: inline-grid; }
  .topbar { padding-inline: 16px; }
  .content { padding-inline: 16px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-wide { grid-column: auto; }
  .status-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-layout { grid-template-columns: 1fr; }
  .tool-tabs { position: static; display: flex; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .tool-tabs::-webkit-scrollbar { display: none; }
  .tool-tabs button { width: auto; min-width: max-content; grid-template-columns: 29px auto; }
  .tool-tabs small { display: none; }
  .feed-layout { grid-template-columns: 1fr; }
  .feed-sources { position: static; }
  .links-grid { grid-template-columns: minmax(0, 1fr) 250px; }
  .reference-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .reference-sidebar { position: static; }
  .notes-workspace { height: auto; min-height: 560px; }
}

@media (max-width: 640px) {
  .topbar { gap: 9px; }
  .global-search { width: auto; flex: 1; }
  .global-search > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .global-search kbd { display: none; }
  .session-button { width: 38px; padding: 0; justify-content: center; }
  .session-button span { display: none; }
  .session-button svg { display: block; }
  .content { padding-top: 25px; padding-bottom: 40px; }
  .page-heading, .action-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 20px; }
  .current-date { display: none; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .quick-tools { grid-template-columns: repeat(2, 1fr); }
  .status-summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-card { min-height: 90px; padding: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .legend { display: none; }
  .tool-workspace { min-height: 420px; padding: 16px; }
  .dual-editor { grid-template-columns: 1fr; }
  .dual-editor textarea { min-height: 180px; }
  .tool-message { width: 100%; margin-left: 0; }
  .password-options { grid-template-columns: 1fr 1fr; align-items: center; }
  .password-options > label:first-child { grid-column: 1 / -1; }
  .qr-builder { grid-template-columns: 1fr; }
  .qr-output { width: min(100%, 230px); margin-inline: auto; }
  .notes-workspace { grid-template-columns: 1fr; }
  .notes-list-pane { max-height: 180px; border-right: 0; border-bottom: 1px solid var(--border); }
  .notes-list { display: flex; overflow-x: auto; }
  .note-list-item { width: 160px; flex: 0 0 auto; }
  .note-editor { min-height: 390px; }
  .feed-item { grid-template-columns: 35px minmax(0, 1fr); }
  .feed-item .external-button { display: none; }
  .links-grid { grid-template-columns: 1fr; }
  .reference-layout { grid-template-columns: 1fr; }
  .reference-sidebar { padding: 9px; }
  .reference-list { display: flex; overflow-x: auto; }
  .reference-item { width: 160px; flex: 0 0 auto; }
  .reference-article { min-height: 440px; padding: 22px 17px; }
  .toast-region { right: 10px; bottom: 10px; }
}

@media (max-width: 390px) {
  .topbar { padding-inline: 11px; }
  .content { padding-inline: 11px; }
  .mobile-menu, #theme-toggle, .session-button { width: 36px; height: 36px; }
  .page-heading h1 { font-size: 25px; }
  .card { padding: 15px; }
  .quick-tools { grid-template-columns: 1fr; }
  .status-summary-grid { grid-template-columns: 1fr; }
  .timestamp-now { grid-template-columns: 1fr auto; }
  .timestamp-now > span { grid-column: 1 / -1; }
  .input-action { grid-template-columns: 1fr; }
  .password-options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
