:root { color-scheme: light; }

.wifi-back-link { margin-left: auto; color: #f0f0f0; text-decoration: none; }
.wifi-back-link:hover { text-decoration: underline; }
.wifi-page { max-width: 1220px; margin: 0 auto; padding: 26px 20px 34px; }
.wifi-page main { padding: 0; }
.page-intro { margin: 0 0 20px; }
.page-intro .eyebrow, .wifi-page .eyebrow { margin: 0 0 7px; color: #147bd1; font-size: .8rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.page-intro h1 { margin: 0 0 8px; color: #172c44; font-size: 2rem; line-height: 1.2; }
.page-intro > p:last-child { max-width: 720px; margin: 0; color: #576976; line-height: 1.55; }
.privacy-banner { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 18px; padding: 12px 15px; border: 1px solid #c8e2ef; border-left: 4px solid #1497bf; background: #f1f9fc; color: #294e64; }
.privacy-banner p { margin: 0; font-size: .9rem; line-height: 1.45; }
.privacy-mark { flex: 0 0 auto; color: #1497bf; font-size: .8rem; line-height: 1.7; }
.wifi-workspace { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: start; gap: 20px; }
.wifi-form, .qr-panel { min-width: 0; border: 1px solid #d7e0e8; background: #fff; }
.wifi-form { padding: 22px; }
.mode-fieldset { min-width: 0; margin: 0 0 19px; padding: 0; border: 0; }
.mode-fieldset legend, .form-field > label, .field-heading label { display: block; margin: 0 0 7px; color: #27394b; font-size: .9rem; font-weight: 700; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid #c6d5e1; border-radius: 6px; background: #f0f5f9; }
.mode-button { min-height: 42px; border: 0; border-radius: 4px; background: transparent; color: #41576a; cursor: pointer; font: inherit; font-weight: 650; }
.mode-button[aria-pressed="true"] { background: #092861; color: #fff; box-shadow: 0 1px 3px #071b5a2a; }
.form-field { margin-bottom: 17px; }
.field-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.field-heading label { margin-bottom: 7px; }
.wifi-form input[type="text"], .wifi-form input[type="password"], .wifi-form input[type="search"], .wifi-form select, .resolution-control select { width: 100%; min-height: 44px; border: 1px solid #bac9d5; border-radius: 4px; background: #fff; color: #223548; font: inherit; padding: 10px 12px; }
.wifi-form input:focus-visible, .wifi-form select:focus-visible, .resolution-control select:focus-visible { outline: 3px solid #66bde8; outline-offset: 1px; border-color: #1679bf; }
.wifi-form input[aria-invalid="true"] { border-color: #b63a3a; }
.field-hint { margin: 6px 0 0; color: #697986; font-size: .8rem; line-height: 1.45; }
.field-error { margin: 6px 0 0; color: #a32e33; font-size: .83rem; font-weight: 650; line-height: 1.4; }
.inline-button { border: 0; background: transparent; color: #075db2; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 700; padding: 4px 0 7px; }
.inline-button:disabled { color: #9aa8b2; cursor: not-allowed; }
.password-control { display: flex; min-width: 0; }
.password-control input { flex: 1; min-width: 0; border-radius: 4px 0 0 4px !important; }
.visibility-button { min-width: 68px; border: 1px solid #bac9d5; border-left: 0; border-radius: 0 4px 4px 0; background: #f6f9fb; color: #305268; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 650; }
.check-control { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; color: #334654; cursor: pointer; font-size: .88rem; line-height: 1.45; }
.check-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.check-box { position: relative; display: inline-block; flex: 0 0 20px; width: 20px; height: 20px; border: 1px solid #9dafbd; border-radius: 4px; background: #fff; }
.check-control input:checked + .check-box { border-color: #126aca; background: #126aca; }
.check-control input:checked + .check-box::after { position: absolute; top: 2px; left: 6px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; content: ""; transform: rotate(45deg); }
.check-control input:focus-visible + .check-box { outline: 3px solid #66bde8; outline-offset: 2px; }
.security-warning { margin: 12px 0; padding: 10px 12px; border: 1px solid #e2d19e; background: #fff9e9; color: #6e5825; font-size: .8rem; line-height: 1.45; }
.legacy-warning { border-color: #e2b9b9; background: #fff4f2; color: #873d38; }
.status-message { min-height: 22px; margin: 12px 0 7px; color: #31556c; font-size: .85rem; line-height: 1.45; }
.status-message.error { color: #a32e33; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.primary-button, .secondary-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border: 1px solid #0a55b3; border-radius: 5px; background: #126bd1; color: #fff; cursor: pointer; font: inherit; font-weight: 700; padding: 10px 16px; text-decoration: none; }
.primary-button:hover:not(:disabled) { background: #0c55ad; }
.secondary-button { border-color: #afc4d2; background: #f6f9fb; color: #174b6d; }
.secondary-button:hover:not(:disabled) { background: #e9f2f7; }
.primary-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: .48; }
.qr-panel { padding: 20px; }
.qr-panel-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.qr-panel-header h2 { margin: 0; color: #18334d; font-size: 1.22rem; }
.resolution-control { display: grid; flex: 0 0 142px; gap: 5px; color: #526574; font-size: .75rem; font-weight: 650; }
.resolution-control select { min-height: 38px; padding: 7px 9px; font-size: .82rem; }
.qr-stage { display: grid; min-height: 330px; place-items: center; padding: 20px; border: 1px dashed #c5d4df; background: #f5f8fa; }
.qr-empty { display: grid; justify-items: center; gap: 8px; color: #72828e; text-align: center; }
.qr-placeholder { display: grid; width: 82px; height: 82px; place-items: center; border: 1px solid #c3d2dc; border-radius: 10px; background: #fff; color: #6f91a7; font-size: 2.4rem; }
.qr-empty p { max-width: 210px; margin: 0; font-size: .88rem; line-height: 1.45; }
#qrCanvas { display: block; width: min(100%, 280px); height: auto; image-rendering: pixelated; background: #fff; }
.qr-summary { display: flex; min-width: 0; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; margin: 12px 0 0; color: #29455a; }
.network-summary-name { overflow-wrap: anywhere; }
.network-summary-security { color: #647887; font-size: .84rem; }
.qr-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.print-card-settings { margin-top: 19px; padding-top: 16px; border-top: 1px solid #e0e7ec; }
.print-card-settings h3 { margin: 0 0 6px; color: #263b4d; font-size: .97rem; }
.print-card-settings .check-control { margin: 10px 0 5px; }
.print-button { width: 100%; margin-top: 12px; }
.share-card-preview { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
[hidden] { display: none !important; }

@media (max-width: 820px) {
  .wifi-page { padding: 20px 16px 30px; }
  .wifi-workspace { grid-template-columns: 1fr; }
  .qr-stage { min-height: 300px; }
}

@media (max-width: 520px) {
  .wifi-page { padding: 18px 12px 26px; }
  .page-intro h1 { font-size: 1.65rem; }
  .wifi-form, .qr-panel { padding: 16px; }
  .qr-panel-header { align-items: flex-start; flex-direction: column; }
  .resolution-control { width: 100%; flex-basis: auto; }
  .qr-stage { min-height: 270px; padding: 12px; }
  .qr-actions { grid-template-columns: 1fr; }
  .wifi-page .site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
}

@media print {
  body * { visibility: hidden !important; }
  .share-card-preview, .share-card-preview * { visibility: visible !important; }
  .share-card-preview { position: absolute; inset: 0; display: grid; width: 100%; min-height: 100vh; align-content: center; justify-items: center; gap: 12px; padding: 24px; background: #fff; color: #14263a; text-align: center; }
  .print-card-brand { display: flex; align-items: center; gap: 10px; color: #0a2861; font-size: 1.2rem; font-weight: 750; }
  .print-card-brand img { width: 38px; height: 38px; }
  .print-card-kicker, .print-card-footnote { margin: 0; color: #536778; }
  #printQrCanvas { width: 320px; height: 320px; }
  #printSsid { max-width: 100%; margin: 0; overflow-wrap: anywhere; font-size: 1.6rem; }
  .print-card-security, .print-card-password { margin: 0; font-size: 1rem; }
  @page { margin: 16mm; }
}