/*
 * Pingvella theme — plain CSS layered on top of Bootstrap 5.3.
 * Brand: ink #101F2A, mint #60E6BC, mint text #087958, paper #F4F7F6, danger #B93E4B, amber #916000.
 * No preprocessor and no build step: edit this file directly.
 */
@import url('https://fonts.bunny.net/css?family=dm-sans:400,500,600,700|space-grotesk:400,500,600,700');

:root {
    /* Brand colours that do not change with the theme: --ink is the dark surface (sidebar, hero card, table header). */
    --ink: #101f2a;
    --mint: #60e6bc;

    /* Theme tokens: light values here, dark values in [data-bs-theme="dark"] below. */
    --text: #101f2a;
    --text-rgb: 16, 31, 42;
    --muted: #667782;
    --paper: #f4f7f6;          /* page background */
    --surface: #fff;           /* panels, top bar, footer */
    --line: #dde6e2;
    --line-strong: #cbd8d2;    /* form control borders */
    --mint-dark: #087958;      /* accent used for text and links */
    --accent-rgb: 8, 121, 88;
    --danger: #b93e4b;
    --amber: #916000;
    --mint-tint: #e1f7ed;
    --header-bg: rgba(244, 247, 246, .94);
    --avatar-bg: #e0eee7;
    --cta-bg: #dff7ed;
    --stripe: #f6f9f8;
    --row-hover: #eaf3ef;
    --thead-bg: var(--ink);
    --bar-empty: #e8eeeb;
    --check-bg: var(--ink);    /* checked checkbox, active page */
    --on-check: #fff;
    --code-bg: var(--ink);
    --tip-bg: var(--ink);
    --chart-line: #1a9c76;
    --danger-tint: #fff4f5;
    --danger-line: #f0c4ca;
    --warn-tint: #fff8e6;
    --warn-line: #f0d9a0;
    --pill-up-fg: #087958;    --pill-up-bg: #e1f7ed;
    --pill-grace-fg: #916000; --pill-grace-bg: #fff1ce;
    --pill-down-fg: #b93e4b;  --pill-down-bg: #ffe8ec;
    --pill-idle-fg: #697782;  --pill-idle-bg: #edf1f3;

    --bs-body-font-family: 'DM Sans', system-ui, sans-serif;
    --bs-body-color: var(--text);
    --bs-body-bg: var(--paper);
    --bs-body-line-height: 1.6;
    --bs-link-color: var(--text);
    --bs-link-color-rgb: var(--text-rgb);
    --bs-link-hover-color: var(--mint-dark);
    --bs-link-hover-color-rgb: var(--accent-rgb);
    --bs-link-decoration: none;
    --bs-border-color: var(--line);
}

/*
 * Dark theme, taken from the hero card: ink panels on a deeper navy page, mint accents.
 * Set by public/js/pingvella.js (and an inline script in <head>) via data-bs-theme on <html>;
 * Bootstrap's own dark mode handles its components, these tokens handle ours.
 */
[data-bs-theme="dark"] {
    --text: #edf5f1;
    --text-rgb: 237, 245, 241;
    --muted: #93a8b1;
    --paper: #09131a;
    --surface: #101f2a;
    --line: #22343f;
    --line-strong: #30444f;
    --mint-dark: #60e6bc;
    --accent-rgb: 96, 230, 188;
    --danger: #f08a95;
    --amber: #f5c267;
    --mint-tint: #60e6bc1a;
    --header-bg: rgba(9, 19, 26, .92);
    --avatar-bg: #1f3744;
    --cta-bg: #12332c;
    --stripe: #14252f;
    --row-hover: #1a303b;
    --thead-bg: #1b303c;
    --bar-empty: #22343f;
    --check-bg: var(--mint);
    --on-check: var(--ink);
    --code-bg: #080f16;
    --tip-bg: #2a4150;
    --chart-line: #3ccf9f;
    --danger-tint: #2a1b21;
    --danger-line: #5a2f39;
    --warn-tint: #2b2512;
    --warn-line: #5c4a1c;
    --pill-up-fg: #60e6bc;    --pill-up-bg: #60e6bc1f;
    --pill-grace-fg: #f5c267; --pill-grace-bg: #f5c26721;
    --pill-down-fg: #f08a95;  --pill-down-bg: #f08a9524;
    --pill-idle-fg: #a9bcc4;  --pill-idle-bg: #ffffff12;

    --bs-body-bg: var(--paper);
    --bs-body-color: var(--text);
    --bs-emphasis-color: var(--text);
    --bs-secondary-color: var(--muted);
    --bs-border-color: var(--line);
}

