/* ==========================================================================
   Checkify — liquid glass
   Neutral, layered surfaces with soft blur, thin highlights and one accent.
   ========================================================================== */

:root {
  color-scheme: light;

  --paper: #eceee9;
  --ink: #171a18;
  --ink-soft: #3b423d;
  --muted: #5f6761;
  --muted-2: #848c85;

  --line: rgba(22, 28, 24, 0.08);
  --line-strong: rgba(22, 28, 24, 0.14);

  --accent: #2c6a50;
  --accent-soft: rgba(44, 106, 80, 0.1);
  --accent-line: rgba(44, 106, 80, 0.22);

  --ok: #2f7a58;
  --ok-soft: rgba(47, 122, 88, 0.1);
  --ok-line: rgba(47, 122, 88, 0.22);
  --warn: #92642f;
  --warn-soft: rgba(146, 100, 47, 0.1);
  --warn-line: rgba(146, 100, 47, 0.22);
  --bad: #9e463d;
  --bad-soft: rgba(158, 70, 61, 0.1);
  --bad-line: rgba(158, 70, 61, 0.22);
  --neutral-soft: rgba(22, 28, 24, 0.06);
  --neutral-line: rgba(22, 28, 24, 0.12);

  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.76);
  --glass-quiet: rgba(255, 255, 255, 0.4);
  --field: rgba(255, 255, 255, 0.42);
  --glass-border: rgba(255, 255, 255, 0.78);
  --glass-edge: rgba(18, 30, 23, 0.09);
  --inset-hi: rgba(255, 255, 255, 0.95);
  --inset-lo: rgba(12, 24, 16, 0.06);
  --panel-hi: rgba(255, 255, 255, 0.5);
  --panel-sheen: rgba(255, 255, 255, 0.3);
  --panel-veil: rgba(255, 255, 255, 0.14);
  --header-bg: rgba(255, 255, 255, 0.62);
  --shadow-color: rgba(20, 34, 25, 0.36);
  --blur: blur(32px) saturate(185%) brightness(1.03);

  --radius: 26px;
  --radius-sm: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Segoe UI Variable Display", "Inter", "Segoe UI", -apple-system,
    BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "SF Mono", "JetBrains Mono", Consolas, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;

  --paper: #0a1410;
  --ink: #e8f1eb;
  --ink-soft: #c0d3c6;
  --muted: #93a89b;
  --muted-2: #74897d;

  --line: rgba(190, 232, 208, 0.1);
  --line-strong: rgba(190, 232, 208, 0.18);

  --accent: #8ad9b1;
  --accent-soft: rgba(138, 217, 177, 0.12);
  --accent-line: rgba(138, 217, 177, 0.26);

  --ok: #86dbaa;
  --ok-soft: rgba(134, 219, 170, 0.12);
  --ok-line: rgba(134, 219, 170, 0.26);
  --warn: #e4b489;
  --warn-soft: rgba(228, 180, 137, 0.12);
  --warn-line: rgba(228, 180, 137, 0.26);
  --bad: #ee9f96;
  --bad-soft: rgba(238, 159, 150, 0.12);
  --bad-line: rgba(238, 159, 150, 0.26);

  --neutral-soft: rgba(255, 255, 255, 0.06);
  --neutral-line: rgba(255, 255, 255, 0.12);

  --glass: rgba(28, 45, 37, 0.62);
  --glass-strong: rgba(34, 54, 44, 0.74);
  --glass-quiet: rgba(24, 39, 32, 0.4);
  --field: rgba(4, 12, 8, 0.38);
  --glass-border: rgba(178, 222, 198, 0.13);
  --glass-edge: rgba(0, 0, 0, 0.45);
  --inset-hi: rgba(255, 255, 255, 0.07);
  --inset-lo: rgba(0, 0, 0, 0.4);
  --panel-hi: rgba(255, 255, 255, 0.07);
  --header-bg: rgba(14, 26, 20, 0.78);
  --panel-sheen: rgba(255, 255, 255, 0.09);
  --shadow-color: rgba(0, 0, 0, 0.65);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1200px 820px at 16% -8%, rgba(255, 255, 255, 0.96), transparent 58%),
    radial-gradient(1000px 760px at 94% 2%, rgba(165, 188, 169, 0.7), transparent 62%),
    radial-gradient(1100px 900px at 54% 118%, rgba(116, 148, 124, 0.5), transparent 60%),
    linear-gradient(160deg, #e9ede4 0%, #d8e1d6 56%, #cbd6cb 100%);
  background-size: 165% 165%;
  background-attachment: fixed;
  animation: liquid-drift 52s ease-in-out infinite alternate;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@keyframes liquid-drift {
  from { background-position: 0% 0%; }
  to { background-position: 100% 64%; }
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="dark"] body::after { opacity: 0.05; mix-blend-mode: screen; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1000px 620px at 82% -10%, rgba(50, 92, 72, 0.5), transparent 62%),
    radial-gradient(820px 540px at 2% 4%, rgba(36, 74, 57, 0.45), transparent 58%),
    linear-gradient(180deg, #0c1712 0%, #08120e 60%, #0a1511 100%);
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}
[data-theme="dark"] body::before { opacity: 1; }

h1, h2, h3 { margin: 0; letter-spacing: -0.03em; line-height: 1.12; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
code, .mono { font-family: var(--mono); font-feature-settings: "tnum"; }
svg { display: block; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }

.wrap { width: min(880px, calc(100% - 48px)); margin-inline: auto; }

/* Glass rim: a thin refracted highlight instead of a flat border */
:where(.check, .card, .progress, .settings) { position: relative; }
:where(.check, .card, .progress, .settings)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0.12) 38%,
    rgba(255, 255, 255, 0.06) 62%,
    rgba(255, 255, 255, 0.6)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.8;
}
[data-theme="dark"] :where(.check, .card, .progress, .settings)::after {
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.32),
    rgba(255, 255, 255, 0.04) 40%,
    rgba(255, 255, 255, 0.02) 60%,
    rgba(255, 255, 255, 0.16)
  );
  opacity: 0.9;
}

