@font-face {
    font-family: 'RazerF5';
    src: url('/assets/fonts/razerf5/dehinted-RazerF5-Thin.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'RazerF5';
    src: url('/assets/fonts/razerf5/dehinted-RazerF5-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'RazerF5';
    src: url('/assets/fonts/razerf5/dehinted-RazerF5-Semibold.ttf') format('truetype');
    font-weight: 600 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'RazerF5';
    src: url('/assets/fonts/razerf5/dehinted-RazerF5-Bold.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'RazerF5';
    src: url('/assets/fonts/razerf5/dehinted-RazerF5-Regitalic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'RazerF5';
    src: url('/assets/fonts/razerf5/dehinted-RazerF5-Bolditalic.ttf') format('truetype');
    font-weight: 600 900;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Strogo';
    src: url('/assets/fonts/strogo/Strogo-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #eef2f7;
    --panel: #f7f9fc;
    --panel-2: #e7ecf4;
    --ink: #494949;
    --muted: #667085;
    --soft: #d8e0ec;
    --accent: #2563eb;
    --accent-2: #7c3aed;
    --accent-3: #06b6d4;
    --danger: #dc2626;
    --warn: #d97706;
    --ok: #0891b2;
    --cut: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
    --font: 'RazerF5', 'Trebuchet MS', 'Segoe UI', Roboto, sans-serif;
    --display-font: 'Strogo', 'RazerF5', 'Trebuchet MS', 'Segoe UI', Roboto, sans-serif;
}

:root[data-theme="dark"] {
    --bg: #2b2c2e;
    --panel: #2a2b2e;
    --panel-2: #34363a;
    --ink: #f0f2f4;
    --muted: #c4c8cd;
    --soft: #474a50;
    --accent: #e5e7eb;
    --accent-2: #c7cbd1;
    --accent-3: #aeb4bb;
    --danger: #f2a7a7;
    --warn: #e0c08a;
    --ok: #b7d4c7;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    background: var(--bg);
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(115deg, rgba(37, 99, 235, .10), transparent 32%),
        linear-gradient(245deg, rgba(124, 58, 237, .10), transparent 34%),
        radial-gradient(circle at 76% 18%, rgba(6, 182, 212, .16), transparent 28%),
        var(--bg);
    color: var(--ink);
    font-family: var(--font);
    line-height: 1.5;
    letter-spacing: 0;
}

:root[data-theme="dark"] body {
    background:
        linear-gradient(115deg, rgba(255, 255, 255, .035), transparent 34%),
        linear-gradient(245deg, rgba(255, 255, 255, .025), transparent 36%),
        var(--bg);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(17, 24, 39, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 24, 39, .045) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 78%);
}

:root[data-theme="dark"] body::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), transparent 78%);
}

a {
    color: inherit;
}

.topbar {
    position: relative;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 24px clamp(18px, 5vw, 72px);
    background: rgba(238, 242, 247, .86);
    backdrop-filter: blur(14px);
}

:root[data-theme="dark"] .topbar {
    background: rgba(32, 33, 36, .94);
}

.brand {
    position: relative;
    color: var(--ink);
    font-family: var(--display-font);
    font-size: 24px;
    font-weight: 400;
    text-decoration: none;
    text-transform: uppercase;
}

/*.brand::after {*/
/*    content: "";*/
/*    position: absolute;*/
/*    left: 0;*/
/*    right: -18px;*/
/*    bottom: -7px;*/
/*    height: 3px;*/
/*    background: linear-gradient(90deg, var(--accent), var(--accent-3), transparent);*/
/*}*/

.nav {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
}

.nav a {
    padding: 10px 14px;
    color: var(--ink);
    text-decoration: none;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.nav a:hover {
    background: rgba(37, 99, 235, .10);
    color: var(--accent);
}

:root[data-theme="dark"] .nav a:hover {
    background: rgba(255, 255, 255, .08);
}

.profile-menu {
    position: relative;
    z-index: 2;
}

.profile-menu summary {
    max-width: 240px;
    padding: 10px 14px;
    overflow: hidden;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.profile-menu summary::-webkit-details-marker {
    display: none;
}

.profile-menu summary:hover,
.profile-menu[open] summary {
    background: rgba(37, 99, 235, .10);
    color: var(--accent);
}

:root[data-theme="dark"] .profile-menu summary:hover,
:root[data-theme="dark"] .profile-menu[open] summary {
    background: rgba(255, 255, 255, .08);
}

.profile-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 901;
    min-width: 180px;
    padding: 6px;
    background: rgba(247, 249, 252, .98);
    box-shadow: 0 18px 36px rgba(15, 23, 42, .16);
}

:root[data-theme="dark"] .profile-menu-panel {
    background: rgba(42, 43, 46, .98);
}

.profile-menu-panel a,
.profile-menu-panel button {
    display: block;
    width: 100%;
    min-height: 38px;
    padding: 10px 12px;
    color: var(--ink);
    background: transparent;
    box-shadow: none;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
    text-decoration: none;
    text-transform: uppercase;
    clip-path: none;
}

.profile-menu-panel a:hover,
.profile-menu-panel button:hover {
    background: rgba(37, 99, 235, .10);
    color: var(--accent);
}

.profile-menu-panel form {
    margin: 0;
}

.auth-provider-button {
    width: fit-content;
}

.auth-inline-error {
    margin-bottom: 4px;
}

.impersonation-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #1f2328;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.impersonation-banner button {
    height: 34px;
    min-height: 34px;
    padding: 0 14px;
    font-size: 12px;
}

.menu-toggle {
    display: none;
}

.theme-toggle {
    position: relative;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    min-height: 42px;
    margin: 0;
    padding: 0;
    color: var(--ink);
    background: transparent;
    box-shadow: none;
    clip-path: none;
}

.theme-toggle-icon {
    position: absolute;
    left: 9px;
    top: 9px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: transparent;
    box-shadow: inset 8px -5px 0 0 currentColor;
}

.theme-toggle-label {
    display: none;
}

:root[data-theme="dark"] .theme-toggle {
    color: var(--ink);
    background: transparent;
    box-shadow: none;
}

:root[data-theme="dark"] .theme-toggle-icon {
    background: currentColor;
    box-shadow:
        0 -10px 0 -7px currentColor,
        0 10px 0 -7px currentColor,
        10px 0 0 -7px currentColor,
        -10px 0 0 -7px currentColor,
        7px 7px 0 -7px currentColor,
        -7px -7px 0 -7px currentColor,
        7px -7px 0 -7px currentColor,
        -7px 7px 0 -7px currentColor;
}

main {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    width: min(1180px, calc(100% - 36px));
    margin: 56px auto 0;
    padding: 26px 0 34px;
    border-top: 1px solid var(--soft);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.site-footer strong {
    margin-right: 10px;
    color: var(--ink);
    font-family: var(--display-font);
    font-weight: 400;
    text-transform: uppercase;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.site-footer a {
    color: var(--muted);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--accent);
}

.cookie-banner {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 920px;
    margin: 0 auto;
    padding: 16px;
    background: rgba(247, 249, 252, .96);
    box-shadow: 0 18px 46px rgba(15, 23, 42, .22);
}

:root[data-theme="dark"] .cookie-banner {
    background: rgba(42, 43, 46, .98);
}

.cookie-banner p {
    margin: 0;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.cookie-banner button {
    flex: 0 0 auto;
    width: auto;
    min-height: 38px;
    padding: 8px 14px;
}

.legal-page h2 {
    margin-top: 30px;
}

.legal-page p {
    max-width: 920px;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.35;
}

.checkbox-row input {
    flex: 0 0 auto;
    width: 18px;
    min-height: 18px;
    margin-top: 2px;
}

.contact-form textarea {
    width: 100%;
    resize: vertical;
}

.hero,
.tool-page {
    position: relative;
    padding: clamp(68px, 10vw, 128px) 0 52px;
}

.tool-page.result-mode {
    padding-top: 26px;
}

.hero::before,
.tool-page::before {
    content: "";
    position: absolute;
    top: 34px;
    right: 0;
    width: min(380px, 48vw);
    aspect-ratio: 1.8;
    z-index: -1;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, .18), transparent 56%),
        linear-gradient(45deg, transparent 0 42%, rgba(124, 58, 237, .28) 43% 48%, transparent 49%),
        linear-gradient(110deg, transparent 0 58%, rgba(6, 182, 212, .24) 59% 64%, transparent 65%);
    clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%);
}

