/* The hidden attribute always wins over display rules (.row, .btn, ...). */
[hidden] { display: none !important; }

:root {
  --bg: #0b0d12;
  --bg-2: #10131a;
  --panel: #151922;
  --panel-2: #1b202b;
  --border: #252b38;
  --border-strong: #333b4c;
  --text: #e7eaf0;
  --muted: #8b93a7;
  --faint: #5d6579;
  --accent: #1f8fff;
  --accent-2: #5fb4ff;
  --accent-bg: rgba(31, 143, 255, 0.12);
  --green: #3ecf8e;
  --green-bg: rgba(62, 207, 142, 0.12);
  --yellow: #f5b83d;
  --yellow-bg: rgba(245, 184, 61, 0.12);
  --red: #f26d6d;
  --red-bg: rgba(242, 109, 109, 0.12);
  --blue: #52a8ff;
  --blue-bg: rgba(82, 168, 255, 0.12);
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }

/* ---------- App shell (client + admin) ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--text); padding: 4px 10px 18px; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  display: grid; place-items: center; font-size: 14px; color: #fff;
}
.brand small { font-weight: 500; font-size: 11px; color: var(--accent-2); background: var(--accent-bg); padding: 2px 6px; border-radius: 4px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 500;
}
.nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--accent-bg); color: var(--text); }
.nav a .ico { width: 18px; text-align: center; opacity: 0.85; }
.nav .count { margin-left: auto; font-size: 11px; background: var(--red); color: #fff; border-radius: 10px; padding: 0 7px; }
.sidebar-foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--border); }
.sidebar-foot .who { font-weight: 600; }
.sidebar-foot .email { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

.main { min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 32px; border-bottom: 1px solid var(--border);
  background: rgba(11, 13, 18, 0.85); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 5;
}
.topbar h1 { margin: 0; font-size: 19px; }
.content { padding: 28px 32px 60px; max-width: 1240px; }
.menu-toggle { display: none; }

.impersonation {
  background: var(--yellow-bg); color: var(--yellow); border-bottom: 1px solid rgba(245, 184, 61, 0.3);
  padding: 8px 32px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

/* ---------- Public layout ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1180px; margin: 0 auto; padding: 18px 24px;
}
.site-header nav { display: flex; gap: 22px; align-items: center; }
.site-header nav a { color: var(--muted); font-weight: 500; }
.site-header nav a:hover { color: var(--text); text-decoration: none; }
.site-main { max-width: 1180px; margin: 0 auto; padding: 0 24px 80px; }
.site-footer { border-top: 1px solid var(--border); color: var(--faint); padding: 28px 24px; text-align: center; font-size: 13px; }

.hero { padding: 72px 0 56px; text-align: center; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); letter-spacing: -0.03em; margin-bottom: 16px; }
.hero h1 span { background: linear-gradient(90deg, var(--accent-2), #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 17px; color: var(--muted); max-width: 620px; margin: 0 auto 28px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 40px 0 56px; }
.feature { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.feature .ico { font-size: 20px; margin-bottom: 10px; }
.feature p { color: var(--muted); margin: 0; }
.section-title { text-align: center; margin: 24px 0 24px; }

.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; max-width: 900px; margin: 0 auto 8px; text-align: left; }
.footer-cols div { display: flex; flex-direction: column; gap: 6px; }
.footer-cols b { color: var(--text); font-weight: 600; margin-bottom: 2px; }
.footer-cols a { color: var(--muted); }
@media (max-width: 640px) { .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-weight: 600; color: var(--accent-2); margin-bottom: 10px !important; }
.hero:not(.hero-xl) p + p { margin-top: -12px; }
.use-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.use-links a { padding: 8px 14px; border: 1px solid var(--border); border-radius: 20px; color: var(--text); background: var(--panel); }
.use-links a:hover { border-color: var(--accent); text-decoration: none; }
.faq summary { cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.guide-card { display: block; color: var(--text); }
.guide-card:hover { border-color: var(--accent); text-decoration: none; }
.guide pre { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; font-size: 13px; line-height: 1.5; }
.guide code { font-family: var(--mono); }
.guide p code, .guide li code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
.footer-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.footer-links a { color: var(--muted); }
.legal { max-width: 760px; margin: 40px auto 0; line-height: 1.7; }
.legal h2 { margin-top: 28px; font-size: 16px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal .caps { font-size: 13px; letter-spacing: 0.01em; color: var(--muted); }
.legal .callout { background: var(--accent-bg); border: 1px solid rgba(31, 143, 255, 0.35); border-radius: var(--radius-sm); padding: 12px 16px; }

/* ---------- Components ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.card-body { padding: 20px; }
.card-head { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card.danger { border-color: rgba(242, 109, 109, 0.35); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }

.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.stat .label { color: var(--muted); font-size: 12.5px; }
.stat .value { font-size: 24px; font-weight: 700; margin-top: 4px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .sub { color: var(--faint); font-size: 12px; margin-top: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--panel-2); color: var(--text);
  font: 500 13.5px var(--font); cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #232937; text-decoration: none; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #1479e0; }
.btn-danger { background: transparent; border-color: rgba(242, 109, 109, 0.5); color: var(--red); }
.btn-danger:hover { background: var(--red-bg); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--panel-2); color: var(--text); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
form.inline { display: inline; }

label { display: block; font-weight: 500; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.hint { color: var(--faint); font-size: 12.5px; margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border-strong); color: var(--text);
  border-radius: var(--radius-sm); padding: 9px 11px; font: 14px var(--font);
}
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--faint); }
.checkbox { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.checkbox input { margin-top: 3px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, 0.015); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 500; text-transform: capitalize; white-space: nowrap; background: var(--panel-2); color: var(--muted); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-active, .badge-paid, .badge-running, .badge-answered { background: var(--green-bg); color: var(--green); }
.badge-pending, .badge-unpaid, .badge-customer_reply, .badge-open { background: var(--yellow-bg); color: var(--yellow); }
.badge-suspended, .badge-stopped, .badge-overdue { background: var(--red-bg); color: var(--red); }
.badge-terminated, .badge-cancelled, .badge-closed, .badge-refunded { background: var(--panel-2); color: var(--faint); }

.alert { padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid; }
.alert-success { background: var(--green-bg); border-color: rgba(62, 207, 142, 0.3); color: #b6f0d4; }
.alert-error { background: var(--red-bg); border-color: rgba(242, 109, 109, 0.3); color: #ffc9c9; }
.alert-info { background: var(--blue-bg); border-color: rgba(82, 168, 255, 0.3); color: #cbe4ff; }
.alert-warn { background: var(--yellow-bg); border-color: rgba(245, 184, 61, 0.3); color: #fde3ad; }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.copy { display: inline-flex; align-items: center; gap: 8px; }
.copy button { background: none; border: 0; color: var(--faint); cursor: pointer; padding: 2px 4px; border-radius: 4px; font-size: 12px; }
.copy button:hover { color: var(--text); background: var(--panel-2); }
.secret { filter: blur(5px); transition: filter 0.15s; cursor: pointer; user-select: none; }
.secret.revealed { filter: none; user-select: text; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }

.meter { height: 6px; background: var(--panel-2); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.meter.warn > span { background: var(--yellow); }
.meter.bad > span { background: var(--red); }

.server-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.server-head .flag { font-size: 28px; }
.server-head h1 { margin: 0; font-size: 20px; }
.power-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--faint); }
.power-dot.running { background: var(--green); box-shadow: 0 0 0 4px var(--green-bg); }
.power-dot.stopped, .power-dot.suspended { background: var(--red); box-shadow: 0 0 0 4px var(--red-bg); }

/* Store */
.loc-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.loc-tab { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.loc-tab:hover { border-color: var(--border-strong); text-decoration: none; }
.loc-tab.active { border-color: var(--accent); background: var(--accent-bg); }
.loc-tab .flag { font-size: 20px; }
.loc-tab small { display: block; color: var(--muted); font-size: 12px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.plan { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; }
.plan:hover { border-color: var(--border-strong); }
.plan h3 { font-size: 16px; margin-bottom: 2px; }
.plan .price { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 10px 0 14px; }
.plan .price small { font-size: 13px; color: var(--muted); font-weight: 400; }
.plan ul { list-style: none; padding: 0; margin: 0 0 18px; color: var(--muted); }
.plan li { padding: 4px 0; display: flex; justify-content: space-between; gap: 8px; }
.plan li b { color: var(--text); font-weight: 500; }
.plan .btn { margin-top: auto; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: block; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; }
.choice span small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-bg); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); }
.summary { position: sticky; top: 90px; }
.summary .total { font-size: 26px; font-weight: 700; }