.skip {
  position: absolute; left: 12px; top: -80px; padding: 8px 14px;
  background: var(--ink); color: var(--paper); border-radius: 999px; z-index: 50;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ header */

.top {
  position: sticky; top: 0; z-index: 20;
  background-color: var(--header-bg);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--glass-border);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  color: #f6fbf8;
  background-color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 6px 14px -10px var(--shadow-color);
}
[data-theme="dark"] .brand-mark { color: #082016; }
.brand-mark svg { width: 20px; height: 20px; }
.brand-text { display: flex; align-items: baseline; gap: 9px; }
.brand-text strong { font-size: 15px; font-weight: 620; letter-spacing: -0.02em; white-space: nowrap; }
.brand-text small { font-size: 11.5px; color: var(--muted-2); letter-spacing: 0.01em; }

.top-right { display: flex; align-items: center; gap: 12px; }

/* iOS-style theme switch */
.theme-switch {
  flex: none; width: 46px; height: 28px; padding: 0; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(22, 28, 24, 0.08);
  position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color 0.8s var(--ease), border-color 0.8s var(--ease);
}
.theme-switch .knob {
  position: absolute; top: 2px; left: 2px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; color: #8a7742;
  box-shadow: 0 1px 3px rgba(20, 20, 20, 0.22);
  display: grid; place-items: center;
  transition: transform 1s cubic-bezier(0.25, 1.05, 0.35, 1),
    background-color 0.8s var(--ease), color 0.8s var(--ease);
}
.theme-switch .switch-icon {
  position: absolute; width: 13px; height: 13px;
  transition: opacity 0.72s var(--ease), transform 1s var(--ease);
}
.theme-switch .sun { opacity: 1; transform: none; }
.theme-switch .moon { opacity: 0; transform: rotate(-80deg) scale(0.55); }
[data-theme="dark"] .theme-switch { background: rgba(138, 217, 177, 0.28); border-color: var(--accent-line); }
[data-theme="dark"] .theme-switch .knob {
  transform: translateX(18px); background: #dcf4e6; color: #1c4a35;
}
[data-theme="dark"] .theme-switch .sun { opacity: 0; transform: rotate(80deg) scale(0.55); }
[data-theme="dark"] .theme-switch .moon { opacity: 1; transform: none; }
.theme-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* -------------------------------------------------------------------- form */

.check {
  position: relative;
  margin-top: 42px;
  padding: 38px 36px 30px;
  border-radius: 32px;
  background-color: var(--glass);
  background-image:
    radial-gradient(120% 100% at 10% -12%, var(--panel-sheen), transparent 55%),
    linear-gradient(165deg, var(--panel-veil), transparent 60%);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 var(--inset-hi),
    inset 0 -1px 0 var(--inset-lo),
    inset 0 0 0 1px var(--glass-edge),
    0 50px 100px -70px var(--shadow-color),
    0 2px 10px -6px var(--shadow-color);
}
.check h1 {
  font-size: clamp(1.85rem, 4.4vw, 2.65rem);
  font-weight: 620;
  letter-spacing: -0.04em;
  max-width: 20ch;
}
.sub { margin-top: 10px; font-size: 15px; color: var(--muted); max-width: 64ch; }

#form { margin-top: 26px; }

.input-row { display: flex; gap: 10px; align-items: stretch; }

.input-shell {
  position: relative;
  flex: 1; display: flex; align-items: center; gap: 11px;
  padding: 0 15px; min-width: 0;
  border-radius: 18px;
  background: var(--field);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--inset-hi);
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.input-shell:focus-within {
  border-color: var(--accent-line);
  box-shadow: inset 0 1px 0 var(--inset-hi), 0 0 0 4px var(--accent-soft),
    0 16px 34px -24px var(--shadow-color);
}
.input-shell.invalid { border-color: var(--bad-line); box-shadow: inset 0 1px 0 var(--inset-hi), 0 0 0 4px var(--bad-soft); }
.input-icon { width: 19px; height: 19px; color: var(--muted-2); flex: none; }

#ip {
  width: 100%; min-width: 0; padding: 16px 0; border: 0; background: transparent;
  font-family: var(--mono); font-size: 17px; letter-spacing: -0.01em; color: var(--ink);
}
#ip::placeholder { color: var(--muted-2); opacity: 0.8; }
#ip:focus { outline: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 22px; border-radius: 16px; font-size: 15px; font-weight: 570;
  white-space: nowrap;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background-color 0.3s var(--ease), opacity 0.3s var(--ease);
}
.btn.primary {
  color: #f7fbf9;
  background-color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 12px 26px -16px var(--shadow-color);
}
[data-theme="dark"] .btn.primary { color: #072015; }
.btn.primary:hover { transform: translateY(-1px); }
.btn.primary:active { transform: none; }
.btn.primary:disabled { opacity: 0.6; cursor: progress; transform: none; box-shadow: none; }

.row-hint {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px;
}
.hint { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--muted-2); }
.hint code {
  font-size: 11.5px; color: var(--ink-soft); background: var(--neutral-soft);
  padding: 2px 6px; border-radius: 6px;
}
.row-hint .mini { flex: none; }

