/* Drip Swapper site. Same look as the app: deep navy, soft panels, condensed headlines. */

@font-face { font-family: "Barlow Condensed"; src: url("/fonts/bc600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/bc700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #12141c;
  --panel: #252839;
  --panel2: #1c1f2c;
  --line: #3a3e56;
  --ink: #f1f2fb;
  --text: #c4c7dc;
  --mute: #8b8fa8;
  --btn: #eef0fb;
  --on-btn: #12141c;
  --bad: #ff8a8a;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --gut: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #eceef6;
  --panel: #ffffff;
  --panel2: #f6f7fc;
  --line: #d3d6e6;
  --ink: #14161f;
  --text: #3d4157;
  --mute: #666a84;
  --btn: #14161f;
  --on-btn: #ffffff;
  --bad: #b3001b;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
svg { display: block; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { width: min(1160px, 100% - 2 * var(--gut)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; color: var(--ink); letter-spacing: .01em; line-height: .96; }
h1 { font-size: clamp(52px, 8vw, 108px); }
h2 { font-size: clamp(40px, 5.4vw, 72px); }
h3 { font-size: 40px; }

/* ------------------------------------------------ top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 700 30px/1 var(--display); color: var(--ink); letter-spacing: .01em; }
.brand svg { width: 20px; height: 24px; fill: currentColor; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { text-decoration: none; padding: 9px 14px; border-radius: 99px; font-weight: 500; font-size: 15px; color: var(--mute); }
.nav a:hover { color: var(--ink); }
.nav a.cta { background: var(--btn); color: var(--on-btn); font-weight: 600; margin-left: 4px; }
.nav a.cta:hover { opacity: .85; }
.themeswitch { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; margin-left: 6px; border-radius: 50%; background: transparent; border: 2px solid var(--line); color: var(--mute); cursor: pointer; flex: none; }
.themeswitch:hover { color: var(--ink); border-color: var(--mute); }
.themeswitch svg { width: 17px; height: 17px; }

/* ------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 30px;
  border-radius: 99px; border: 2px solid var(--btn); background: var(--btn); color: var(--on-btn);
  font-weight: 600; font-size: 16px; line-height: 1; text-decoration: none; cursor: pointer; transition: opacity .15s, background .15s, color .15s;
}
.btn:hover { opacity: .86; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--mute); opacity: 1; }
.btn.small { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------ cards */
.card { background: var(--panel); border: 2px solid var(--line); border-radius: 28px; padding: clamp(22px, 3vw, 36px); }

/* ------------------------------------------------ home */
.hero { padding: clamp(36px, 7vw, 96px) 0 clamp(40px, 6vw, 72px); }
.lede { margin-top: 28px; max-width: 52ch; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; }
.hero .actions { margin-top: 36px; }
.fine { margin-top: 20px; font-size: 14px; color: var(--mute); }

section { padding: clamp(28px, 4vw, 52px) 0; }
.sec-head { margin-bottom: clamp(20px, 3vw, 36px); }
.sec-head p { margin-top: 12px; max-width: 56ch; color: var(--mute); }

.games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.gcard { display: flex; flex-direction: column; gap: 12px; }
.gcard h3 { margin-bottom: 2px; }
.gcard .risk { margin-top: auto; padding-top: 18px; color: var(--ink); font-size: 15px; line-height: 1.5; }
.gcard .risk b { font-weight: 700; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.step .n { display: block; font: 700 72px/.9 var(--display); color: var(--mute); margin-bottom: 14px; }
.step h3 { font-size: 32px; margin-bottom: 8px; }

.safe h2 { margin-bottom: 22px; }
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); }
.rules div { padding: 16px 0; border-top: 2px solid var(--line); }
.rules dt { font-weight: 700; color: var(--ink); font-size: 18px; }
.rules dd { margin-top: 4px; color: var(--text); }

.final { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.final p { margin-top: 10px; color: var(--mute); }

footer { padding: 28px 0 48px; display: flex; gap: 12px 32px; flex-wrap: wrap; justify-content: space-between; color: var(--mute); font-size: 14.5px; }
footer a { text-underline-offset: 3px; }
footer a:hover { color: var(--ink); }
.foot-links { display: flex; gap: 24px; }

/* ------------------------------------------------ download page */
.dl-head { display: flex; align-items: baseline; gap: 6px 24px; flex-wrap: wrap; padding: 4px 0 16px; }
.dl-head h1 { font-size: clamp(44px, 4.6vw, 64px); }
.dl-head .lede { margin: 0; font-size: 17px; }
#alerts:not(:empty) { margin-bottom: 16px; }
.dlcards, .three { display: grid; gap: clamp(12px, 1.6vw, 20px); }
.dlcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(12px, 1.6vw, 20px); }
.dl-head + #alerts + .dlcards .card, .three .card { padding: 18px 22px; border-radius: 24px; }
.dlcard { display: flex; flex-direction: column; gap: 8px; }
.dlcard h2 { font-size: 32px; }
.dlcard p { font-size: 15px; line-height: 1.5; }
.dlcard .get { margin-top: auto; padding-top: 8px; display: grid; gap: 10px; }
.dlcard .btn { width: 100%; min-height: 50px; font-size: 16px; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; min-height: 0; }
.chip { background: var(--panel2); border: 2px solid var(--line); border-radius: 99px; padding: 2px 11px; font-size: 13px; font-weight: 500; color: var(--text); }
.three h2 { font-size: 28px; margin-bottom: 10px; }
.three p, .three li, .three span { font-size: 14.5px; line-height: 1.45; }
.list li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 7px 0; border-top: 2px solid var(--line); }
.list li:first-child { border-top: 0; padding-top: 0; }
.list li i { font: 700 26px/.9 var(--display); font-style: normal; color: var(--mute); }
.list li b { display: block; color: var(--ink); font-weight: 600; }
.news li { padding: 7px 0; border-top: 2px solid var(--line); }
.news li:first-child { border-top: 0; padding-top: 0; }
.news li b { color: var(--ink); font-weight: 600; }
.banner { border: 2px solid var(--line); background: var(--panel); border-radius: 18px; padding: 12px 18px; }
.banner b { margin-right: 8px; color: var(--ink); }
.msg { min-height: 0; margin: 0; font-size: 14px; color: var(--mute); }
.msg:empty { display: none; }
.msg.err { color: var(--bad); font-weight: 600; }
.bar { height: 8px; border-radius: 99px; background: var(--panel2); overflow: hidden; width: 100%; }
.bar > i { display: block; height: 100%; width: 0; background: var(--btn); border-radius: 99px; transition: width .2s ease; }

/* ------------------------------------------------ owner login + panel (dialogs) */
dialog { border: 2px solid var(--line); padding: 0; margin: auto; border-radius: 28px; background: var(--panel); color: var(--text); width: min(540px, calc(100% - 28px)); max-height: calc(100dvh - 28px); }
dialog.wide { width: min(780px, calc(100% - 28px)); }
dialog::backdrop { background: rgba(8, 9, 14, .7); }
.dlg { padding: 28px; display: grid; gap: 14px; }
.dlg h3 { font-size: 44px; }
.dlg p { color: var(--mute); }
.dlg label { font-weight: 600; font-size: 14px; color: var(--ink); display: grid; gap: 6px; }
.dlg input[type=text], .dlg input[type=password], .dlg input[type=url], .dlg input[type=number], .dlg textarea {
  font-weight: 500; font-size: 15px; color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; width: 100%;
}
.dlg textarea { min-height: 110px; resize: vertical; }
.dlg input:focus, .dlg textarea:focus { outline: none; border-color: var(--mute); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1; min-width: 140px; }
.check { display: flex !important; align-items: center; gap: 10px; font-weight: 600 !important; }
.check input { width: 20px; height: 20px; accent-color: var(--btn); flex: none; }
.hint { font-size: 12.5px; font-weight: 500; color: var(--mute); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--bg); border-radius: 16px; padding: 12px 14px; }
.stat b { display: block; font: 700 38px/1 var(--display); color: var(--ink); }
.stat span { font-size: 12.5px; color: var(--mute); }
.log { max-height: 180px; overflow: auto; font-size: 13px; background: var(--bg); border-radius: 16px; padding: 8px 14px; }
.log div { display: grid; grid-template-columns: 120px 110px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.log div:last-child { border: 0; }
.log .b { color: var(--bad); font-weight: 700; }
.filebox { background: var(--bg); border: 2px dashed var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 8px; }
.filebox b { color: var(--ink); }
.filebox input[type=file] { font-size: 14px; }
hr { border: 0; border-top: 2px solid var(--line); width: 100%; margin: 4px 0; }

/* ------------------------------------------------ small screens */
@media (max-width: 880px) {
  .games, .steps, .rules, .dlcards, .three { grid-template-columns: 1fr; }
  .nav a:not(.cta) { display: none; }
  .nav a.cta { margin-left: 0; }
  .brand { font-size: 26px; }
  .stats { grid-template-columns: 1fr; }
  .log div { grid-template-columns: 1fr 1fr; }
  .step .n { font-size: 56px; margin-bottom: 8px; }
  .final .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