/* Delivery progress */
.progress { list-style: none; padding: 0; margin: 16px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.progress li { flex: 1; min-width: 120px; display: flex; flex-direction: column; gap: 8px; color: var(--faint); font-size: 12.5px; }
.progress li span { height: 4px; border-radius: 4px; background: var(--panel-2); }
.progress li.done { color: var(--muted); }
.progress li.done span { background: var(--accent); }
.progress li.current { color: var(--text); font-weight: 500; }
.progress li.current span { background: linear-gradient(90deg, var(--accent), var(--panel-2)); background-size: 200% 100%; animation: progress-pulse 1.6s linear infinite; }
@keyframes progress-pulse { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .progress li.current span { animation: none; background: var(--accent); opacity: 0.6; } }

/* Tickets */
.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
.msg.staff { border-color: rgba(31, 143, 255, 0.4); background: linear-gradient(0deg, var(--accent-bg), var(--accent-bg)), var(--panel); }
.msg-head { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.msg-head b { color: var(--text); }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at top, rgba(31, 143, 255, 0.12), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .brand { justify-content: center; padding-bottom: 24px; }
.auth-card h1 { text-align: center; }
.auth-foot { text-align: center; color: var(--muted); margin-top: 18px; }

.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.bars span { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; opacity: 0.85; }
.bars span:hover { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; z-index: 20; transform: translateX(-100%); transition: transform 0.2s; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow); }
  .menu-toggle { display: inline-flex; }
  .topbar, .impersonation { padding-left: 16px; padding-right: 16px; }
  .content { padding: 20px 16px 48px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .site-header nav .hide-sm { display: none; }
  .site-header, .site-main { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Landing ---------- */
#ocean { position: fixed; inset: 0; width: 100%; height: 100vh; z-index: 0; pointer-events: none; }
.ocean-fade { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 70% 0%, rgba(31, 143, 255, 0.16), transparent 60%),
              radial-gradient(ellipse 60% 50% at 10% 20%, rgba(34, 211, 238, 0.10), transparent 60%),
              linear-gradient(180deg, rgba(11, 13, 18, 0.2) 0%, rgba(11, 13, 18, 0.55) 55%, rgba(11, 13, 18, 0.9) 100%); }
.has-ocean .site-header, .has-ocean .site-main, .has-ocean .site-footer { position: relative; z-index: 1; }
.has-ocean .site-header { backdrop-filter: blur(6px); }
.has-ocean .site-footer { background: rgba(11, 13, 18, 0.85); }

.hero-xl { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; text-align: left; padding: 84px 0 64px; min-height: calc(100vh - 80px); }
.hero-xl h1 { font-size: clamp(36px, 5.2vw, 64px); line-height: 1.04; }
.hero-xl p { margin-left: 0; }
.hero h1 span { background: linear-gradient(90deg, var(--accent-2), #67e8f9, var(--accent-2)); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite; }
@keyframes shimmer { to { background-position: 200% center; } }
.hero-cta { margin: 8px 0 22px; }
.btn-glass { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.16); backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.12); }
.trust { list-style: none; padding: 0; margin: 0; display: flex; gap: 10px 18px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }

.hero-visual { position: relative; perspective: 1200px; min-height: 380px; }
[data-tilt] { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.25s ease-out, border-color 0.2s, box-shadow 0.3s; transform-style: preserve-3d; }
.term { position: relative; background: rgba(13, 16, 23, 0.88); border: 1px solid rgba(95, 180, 255, 0.25); border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03) inset, 0 0 60px rgba(31, 143, 255, 0.15); backdrop-filter: blur(10px); overflow: hidden; --rx: 6deg; --ry: -14deg; animation: float 7s ease-in-out infinite; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: #f26d6d; }
.term-bar span:nth-child(2) { background: #f5b83d; }
.term-bar span:nth-child(3) { background: #3ecf8e; }
.term-bar b { margin-left: 8px; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.term pre { margin: 0; padding: 18px 20px 22px; font-family: var(--mono); font-size: 13px; line-height: 1.75; white-space: pre-wrap; color: #cfd8e6; }
.term i { color: var(--accent-2); font-style: normal; }
.term em { color: #3ecf8e; font-style: normal; }
.term b { color: #67e8f9; font-weight: 500; }
.cursor { display: inline-block; width: 8px; height: 16px; background: #67e8f9; vertical-align: -3px; margin-left: 4px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.float-card { position: absolute; padding: 12px 16px; border-radius: 12px; background: rgba(21, 25, 34, 0.9); border: 1px solid rgba(95, 180, 255, 0.28); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); backdrop-filter: blur(8px); display: flex; flex-direction: column; gap: 2px; animation: float 6s ease-in-out infinite; }
.float-card small { color: var(--muted); }
.fc-1 { right: -12px; top: -26px; --rx: 8deg; --ry: -18deg; animation-delay: -2s; }
.fc-2 { left: -30px; bottom: -10px; --rx: -6deg; --ry: 14deg; animation-delay: -4s; }

.block { margin: 90px 0; }
.section-sub { text-align: center; color: var(--muted); margin: -12px auto 32px; max-width: 560px; }
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.stats-band div { background: rgba(21, 25, 34, 0.85); padding: 26px 20px; text-align: center; backdrop-filter: blur(6px); }
.stats-band b { display: block; font-size: 30px; letter-spacing: -0.02em; background: linear-gradient(90deg, #fff, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats-band span { color: var(--muted); font-size: 13px; }

.pop-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pop-card { position: relative; background: rgba(21, 25, 34, 0.82); border: 1px solid var(--border); border-radius: 14px; padding: 22px; overflow: hidden; backdrop-filter: blur(6px); }
.pop-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(31, 143, 255, 0.14), transparent 45%); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.pop-card:hover::before { opacity: 1; }
.pop-card:hover { border-color: rgba(95, 180, 255, 0.45); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(31, 143, 255, 0.12); }
.pop-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: linear-gradient(135deg, rgba(31, 143, 255, 0.25), rgba(34, 211, 238, 0.12)); border: 1px solid rgba(95, 180, 255, 0.3); margin-bottom: 14px; transform: translateZ(30px); }
.pop-card h3 { transform: translateZ(20px); }
.pop-card p { color: var(--muted); margin: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; background: rgba(21, 25, 34, 0.82); border: 1px solid var(--border); border-radius: 14px; padding: 26px 22px 22px; backdrop-filter: blur(6px); }
.step span { position: absolute; top: -16px; left: 22px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, var(--accent), #22d3ee); box-shadow: 0 6px 20px rgba(31, 143, 255, 0.45); }
.step p { color: var(--muted); margin: 0; }

.split-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 16px 0 22px; display: grid; gap: 10px; }
.checks li { padding-left: 28px; position: relative; }
.checks li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--green-bg); color: var(--green); }
.panel-mock { background: rgba(21, 25, 34, 0.92); border: 1px solid rgba(95, 180, 255, 0.25); border-radius: 14px; padding: 18px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5); --rx: 4deg; --ry: -10deg; }
.pm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pm-head .badge { margin-left: auto; }
.pm-tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--border); margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.pm-tabs span { padding-bottom: 8px; }
.pm-tabs .on { color: var(--text); border-bottom: 2px solid var(--accent); }
.pm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.pm-stats div { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.pm-stats small { color: var(--muted); display: block; }
.pm-stats b { font-size: 18px; }
.pm-stats i { display: block; height: 4px; border-radius: 4px; margin-top: 6px; background: linear-gradient(90deg, var(--accent) var(--w), var(--panel-2) var(--w)); }
.pm-row { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.pm-row code { color: var(--text); }

.showcase { position: relative; min-height: 440px; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; background: radial-gradient(ellipse at 70% 50%, rgba(31, 143, 255, 0.10), transparent 60%), rgba(13, 16, 23, 0.85); display: grid; align-items: center; }
.showcase-copy { position: relative; z-index: 1; max-width: 480px; padding: 48px; }
.showcase-copy p { color: var(--muted); }
#ddos-viz { position: absolute; inset: 0; width: 100%; height: 100%; }
.ddos-showcase .showcase-copy { background: linear-gradient(90deg, rgba(13, 16, 23, 0.92) 70%, transparent); max-width: 540px; }
.viz-legend { position: absolute; right: 22px; bottom: 16px; z-index: 1; display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.viz-legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.lg-bad::before { background: #f26d6d; }
.lg-good::before { background: #3ecf8e; }
.backup-showcase { grid-template-columns: 1fr 1.2fr; }
.backup-rings { position: relative; height: 320px; display: grid; place-items: center; }
.backup-rings b { font-size: 54px; filter: drop-shadow(0 0 24px rgba(34, 211, 238, 0.6)); z-index: 1; }
.backup-rings i { position: absolute; width: 120px; height: 120px; border-radius: 50%; border: 2px solid rgba(95, 180, 255, 0.5); animation: ripple 3.6s ease-out infinite; }
.backup-rings i:nth-child(2) { animation-delay: 1.2s; }
.backup-rings i:nth-child(3) { animation-delay: 2.4s; }
@keyframes ripple { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(2.6); opacity: 0; } }

.use-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.use-card { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 12px; background: rgba(21, 25, 34, 0.82); border: 1px solid var(--border); color: var(--text); font-weight: 500; backdrop-filter: blur(6px); }
.use-card span { font-size: 20px; }
.use-card em { margin-left: auto; font-style: normal; color: var(--faint); transition: transform 0.2s, color 0.2s; }
.use-card:hover { border-color: rgba(95, 180, 255, 0.45); text-decoration: none; }
.use-card:hover em { transform: translateX(4px); color: var(--accent-2); }

.loc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.loc-card { background: rgba(21, 25, 34, 0.82); border: 1px solid var(--border); border-radius: 16px; padding: 26px; backdrop-filter: blur(6px); }
.loc-flag { font-size: 34px; margin-bottom: 8px; }
.faq-block { max-width: 780px; margin-left: auto; margin-right: auto; }
.faq-block .faq { background: rgba(21, 25, 34, 0.85); }
.cta-band { text-align: center; padding: 56px 24px; border-radius: 20px; margin: 90px 0 30px; background: radial-gradient(ellipse at top, rgba(31, 143, 255, 0.25), transparent 70%), rgba(21, 25, 34, 0.85); border: 1px solid rgba(95, 180, 255, 0.25); }
.cta-band p { color: var(--muted); }

.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.price-card { position: relative; background: rgba(21, 25, 34, 0.86); border: 1px solid var(--border); border-radius: 16px; padding: 26px; backdrop-filter: blur(8px); display: flex; flex-direction: column; }
.price-card.featured { border-color: rgba(95, 180, 255, 0.6); box-shadow: 0 0 40px rgba(31, 143, 255, 0.2); }
.price-card .price { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; margin: 8px 0 2px; }
.price-card .price small { font-size: 14px; color: var(--muted); font-weight: 400; }
.price-card ul { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 8px; color: var(--muted); }
.price-card ul b { color: var(--text); }
.price-card .btn { margin-top: auto; }
.ribbon { position: absolute; top: 14px; right: 14px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: linear-gradient(135deg, var(--accent), #22d3ee); }

/* 3D pop on scroll. Only hidden when JS is running, so content never disappears without it. */
.js .reveal { opacity: 0; transform: perspective(900px) translateY(60px) rotateX(22deg) scale(0.94); transform-origin: 50% 100%; transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.2, 0.9, 0.25, 1.15); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.in[data-tilt] { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: opacity 0.7s ease, transform 0.25s ease-out; }

@media (max-width: 1000px) {
  .hero-xl, .split-feature, .backup-showcase { grid-template-columns: 1fr; }
  .hero-xl { min-height: 0; text-align: left; }
  .hero-visual { margin: 0 12px; }
  .pop-grid, .use-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .ddos-showcase .showcase-copy { background: rgba(13, 16, 23, 0.85); }
}
@media (max-width: 640px) {
  .pop-grid, .use-grid, .steps, .loc-grid, .price-grid { grid-template-columns: 1fr; }
  .showcase-copy { padding: 28px 22px; }
  .fc-1, .fc-2 { display: none; }
  .block { margin: 60px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .term, .float-card, .backup-rings i, .hero h1 span { animation: none; }
}

/* ---------- Services dropdown ---------- */
.site-header { position: relative; z-index: 20; }
.nav-dd { position: relative; }
.nav-dd-btn { background: none; border: 0; color: var(--muted); font: 500 14px var(--font); cursor: pointer; padding: 6px 0; display: inline-flex; align-items: center; gap: 5px; }
.nav-dd-btn span { font-size: 10px; transition: transform 0.2s; }
.nav-dd-btn:hover, .nav-dd.open .nav-dd-btn { color: var(--text); }
.nav-dd.open .nav-dd-btn span { transform: rotate(180deg); }
.dd-panel { position: absolute; top: calc(100% + 14px); left: 50%; width: min(1020px, calc(100vw - 32px)); transform: translateX(-50%) translateY(8px); opacity: 0; visibility: hidden; transition: opacity 0.18s, transform 0.18s, visibility 0.18s; background: #10131a; border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(31, 143, 255, 0.1); backdrop-filter: blur(12px); padding: 18px; }
.dd-panel::before { content: ''; position: absolute; top: -16px; left: 0; right: 0; height: 16px; } /* hover bridge */
.nav-dd.open .dd-panel { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
@media (hover: hover) { .nav-dd:hover .dd-panel { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); } .nav-dd:hover .nav-dd-btn { color: var(--text); } }
.dd-cols { display: grid; grid-template-columns: 1.15fr 1.15fr 0.9fr 0.9fr; gap: 10px; }
.dd-note { font-size: 11.5px; color: var(--faint); padding: 6px 10px; }
.dd-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); font-weight: 600; padding: 4px 10px 8px; }
.dd-cols a { display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; color: var(--text); }
.dd-cols a:hover { background: var(--panel-2); text-decoration: none; }
.dd-cols a span { grid-row: span 2; font-size: 17px; text-align: center; }
.dd-cols a b { font-weight: 500; font-size: 13.5px; }
.dd-cols a small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.soon { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--yellow); background: var(--yellow-bg); padding: 1px 6px; border-radius: 10px; margin-left: 4px; vertical-align: 1px; }
.dd-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 12px; padding: 12px 10px 0; }
.dd-foot > a { color: var(--accent-2); }
@media (max-width: 1100px) { .dd-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) {
  .nav-dd { position: static; }
  .dd-panel { position: absolute; left: 16px; right: 16px; width: auto; transform: translateY(8px); max-height: calc(100vh - 90px); overflow-y: auto; }
  .nav-dd.open .dd-panel { transform: translateY(0); }
  .dd-cols { grid-template-columns: 1fr; }
}

@media (min-width: 801px) {
  .nav-dd .dd-panel { left: auto; right: -260px; transform: translateY(8px); }
  .nav-dd.open .dd-panel { transform: translateY(0); }
}
@media (min-width: 801px) and (hover: hover) { .nav-dd:hover .dd-panel { transform: translateY(0); } }

.offer-strip { display: grid; grid-template-columns: 1fr 1.6fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-top: 18px; }
.offer-strip div { background: rgba(21, 25, 34, 0.85); padding: 18px 22px; display: flex; flex-direction: column; gap: 4px; backdrop-filter: blur(6px); }
.offer-strip b { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); }
@media (max-width: 800px) { .offer-strip { grid-template-columns: 1fr; } }

/* The header (and its dropdown) must sit above page content, including on ocean pages. */
.has-ocean .site-header, .site-header { z-index: 30; }

.loc-region { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); font-weight: 600; margin: 14px 0 8px; }

.pay-summary { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px; display: grid; gap: 6px; }
.pay-summary .pay-total { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 2px; }

/* ---- TidalVPS app: download page, promo, banner ---- */
.in-app .hide-in-app { display: none !important; }
.app-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 36px; align-items: center; text-align: left; max-width: 1100px; margin: 0 auto; }
.app-hero h1, .app-hero p { margin-left: 0; margin-right: 0; }
.app-cta { margin: 18px 0 12px; flex-wrap: wrap; }
.on-mobile .qr-card { display: none; }
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px; text-align: center; max-width: 300px; justify-self: center; }
.qr-card .qr { background: #fff; border-radius: 14px; padding: 10px; width: 190px; height: 190px; }
.qr-card .qr svg { width: 100%; height: 100%; display: block; }
.device-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.device-card h3 { margin: 0 0 10px; }
.device-card ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.device-card.is-you { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 12px 40px rgba(31, 143, 255, 0.18); }
.device-card.is-you h3::after { content: 'Your device'; margin-left: 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); vertical-align: middle; }
.kbd { display: inline-block; border: 1px solid var(--border); border-radius: 6px; padding: 0 6px; font-size: 0.9em; }
.app-promo { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 28px 32px; }
.app-promo h2 { margin: 4px 0 8px; }
.app-promo img { border-radius: 32px; flex-shrink: 0; box-shadow: 0 18px 50px rgba(31, 143, 255, 0.35); }
.app-banner { border-color: var(--accent); gap: 12px; flex-wrap: wrap; }
@media (max-width: 800px) {
  .app-hero { grid-template-columns: 1fr; text-align: center; }
  .app-cta { justify-content: center; }
  .app-promo { flex-direction: column-reverse; text-align: center; padding: 24px 20px; }
  .app-promo img { width: 96px; height: 96px; border-radius: 22px; }
}

/* ---- Two-factor authentication ---- */
.code-input { font-family: 'JetBrains Mono', monospace; font-size: 20px; letter-spacing: 0.18em; text-align: center; max-width: 220px; }
.tfa-setup { max-width: 760px; }
.tfa-steps { margin: 0; padding-left: 22px; display: grid; gap: 22px; }
.tfa-steps h3 { margin: 0 0 6px; }
.tfa-steps p { margin: 0 0 8px; }
.tfa-qr-row { display: flex; gap: 22px; align-items: flex-start; }
.tfa-qr-row .qr { background: #fff; border-radius: 12px; padding: 8px; width: 180px; height: 180px; flex-shrink: 0; }
.tfa-qr-row .qr svg { width: 100%; height: 100%; display: block; }
.tfa-secret { font-size: 15px; letter-spacing: 0.06em; word-break: break-all; }
.tfa-confirm { flex-wrap: wrap; }
.tfa-off { border-color: rgba(245, 185, 66, 0.35); }
.tfa-admin { margin: 10px 0; }
.on-mobile-only { display: none; }
.on-mobile .on-mobile-only { display: inline-flex; }
.recovery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; padding: 16px; border: 1px dashed var(--border); border-radius: var(--radius-sm); font-size: 16px; }
@media (max-width: 640px) { .tfa-qr-row { flex-direction: column; align-items: center; text-align: center; } .tfa-qr-row .row { justify-content: center; } }
@media print { .sidebar, .topbar, .row.mt, .alert, .app-banner { display: none !important; } .recovery-grid { color: #000; border-color: #000; } body { background: #fff; color: #000; } }