h1, h2, h3, h4, .display { font-family: 'Space Grotesk', system-ui, sans-serif; line-height: 1.12; letter-spacing: -.04em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 5rem); font-weight: 600; }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h3 { font-size: 1.25rem; }
a { text-decoration: none; }
.mono, code, pre { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--mint-dark); outline-offset: 3px; }

/* Buttons */
.btn { border-radius: 9px; padding: 11px 19px; font-weight: 700; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-primary { --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-color: #fff; --bs-btn-hover-bg: #244251; --bs-btn-hover-border-color: #244251; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #244251; --bs-btn-active-border-color: #244251; --bs-btn-focus-shadow-rgb: 16, 31, 42; }
.btn-mint { --bs-btn-bg: var(--mint); --bs-btn-border-color: var(--mint); --bs-btn-color: var(--ink); --bs-btn-hover-bg: #a2f3d8; --bs-btn-hover-border-color: #a2f3d8; --bs-btn-hover-color: var(--ink); --bs-btn-active-bg: #a2f3d8; --bs-btn-active-border-color: #a2f3d8; }
.btn-outline-ink { --bs-btn-color: var(--text); --bs-btn-border-color: var(--line-strong); --bs-btn-hover-bg: var(--ink); --bs-btn-hover-border-color: var(--ink); --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--ink); --bs-btn-active-border-color: var(--ink); --bs-btn-active-color: #fff; }
.btn-outline-danger { --bs-btn-color: var(--danger); --bs-btn-border-color: #e3b5bb; --bs-btn-hover-bg: var(--danger); --bs-btn-hover-border-color: var(--danger); }

/* Forms */
.form-control, .form-select { border-color: var(--line-strong); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.form-select { padding-right: 2.5rem; } /* leave room for the chevron */
.form-select-sm { padding: 6px 2.5rem 6px 12px; font-size: 13px; }
.form-control:focus, .form-select:focus { border-color: var(--mint-dark); box-shadow: 0 0 0 .2rem #60e6bc40; }
.form-label { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-text { font-size: 11px; }
.form-check-input:checked { background-color: var(--check-bg); border-color: var(--check-bg); }

/* Shared building blocks */
.brand { width: 177px; height: auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .15em; font: 700 11px 'DM Sans', sans-serif; color: var(--mint-dark); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 25px; }
.panel p { color: var(--muted); font-size: 14px; }
.feature-icon { background: var(--mint-tint); color: var(--mint-dark); width: 43px; height: 43px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 30px; font-size: 21px; }
.subtle-link { font-size: 12px; color: var(--mint-dark); font-weight: 700; }
.demo-note { font-size: 11px; color: var(--muted); margin: 15px 0; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; }

/* Status pills: .pill.up / .grace / .down / .paused / .new */
.pill { display: inline-flex; align-items: center; gap: 2px; padding: 4px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pill.up { color: var(--pill-up-fg); background: var(--pill-up-bg); }
.pill.grace { color: var(--pill-grace-fg); background: var(--pill-grace-bg); }
.pill.down { color: var(--pill-down-fg); background: var(--pill-down-bg); }
.pill.paused, .pill.new { color: var(--pill-idle-fg); background: var(--pill-idle-bg); }
.terminal .pill.up { color: #60e6bc; background: #60e6bc15; }
.terminal .pill.grace { color: #f5c267; background: #f5c26715; }

/* Marketing site */
html { scroll-padding-top: 90px; } /* anchor links clear the sticky header */
.site-header { position: sticky; top: 0; z-index: 1030; background: var(--header-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 20px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.hero { padding: 65px 0 84px; }
.hero-grid { display: grid; grid-template-columns: 1.03fr 1fr; gap: 64px; align-items: center; }
.hero p { max-width: 480px; font-size: 18px; color: var(--muted); margin: 25px 0; }
.hero h1 span { color: var(--mint-dark); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .note { font-size: 12px; margin-top: 16px; }
.terminal { background: var(--ink); color: #edf5f1; border-radius: 16px; padding: 25px; box-shadow: 0 24px 50px #122c2418; }
.terminal-top { display: flex; justify-content: space-between; font-size: 12px; color: #91a69f; margin-bottom: 26px; }
.terminal h3 { font-size: 21px; margin: 12px 0 24px; }
.signal { background: #ffffff08; border: 1px solid #ffffff15; border-radius: 10px; padding: 17px; margin-bottom: 12px; }
.signal-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.heartbeat { display: flex; gap: 4px; margin: 16px 0 5px; }
.heartbeat i { height: 22px; flex: 1; background: #60e6bc; border-radius: 2px; opacity: .8; }
.heartbeat i.warn { background: #e9b45b; }
.heartbeat i.fail { background: #e4808a; }
.code-strip { background: #080f16; border: 1px solid #30424b; border-radius: 9px; padding: 18px; font-size: 12px; overflow: auto; margin-top: 24px; color: #91d7bf; }
.strip { padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; letter-spacing: .12em; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; color: var(--muted); }
.section { padding: 80px 0; }
.section-head { max-width: 650px; margin-bottom: 38px; }
.section-head p { color: var(--muted); margin-top: 16px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps { counter-reset: steps; }
.steps .panel:before { counter-increment: steps; content: '0' counter(steps); font-family: 'Space Grotesk'; display: block; font-size: 32px; color: var(--mint-dark); margin-bottom: 24px; }
.dark-section { background: var(--ink); color: #fff; }
.dark-section .eyebrow { color: var(--mint); }
.dark-section p, .dark-section .panel p { color: #afc0c7; }
.dark-section .panel { background: #192b37; border-color: #2d434e; }
.dark-section .feature-icon { background: #60e6bc18; color: var(--mint); }
details { border-bottom: 1px solid var(--line); padding: 20px 0; }
summary { font-weight: 700; cursor: pointer; }
details p { color: var(--muted); margin: 12px 0 0; }
.cta { background: var(--cta-bg); border-radius: 16px; padding: 45px; display: flex; align-items: center; justify-content: space-between; gap: 25px; }
/* Footer: sits at the bottom of the content, or of the viewport when the page is short (see body flex column). */
.site-footer { margin-top: auto; padding: 24px 0; border-top: 1px solid var(--line); background: var(--surface); font-size: 12px; color: var(--muted); }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer .brand { width: 120px; }
.app-main .site-footer .container { padding-left: 38px; padding-right: 38px; max-width: none; }

/* Sign-in / register */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-story { background: var(--ink); padding: 55px 10%; color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.auth-story h1 { font-size: clamp(2.8rem, 4vw, 4.2rem); max-width: 530px; margin: 65px 0 20px; }
.auth-story p { color: #b5c8d1; max-width: 390px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 50px 24px; }
.auth-card { width: 100%; max-width: 390px; }
.auth-card h2 { font-size: 32px; }
.auth-card .btn-primary { width: 100%; margin-top: 25px; }

/* App shell */
.app-shell { display: grid; grid-template-columns: 228px 1fr; flex: 1; }
.sidebar { background: var(--ink); color: #bbcbd3; padding: 30px 22px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; align-self: start; overflow-y: auto; }
.sidebar .brand { margin-bottom: 37px; }
.sidebar-backdrop { display: none; }
.sidebar a { color: inherit; }
.workspace { background: #ffffff09; border: 1px solid #ffffff15; border-radius: 9px; padding: 12px; font-size: 12px; margin-bottom: 30px; }
.workspace strong { display: block; color: #f2f7f5; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.side-label { font-size: 10px; letter-spacing: .15em; color: #8098a6; margin: 15px 12px 12px; }
.side-nav { display: flex; flex-direction: column; gap: 5px; }
.side-nav a { padding: 10px 12px; border-radius: 8px; font-size: 14px; display: flex; gap: 12px; align-items: center; }
.side-nav a:hover { color: #fff; background: #ffffff0a; }
.side-nav a.active { background: #60e6bc18; color: var(--mint); }
.side-bottom { margin-top: auto; padding-top: 40px; font-size: 12px; }
.side-bottom .panel { background: #ffffff08; border: 1px solid #ffffff15; padding: 15px; color: #fff; }
.side-bottom .panel p { font-size: 11px; color: #a5bac5; }
.app-main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.app-content { flex: 1 0 auto; }
.topbar { position: sticky; top: 0; z-index: 1020; height: 77px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 38px; font-size: 12px; gap: 16px; }
.avatar { background: var(--avatar-bg); border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; font-weight: 700; border: 0; }
.app-content { padding: 35px 38px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.page-heading h1 { font-size: 31px; margin: 7px 0; }
.page-heading p { font-size: 13px; margin: 0; color: var(--muted); }
.mobile-menu { display: none; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 7px; padding: 7px 10px; }
.topbar-start { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
/* The logo sits in the sidebar on desktop, and in the header once the sidebar becomes an offcanvas panel. */
.topbar-brand { display: none; flex: 0 0 auto; }
.topbar-brand img { width: 130px; height: auto; display: block; }

/* Theme switcher (partials/theme-switcher.blade.php) */
.theme-switcher .btn-theme { background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 9px; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; }
.theme-switcher .btn-theme:hover { border-color: var(--line-strong); background: var(--stripe); }
.theme-switcher .dropdown-item { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.theme-switcher .dropdown-item .bi-check2 { margin-left: auto; visibility: hidden; color: var(--mint-dark); }
.theme-switcher .dropdown-item[aria-current="true"] .bi-check2 { visibility: visible; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.auth-form { position: relative; }
.auth-theme { position: absolute; top: 20px; right: 20px; }

/* Each logo is drawn twice and the theme decides which shows (!important beats per-spot img sizing rules). */
.brand-on-dark { display: none !important; }
[data-bs-theme="dark"] .brand-on-light { display: none !important; }
[data-bs-theme="dark"] .brand-on-dark { display: inline-block !important; }

/* Dashboard */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 25px; }
.stat { padding: 20px; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-family: 'Space Grotesk'; font-size: 31px; line-height: 1.5; }
.stat-note { font-size: 11px; color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 22px; }
.table-panel { padding: 0; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 16px; }
.table-body { padding: 8px 24px 16px; overflow-x: auto; }
.checks-table { font-size: 12px; margin: 0; }
/* Dark header. The extra classes outrank DataTables' Bootstrap rule that paints cells with --bs-table-bg. */
table.checks-table.table > thead > tr > th,
table.checks-table.dataTable.table > thead > tr > th {
    --bs-table-bg: var(--thead-bg);
    --bs-table-color: #fff;
    background-color: var(--thead-bg);
    box-shadow: none;
    color: #fff;
    font-weight: 500;
    border-bottom-color: var(--thead-bg);
}
/* Ping log: DataTables right-aligns the When column because its sort keys are numeric; keep it left-aligned. */
table#ping-log > thead > tr > th:first-child,
table#ping-log > tbody > tr > td:first-child { text-align: left; }
table#ping-log > thead > tr > th:first-child > div.dt-column-header { flex-direction: row; justify-content: flex-start; }
.checks-table.table-striped { --bs-table-striped-bg: var(--stripe); }
.checks-table td { vertical-align: middle; padding: 16px 12px; }
.checks-table tr.js-ping-row { cursor: pointer; }
.checks-table tr.js-ping-row:hover > td { --bs-table-bg-state: var(--row-hover); }
.checks-table tr.js-ping-row:focus-visible { outline: 2px solid var(--mint-dark); outline-offset: -2px; }
.check-name { display: block; font-size: 13px; font-weight: 700; }
.check-tag { font-size: 10px; color: var(--muted); }
.mini-bars { display: inline-flex; gap: 3px; min-width: 72px; }
.mini-bars i { height: 19px; width: 5px; border-radius: 2px; background: #86d8bb; }
.mini-bars .late { background: #f0c35c; }
.mini-bars .fail { background: #e89ca5; }
.mini-bars .missed { background: var(--surface); box-shadow: inset 0 0 0 1.5px #e89ca5; }
.mini-bars .none { background: var(--bar-empty); }
.incident { border-left: 3px solid #e18b97; background: var(--danger-tint); padding: 15px; border-radius: 0 8px 8px 0; font-size: 12px; margin-top: 22px; }
.incident strong { display: block; margin-bottom: 6px; }
.timeline { list-style: none; padding: 0; margin: 20px 0 0; }
.timeline li { position: relative; border-left: 1px solid var(--line); padding: 0 0 24px 19px; font-size: 12px; }
.timeline li:before { content: ''; position: absolute; left: -4px; top: 7px; border-radius: 50%; width: 7px; height: 7px; background: #4dba96; }
.timeline li.fail:before { background: #e18b97; }
.timeline li small { display: block; color: var(--muted); margin-top: 5px; }
.aside-panel { margin-bottom: 20px; }
.aside-panel h3 { font-size: 16px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* DataTables, themed */
div.dt-container .dt-search input, div.dt-container .dt-length select { border-color: var(--line-strong); border-radius: 8px; font-size: 13px; }
div.dt-container .dt-info { font-size: 11px; color: var(--muted); }
div.dt-container .page-link { color: var(--text); font-size: 12px; }
div.dt-container .page-item.active .page-link { background: var(--check-bg); border-color: var(--check-bg); color: var(--on-check); }
table.dataTable > thead > tr > th, table.dataTable > thead > tr > td { border-bottom-color: var(--line); }

/* Check detail */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
.kv { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 13px 0; font-size: 13px; }
.kv strong { text-align: right; overflow-wrap: anywhere; }
.copy-box { background: var(--code-bg); color: #d6f5e8; padding: 17px; border-radius: 9px; margin: 18px 0; overflow-wrap: anywhere; word-break: break-all; font-size: 12px; }
.panel-status { transition: background-color .3s, border-color .3s; }
.panel-status.grace { background: var(--warn-tint); border-color: var(--warn-line); }
.panel-status.down { background: var(--danger-tint); border-color: var(--danger-line); }
.history-chart { height: 160px; display: flex; align-items: flex-end; gap: 7px; margin: 26px 0 8px; }
.history-chart i { flex: 1; background: #88dbbe; border-radius: 4px 4px 0 0; min-height: 15px; }
.history-chart i.late { background: #f0c35c; }
.history-chart i.fail { background: #e89ca5; }
.history-chart i.missed { background: var(--surface); box-shadow: inset 0 0 0 1.5px #e89ca5; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 14px; font-size: 11px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; background: #88dbbe; }
.chart-legend i.late { background: #f0c35c; }
.chart-legend i.fail { background: #e89ca5; }
.chart-legend i.missed { background: var(--surface); box-shadow: inset 0 0 0 1.5px #e89ca5; }
/* Uptime chart (drawn by public/js/uptime-chart.js) */
.uptime-summary { display: flex; flex-wrap: wrap; gap: 8px 40px; margin: 14px 0 6px; }
.uptime-figure { font: 700 28px 'Space Grotesk', system-ui, sans-serif; letter-spacing: -.04em; line-height: 1.2; }
.uptime-caption { font-size: 12px; color: var(--muted); }
.uptime-chart { margin-top: 10px; outline-offset: 2px; }
.uptime-chart svg { display: block; overflow: visible; }
.uptime-chart .grid { stroke: var(--line); stroke-width: 1; }
.uptime-chart .tick { fill: var(--muted); font-size: 11px; font-family: 'DM Sans', system-ui, sans-serif; }
.uptime-chart .line { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.uptime-chart .area { fill: var(--chart-line); fill-opacity: .1; stroke: none; }
.uptime-chart .line-dot { fill: var(--chart-line); }
.uptime-chart .down-dot { fill: var(--danger); stroke: var(--surface); stroke-width: 2; }
.uptime-chart .cross { stroke: var(--muted); stroke-width: 1; }
.uptime-chart .focus-dot { fill: var(--surface); stroke: var(--chart-line); stroke-width: 2; }
.uptime-tip { position: absolute; z-index: 2; pointer-events: none; background: var(--tip-bg); color: #fff; border-radius: 8px; padding: 8px 11px; font-size: 11px; line-height: 1.4; white-space: nowrap; display: flex; flex-direction: column; }
.uptime-tip[hidden] { display: none; }
.uptime-tip strong { font-size: 15px; }
.uptime-tip span { color: #c5d2cc; }
.chart-axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }

/* Integrations */
.integration-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.integration-card .feature-icon { margin-bottom: 22px; }
.integration-card h3 { margin-bottom: 10px; }
.channel-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.channel-row:last-child { border: 0; }

/* Modals + toasts */
.modal-content { border: 1px solid var(--line); border-radius: 15px; }
.modal-body, .modal-header, .modal-footer { padding-left: 30px; padding-right: 30px; }
.modal-backdrop { --bs-backdrop-bg: #0f202a; --bs-backdrop-opacity: .7; }
.toast-container { z-index: 2000; }
.toast { background: var(--ink); color: #fff; border: 0; border-radius: 10px; }

/* Dark theme: components that need more than a token swap */
[data-bs-theme="dark"] .btn-primary { --bs-btn-bg: var(--mint); --bs-btn-border-color: var(--mint); --bs-btn-color: var(--ink); --bs-btn-hover-bg: #a2f3d8; --bs-btn-hover-border-color: #a2f3d8; --bs-btn-hover-color: var(--ink); --bs-btn-active-bg: #a2f3d8; --bs-btn-active-border-color: #a2f3d8; --bs-btn-active-color: var(--ink); --bs-btn-focus-shadow-rgb: 96, 230, 188; }
[data-bs-theme="dark"] .btn-outline-ink { --bs-btn-hover-bg: #22343f; --bs-btn-hover-border-color: #3a525f; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #22343f; --bs-btn-active-border-color: #3a525f; }
[data-bs-theme="dark"] .btn-outline-danger { --bs-btn-border-color: #6b3540; --bs-btn-hover-color: var(--ink); }
[data-bs-theme="dark"] .form-control:focus, [data-bs-theme="dark"] .form-select:focus { box-shadow: 0 0 0 .2rem #60e6bc33; }
[data-bs-theme="dark"] .modal-content { --bs-modal-bg: var(--surface); }
[data-bs-theme="dark"] .dropdown-menu { --bs-dropdown-bg: var(--surface); --bs-dropdown-border-color: var(--line); --bs-dropdown-link-hover-bg: var(--stripe); }
[data-bs-theme="dark"] .checks-table { --bs-table-bg: transparent; }
[data-bs-theme="dark"] .terminal { border: 1px solid var(--line); box-shadow: none; }
[data-bs-theme="dark"] .sidebar, [data-bs-theme="dark"] .auth-story { border-right: 1px solid var(--line); }
[data-bs-theme="dark"] .copy-box { border: 1px solid var(--line); }
[data-bs-theme="dark"] .uptime-tip { border: 1px solid #3a525f; }
[data-bs-theme="dark"] .toast { border: 1px solid var(--line); }
[data-bs-theme="dark"] .dark-section { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Cookie notice */
.cookie-banner { position: fixed; left: 16px; bottom: 16px; z-index: 1040; width: min(460px, calc(100vw - 32px)); display: flex; align-items: center; gap: 16px; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 13px; padding: 16px 18px; box-shadow: 0 12px 34px #101f2a26; }
.cookie-banner[hidden] { display: none; }
.cookie-banner-text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.cookie-banner-text strong { color: var(--text); }
.cookie-banner-text a { color: var(--mint-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 600px) { .cookie-banner { flex-direction: column; align-items: stretch; left: 12px; right: 12px; bottom: 12px; width: auto; } }

/* Legal pages (cookies) */
.legal { max-width: 820px; padding-top: 56px; padding-bottom: 72px; }
.legal h1 { font-size: clamp(2rem, 4vw, 3rem); }
.legal p { color: var(--muted); }
.legal-table { font-size: 14px; }
.legal-table th { font-weight: 600; }
.legal-table code { font-size: 12px; }

.footer-note { margin-top: 28px; font-size: 11px; color: var(--muted); }

@media (max-width: 1150px) {
    .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
    .dashboard-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    .hero-grid { gap: 30px; }
    .integration-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero { padding-top: 40px; }
    .terminal { max-width: 650px; }
    .cards { grid-template-columns: 1fr; }
    .app-shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar { display: none; position: fixed; inset: 65px auto 0 0; height: auto; width: min(250px, 85vw); z-index: 1000; overflow: auto; }
    .sidebar.is-open { display: flex; }
    /* Dims the page behind the open panel; tapping it closes the panel (see pingvella.js). */
    .sidebar.is-open + .sidebar-backdrop { display: block; position: fixed; inset: 65px 0 0 0; z-index: 999; background: #0f1d2659; }
    .topbar { padding: 0 24px; height: 65px; }
    .mobile-menu { display: block; }
    .topbar-brand { display: block; }
    .sidebar-brand { display: none; }
    .app-content { padding: 28px 24px; }
    .detail-grid { grid-template-columns: minmax(0, 1fr); }
    .nav-links { gap: 16px; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-story { padding: 30px 24px; }
    .auth-story h1 { margin: 40px 0 20px; font-size: 38px; }
    .auth-story .story-footer { display: none; }
    .cta { flex-direction: column; align-items: flex-start; }
    .section { padding: 55px 0; }
}
@media (max-width: 600px) {
    .site-nav { flex-wrap: wrap; }
    .nav-links { display: none; flex-direction: column; align-items: stretch; width: 100%; padding: 15px 0; }
    .nav-links.is-open { display: flex; }
    .nav-toggle { display: block; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat { padding: 15px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .dashboard-aside { grid-template-columns: 1fr; }
    .integration-grid { grid-template-columns: 1fr; }
    .site-footer .container { gap: 12px; flex-wrap: wrap; }
    .app-main .site-footer .container { padding-left: 16px; padding-right: 16px; }
    .topbar .breadcrumb-project { display: none; }
    /* Menu button moves to the right, beside the account avatar. */
    .topbar { gap: 10px; }
    .topbar .mobile-menu { order: 1; }
    .topbar .topbar-actions { order: 2; }
    .hero h1 { font-size: 44px; }
    .hero p { font-size: 16px; }
    .terminal { padding: 19px; }
    .signal-line { font-size: 11px; }
    .strip { font-size: 10px; }
    .app-content { padding: 25px 16px; }
    .panel { padding: 20px; }
    .table-panel { padding: 0; }
    .cta { padding: 28px; }
    .history-chart { gap: 4px; }
    /* Tables become stacked cards: one block per row, each cell labelled from its column header (set in pingvella.js). */
    .table-body { padding: 8px 16px 16px; }
    .checks-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .checks-table, .checks-table tbody, .checks-table tr, .checks-table td { display: block; width: 100%; }
    .checks-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
    .checks-table td { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; align-items: center; justify-items: end; padding: 6px 8px; border: 0; text-align: right; max-width: none !important; white-space: normal; overflow-wrap: anywhere; }
    .checks-table td::before { content: attr(data-label); grid-row: span 20; justify-self: start; color: var(--muted); font-family: var(--bs-body-font-family); font-weight: 500; text-align: left; }
    .checks-table td.dt-empty { display: block; text-align: center; }
    .checks-table td.dt-empty::before { content: none; }
}
@media (min-width: 601px) { .nav-toggle { display: none; } }