:root[data-theme="dark"] .hero::before,
:root[data-theme="dark"] .tool-page::before {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .05), transparent 56%),
        linear-gradient(45deg, transparent 0 42%, rgba(255, 255, 255, .08) 43% 48%, transparent 49%),
        linear-gradient(110deg, transparent 0 58%, rgba(255, 255, 255, .06) 59% 64%, transparent 65%);
}

.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 34px;
    align-items: start;
}

.hero-copy {
    max-width: 920px;
}

.eyebrow,
.tool-kicker,
.label {
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.help-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-left: 5px;
    border: 0;
    border-radius: 50%;
    color: #334155;
    background: rgba(226, 232, 240, .96);
    cursor: help;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    text-transform: none;
    vertical-align: middle;
    transform: translateY(-1px);
}

:root[data-theme="dark"] .help-tip {
    color: #1f2328;
    background: rgba(238, 240, 243, .96);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .2);
}

.site-tooltip {
    position: fixed;
    z-index: 1000;
    max-width: min(360px, calc(100vw - 32px));
    padding: 10px 12px;
    color: #fff;
    background: rgba(15, 23, 42, .96);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .22);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
    white-space: normal;
    overflow-wrap: anywhere;
    pointer-events: none;
    opacity: 0;
    transition: opacity .12s ease;
}

.site-tooltip.visible {
    opacity: 1;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 840px;
    margin-bottom: 22px;
    font-size: clamp(36px, 5.4vw, 68px);
    font-weight: 900;
    line-height: 1.04;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.hero h1,
.tool-header h1 {
    font-family: var(--display-font);
    font-weight: 400;
}

h2 {
    margin-bottom: 12px;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.05;
    text-transform: uppercase;
}

h3 {
    font-size: 20px;
    line-height: 1.15;
    text-transform: uppercase;
}

.lead {
    max-width: 720px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 21px;
    overflow-wrap: anywhere;
}

.external-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: 4px;
    color: var(--accent);
    vertical-align: middle;
}

.external-link-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.external-link-icon:hover {
    opacity: .75;
}

.quick-form,
.check-form,
.result,
.alert,
.tool-card,
.seo-grid article,
.seo-columns > div {
    background: linear-gradient(135deg, rgba(255,255,255,.72), rgba(231,236,244,.82));
    box-shadow: 18px 24px 70px rgba(31, 41, 55, .08);
    clip-path: var(--cut);
}

:root[data-theme="dark"] .quick-form,
:root[data-theme="dark"] .check-form,
:root[data-theme="dark"] .result,
:root[data-theme="dark"] .alert,
:root[data-theme="dark"] .tool-card,
:root[data-theme="dark"] .seo-grid article,
:root[data-theme="dark"] .seo-columns > div {
    background: linear-gradient(135deg, rgba(42, 43, 46, .98), rgba(50, 52, 56, .94));
    box-shadow: 18px 24px 70px rgba(20, 20, 22, .18);
}

.quick-form,
.check-form {
    position: relative;
    padding: 30px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 420px;
}

.auth-form label {
    margin-bottom: 6px;
}

.auth-form button {
    align-self: flex-start;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.quick-form {
    width: 100%;
    max-width: 980px;
    padding: 38px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(225,238,255,.94)),
        linear-gradient(135deg, rgba(37,99,235,.16), rgba(124,58,237,.16));
    box-shadow: 0 28px 90px rgba(37, 99, 235, .22), 0 12px 34px rgba(17, 24, 39, .10);
    transform: none;
}

:root[data-theme="dark"] .quick-form {
    background: linear-gradient(135deg, rgba(48, 50, 54, .98), rgba(38, 39, 42, .96));
    box-shadow: 0 28px 90px rgba(20, 20, 22, .28), 0 12px 34px rgba(20, 20, 22, .16);
}

:root[data-theme="dark"] .quick-form input {
    background: #42444a;
    color: var(--ink);
    box-shadow: inset 0 -4px 0 rgba(190, 194, 200, .28);
}

