:root {
  --navy: #0a0f1d;
  --navy-2: #10182c;
  --card: #1c2541;
  --line: #2a3b5c;
  --cyan: #00b4d8;
  --green: #06d6a0;
  --amber: #f5b942;
  --red: #f07178;
  --blue: #0077b6;
  --text: #e7eefc;
  --muted: #93a0b8;
  --paper: #f4f7fb;
  --ink: #142033;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --sans: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(0, 180, 216, 0.16), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(6, 214, 160, 0.08), transparent 50%),
    var(--navy);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }

.wrap {
  width: min(1440px, calc(100% - 2rem));
  margin-inline: auto;
}

.topbar {
  background: #070b16;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.topbar .wrap,
.brandbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.topbar .wrap { min-height: 34px; }
.live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(6, 214, 160, 0.7);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 7px rgba(6, 214, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(6, 214, 160, 0); }
}
.topbar a { color: var(--cyan); text-decoration: none; }

.brandbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 15, 29, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brandbar .wrap { min-height: 76px; }
.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  text-decoration: none;
}
.brand img {
  height: 46px;
  width: auto;
  background: #fff;
  border-radius: 8px;
  padding: 3px 6px;
}
.brand strong { display: block; font-size: 1.05rem; letter-spacing: -0.02em; }
.brand span {
  display: block;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.wa {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--green);
  color: #06281f;
  text-decoration: none;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  white-space: nowrap;
}
.wa:hover { filter: brightness(1.06); }

.banner {
  margin: 0.8rem auto 0;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(245, 185, 66, 0.45);
  background: rgba(245, 185, 66, 0.1);
  color: #ffe3a3;
  border-radius: 12px;
}

.tabs-section { padding: 1rem 0 0.4rem; }
.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}
.tab {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-align: left;
  color: var(--muted);
  background: rgba(28, 37, 65, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.8rem;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.tab:hover { color: var(--text); border-color: rgba(0, 180, 216, 0.45); }
.tab[aria-selected="true"] {
  color: white;
  background: #0e6ea8;
  border-color: rgba(0, 180, 216, 0.85);
  box-shadow: 0 10px 24px rgba(0, 119, 182, 0.28);
}
.tab-index {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan);
}
.tab[aria-selected="true"] .tab-index { color: #b8fff0; }
.tab-copy { display: flex; flex-direction: column; min-width: 0; }
.tab-copy strong { font-size: 0.95rem; line-height: 1.2; }
.tab-copy small { color: inherit; opacity: 0.78; font-size: 12px; }

.ad-slot {
  margin-top: 0.85rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(13, 21, 39, 0.65);
  min-height: 72px;
  padding: 0.45rem 0.7rem 0.7rem;
}
.ad-slot.side { margin-top: 0; min-height: 250px; }
.ad-label {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ad-fallback {
  display: grid;
  place-items: center;
  min-height: 48px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.ad-slot.side .ad-fallback { min-height: 200px; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1rem;
  align-items: start;
  padding: 0.9rem 0 2.5rem;
}

.about {
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px;
  padding: 1rem 1.1rem 0.95rem;
  margin-bottom: 0.75rem;
}
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
}
.about h2 {
  margin: 0.2rem 0 0.45rem;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.about p { margin: 0; color: #3d4b63; }
.points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}
.points li {
  background: #e7f6fb;
  color: #0b5570;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 12px;
  font-weight: 700;
}
.note {
  margin: 0.7rem 0 0;
  font-size: 12px;
  color: #607089;
}

.console {
  background: #070c18;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 720px;
  height: calc(100dvh - 9rem);
  display: flex;
  flex-direction: column;
}
.console:fullscreen {
  width: 100%;
  height: 100%;
  border-radius: 0;
  min-height: 0;
}
.console-bar {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  background: #121b31;
  border-bottom: 1px solid var(--line);
}
.console-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.console-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font-size: 12px;
  font-weight: 700;
}
.ghost:hover { border-color: var(--cyan); color: white; }
.ghost.primary {
  background: var(--blue);
  border-color: transparent;
}

.viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #050914;
}
.viewport iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #050914;
  display: block;
}
.loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 9, 20, 0.86);
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: 0.04em;
  z-index: 2;
}
.loading[hidden] { display: none; }