.mini {
  padding: 6px 11px; border-radius: 9px; font-size: 12.5px; color: var(--muted);
  border: 1px solid transparent;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.mini:hover { background-color: var(--glass-quiet); color: var(--ink); border-color: var(--glass-border); }

.settings {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin-top: 12px; padding: 14px 16px;
  border: 1px solid var(--glass-border); border-radius: 16px;
  background-color: var(--glass);
  background-image:
    radial-gradient(120% 100% at 12% -12%, var(--panel-hi), transparent 55%),
    linear-gradient(165deg, var(--panel-veil), transparent 60%);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 var(--inset-hi);
}
.settings label { font-size: 12.5px; color: var(--muted); }
.settings input {
  width: 180px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--glass); font-family: var(--mono); font-size: 13px; color: var(--ink);
}
.settings-note { font-size: 11.5px; color: var(--muted-2); flex: 1 1 240px; }

.error {
  margin-top: 12px; padding: 10px 13px; border-radius: 12px;
  background: var(--bad-soft); color: var(--bad); font-size: 13px;
  border: 1px solid var(--bad-line);
}

/* ---------------------------------------------------------------- progress */

.progress {
  margin-top: 20px; padding: 18px 20px;
  border: 1px solid var(--glass-border); border-radius: 20px;
  background-color: var(--glass);
  background-image:
    radial-gradient(120% 100% at 88% -14%, var(--panel-hi), transparent 55%),
    linear-gradient(165deg, var(--panel-veil), transparent 60%);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 var(--inset-hi), inset 0 -1px 0 var(--inset-lo), 0 18px 44px -30px var(--shadow-color);
}
.progress-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.progress-head .mono { font-size: 13.5px; color: var(--ink-soft); }
.progress-time { color: var(--muted-2); font-size: 12px; font-family: var(--mono); }