:root[data-theme="dark"] .quick-form button {
    color: #1f2328;
    background: linear-gradient(135deg, #f1f3f5, #d7dbe0);
    box-shadow: 0 16px 34px rgba(20, 20, 22, .24);
}

.quick-form::before,
.check-form::before,
.result::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 42%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
}

label {
    display: block;
    margin-bottom: 0px;
    font-weight: 900;
    text-transform: uppercase;
}

.quick-form label {
    color: var(--accent);
    font-size: 18px;
}

.input-row {
    display: flex;
    gap: 12px;
}

input,
select {
    min-width: 0;
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 0;
    padding: 0 16px;
    background: rgba(255, 255, 255, .78);
    color: var(--ink);
    font: inherit;
    font-size: 18px;
    font-weight: 700;
    outline: 0;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    height: auto;
    min-height: auto;
    clip-path: none;
    padding: 0;
    background: none;
    font-size: inherit;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select {
    background: rgba(64, 66, 71, .94);
    color: var(--ink);
}

:root[data-theme="dark"] input::placeholder {
    color: #aeb4bb;
}

select {
    appearance: none;
}

.quick-form input {
    flex: 1 1 auto;
    height: 70px;
    padding: 0 22px;
    background: #ffffff;
    color: #0f172a;
    font-size: 23px;
    box-shadow: inset 0 -4px 0 rgba(37, 99, 235, .28);
}

.quick-form input::placeholder {
    color: #8aa0bd;
}

input:focus,
select:focus {
    box-shadow: inset 0 -3px 0 var(--accent);
}

button {
    height: 40px;
    border: 0;
    border-radius: 0;
    padding: 0 24px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 17px;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.quick-form button {
    flex: 0 0 260px;
    height: 70px;
    padding: 0 30px;
    font-size: 19px;
    background: linear-gradient(135deg, #1d4ed8, #7c3aed 58%, #0891b2);
    box-shadow: 0 16px 34px rgba(37, 99, 235, .28);
}

button:hover {
    filter: brightness(1.08);
}

.secondary-button {
    color: var(--ink);
    background: rgba(226, 232, 240, .9);
    box-shadow: none;
}

:root[data-theme="dark"] .secondary-button,
:root[data-theme="dark"] .confirm-dialog .secondary-button,
:root[data-theme="dark"] .monitoring-view-input:checked + label,
:root[data-theme="dark"] button.button-link,
:root[data-theme="dark"] a.button-link {
    color: #1f2328;
    background: linear-gradient(135deg, #f1f3f5, #d7dbe0);
}

:root[data-theme="dark"] button {
    color: #1f2328;
    background: linear-gradient(135deg, #f1f3f5, #d7dbe0);
}

:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .inline-action-form button,
:root[data-theme="dark"] .inline-delete-form button,
:root[data-theme="dark"] .table-sort,
:root[data-theme="dark"] .edit-tags-button {
    color: var(--ink);
    background: transparent;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding: 22px 0 66px;
}

.secondary-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 0;
}

.tool-card {
    position: relative;
    min-height: 220px;
    padding: 28px;
    text-decoration: none;
    overflow: hidden;
}

.tool-card::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -34px;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(37,99,235,.18), rgba(124,58,237,.18));
    clip-path: polygon(45% 0, 100% 0, 55% 100%, 0 100%);
}

:root[data-theme="dark"] .tool-card::after {
    background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
}

.tool-card:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(219,228,245,.94));
}

:root[data-theme="dark"] .tool-card:hover {
    background: linear-gradient(135deg, rgba(78, 80, 85, .96), rgba(68, 70, 74, .94));
}

.tool-card p {
    color: var(--muted);
    font-size: 17px;
}

.tool-header {
    margin-bottom: 32px;
}

.result-context {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 14px 16px;
    background: rgba(255,255,255,.66);
}

:root[data-theme="dark"] .result-context {
    background: rgba(42, 43, 46, .92);
}

.result-context strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 20px;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-left: auto;
    padding: 0 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

button.button-link {
    width: auto;
    height: auto;
    margin: 0 0 0 auto;
    border: 0;
}

.result-context .button-link + .button-link {
    margin-left: 0;
}

.result-mode .check-form {
    margin-bottom: 18px;
    padding: 18px;
}

.result-mode .check-form label {
    margin-bottom: 8px;
    font-size: 13px;
}

.alert {
    margin-top: 22px;
    margin-bottom: 20px;
    padding: 20px 22px;
}

.alert.error {
    color: var(--danger);
    background: linear-gradient(135deg, rgba(254, 226, 226, .9), rgba(255,255,255,.66));
}

:root[data-theme="dark"] .alert.error {
    color: #f1f3f5;
    background: linear-gradient(135deg, rgba(50, 52, 56, .96), rgba(42, 43, 46, .92));
    box-shadow: inset 5px 0 0 #b8b8b8;
}

.alert.success {
    color: #047857;
    background: linear-gradient(135deg, rgba(209, 250, 229, .9), rgba(255,255,255,.66));
}

:root[data-theme="dark"] .alert.success {
    color: #f1f3f5;
    background: linear-gradient(135deg, rgba(50, 52, 56, .96), rgba(42, 43, 46, .92));
    box-shadow: inset 5px 0 0 #9ca3af;
}

.result {
    position: relative;
    margin-top: 28px;
    overflow: hidden;
    background: rgba(247, 249, 252, .86);
}

.status-band {
    padding: 28px;
    background: rgba(255,255,255,.62);
}

:root[data-theme="dark"] .status-band,
:root[data-theme="dark"] .summary > div,
:root[data-theme="dark"] .details-grid > div,
:root[data-theme="dark"] .san-list,
:root[data-theme="dark"] .match-card,
:root[data-theme="dark"] .feedback-panel,
:root[data-theme="dark"] .monitoring-pd-status,
:root[data-theme="dark"] .monitoring-controls,
:root[data-theme="dark"] .monitoring-toolbar,
:root[data-theme="dark"] .monitoring-view-toggle,
:root[data-theme="dark"] .monitoring-next-check,
:root[data-theme="dark"] .monitoring-card,
:root[data-theme="dark"] table {
    background: rgba(42, 43, 46, .92);
}

.status-band strong {
    display: block;
    margin-top: 6px;
    font-size: 30px;
    text-transform: uppercase;
}

.status-band p {
    margin: 10px 0 0;
    color: var(--muted);
}