.side { display: flex; flex-direction: column; gap: 0.75rem; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.95rem;
}
.card h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}
.card p, .card li { color: var(--muted); font-size: 13px; }
.card ul { margin: 0.4rem 0 0.8rem; padding-left: 1.1rem; }
.card .wa { justify-content: center; }

.qtc label {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.qtc input {
  width: 100%;
  margin-top: 0.25rem;
  background: var(--navy);
  color: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
}
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.sex {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin: 0.2rem 0 0.7rem;
}
.sex button {
  background: var(--navy);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem;
  font-size: 12px;
  font-weight: 700;
}
.sex button[aria-pressed="true"] {
  background: var(--blue);
  color: white;
  border-color: transparent;
}
.results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  text-align: center;
}
.results div {
  background: var(--navy);
  border-radius: 8px;
  padding: 0.4rem 0.2rem;
}
.results span {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
}
.results strong { font-family: var(--mono); font-size: 13px; }
#qtc-status {
  margin: 0.65rem 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
#qtc-status[data-level="ok"] { color: var(--green); }
#qtc-status[data-level="alert"],
#qtc-status[data-level="warn"] { color: var(--amber); }

.site-nav {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}
.site-nav a:hover { color: white; }

.intro {
  padding: 1.4rem 0 0.2rem;
  max-width: 980px;
}
.intro h1 {
  margin: 0.35rem 0 0.7rem;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.intro p { margin: 0 0 0.75rem; color: #d5deef; max-width: 78ch; }
.intro .kicker { color: var(--cyan); }

.guide {
  padding: 0.5rem 0 2.5rem;
}
.guide h2 {
  margin: 0 0 0.4rem;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}
.guide .lead { color: #d5deef; max-width: 78ch; }
.guide article {
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px;
  padding: 1rem 1.15rem 0.4rem;
  margin-top: 0.85rem;
}
.guide h3 { margin: 0 0 0.45rem; letter-spacing: -0.02em; }
.guide article p { color: #3d4b63; margin: 0 0 0.8rem; }

.page {
  padding: 1.5rem 0 3rem;
  max-width: 860px;
}
.page h1 {
  margin: 0.3rem 0 0.8rem;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
}
.page p, .page li { color: #d5deef; }
.page h2 { margin: 1.4rem 0 0.4rem; font-size: 1.15rem; }
.page a { color: var(--cyan); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.3rem 0 1.6rem;
  color: var(--muted);
  font-size: 13px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer a { color: var(--cyan); }
.site-footer strong { color: var(--text); }

@media (max-width: 1100px) {
  .tabs { grid-template-columns: 1fr 1fr; }
  .layout { grid-template-columns: 1fr; }
  .console { height: 86dvh; min-height: 680px; }
}
@media (max-width: 720px) {
  .wrap { width: min(1440px, calc(100% - 1rem)); }
  .hide-sm { display: none; }
  .brand span { display: none; }
  .brandbar .wrap {
    flex-wrap: wrap;
    min-height: 0;
    padding: 0.55rem 0 0.7rem;
  }
  .brand { flex: 1 1 auto; }
  .brand img { height: 40px; }
  .site-nav { width: 100%; margin-left: 0; }
  .wa { margin-left: auto; }
  .tabs { grid-template-columns: 1fr 1fr; gap: 0.45rem; }
  .tab { padding: 0.6rem 0.5rem; gap: 0.4rem; }
  .tab-copy strong { font-size: 0.82rem; }
  .tab-copy small { font-size: 11px; }
  .console { height: 92dvh; min-height: 640px; }
  .console-title span:last-child { display: none; }
}
