:root {
  color-scheme: light;
  --ink: #172339;
  --muted: #6c7789;
  --line: #e5e9ef;
  --canvas: #f5f7fa;
  --white: #fff;
  --navy: #172339;
  --blue: #3d63e8;
  --blue-dark: #2e50c7;
  --green: #198b64;
  --green-bg: #e6f6ef;
  --red: #c44b58;
  --red-bg: #fff0f0;
  --amber: #99660c;
  --amber-bg: #fff5df;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.topbar { height: 72px; padding: 0 max(24px, calc((100vw - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; background: var(--white); border-bottom: 1px solid var(--line); }
.topbar form { margin: 0; }
.brand { display: inline-flex; align-items: center; gap: 11px; font: 800 18px ui-sans-serif, system-ui, sans-serif; letter-spacing: -.04em; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: #fff; background: var(--blue); font-size: 16px; letter-spacing: 0; box-shadow: 0 5px 12px #3d63e82b; }
.brand-accent { color: var(--blue); }
.page-shell { width: min(1120px, calc(100% - 48px)); min-height: calc(100vh - 130px); margin: 0 auto; padding: 42px 0 58px; }
.footer { padding: 21px 24px 28px; color: #97a0ae; text-align: center; font-size: 12px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: ui-sans-serif, system-ui, sans-serif; letter-spacing: -.035em; }
h1 { margin-bottom: 8px; font-size: clamp(29px, 4vw, 38px); line-height: 1.15; }
h2 { margin-bottom: 4px; font-size: 17px; }
h3 { margin-bottom: 8px; font-size: 17px; }
.muted { color: var(--muted); }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.page-heading p { margin-bottom: 0; font-size: 14px; }
.eyebrow { display: block; margin-bottom: 11px; color: #7e8a9c; font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.refresh-note { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.heading-actions { display: flex; align-items: center; gap: 13px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #2db986; box-shadow: 0 0 0 4px #2db98620; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.summary-card, .panel { background: var(--white); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 3px 12px #17233905; }
.summary-card { padding: 17px 20px 16px; }
.summary-label { display: block; margin-bottom: 10px; color: #7e8a9c; font-size: 10px; font-weight: 700; letter-spacing: .09em; }
.summary-card strong { font: 700 27px ui-sans-serif, system-ui, sans-serif; }
.text-up { color: var(--green); }
.text-down { color: var(--red); }
.text-warning { color: var(--amber); }
.panel { margin-bottom: 20px; overflow: hidden; }
.add-panel, .monitor-panel, .history-panel, .edit-panel, .tls-panel, .alert-panel, .status-panel { padding: 21px 23px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 17px; }
.section-heading p { margin: 4px 0 0; font-size: 13px; }
.add-form, .edit-form { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.5fr); gap: 12px; align-items: start; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: end; }
.field { display: grid; gap: 7px; color: #49566c; font-size: 12px; font-weight: 600; }
.field small { color: var(--muted); font-size: 11px; font-weight: 400; }
.field input, .stack-form input:not([type="checkbox"]) { width: 100%; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid #dce2eb; border-radius: 8px; background: #fff; color: var(--ink); font-size: 13px; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.field input:focus, .stack-form input:not([type="checkbox"]):focus { border-color: #7890f4; box-shadow: 0 0 0 3px #3d63e81a; }
.button { display: inline-flex; justify-content: center; align-items: center; height: 40px; padding: 0 15px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 700; transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--blue); box-shadow: 0 4px 9px #3d63e822; }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { color: #33435f; background: #fff; border-color: #dce2eb; }
.button-secondary:hover, .button-quiet:hover { background: #f4f6fa; }
.button-quiet { height: 34px; padding: 0 11px; color: #58657a; background: transparent; }
.button-danger { color: #fff; background: var(--red); }
.button-danger:hover { background: #a93845; }
.button-full { width: 100%; height: 44px; margin-top: 5px; }
.notice { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.notice-error { color: #9c3440; background: var(--red-bg); }
.notice-warning { color: var(--amber); background: var(--amber-bg); }
.notice-success { color: var(--green); background: var(--green-bg); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 11px 12px; color: #7b8799; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
td { padding: 14px 12px; border-bottom: 1px solid #edf0f4; color: #46536a; font-size: 12px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.monitor-cell { min-width: 245px; }
.monitor-name { display: block; margin-bottom: 4px; color: var(--ink); font-size: 13px; font-weight: 700; }
.monitor-name:hover, .text-link:hover, .breadcrumb a:hover { color: var(--blue); }
.url-text { display: block; max-width: 370px; overflow: hidden; color: #778397; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.status { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 100px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status-up { color: var(--green); background: var(--green-bg); }
.status-down, .status-error { color: var(--red); background: var(--red-bg); }
.status-unknown { color: var(--amber); background: var(--amber-bg); }
.status + .status { margin-left: 5px; }
.time-cell { min-width: 155px; color: #748095; font-size: 11px; white-space: nowrap; }
.action-cell { text-align: right; white-space: nowrap; }
.text-link { color: #53627a; font-size: 11px; font-weight: 700; }
.empty-state { padding: 33px 12px 25px; text-align: center; }
.empty-state p { max-width: 430px; margin: 0 auto; font-size: 13px; line-height: 1.6; }
.empty-icon { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 13px; border-radius: 12px; color: var(--blue); background: #eef2ff; font-size: 20px; }
.breadcrumb { display: flex; gap: 10px; margin-bottom: 26px; color: #8993a2; font-size: 12px; }
.breadcrumb a { color: #54627a; font-weight: 600; }
.detail-heading { align-items: center; }
.detail-title { display: flex; align-items: center; gap: 12px; }
.detail-title h1 { margin-bottom: 0; }
.detail-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; }
.detail-actions form { margin: 0; }
.detail-url { margin-top: 8px; font-size: 12px; }
.history-panel { padding-bottom: 9px; }
.tls-panel p { margin: 9px 0 0; color: #53627a; font-size: 13px; }
.error-text { max-width: 280px; color: #8d5360; font-size: 11px; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 30px; padding: 19px 21px; border: 1px solid #f0d8dc; border-radius: 12px; background: #fffafa; }
.danger-zone h2 { margin-bottom: 4px; color: #8e3540; font-size: 14px; }
.danger-zone p { margin-bottom: 0; font-size: 12px; }
.login-wrap { display: grid; place-items: center; min-height: calc(100vh - 230px); }
.login-card { width: min(100%, 390px); padding: 32px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); box-shadow: 0 12px 40px #1723390c; }
.login-card h1 { font-size: 29px; }
.login-card > p { margin-bottom: 23px; font-size: 13px; }
.stack-form { display: grid; gap: 9px; }
.stack-form label { color: #49566c; font-size: 12px; font-weight: 600; }
.stack-form small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.stack-form .checkbox-field { display: flex; align-items: start; gap: 9px; line-height: 1.5; }
.stack-form input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.recovery-code { overflow-wrap: anywhere; margin: 16px 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); color: var(--navy); font-size: 15px; font-weight: 700; text-align: center; }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.checker-hero { max-width: 760px; margin: 0 auto 25px; text-align: center; }
.checker-hero .eyebrow { color: var(--blue); }
.checker-hero p { max-width: 620px; margin: 12px auto 0; font-size: 15px; line-height: 1.65; }
.checker-panel, .checker-results { max-width: 760px; margin-right: auto; margin-left: auto; padding: 23px; }
.checker-form { display: grid; gap: 16px; }
.checker-form .field input { height: 48px; font-size: 14px; }
.consent-line { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; color: #49566c; font-size: 12px; line-height: 1.55; }
.consent-line input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--blue); }
.privacy-hint, .request-note { margin: -7px 0 0 27px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.privacy-hint a, .checker-footnote a { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 2px; }
.request-note { margin: 0; padding: 11px 13px; border-radius: 8px; background: #f5f7fa; }
.checker-submit { justify-self: start; min-width: 150px; height: 44px; }
.checker-results { margin-top: 20px; }
.checker-results .section-heading { align-items: start; }
.checker-results .section-heading h2 { margin: 0; font-size: 20px; overflow-wrap: anywhere; }
.reputation-warning { line-height: 1.55; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; }
.result-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.result-card .summary-label { margin-bottom: 8px; }
.result-card strong { display: block; font-size: 14px; line-height: 1.4; }
.result-card p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.redirect-note { margin: 14px 0 0; color: #53627a; font-size: 12px; line-height: 1.5; }
.checker-results > .privacy-hint { margin: 14px 0 0; }
.checker-footnote { max-width: 720px; margin: 25px auto 0; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.6; }
.checker-footnote p { margin-bottom: 8px; }
.footer a { color: #63718a; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 740px) {
  .topbar { height: 64px; padding: 0 20px; }
  .page-shell { width: min(100% - 32px, 1120px); padding-top: 30px; }
  .page-heading { align-items: start; flex-direction: column; gap: 14px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .summary-card { padding: 13px 12px; }
  .summary-card strong { font-size: 22px; }
  .summary-label { font-size: 9px; line-height: 1.4; }
  .add-panel, .monitor-panel, .history-panel, .edit-panel, .tls-panel, .alert-panel, .status-panel { padding: 17px 15px; }
  .heading-actions { align-items: start; flex-direction: column; }
  .add-form, .edit-form { grid-template-columns: 1fr; }
  .add-button { width: 100%; }
  .detail-heading { align-items: start; }
  .detail-actions { justify-content: start; }
  .time-cell { min-width: 135px; }
  .danger-zone { align-items: start; flex-direction: column; }
  .login-card { padding: 26px 22px; }
  .checker-hero { text-align: left; }
  .checker-panel, .checker-results { padding: 17px 15px; }
  .checker-results .section-heading { flex-direction: column; }
  .result-grid { grid-template-columns: 1fr; }
  .checker-submit { width: 100%; }
}