.status-band.ok,
.status-band.low,
.status-band.info,
.status-band.warning,
.status-band.risk,
.status-band.medium,
.status-band.error,
.status-band.high {
    box-shadow: inset 5px 0 0 var(--soft);
}

.status-band.ok {
    background:
        linear-gradient(135deg, rgba(6, 182, 124, .18), rgba(6, 182, 212, .12)),
        linear-gradient(135deg, rgba(255,255,255,.80), rgba(231,236,244,.46));
    box-shadow: inset 6px 0 0 #10b981, 0 18px 48px rgba(16, 185, 129, .14);
}

:root[data-theme="dark"] .status-band.ok {
    background:
        linear-gradient(135deg, rgba(50, 52, 56, .96), rgba(42, 43, 46, .92));
    box-shadow: inset 6px 0 0 #9ca3af, 0 18px 48px rgba(20, 20, 22, .18);
}

:root[data-theme="dark"] .status-band.ok .label,
:root[data-theme="dark"] .status-band.ok strong {
    color: var(--ink);
}

.status-band.ok .label {
    color: #047857;
}

.status-band.ok strong {
    color: #064e3b;
}
.status-band.warning,
.status-band.medium { box-shadow: inset 5px 0 0 var(--warn); }
.status-band.risk { box-shadow: inset 5px 0 0 #be123c; }
.status-band.error,
.status-band.high { box-shadow: inset 5px 0 0 var(--danger); }

.summary,
.details-grid,
.matches-list {
    display: grid;
    gap: 2px;
    background: rgba(216, 224, 236, .72);
}

:root[data-theme="dark"] .summary,
:root[data-theme="dark"] .details-grid,
:root[data-theme="dark"] .matches-list {
    background: rgba(70, 73, 78, .74);
}

:root[data-theme="dark"] .monitoring-card-metrics {
    background: rgba(30, 31, 34, .98);
}

.summary {
    grid-template-columns: 2fr 1fr 1fr;
}

.availability-summary,
.availability-details,
.ssl-summary,
.ssl-details {
    gap: 14px;
    padding: 18px;
    background: rgba(247, 249, 252, .62);
}

.availability-summary,
.ssl-summary {
    padding-bottom: 7px;
}

.availability-details,
.ssl-details {
    padding-top: 7px;
}

.details-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary > div,
.details-grid > div,
.san-list,
.match-card {
    min-width: 0;
    padding: 22px;
    background: rgba(255,255,255,.66);
}

.availability-summary > div,
.availability-details > div,
.ssl-summary > div,
.ssl-details > div {
    background: rgba(255,255,255,.72);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.36);
}

:root[data-theme="dark"] .availability-summary > div,
:root[data-theme="dark"] .availability-details > div,
:root[data-theme="dark"] .ssl-summary > div,
:root[data-theme="dark"] .ssl-details > div,
:root[data-theme="dark"] .monitoring-card-metrics > div {
    background: rgba(48, 50, 54, .94);
}

.summary strong,
.details-grid strong,
.san-list strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 20px;
}

:root[data-theme="dark"] .summary strong,
:root[data-theme="dark"] .details-grid strong,
:root[data-theme="dark"] .san-list strong,
:root[data-theme="dark"] .match-card h2,
:root[data-theme="dark"] .match-card .score,
:root[data-theme="dark"] .feedback-panel h2 {
    color: var(--ink);
}

.san-list {
    background: rgba(255,255,255,.66);
}

.san-list ul {
    columns: 2;
    margin: 12px 0 0;
    padding-left: 20px;
}

.technologies-list ul {
    columns: 1;
    padding-left: 0;
    list-style: none;
}

.technologies-list li {
    display: grid;
    grid-template-columns: minmax(150px, .45fr) minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid rgba(216, 224, 236, .72);
}

.technologies-list li:first-child {
    border-top: 0;
}

.technologies-list span {
    color: var(--muted);
}

:root[data-theme="dark"] .technologies-list li {
    border-top-color: rgba(86, 88, 94, .92);
}

.matches-list {
    grid-template-columns: 1fr;
}

.feedback-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    padding: 24px;
    background: rgba(255,255,255,.66);
}

.feedback-panel h2 {
    margin: 4px 0 8px;
    font-size: 22px;
}

.feedback-panel p {
    margin: 0;
    color: var(--muted);
}

:root[data-theme="dark"] .feedback-panel {
    box-shadow: inset 5px 0 0 var(--soft);
}

:root[data-theme="dark"] .feedback-panel p,
:root[data-theme="dark"] .match-card p,
:root[data-theme="dark"] .match-card ul,
:root[data-theme="dark"] .technologies-list span,
:root[data-theme="dark"] .status-band p {
    color: #d4d7dc;
}

.feedback-form {
    align-self: end;
}

.feedback-form-wide {
    grid-column: 1 / -1;
}

.feedback-form label {
    margin-bottom: 8px;
    font-size: 13px;
}

.feedback-row {
    display: grid;
    grid-template-columns: minmax(170px, .8fr) minmax(190px, 1fr) auto;
    gap: 10px;
}

.monitoring-page h2 {
    margin: 32px 0 14px;
    font-size: 24px;
}

.monitoring-page {
    padding-top: 20px;
}

.monitoring-page .tool-header {
    margin-bottom: 14px;
}

.monitoring-page .tool-header h1 {
    font-size: clamp(28px, 4vw, 44px);
}

.monitoring-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.monitoring-next-check {
    flex: 0 0 auto;
    min-width: 210px;
    padding: 14px 16px;
    background: rgba(255,255,255,.72);
    box-shadow: inset 5px 0 0 var(--soft);
}

.monitoring-next-check .label,
.monitoring-next-check strong {
    display: block;
}

.monitoring-next-check strong {
    margin-top: 5px;
    color: var(--ink);
    font-size: 22px;
    line-height: 1.1;
}

.monitoring-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 14px;
    padding: 14px;
    background: rgba(255,255,255,.66);
}

.monitoring-toolbar-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.monitoring-toolbar-row-filters .monitoring-toolbar-divider {
    margin-left: auto;
}

.monitoring-toolbar-divider {
    align-self: stretch;
    width: 1px;
    background: var(--soft);
    flex: 0 0 auto;
}

.monitoring-toolbar-compact {
    display: none;
    gap: 8px;
}