.steps { display: flex; gap: 20px; margin: 14px 0; padding: 0; list-style: none; }
.steps li { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted-2); }
.steps .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong);
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.steps li.active { color: var(--ink); }
.steps li.active .dot { background: var(--accent); animation: pulse 1.6s infinite; }
.steps li.done { color: var(--muted); }
.steps li.done .dot { background: var(--ok); }
.steps li.fail .dot { background: var(--bad); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-soft); }
  70% { box-shadow: 0 0 0 7px rgba(44, 106, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(44, 106, 80, 0); }
}

.bar { height: 4px; border-radius: 999px; background: var(--neutral-soft); overflow: hidden; }
.bar span {
  display: block; height: 100%; width: 8%; border-radius: inherit;
  background-color: var(--accent);
  transition: width 0.5s var(--ease);
}

/* ------------------------------------------------------------------ result */

.result { margin-top: 18px; animation: rise 0.5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.card {
  position: relative; overflow: hidden;
  padding: 26px 28px 18px;
  border-radius: var(--radius);
  background-color: var(--glass);
  background-image:
    radial-gradient(120% 100% at 88% -14%, var(--panel-hi), transparent 55%),
    linear-gradient(165deg, var(--panel-veil), transparent 60%);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 var(--inset-hi),
    inset 0 -1px 0 var(--inset-lo),
    inset 0 0 0 1px var(--glass-edge),
    0 30px 70px -44px var(--shadow-color),
    0 2px 8px -4px var(--shadow-color);
}
.card-accent {
  position: absolute; inset: 0 0 auto 0; height: 1px;
  background: var(--neutral-line);
}
.card[data-tone="ok"] .card-accent { background: var(--ok-line); }
.card[data-tone="warn"] .card-accent { background: var(--warn-line); }
.card[data-tone="danger"] .card-accent { background: var(--bad-line); }
.card[data-tone="neutral"] .card-accent { background: var(--neutral-line); }

.card-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.head-main { min-width: 0; }

.ip-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ip { font-size: 13.5px; color: var(--muted); letter-spacing: 0; }
.geo { font-size: 12.5px; color: var(--muted-2); }

.card h2 { margin-top: 7px; font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 620; letter-spacing: -0.035em; }
.card p { margin-top: 9px; font-size: 14px; line-height: 1.55; color: var(--muted); max-width: 58ch; }

.badge-wrap { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 620; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--neutral-soft); color: var(--ink-soft);
  border: 1px solid var(--neutral-line);
  white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.card[data-tone="ok"] .badge { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.card[data-tone="warn"] .badge { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.card[data-tone="danger"] .badge { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.card[data-tone="neutral"] .badge { background: var(--neutral-soft); color: var(--muted); border-color: var(--neutral-line); }

.conf { font-size: 11px; color: var(--muted-2); }

.facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  margin: 22px 0 0; background: var(--line); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden;
}
.fact { padding: 12px 14px; background-color: var(--glass-strong); }
.fact dt { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.fact dd { margin: 4px 0 0; font-size: 13.5px; font-weight: 560; color: var(--ink-soft); }
.fact dd.bad { color: var(--bad); }
.fact dd.good { color: var(--ok); }
.fact dd.warn { color: var(--warn); }

.ports { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.port {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 12px; color: var(--muted);
}
.port .pnum { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.port .state { font-size: 11.5px; }
.port.open { border-color: var(--ok-line); background: var(--ok-soft); }
.port.open .state { color: var(--ok); }
.port.closed { background: var(--neutral-soft); }
.port.reset, .port.timeout { border-color: var(--warn-line); background: var(--warn-soft); }
.port.reset .state, .port.timeout .state { color: var(--warn); }
.port.unreachable, .port.error { border-color: var(--bad-line); background: var(--bad-soft); }
.port.unreachable .state, .port.error .state { color: var(--bad); }
.port .tls-mark { font-size: 10.5px; color: var(--muted-2); border-left: 1px solid var(--line); padding-left: 7px; }

.more { margin-top: 16px; border-top: 1px solid var(--line); }
.more summary {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 0 7px; font-size: 12.5px; color: var(--muted); cursor: pointer;
  list-style: none; user-select: none;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::before {
  content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(-45deg);
  transition: transform 0.3s var(--ease);
}
.more[open] summary::before { transform: rotate(45deg); }
.more-body { padding: 6px 0 4px; }

.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 7px 16px; margin: 0; }
.kv dt { font-size: 12px; color: var(--muted-2); }
.kv dd { margin: 0; font-size: 12px; color: var(--ink-soft); word-break: break-word; }
.kv dd.mono { font-size: 11.5px; }

.notes { margin: 13px 0 0; padding-left: 16px; font-size: 12px; color: var(--muted); line-height: 1.55; }
.notes li + li { margin-top: 3px; }

.card-actions {
  display: flex; justify-content: flex-end; gap: 4px;
  margin-top: 8px; padding-top: 11px; border-top: 1px solid var(--line);
}
.card-actions .mini { font-size: 12px; }

/* ------------------------------------------------------------------ footer */

.bottom { margin-top: 30px; padding: 18px 0 24px; border-top: 1px solid var(--line); }
.bottom-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px;
  font-size: 11.5px; color: var(--muted-2);
}
.bottom-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.build { letter-spacing: 0.01em; }
.build a {
  color: var(--ink-soft); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.build a:hover { color: var(--ink); border-bottom-color: currentColor; }

/* ------------------------------------------------------------ theme change */

html.theme-fade,
html.theme-fade * {
  transition-property: color, background-color, border-color, box-shadow,
    opacity, fill, stroke !important;
  transition-duration: 0.8s !important;
  transition-timing-function: var(--ease) !important;
}

/* The switch keeps its own long, springy motion during the crossfade. */
html.theme-fade .theme-switch {
  transition: background-color 0.8s var(--ease), border-color 0.8s var(--ease) !important;
}
html.theme-fade .theme-switch .knob {
  transition: transform 1s cubic-bezier(0.25, 1.05, 0.35, 1),
    background-color 0.8s var(--ease), color 0.8s var(--ease) !important;
}
html.theme-fade .theme-switch .switch-icon {
  transition: opacity 0.72s var(--ease), transform 1s var(--ease) !important;
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 700px) {
  .wrap { width: calc(100% - 28px); }
  .check {
    margin-top: 22px;
    padding: 24px 18px 22px;
    border-radius: 24px;
  }
  .check h1 { font-size: 1.7rem; }
  .sub { font-size: 13.5px; }
  .input-row { flex-direction: column; gap: 8px; }
  .input-shell { min-height: 54px; }
  .btn.primary { min-height: 48px; }
  .row-hint { flex-wrap: wrap; }
  .hint { font-size: 11.5px; }
  .brand-text small { display: none; }
  .brand-text { gap: 0; }
  .top-right { gap: 10px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 20px 18px 14px; }
  .card-head { flex-direction: column-reverse; gap: 10px; }
  .badge-wrap { flex-direction: row; align-items: center; gap: 8px; }
  .card p { font-size: 13px; }
  .kv { grid-template-columns: 108px minmax(0, 1fr); }
  .card-actions { justify-content: flex-start; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  /* Keyframe motion is off, but the explicit theme crossfade stays: it is a
     colour change the user triggers, not ambient movement. */
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
