:root {
  --bg: #f3f8fc;
  --text: #0b1f36;
  --muted: #53677a;
  --card: #ffffff;
  --line: #d7e4ee;
  --blue: #006aa7;
  --yellow: #fecc02;
  --dark: #0b1f36;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.site-header,
main,
footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  padding: 26px 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}

#vpn-status {
  font-size: 14px;
  text-align: right;
  white-space: nowrap;
}

.brand {
  color: var(--text);
  font-weight: 800;
  font-size: 24px;
  text-decoration: none;
  letter-spacing: -0.03em;
}

h1, h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.06em;
}

h1 { font-size: clamp(46px, 8vw, 82px); }
h2 { font-size: clamp(26px, 4vw, 36px); }

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.start-box,
.receipt-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  padding: 34px;
  margin-bottom: 38px;
  box-shadow: 0 8px 30px rgba(11, 31, 54, 0.05);
}

.receipt-box { align-items: start; }
.single-column { grid-template-columns: 1fr; }

.start-box p,
.receipt-box p {
  color: var(--muted);
  font-size: 18px;
}

.price {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}

.price-details {
  margin-top: .5rem;
  color: var(--muted);
  font-size: 18px;
}

.button,
button {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  padding: 13px 22px;
  margin-top: 28px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

form button { width: 100%; }

.button:hover,
button:hover { opacity: .92; }

.button:active,
button:active { transform: translateY(2px); }

.warning { font-weight: 700; }

pre {
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf9f7;
  font-size: 15px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.actions .button,
.actions button { margin-top: 12px; }

.copy-status { min-height: 1.5em; }

.qr-panel { text-align: center; }

.qr-code {
  display: block;
  width: min(360px, 100%);
  height: auto;
  margin: 20px auto 0;
  border: 1px solid var(--line);
  border-radius: 16px;
}

footer {
  padding: 28px 0 44px;
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 820px) {
  .start-box,
  .receipt-box { grid-template-columns: 1fr; }
}




@media (max-width: 700px) {
  .welcome-visual {
    margin-bottom: 24px;
  }

  .welcome-visual img {
    width: 100%;
    height: auto;
  }
}
select,
input[type="password"] {
  width: 100%;
  padding: 13px 16px;
  margin: 8px 0 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

@media print {
  .site-header,
  footer,
  .actions,
  .copy-status {
    display: none !important;
  }

  body {
    background: #fff;
  }

  main {
    width: 100%;
  }

  .receipt-box {
    border: 0;
    padding: 0;
    margin: 0;
  }
}

/* Combined purchase + WireGuard configuration page */
.configure-box,
.result-box {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  padding: 34px;
  margin-bottom: 38px;
  box-shadow: 0 8px 30px rgba(11, 31, 54, 0.05);
}
.configure-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: start;
}
.configure-box p { color: var(--muted); font-size: 18px; }
label { display: block; font-weight: 700; margin: 0 0 7px; }
textarea {
  width: 100%;
  min-height: 150px;
  padding: 13px 16px;
  margin: 8px 0 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: 13px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  resize: vertical;
}
.server-details { min-height: 24px; margin: -12px 0 18px; color: var(--muted); font-size: 14px; }
.status { min-height: 1.5em; color: var(--muted); }
.status.error { color: #9b1c1c; }
.quiet { color: var(--muted); }
.result-heading { display: flex; justify-content: space-between; gap: 24px; align-items: start; }
.result-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: 32px; margin-top: 28px; }
.result-grid .qr-panel img { width: min(100%, 420px); background: #fff; }
.private-note { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 26px; }
.secret-gate { margin: 22px 0 8px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #faf9f7; }
.secret-gate p { margin: 0; }
.secret-gate button { margin-top: 12px; }
button.secondary { background: #fff; color: var(--dark); border: 1px solid var(--dark); }
[hidden] { display: none !important; }

@media (max-width: 820px) {
  .configure-box, .result-grid { grid-template-columns: 1fr; }
  .result-heading { display: block; }
  .result-heading .actions { margin-top: 12px; }
}

@media print {
  .no-print, #buy, #setup, #receipt-result { display: none !important; }
  #result[hidden] { display: none !important; }
  #secret-content { display: block !important; }
  .result-box { border: 0; padding: 0; margin: 0; }
}


/* Print only the item selected by its Print button. */
@media print {
  body.print-receipt main > * { display: none !important; }
  body.print-receipt #receipt-result {
    display: grid !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.print-config main > * { display: none !important; }
  body.print-config #result {
    display: block !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body.print-config #secret-content { display: block !important; }
}

.welcome-visual {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 38px;
  overflow: hidden;
}

.welcome-visual picture {
  display: block;
  width: 100%;
}

.welcome-visual img {
  display: block;
  width: 100%;
  height: auto;
}


.beta-notice {
  padding: 16px 20px;
  margin-bottom: 24px;
  border: 2px solid #c62828;
  border-radius: 10px;
  background: #fff1f1;
  color: #6f1717;
}

.beta-notice strong {
  display: block;
  margin-bottom: 5px;
  color: #a71919;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.beta-notice span {
  display: block;
  font-size: 0.95rem;
  line-height: 1.45;
}


/* SweVPN brand accents */
a {
  color: var(--blue);
}

a:hover {
  color: #004f7d;
}

select:focus,
textarea:focus,
input:focus {
  outline: 3px solid rgba(254, 204, 2, 0.35);
  border-color: var(--blue);
}

/* Server directory */
.servers-section h2 { font-size: clamp(30px, 4vw, 42px); }
.server-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 20px; }
.server-panel { min-width: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.server-panel-heading { padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--bg); }
.server-panel-heading h3 { margin: 0; font-size: 17px; letter-spacing: .06em; }
.server-panel-heading label { font-size: 13px; color: var(--muted); }
.server-panel-heading select { display: block; width: 150px; max-width: 100%; margin-top: 4px; padding: 6px; }
.server-scroll { max-height: 240px; overflow: auto; }
.server-scroll table { border-collapse: collapse; width: 100%; font-size: 14px; text-align: left; }
.server-scroll th, .server-scroll td { padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.server-scroll th { position: sticky; top: 0; background: white; color: var(--muted); font-size: 12px; }
@media (max-width: 760px) { .server-columns { grid-template-columns: 1fr; } .server-panel-heading { flex-wrap: wrap; } }
@media print { .servers-section { display: none !important; } }


/* Get started: WireGuard download cards */
.get-started h2 { margin-bottom: 22px; }
.wg-app-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.wg-app-links a { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 15px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--text); text-decoration: none; }
.wg-app-links a:hover { border-color: var(--blue); background: #fff; }
.wg-app-links .wg-icon { flex: 0 0 32px; display: grid; place-items: center; font-size: 26px; color: var(--blue); }
.wg-app-links strong, .wg-app-links small { display: block; }
.wg-app-links strong { font-size: 14px; line-height: 1.3; }
.wg-app-links small { font-size: 12px; color: var(--muted); margin-top: 3px; }
.get-started .wg-other { font-size: 15px; margin-bottom: 30px; }
@media (max-width: 820px) { .wg-app-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 430px) { .wg-app-links { grid-template-columns: 1fr; } }

/* Receipt upload button */
#config-form #receipt {
  margin-bottom: 0;
}

#config-form #upload-receipt {
  display: inline-block;
  width: auto;
  margin: 8px 0 24px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 700;
}

/* VPN setup instructions */

.vpn-instructions {
  margin: 30px 0;
}

.vpn-instructions h2 {
  font-size: 22px;
  margin: 28px 0 10px;
  letter-spacing: -0.02em;
}

.vpn-instructions p {
  color: var(--muted);
  font-size: 17px;
  margin: 0 0 16px;
}

.vpn-instructions .actions {
  margin-bottom: 30px;
}