.monitoring-toolbar-compact select {
    flex: 1 1 0;
    min-width: 0;
    height: 34px;
    min-height: 34px;
    padding: 4px 22px 4px 8px;
    font-size: 11px;
}

.monitoring-filter-group,
.monitoring-sort-group,
.monitoring-tag-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.monitoring-filter-button,
.monitoring-sort-button {
    width: auto;
    min-height: 34px;
    padding: 7px 10px;
    color: var(--ink);
    background: rgba(226, 232, 240, .86);
    box-shadow: none;
    font-size: 13px;
}

.monitoring-filter-button.active,
.monitoring-sort-button.active {
    color: #fff;
    background: #334155;
}

:root[data-theme="dark"] .monitoring-filter-button,
:root[data-theme="dark"] .monitoring-sort-button {
    color: var(--ink);
    background: rgba(60, 62, 67, .96);
}

:root[data-theme="dark"] .monitoring-filter-button.active,
:root[data-theme="dark"] .monitoring-sort-button.active {
    color: #1f2328;
    background: linear-gradient(135deg, #f1f3f5, #d7dbe0);
}

.monitoring-tag-filter select {
    min-height: 34px;
    padding: 7px 28px 7px 10px;
    font-size: 13px;
}

.monitoring-search {
    display: inline-flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 6px;
}

.monitoring-search input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 13px;
}

.monitoring-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.monitoring-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    color: #475569;
    background: rgba(226, 232, 240, .86);
    font-size: 12px;
    font-weight: 800;
}

:root[data-theme="dark"] .monitoring-tags span {
    color: #f1f3f5;
    background: rgba(60, 62, 67, .96);
}

.monitoring-tags-form {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) auto;
    gap: 6px;
    margin: 0;
}

.monitoring-tags-form input {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 13px;
    margin-bottom: 10px;
}

.monitoring-tags-form button {
    width: auto;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
}

.monitoring-tags-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.monitoring-tags-cell .monitoring-tags {
    margin-top: 0;
}

.edit-tags-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    color: var(--muted);
    opacity: .55;
}

.edit-tags-button:hover {
    opacity: 1;
}

.edit-tags-button svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tags-dialog-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 12px;
    min-height: 32px;
}

.tag-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: rgba(226, 232, 240, .72);
    cursor: pointer;
    font-size: 13px;
    user-select: none;
}

.tag-option input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    min-height: 15px;
    margin: 0;
    padding: 0;
    background: #fff;
    box-shadow: inset 0 0 0 1.5px #94a3b8;
    clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
    cursor: pointer;
    transition: background .12s, box-shadow .12s;
}

.tag-option input[type="checkbox"]:hover {
    box-shadow: inset 0 0 0 1.5px #64748b;
}

.tag-option input[type="checkbox"]:checked {
    background: #2563eb;
    box-shadow: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9'%3E%3Cpath d='M1 4.5L4.5 8 11 1' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 7px;
}

.tag-option input[type="checkbox"]:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

:root[data-theme="dark"] .tag-option {
    background: rgba(55, 57, 62, .96);
    color: var(--ink);
}

:root[data-theme="dark"] .tag-option input[type="checkbox"] {
    background: rgba(22, 23, 26, .95);
    box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.18);
}

:root[data-theme="dark"] .tag-option input[type="checkbox"]:hover {
    box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.38);
}

:root[data-theme="dark"] .tag-option input[type="checkbox"]:checked {
    background: #e5e7eb;
    box-shadow: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9'%3E%3Cpath d='M1 4.5L4.5 8 11 1' stroke='%231f2328' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 7px;
}

:root[data-theme="dark"] .tag-option input[type="checkbox"]:focus-visible {
    outline: 2px solid rgba(255,255,255,.5);
    outline-offset: 2px;
}

.tags-dialog-custom {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 16px;
}

.tags-dialog-custom input {
    flex: 1;
    min-width: 0;
    height: auto;
    padding: 8px 12px;
    font-size: 13px;
}

.tags-dialog-custom button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: auto;
    padding: 0;
    font-size: 20px;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.monitoring-detail-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
}

.monitoring-detail-header h1 {
    margin-bottom: 10px;
}

.monitoring-detail-action {
    margin: 4px 0 0;
}

.monitoring-detail-action button {
    width: auto;
    min-height: 42px;
    padding: 10px 16px;
}

.muted {
    color: var(--muted);
}

.date-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    color: #64748b;
    background: rgba(226, 232, 240, .82);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

:root[data-theme="dark"] .date-pill {
    color: #eef0f2;
    background: rgba(60, 62, 67, .96);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    color: #475569;
    background: rgba(226, 232, 240, .86);
    text-decoration: none;
}

:root[data-theme="dark"] .status-pill,
:root[data-theme="dark"] .status-pill.ok,
:root[data-theme="dark"] .status-pill.warning,
:root[data-theme="dark"] .status-pill.critical,
:root[data-theme="dark"] .incident-count-pill {
    color: #f1f3f5;
    background: rgba(60, 62, 67, .96);
}

:root[data-theme="dark"] .status-pill.warning {
    box-shadow: inset 0 -2px 0 #b8b8b8;
}

:root[data-theme="dark"] .status-pill.critical {
    box-shadow: inset 0 -2px 0 #d0d0d0;
}

.status-pill.ok {
    color: #047857;
    background: rgba(16, 185, 129, .14);
}

.status-pill.warning {
    color: #92400e;
    background: rgba(245, 158, 11, .18);
}

.status-pill.critical {
    color: #b91c1c;
    background: rgba(239, 68, 68, .16);
}

.table-sort {
    display: inline-flex;
    align-items: center;
    min-height: 0;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    box-shadow: none;
    clip-path: none;
    font: inherit;
    line-height: 1.25;
    text-align: left;
    overflow: visible;
}

.table-sort::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: .45;
    vertical-align: middle;
}

.table-sort[aria-sort="descending"]::after {
    border-top: 0;
    border-bottom: 5px solid currentColor;
}

.table-sort[aria-sort]::after {
    opacity: 1;
}

.monitoring-status-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 28px;
}

.monitoring-status-grid a {
    color: var(--accent);
    font-weight: 900;
}

.monitoring-table .monitoring-site-cell {
    min-width: 210px;
}

.monitoring-table th {
    vertical-align: middle;
    line-height: 1.25;
    overflow: visible;
}

.monitoring-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 14px;
    padding: 4px;
    background: rgba(247, 249, 252, .86);
}

.monitoring-view-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.monitoring-view-toggle label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-height: 34px;
    margin: 0;
    padding: 0;
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.view-icon {
    display: inline-block;
    width: 19px;
    height: 19px;
    color: currentColor;
}

.table-icon {
    background:
        linear-gradient(currentColor 0 0) 0 3px / 19px 3px no-repeat,
        linear-gradient(currentColor 0 0) 0 8px / 19px 3px no-repeat,
        linear-gradient(currentColor 0 0) 0 13px / 19px 3px no-repeat;
}

.cards-icon {
    background:
        linear-gradient(currentColor 0 0) 0 0 / 8px 8px no-repeat,
        linear-gradient(currentColor 0 0) 100% 0 / 8px 8px no-repeat,
        linear-gradient(currentColor 0 0) 0 100% / 8px 8px no-repeat,
        linear-gradient(currentColor 0 0) 100% 100% / 8px 8px no-repeat;
}

.monitoring-view-input:checked + label {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.monitoring-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.monitoring-list {
    display: none;
    flex-direction: column;
    gap: 8px;
}

.monitoring-page:has(#monitoring-view-table:checked) .monitoring-list {
    display: flex;
}

.monitoring-page:has(#monitoring-view-table:checked) .monitoring-card-grid {
    display: none;
}

.monitoring-list-row {
    display: grid;
    grid-template-columns: minmax(180px, 2fr) minmax(90px, .65fr) minmax(70px, .4fr) minmax(80px, .45fr) minmax(80px, .5fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255,255,255,.72);
    box-shadow: 12px 18px 44px rgba(31, 41, 55, .08);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

:root[data-theme="dark"] .monitoring-list-row {
    background: rgba(42, 43, 46, .92);
}

.monitoring-list-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.monitoring-list-meta .label {
    display: block;
    font-size: 10px;
    letter-spacing: .04em;
}

.monitoring-list-meta strong {
    font-size: 13px;
    color: var(--ink);
}

.monitoring-list-meta strong.warning {
    color: #92400e;
}

.monitoring-list-meta strong.critical {
    color: #b91c1c;
}

.monitoring-list-actions {
    display: inline-flex;
    gap: 6px;
    justify-content: flex-end;
}

.monitoring-card {
    min-width: 0;
    padding: 18px;
    background: rgba(255,255,255,.72);
    box-shadow: 12px 18px 44px rgba(31, 41, 55, .08);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.monitoring-card-head,
.monitoring-card-foot {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.monitoring-card-head {
    margin-bottom: 14px;
}

.monitoring-card-head > div {
    min-width: 0;
}

.monitoring-card-head .status-pill {
    flex: 0 0 auto;
}

.monitoring-card-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    margin-bottom: 14px;
    background: rgba(216, 224, 236, .72);
}

.monitoring-card-metrics > div {
    min-width: 0;
    padding: 12px;
    background: rgba(247, 249, 252, .86);
}

.monitoring-card-metrics .label {
    display: block;
    margin-bottom: 5px;
}

.monitoring-card-metrics strong {
    display: block;
    color: var(--ink);
    font-size: 20px;
    line-height: 1.1;
}

.monitoring-card-metrics strong.warning {
    color: #92400e;
}

.monitoring-card-metrics strong.critical {
    color: #b91c1c;
}

.monitoring-card-actions {
    display: inline-flex;
    gap: 6px;
}

.monitoring-card-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    min-height: 28px;
}

.monitoring-card-tags .monitoring-tags {
    margin-top: 0;
}

.monitoring-site-name,
.monitoring-site-url {
    display: block;
    overflow-wrap: anywhere;
}

.monitoring-site-name {
    margin-bottom: 4px;
    font-family: var(--display-font);
    font-size: 18px;
    font-weight: 400;
    color: #4752eb;
    text-decoration: none;
    text-transform: uppercase;
}

:root[data-theme="dark"] .monitoring-site-name {
    color: #dcab26;
}

.monitoring-site-url {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.25;
}

.monitoring-site-cell .date-pill {
    min-height: 20px;
    padding: 2px 7px;
    font-size: 11px;
}

.monitoring-status-badges {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.incident-count-pill {
    color: #475569;
    background: rgba(226, 232, 240, .86);
}

.monitoring-status-grid p {
    margin: 10px 0 0;
    color: var(--muted);
}

.monitoring-status-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.monitoring-status-line .label {
    color: var(--ink);
}

.monitoring-pd-status {
    margin: -10px 0 28px;
    padding: 22px;
    background: rgba(255,255,255,.66);
}

.monitoring-pd-status p {
    margin: 12px 0 0;
    color: var(--muted);
}

.monitoring-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 32px 0 14px;
}

.monitoring-section-heading h2 {
    margin: 0;
}

.monitoring-section-heading form {
    margin: 0;
}

.monitoring-section-heading button {
    min-height: 40px;
    height: 40px;
    padding: 0 14px;
    font-size: 13px;
}

.monitoring-section-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.incidents-page-size {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.incidents-page-size select {
    min-width: 72px;
    height: 40px;
    min-height: 40px;
    padding: 6px 28px 6px 10px;
    font-size: 13px;
}

.incident-site-link {
    font-weight: 900;
    text-decoration: none;
}

.incident-date-cell {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.inline-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.copy-json-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    color: #1d4ed8;
    background: rgba(219, 234, 254, .9);
    box-shadow: none;
}

.copy-json-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.copy-json-button.copied {
    color: #15803d;
    background: rgba(220, 252, 231, .9);
}

.incidents-table .copy-json-button {
    width: auto;
    min-width: 46px;
    padding: 0 9px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.json-dialog {
    width: min(860px, calc(100vw - 28px));
}

.json-dialog-content {
    max-height: min(62vh, 620px);
    margin: 0 0 16px;
    padding: 14px;
    overflow: auto;
    color: #dbeafe;
    background: #111827;
    font: 13px/1.45 Consolas, 'SFMono-Regular', monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.incidents-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 14px;
}

.incidents-pagination button {
    width: auto;
    min-height: 38px;
    padding: 8px 13px;
    font-size: 13px;
}

.incidents-pagination button:disabled {
    cursor: default;
    opacity: .45;
}

#incidents-page-label {
    min-width: 58px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.monitoring-controls {
    display: grid;
    grid-template-columns: minmax(280px, .42fr) minmax(560px, 1fr);
    gap: 16px;
    align-items: start;
    margin: 0 0 16px;
    padding: 14px;
    background: rgba(247, 249, 252, .86);
}

.monitoring-limit-note {
    margin: -8px 0 16px;
    font-size: 13px;
    font-weight: 800;
}

.monitoring-settings-form,
.monitoring-add-form {
    display: grid;
    gap: 8px 10px;
    align-items: start;
    margin: 0;
}

.monitoring-settings-form {
    grid-template-columns: minmax(96px, 1fr) auto;
}

.monitoring-add-form {
    grid-template-columns: minmax(210px, 1fr) minmax(160px, .6fr) auto;
}

.monitoring-controls label {
    grid-column: 1 / -1;
    margin: 0;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1;
}

.monitoring-controls input {
    min-height: 42px;
    padding: 10px 12px;
}

.monitoring-controls button {
    min-height: 42px;
    padding: 10px 14px;
    white-space: nowrap;
}

.monitoring-controls-mobile {
    display: none;
    gap: 10px;
    margin: 0 0 16px;
}

.monitoring-controls-mobile button {
    flex: 1 1 0;
    min-width: 0;
}

.dialog-field {
    margin-bottom: 14px;
}

.dialog-field label {
    margin-bottom: 6px;
}

.dialog-field:last-of-type {
    margin-bottom: 0;
}

.inline-action-form,
.inline-delete-form {
    display: inline-block;
    margin: 0;
}

.inline-action-form button,
.inline-delete-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    font-size: 17px;
    line-height: 1;
    box-shadow: none;
}

.inline-action-form svg,
.inline-delete-form svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.inline-action-form button {
    color: #1d4ed8;
    background: rgba(219, 234, 254, .9);
}

.inline-delete-form button {
    color: #b91c1c;
    background: rgba(254, 226, 226, .8);
}

.confirm-dialog {
    width: min(420px, calc(100vw - 32px));
    padding: 24px;
    border: 0;
    background: rgba(247, 249, 252, .98);
    box-shadow: 0 28px 80px rgba(15, 23, 42, .24);
}

.confirm-dialog::backdrop {
    background: rgba(15, 23, 42, .42);
}

.confirm-dialog h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.confirm-dialog p {
    margin: 0;
    color: var(--muted);
}

.confirm-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.confirm-dialog .secondary-button,
.confirm-dialog .danger-button {
    min-height: 40px;
    padding: 10px 14px;
    box-shadow: none;
}

.confirm-dialog .secondary-button {
    color: var(--text);
    background: rgba(226, 232, 240, .9);
}

.confirm-dialog .danger-button {
    color: #fff;
    background: #dc2626;
}

:root[data-theme="dark"] .confirm-dialog {
    background: rgba(42, 43, 46, .97);
    color: var(--ink);
}

:root[data-theme="dark"] .confirm-dialog .tags-dialog-custom input {
    background: rgba(22, 23, 26, .95);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
}

:root[data-theme="dark"] .confirm-dialog .tags-dialog-custom input:hover {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}

:root[data-theme="dark"] .confirm-dialog .tags-dialog-custom input:focus {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}

.match-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    background: rgba(255,255,255,.66);
    clip-path: none;
    box-shadow: none;
}

.match-card p {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
}

.match-card h2 {
    margin: 4px 0 0;
}

.match-card .score {
    white-space: nowrap;
    font-size: 22px;
}

.match-card ul {
    grid-column: 1 / -1;
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
}

.compliance-findings .match-card {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: start;
}

.compliance-findings .match-card p {
    grid-column: 2 / -1;
    margin: 0;
}

.ssl-findings .match-card p {
    margin: 0;
}

.finding-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #fff;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.finding-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.finding-icon.ok {
    background: #059669;
}

.finding-icon.bad {
    background: #dc2626;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255,255,255,.66);
}

th,
td {
    padding: 16px;
    border-top: 2px solid rgba(216, 224, 236, .72);
    text-align: left;
    vertical-align: top;
}

:root[data-theme="dark"] th,
:root[data-theme="dark"] td {
    border-top-color: rgba(86, 88, 94, .92);
}

th {
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.url-cell {
    max-width: 420px;
    overflow-wrap: anywhere;
}

.seo-section,
.seo-panel {
    margin: 0 0 72px;
    padding: 46px 24px;
    background: linear-gradient(135deg, rgba(231,236,244,.64), rgba(247,249,252,.18));
}

:root[data-theme="dark"] .seo-section,
:root[data-theme="dark"] .seo-panel {
    background: linear-gradient(135deg, rgba(42, 43, 46, .68), rgba(32, 33, 36, .35));
}

.seo-section.compact {
    padding-top: 34px;
}

.seo-intro {
    max-width: 760px;
    margin-bottom: 26px;
}

.seo-intro h2,
.seo-panel h2 {
    margin-bottom: 12px;
    font-size: clamp(28px, 4vw, 46px);
}

.seo-intro p,
.seo-panel > p,
.seo-grid p,
.seo-columns p {
    color: var(--muted);
    font-size: 18px;
}

.seo-grid,
.seo-columns {
    display: grid;
    gap: 18px;
}

.seo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.seo-grid.two,
.seo-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seo-grid article,
.seo-columns > div {
    min-width: 0;
    padding: 24px;
}

.seo-grid h2,
.seo-grid h3,
.seo-columns h3 {
    margin-bottom: 10px;
    font-size: 21px;
}

.seo-grid a,
.seo-panel a {
    color: var(--accent);
    font-weight: 900;
}

@media print {
    @page {
        margin: 14mm;
    }

    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    html,
    body {
        background: #fff !important;
        color: #111827;
    }

    body::before,
    .topbar,
    .check-form,
    .quick-form,
    .seo-section,
    .seo-panel,
    .button-link,
    button,
    .help-tip,
    .site-tooltip,
    .feedback-panel,
    .external-link-icon,
    .no-print {
        display: none !important;
    }

    main {
        width: 100%;
        margin: 0;
    }

    .tool-page,
    .tool-page.result-mode {
        padding: 0;
    }

    .tool-page::before,
    .result::before {
        display: none;
    }

    .result-context {
        display: block;
        margin: 0 0 16px;
        padding: 0;
        background: transparent;
    }

    .result-context .label {
        display: block;
        margin-bottom: 4px;
    }

    .result,
    .status-band,
    .summary,
    .details-grid,
    .matches-list,
    .summary > div,
    .details-grid > div,
    .san-list,
    .match-card {
        display: block;
        padding: 0;
        background: transparent !important;
        clip-path: none !important;
    }

    .summary > div,
    .details-grid > div,
    .san-list,
    .match-card {
        margin: 0 0 12px;
        break-inside: avoid;
    }

    .status-band {
        margin-bottom: 16px;
        border-left: 4px solid #94a3b8;
        padding-left: 12px;
    }

    .match-card p,
    .san-list ul {
        margin-top: 6px;
    }
}

@media (max-width: 940px) {
    .monitoring-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .input-row,
    .hero {
        display: block;
    }

    .monitoring-header,
    .monitoring-status-line {
        grid-template-columns: 1fr;
    }

    .monitoring-header {
        display: grid;
    }

    .monitoring-next-check {
        width: 100%;
    }

    .monitoring-controls {
        display: none;
    }

    .monitoring-controls-mobile {
        display: flex;
    }

    .monitoring-toolbar-row-search .monitoring-tag-filter,
    .monitoring-toolbar-row-filters,
    .monitoring-toolbar-divider {
        display: none;
    }

    .monitoring-toolbar-row-search .monitoring-search .label {
        display: none;
    }

    .monitoring-toolbar-compact {
        display: flex;
    }

    .monitoring-list-ssl,
    .monitoring-list-domain,
    .monitoring-tags-cell {
        display: none;
    }

    .monitoring-section-heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .monitoring-section-heading button {
        width: auto;
        margin-top: 0;
    }

    .topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        padding: 18px;
        gap: 16px;
    }

    .brand {
        font-size: 21px;
        flex: 0 1 auto;
        min-width: 0;
    }

    .menu-toggle {
        display: inline-flex;
        flex: 0 0 48px;
        width: 48px;
        height: 44px;
        margin: 0;
        padding: 0;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 6px;
        background: linear-gradient(135deg, var(--accent), var(--accent-2));
        box-shadow: 0 12px 26px rgba(37, 99, 235, .24);
    }

    .menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: #fff;
    }

    .nav {
        position: static;
        flex: 0 0 100%;
        z-index: 20;
        display: none;
        margin-top: 0;
        padding: 10px;
        overflow: visible;
        background: rgba(247, 249, 252, .97);
        box-shadow: 0 24px 70px rgba(17, 24, 39, .16);
        clip-path: var(--cut);
    }

    :root[data-theme="dark"] .nav {
        background: rgba(42, 43, 46, .98);
        box-shadow: 0 24px 70px rgba(20, 20, 22, .24);
    }

    :root[data-theme="dark"] .nav a,
    :root[data-theme="dark"] .profile-menu summary,
    :root[data-theme="dark"] .profile-menu-panel a,
    :root[data-theme="dark"] .profile-menu-panel button {
        color: var(--ink);
    }

    :root[data-theme="dark"] .profile-menu-panel {
        background: rgba(50, 52, 56, .98);
    }

    .nav.open {
        display: grid;
        grid-template-columns: 1fr;
        margin-top: 4px;
    }

    .nav a {
        width: 100%;
        padding: 14px 16px;
        overflow-wrap: anywhere;
    }

    .profile-menu {
        width: 100%;
    }

    .profile-menu summary {
        max-width: none;
        width: 100%;
        padding: 14px 16px;
    }

    .profile-menu-panel {
        position: static;
        margin-top: 4px;
        box-shadow: none;
    }

    h1 {
        font-size: clamp(31px, 9.2vw, 44px);
        line-height: 1.08;
    }

    h2 {
        font-size: 24px;
    }

    .lead {
        font-size: 18px;
    }

    .result-context {
        display: grid;
        grid-template-columns: 1fr;
    }

    .button-link {
        width: 100%;
        margin-left: 0;
    }

    button.button-link {
        width: 100%;
        margin: 0;
    }

    button {
        width: 100%;
        margin-top: 12px;
        font-size: 12px;
        white-space: normal;
    }

    .table-sort {
        width: auto;
        margin-top: 0;
        white-space: normal;
    }

    .monitoring-card-grid {
        grid-template-columns: 1fr;
    }

    .monitoring-list-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "site actions"
            "status status";
        gap: 8px 12px;
    }

    .monitoring-site-cell { grid-area: site; }
    .monitoring-list-row > div:nth-child(2) { grid-area: status; }
    .monitoring-list-actions { grid-area: actions; align-self: start; }

    .menu-toggle {
        width: 48px;
        margin-top: 0;
        white-space: nowrap;
    }

    .theme-toggle {
        display: none;
    }

    .nav.open ~ .theme-toggle {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        flex: 0 0 100%;
        width: 100%;
        height: auto;
        min-height: 0;
        margin-top: 4px;
        padding: 14px 16px;
        background: rgba(247, 249, 252, .97);
        box-shadow: 0 24px 70px rgba(17, 24, 39, .16);
        clip-path: var(--cut);
        white-space: nowrap;
    }

    :root[data-theme="dark"] .nav.open ~ .theme-toggle {
        color: var(--ink);
        background: rgba(42, 43, 46, .98);
        box-shadow: 0 24px 70px rgba(20, 20, 22, .24);
    }

    .nav.open ~ .theme-toggle .theme-toggle-icon {
        position: static;
        flex: 0 0 auto;
    }

    .nav.open ~ .theme-toggle .theme-toggle-label {
        display: inline;
        color: var(--ink);
        font-size: 13px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .tools-grid,
    .secondary-tools,
    .summary,
    .details-grid,
    .feedback-panel,
    .feedback-row,
    .seo-grid,
    .seo-grid.two,
    .seo-columns {
        grid-template-columns: 1fr;
    }

    .quick-form {
        margin-top: 32px;
        padding: 26px;
        max-width: none;
    }

    .quick-form input,
    .quick-form button {
        height: 62px;
        font-size: 18px;
    }

    .quick-form button {
        flex-basis: auto;
    }

    .san-list ul {
        columns: 1;
    }
}
