:root {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", sans-serif;
  color-scheme: light dark;
  --background: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --secondary: #6e6e73;
  --border: #d2d2d7;
  --button: #414145;
  --button-text: #ffffff;
  --language-active-background: #ffffff;
  --language-active-text: #414145;
  --language-active-border: #d2d2d7;
  --success: #248a3d;
  --error: #d70015;
  --danger: #d70015;
  --warning: #b26a00;
  --warning-border: #c77b00;
  --warning-background: rgba(199, 123, 0, 0.08);
  --constructive-text: #2d6647;
  --constructive-border: #a5bcae;
  --constructive-pressed: #f1f6f3;
  --delete-background: #e85d75;
  --delete-border: #e85d75;
  --account-delete-background: #c70015;
  --account-delete-border: #c70015;
  --account-delete-note: #b00012;
  --segment-background: #f5f5f7;
  --code-background: #f5f5f7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #000000;
    --card: #1c1c1e;
    --text: #f5f5f7;
    --secondary: #98989d;
    --border: #38383a;
    --button: #414145;
    --button-text: #ffffff;
    --language-active-background: #414145;
    --language-active-text: #ffffff;
    --language-active-border: #636369;
    --success: #30d158;
    --error: #ff453a;
    --danger: #ff453a;
    --warning: #ffb340;
    --warning-border: #ffb340;
    --warning-background: rgba(255, 179, 64, 0.10);
    --constructive-text: #c2ddca;
    --constructive-border: #688572;
    --constructive-pressed: #24342a;
    --delete-background: #d94f69;
    --delete-border: #d94f69;
    --account-delete-background: #ff3b30;
    --account-delete-border: #ff3b30;
    --account-delete-note: #ff6961;
    --segment-background: #2c2c2e;
    --code-background: #2c2c2e;
  }
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--background);
  color: var(--text);
}
body { min-height: 100vh; min-height: 100dvh; }
button, input { font: inherit; }
.page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: max(42px, env(safe-area-inset-top)) 24px max(42px, env(safe-area-inset-bottom));
}
.brand { margin-bottom: 16px; }
.brand-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.brand-copy { min-width: 0; }
.brand h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.brand p {
  margin: 10px 0 0;
  color: var(--secondary);
  font-size: 17px;
  line-height: 1.45;
}
.language-switcher {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--segment-background);
  border: 1px solid var(--border);
  border-radius: 11px;
}
.language-button {
  min-height: 32px;
  padding: 6px 10px;
  background: transparent;
  color: var(--secondary);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  cursor: pointer;
}
.language-button.active {
  background: var(--language-active-background);
  color: var(--language-active-text);
  border-color: var(--language-active-border);
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.card-content { padding: 28px; }
.quick-setup-card { margin-bottom: 16px; }
.quick-setup-button { width: 100%; margin-top: 18px; }
.card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 650;
}
.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.sign-out-button {
  width: 25%;
  flex: 0 0 25%;
  margin-right: -14px;
  min-height: 38px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.sign-out-button svg { width: 16px; height: 16px; flex: 0 0 16px; }
.sign-out-button:disabled { opacity: 0.5; cursor: default; }
.card-description {
  margin: 9px 0 0;
  color: var(--secondary);
  font-size: 15px;
  line-height: 1.5;
}
.server-section { margin-top: 24px; }
.server-heading {
  margin: 0 0 10px;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
}
.server-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  background: var(--segment-background);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.server-option { position: relative; min-width: 0; }
.server-option input { position: absolute; opacity: 0; pointer-events: none; }
.server-option label {
  min-height: 84px;
  height: 100%;
  padding: 10px 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
  user-select: none;
  -webkit-user-select: none;
}
.server-option input:checked + label {
  background: var(--button);
  color: var(--button-text);
  border-color: var(--button);
}
.server-option input:disabled + label { opacity: 0.38; cursor: default; }
.server-option input:focus-visible + label { outline: 2px solid var(--text); outline-offset: 2px; }
.server-option.server-caution input:not(:checked) + label {
  background: var(--segment-background);
  color: var(--secondary);
}
.server-option.server-caution input:not(:checked) + label .server-flag { filter: saturate(0.35); }
.server-flag { display: block; font-size: 37.5px; line-height: 1; }
.server-city { display: block; white-space: nowrap; }
.server-coming-soon { font-size: 11px; line-height: 1.2; font-weight: 500; }
.server-address {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 11px;
  padding: 0 4px;
  font-size: 15px;
  line-height: 1.4;
}
.server-address-label { color: var(--secondary); }
.server-address-value { min-width: 0; text-align: right; overflow-wrap: anywhere; font-weight: 500; }
.actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.actions > button, .actions > .button-link { flex: 1 1 0; min-width: 0; }
.profile-delivery-actions {
  flex: 0 0 100%;
  display: flex;
  gap: 12px;
}
.profile-delivery-actions > .button-link { flex: 1 1 0; min-width: 0; }
button, .button-link {
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.primary { background: var(--button); color: var(--button-text); border: 1px solid var(--button); }
.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.constructive {
  background: transparent;
  color: var(--constructive-text);
  border: 1px solid var(--constructive-border);
}
.constructive:active { background: var(--constructive-pressed); }
.warning { background: var(--warning-background); color: var(--warning); border: 1px solid var(--warning-border); }
.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
button:disabled { opacity: 0.55; cursor: default; }
.password-note {
  flex: 0 0 100%;
  margin: 0 4px;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}
.account-page > .card + .card {
  margin-top: 20px;
}

.delete-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.account-delete-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.delete-button {
  width: 100%;
  background: var(--delete-background);
  color: #ffffff;
  border: 1px solid var(--delete-border);
}
.delete-note {
  margin: 10px 4px 0;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}
.section-title { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: -0.015em; font-weight: 650; }
.section-description { margin: 6px 0 0; color: var(--secondary); font-size: 14px; line-height: 1.45; }
.passkey-list { margin-top: 16px; border-top: 1px solid var(--border); }
.passkey-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.passkey-info { min-width: 0; }
.passkey-name { font-size: 15px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.passkey-meta { margin-top: 3px; color: var(--secondary); font-size: 13px; line-height: 1.4; }
.passkey-remove-button {
  width: 25%;
  flex: 0 0 25%;
  margin-right: -14px;
  min-height: 38px;
  padding: 8px 12px;
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
}
.passkey-add-row { margin-top: 16px; }
.add-passkey-button { width: 100%; }
.passkey-note {
  margin: 10px 4px 0;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}
.passkey-message, .recovery-message {
  margin-top: 10px;
  min-height: 20px;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.45;
}
.passkey-message.error, .recovery-message.error { color: var(--error); }
.passkey-message.success, .recovery-message.success { color: var(--success); }
.recovery-actions { margin-top: 16px; }
.recovery-actions button { width: 100%; }
.recovery-code-box {
  margin-top: 16px;
  padding: 18px;
  background: var(--code-background);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.recovery-code-heading { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 650; }
.recovery-code {
  margin-top: 12px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0.025em;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}
.recovery-code-warning { margin: 12px 0 0; color: var(--secondary); font-size: 13px; line-height: 1.45; }
.recovery-code-actions { display: flex; gap: 10px; margin-top: 16px; }
.recovery-code-actions button { flex: 1 1 0; min-width: 0; }
.recover-panel { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border); }
.recovery-input {
  width: 100%;
  min-height: 50px;
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  line-height: 1.4;
  text-transform: uppercase;
}
.recovery-input::placeholder { color: var(--secondary); text-transform: none; }
.recovery-input:focus { border-color: var(--text); }
.recover-actions { display: flex; gap: 10px; margin-top: 12px; }
.recover-actions button { flex: 1 1 0; }
.account-delete-button {
  width: 100%;
  background: var(--account-delete-background);
  color: #ffffff;
  border: 1px solid var(--account-delete-border);
  font-weight: 700;
}
.account-delete-note {
  margin: 10px 4px 0;
  color: var(--account-delete-note);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  text-align: center;
}
.status-table { margin-top: 24px; border-top: 1px solid var(--border); }
.row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.4fr);
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.row-label { color: var(--secondary); font-size: 15px; line-height: 1.4; }
.row-value { min-width: 0; text-align: right; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
#networkMetricLatency { font-weight: 600; }
.server-value-name { display: block; }
.server-value-host { display: block; margin-top: 3px; color: var(--secondary); font-size: 15px; }
.status-active { color: var(--success); font-weight: 600; }
.status-error { color: var(--error); font-weight: 600; }
.message { margin-top: 18px; min-height: 22px; color: var(--secondary); font-size: 14px; line-height: 1.45; }
.message.error { color: var(--error); }
.message.success { color: var(--success); }
.hidden { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.promo-section { margin-top: 18px; }
.promo-actions { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: stretch; gap: 10px; margin-top: 10px; }
.promo-input {
  flex: 0 1 132px;
  width: 132px;
  min-width: 104px;
  min-height: 50px;
  padding: 12px 14px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}
.promo-actions > button {
  flex: 1 1 0;
  min-width: 0;
  max-width: 180px;
  padding-left: 12px;
  padding-right: 12px;
  font-size: 15px;
}
.promo-input:focus { outline-color: var(--text); }
.promo-message { color: var(--secondary); font-size: 14px; line-height: 1.45; }
.promo-message:not(:empty) { margin-top: 10px; }
.promo-message.error { color: var(--error); }
.promo-message.success { color: var(--success); }

.profile-settings { margin-top: 18px; }
.profile-settings summary {
  cursor: pointer;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.45;
  padding: 6px 0;
}
.local-id-label { display: block; margin-top: 12px; font-size: 14px; font-weight: 600; }
.local-id-input {
  display: block;
  width: 100%;
  min-height: 46px;
  margin: 8px 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
.local-id-input::placeholder { color: var(--secondary); }
.local-id-input:focus { outline-color: var(--text); }
.local-id-input:disabled { opacity: 0.55; }
.local-id-routing { margin: 10px 0; font-size: 14px; line-height: 1.5; }
.local-id-routing.error { color: var(--error); }

.settings-divider {
  height: 1px;
  margin: 20px 0;
  background: var(--border);
}

.settings-label,
.settings-title {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
}

.settings-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.platform-note {
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 400;
}

.settings-input,
.settings-select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.settings-label + .settings-input,
.settings-label + .settings-select {
  margin-top: 8px;
}

.settings-textarea {
  min-height: 70px;
  resize: vertical;
}

.settings-input:focus,
.settings-select:focus {
  outline-color: var(--text);
}

.settings-input[aria-invalid="true"] {
  border-color: var(--error);
}

.settings-subgroup { margin-top: 14px; }

.settings-validation {
  min-height: 18px;
  margin: 7px 0 0;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.4;
}

.settings-validation.error { color: var(--error); }

.routing-rule-groups {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.routing-rule-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.routing-rule-group-header {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: color-mix(in srgb, var(--text) 3%, transparent);
}

.routing-rule-group-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  line-height: 1.35;
}

.routing-rule-count,
.routing-rule-status {
  color: var(--secondary);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.routing-rule-list:empty::before {
  content: attr(data-empty-label);
  display: block;
  padding: 11px 12px;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.4;
}

.routing-rule-item {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px 5px 12px;
  border-top: 1px solid var(--border);
}

.routing-rule-domain {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.4;
}

.routing-rule-edit,
.routing-rule-remove {
  min-height: 34px;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--secondary);
  font: inherit;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.routing-rule-add {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.routing-rule-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 7px;
  padding: 8px;
  border-top: 1px solid var(--border);
}

.routing-rule-hint {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.4;
}

.routing-rule-editor .settings-input {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 14px;
}

.routing-rule-editor button {
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.routing-rule-save {
  border: 0;
  background: var(--text);
  color: var(--card);
}

.routing-rule-cancel {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}

.routing-rule-add:active,
.routing-rule-remove:active {
  background: color-mix(in srgb, var(--text) 6%, transparent);
}

.routing-rule-group[data-available="false"] {
  opacity: 0.58;
}

.settings-switch-row {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0;
  font-size: 15px;
  cursor: pointer;
}

.ios-switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: 0 0 51px;
  width: 51px;
  height: 31px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: var(--border);
  cursor: pointer;
  transition: background-color 120ms ease;
}

.ios-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  transition: transform 120ms ease;
}

.ios-switch:checked { background: var(--success); }
.ios-switch:checked::after { transform: translateX(20px); }
.ios-switch:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.settings-subtitle {
  margin: 17px 0 8px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.9fr);
  gap: 8px 14px;
  align-items: center;
}

.settings-grid > label {
  font-size: 15px;
  line-height: 1.4;
}

.on-demand-rules {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.on-demand-rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.7fr) 34px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid var(--border);
}

.on-demand-rule .settings-input,
.on-demand-rule .settings-select {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 14px;
}

.remove-on-demand-rule {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--secondary);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.add-on-demand-rule {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.add-on-demand-rule:active,
.remove-on-demand-rule:active {
  background: color-mix(in srgb, var(--text) 6%, transparent);
}

.profile-settings :disabled { opacity: 0.55; cursor: default; }

@media (min-width: 621px) {
  .server-option label { flex-direction: row; min-height: 56px; padding-top: 8px; padding-bottom: 8px; gap: 10px; }
  .server-flag { font-size: 32.5px; }
}

@media (max-width: 620px) {
  .brand-top { gap: 14px; }
  .actions { flex-direction: column; flex-wrap: nowrap; }
  .actions > button, .actions > .button-link { width: 100%; flex: none; }
  .profile-delivery-actions { flex-direction: column; width: 100%; }
  .profile-delivery-actions > .button-link { width: 100%; flex: none; }
  .password-note { flex: none; }
  .recovery-code-actions, .recover-actions { flex-direction: column; }
}
@media (max-width: 520px) {
  .page {
    padding-top: max(12px, env(safe-area-inset-top));
    padding-left: 16px;
    padding-right: 16px;
  }
  .brand h1 { font-size: 30px; }
  .language-button { padding-left: 8px; padding-right: 8px; }
  .card-content { padding: 22px; }
  .server-option label { padding-left: 4px; padding-right: 4px; font-size: 14px; }
  .server-address { flex-direction: column; gap: 3px; }
  .server-address-value { text-align: left; }
  .row { grid-template-columns: 1fr; gap: 5px; }
  .row-value { text-align: left; }
  .passkey-item { align-items: flex-start; flex-direction: column; }
  .sign-out-button,
  .passkey-remove-button {
    width: calc(50% + 5px);
    flex-basis: calc(50% + 5px);
    margin-right: -10px;
  }
  .passkey-remove-button { align-self: flex-end; }
  .settings-grid { grid-template-columns: 1fr; gap: 6px; }
  .settings-grid > label:not(:first-child) { margin-top: 6px; }
  .on-demand-rule { grid-template-columns: minmax(0, 1fr) 34px; }
  .on-demand-rule-action { grid-column: 1 / 2; }
  .remove-on-demand-rule { grid-column: 2; grid-row: 1 / 3; }
  .routing-rule-editor { grid-template-columns: 1fr 1fr; }
  .routing-rule-editor .settings-input { grid-column: 1 / -1; }
}

.server-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.server-latency {
  display: block;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 500;
  white-space: nowrap;
}

.server-option input:checked + label .server-latency {
  color: inherit;
  opacity: 0.72;
}

@media (min-width: 621px) {
  .server-copy {
    align-items: flex-start;
    text-align: left;
  }
}

.vpn-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 24px;
  align-items: start;
}

.vpn-overview-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.vpn-overview-header {
  min-height: 48px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px 11px;
  border-bottom: 1px solid var(--border);
}

.vpn-overview-title {
  padding: 0;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
  border-bottom: 0;
}

.vpn-overview-status,
.vpn-overview-updated {
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
}

.vpn-overview-status {
  font-weight: 600;
}

.vpn-overview .status-table {
  margin-top: 0;
  border-top: 0;
}

.vpn-overview .row {
  min-height: 64px;
  box-sizing: border-box;
  padding: 12px 16px;
  align-items: center;
}

.vpn-overview .row:last-child {
  border-bottom: 0;
}

.vpn-overview .row-label,
.vpn-overview .row-value {
  line-height: 1.3;
}

.network-throughput-values {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.network-throughput-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.network-throughput-line > span:first-child {
  color: var(--secondary);
}

.network-throughput-line > span:last-child {
  color: var(--text);
  white-space: nowrap;
}

.network-throughput-row .row-label {
  align-self: center;
}

.network-throughput-values {
  width: 100%;
}

.network-throughput-line {
  align-items: baseline;
}

.network-throughput-line > span:first-child {
  min-width: 0;
}

.network-throughput-line > span:last-child {
  margin-left: auto;
  text-align: right;
}

@media (min-width: 760px) {
  .vpn-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vpn-overview .row {
    height: 72px;
    min-height: 72px;
    grid-template-columns: minmax(90px, 0.65fr) minmax(0, 1.6fr);
    gap: 12px;
  }
}

@media (max-width: 759px) {
  .vpn-overview {
    gap: 14px;
    margin-top: 20px;
  }

  .vpn-overview .row {
    min-height: 58px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

.network-throughput-row {
  align-items: start !important;
}

.network-throughput-row .row-label {
  align-self: start;
}

.network-throughput-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 6px;
  width: 100%;
  align-items: baseline;
}

.network-throughput-line {
  display: contents;
}

.network-throughput-line > span:first-child {
  white-space: nowrap;
  color: var(--secondary);
}

.network-throughput-line > span:last-child {
  white-space: nowrap;
  text-align: right;
  color: var(--text);
}

/* Network throughput: label on first line, directions below */
@media (min-width: 760px) {
  #usernameRow,
  .network-throughput-row {
    height: 88px;
    min-height: 88px;
  }

  #usernameRow {
    align-items: start;
  }

  .network-throughput-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px !important;
    align-content: start;
    align-items: start !important;
  }

  .network-throughput-row .row-label {
    align-self: start;
  }

  .network-throughput-values {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 16px;
    row-gap: 3px;
    width: 100%;
  }

  .network-throughput-line {
    display: contents;
  }

  .network-throughput-line > span:first-child {
    white-space: nowrap;
  }

  .network-throughput-line > span:last-child {
    white-space: nowrap;
    text-align: right;
    margin-left: 0;
  }
}

@media (min-width: 760px) {
  #usernameRow,
  .network-throughput-row {
    height: 100px;
    min-height: 100px;
  }
}

@media (min-width: 760px) {
  .network-throughput-values {
    grid-template-columns: minmax(0, 1fr) max-content;
    column-gap: 14px;
  }

  .network-throughput-line > span:first-child {
    min-width: 0;
    white-space: nowrap;
    font-size: 13px;
  }

  .network-throughput-line > span:last-child {
    min-width: 76px;
    white-space: nowrap;
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
}


/* VPN overview — final network layout */
@media (min-width: 760px) {
  .vpn-overview #usernameRow {
    height: 72px;
    min-height: 72px;
    align-items: center;
  }
}

.vpn-overview-speed {
  grid-column: 1 / -1;
}

.vpn-overview-speed .speed-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 24px;
  align-items: center;
}

.vpn-overview-speed .speed-value {
  min-width: 90px;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 760px) {
  .vpn-overview-speed .speed-row {
    height: 58px;
    min-height: 58px;
  }
}

@media (max-width: 759px) {
  .vpn-overview-speed .speed-row {
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 16px;
  }

  .vpn-overview-speed .speed-value {
    min-width: 82px;
  }
}


/* Manual connection test row */
@media (min-width: 760px) {
  .network-metrics .row {
    height: 72px;
    min-height: 72px;
  }

  .network-test-row {
    display: flex !important;
    align-items: center !important;
    justify-content: center;
  }
}

.network-test-button {
  min-width: 138px;
  height: 40px;
  padding: 0 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.network-test-button.constructive {
  border: 1px solid var(--constructive-border);
  background: transparent;
  color: var(--constructive-text);
}

.network-test-button.constructive:active {
  background: var(--constructive-pressed);
}

.network-test-button:active {
  opacity: 0.65;
}

.network-test-button {
  width: calc(100% - 32px);
  max-width: 250px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--text);
  color: var(--background, #fff);
  font: inherit;
  font-weight: 600;
}

.network-test-button:active {
  opacity: 0.72;
}


/* VPN overview visual refinement */
.vpn-overview-title {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--text);
}

/* Same row rhythm everywhere */
.vpn-overview-speed .speed-row {
  height: 72px;
  min-height: 72px;
}

/* Quiet secondary connection-test button */
.network-test-button {
  width: calc(100% - 32px);
  max-width: none;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--text);
  font: inherit;
  font-weight: 600;
}

.network-test-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.network-test-button:active {
  background: color-mix(in srgb, var(--text) 13%, transparent);
  opacity: 1;
}

/* Final compact VPN overview */
.vpn-overview-title {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--text);
}

.vpn-overview-header {
  min-height: 48px;
  padding: 12px 16px;
}

.vpn-overview .row,
.vpn-overview-speed .speed-row {
  min-height: 60px;
  height: 60px;
  padding: 10px 16px;
}

.network-test-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center;
}

.network-test-button {
  width: calc(100% - 32px);
  max-width: none;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
}

.network-test-button:active {
  background: color-mix(in srgb, var(--text) 6%, transparent);
  opacity: 1;
}

.network-test-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.connection-test-card {
  grid-column: 1 / -1;
}

.connection-test-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.connection-test-result {
  min-width: 0;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-right: 1px solid var(--border);
  text-align: center;
}

.connection-test-result:last-child { border-right: 0; }

.connection-test-result span {
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.25;
}

.connection-test-result strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.connection-test-card .network-test-row {
  min-height: 60px;
  padding: 10px 16px;
}

.network-test-button:disabled {
  opacity: 0.55;
  cursor: default;
}

@media (max-width: 520px) {
  .connection-test-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .connection-test-result:nth-child(2) { border-right: 0; }
  .connection-test-result:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
}

/* Uniform compact rows in all VPN overview tables */
.vpn-overview .row,
.vpn-overview #usernameRow,
.vpn-overview .network-metrics .row,
.vpn-overview-speed .speed-row {
  height: auto;
  min-height: 48px;
  padding: 8px 16px;
  align-items: center;
}

.connection-test-result {
  height: auto;
  min-height: 48px;
  box-sizing: border-box;
  gap: 2px;
  padding: 5px 8px;
}

.network-metrics .network-test-row {
  height: auto;
  min-height: 48px;
  box-sizing: border-box;
  padding: 8px 16px;
}

/* VPN summary and consolidated TOLF network measurements */
.vpn-overview {
  grid-template-columns: minmax(0, 1fr);
}

.vpn-overview-top {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.vpn-overview-speed .vpn-overview-header {
  flex-wrap: wrap;
}

.connection-test-action {
  min-width: 0;
  display: flex;
  grid-column: 1 / -1;
}

.connection-test-action .network-test-button {
  width: 100%;
  max-width: none;
  height: 44px;
  margin: 0;
}

@media (max-width: 520px) {
  .server-option label {
    height: 76px;
    min-height: 76px;
    padding: 3px 4px;
    gap: 3px;
  }

  .server-flag {
    font-size: 29px;
  }

  .server-city {
    font-size: 14px;
  }

}

#networkMetricRigaToMoscow,
#networkMetricMoscowToRiga {
  font-weight: 600;
}

#vpnServerName,
#vpnUsername {
  font-weight: 600;
}

.windows-create-form { display: grid; gap: 12px; margin: 20px 0; }
.windows-create-form label { color: var(--secondary); font-size: 15px; }
.windows-create-form input { box-sizing: border-box; width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; }
.windows-device { padding: 16px; margin-top: 16px; }
.windows-device h4 { margin: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.windows-device-username { color: var(--secondary); font-size: 14px; overflow-wrap: anywhere; }

.windows-create-actions { display: flex; align-items: center; gap: 16px; }
.windows-create-actions #windowsCreateButton { flex: 1; min-width: 0; }
.windows-create-actions .windows-back-button { flex: 0 0 auto; width: auto; padding: 10px 0; border: 0; background: transparent; box-shadow: none; color: var(--secondary); font-size: 13px; font-weight: 500; }

.windows-device-delivery { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; width: 100%; margin-top: 12px; }
.windows-device-delivery > button { width: 100%; min-width: 0; height: auto; min-height: 48px; padding: 12px; font-weight: 600; overflow-wrap: anywhere; }
.windows-device-delivery .windows-copy-button { appearance: none; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 12px; }
.windows-device-open { grid-column: 1 / -1; }
.windows-device > .message:empty { display: none; }

.windows-device > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.windows-device > summary::-webkit-details-marker { display: none; }
.windows-device > summary::after { content: '›'; flex: 0 0 auto; color: var(--secondary); font-size: 22px; font-weight: 400; }
.windows-device[open] > summary::after { transform: rotate(90deg); }
.windows-device > summary:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: 4px; }
.windows-device-body > .message:empty { display: none; }

/* Existing VPN access uses the same form controls as the account page. */
.existing-vpn-form { display: grid; gap: 10px; margin-top: 16px; }
.existing-vpn-form input { width: 100%; min-width: 0; box-sizing: border-box; }
.existing-vpn-form button { margin-top: 6px; width: 100%; }
#existingVpnDetails summary { cursor: pointer; }

#invitationCard, #existingVpnCard { margin-bottom: 16px; }
#invitationText { line-height: 1.5; overflow-wrap: anywhere; }

.passkey-label-field { margin: 18px 0; text-align: left; }
.passkey-label-field label { display: block; font-weight: 600; margin-bottom: 8px; }
.passkey-label-field input { width: 100%; box-sizing: border-box; }
.passkey-label-field p { font-size: 0.875rem; margin: 8px 0; }
.passkey-label-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.passkey-rename-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.passkey-rename-form input { width: 100%; min-width: 0; }
.passkey-name { overflow-wrap: anywhere; }
.passkey-info { min-width: 0; }
@media (max-width: 600px) {
  .passkey-label-actions { width: 100%; }
}

.invitation-actions {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 16px;
}
.invitation-actions > button {
  flex: 1 1 0;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
#invitationDismiss {
  background: #ffffff;
  color: #d70015;
  border: 1px solid #d70015;
}

/* Keep complete usernames inside the card when they wrap. */
.vpn-overview #usernameRow {
  height: auto;
  min-height: 48px;
}
.passkey-label-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(320px, 100%);
  flex-shrink: 0;
  align-items: stretch;
}
.passkey-label-actions > button {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  height: 100%;
  margin: 0;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.3;
  align-self: stretch;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .passkey-label-actions { width: 100%; }
}

.passkey-label-actions { width: min(160px, 100%); grid-template-columns: minmax(0, 1fr); margin-left: auto; }

/* Match the compact Apply button in the header. */
.passkey-label-actions { width: min(168px, 100%); }
.passkey-label-actions > .passkey-remove-button {
  height: 44px;
  min-height: 44px;
  border-radius: 11px;
  padding: 8px 10px;
  font-size: 15px;
}

@media (max-width: 600px) {
  .passkey-label-actions {
    width: 100%;
    margin-left: 0;
  }
  .passkey-label-actions > .passkey-remove-button {
    width: 100%;
    flex-basis: 100%;
  }
}

/* The site switches to stacked cards below 760px. Match that same breakpoint. */
@media (max-width: 759px) {
  .passkey-item .passkey-label-actions {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
  }
  .passkey-item .passkey-label-actions > .passkey-remove-button {
    width: 100% !important;
    flex: 1 1 100% !important;
  }
}

/* Ask for a device name only after the explicit add action. */
.windows-start-actions { margin: 20px 0; }
.windows-create-actions #windowsAddButton,
.windows-create-form .windows-create-actions > button { flex: 1; min-width: 0; }

.windows-device-delete { display: block; width: 100%; box-sizing: border-box; margin-top: 12px; background: #bc4369; color: #fff; border-color: #bc4369; }
.windows-device-delete:not(:disabled):hover { background: #ad375d; border-color: #ad375d; }
.windows-device-delete:not(:disabled):active { background: #9f2f53; border-color: #9f2f53; }

.windows-device-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.windows-device-links > button { width: 100%; min-width: 0; height: auto; min-height: 52px; padding: 12px; white-space: normal; overflow-wrap: anywhere; }
.windows-device-links > .windows-copy-button { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.windows-create-form select { box-sizing: border-box; width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; }
.windows-create-form > .card-description { margin: 0; }

#windowsCancelButton { background: #fff; color: var(--danger); border: 1px solid var(--danger); }

.windows-password { margin: 24px 0; padding-top: 20px; border-top: 1px solid var(--border); }
.windows-password h4 { margin: 0 0 12px; }
.windows-password-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.windows-password-value { flex: 1 1 220px; min-width: 0; font-family: ui-monospace, monospace; }
.windows-password-row button { flex: 1 0 auto; }

.windows-link-create { grid-template-columns: minmax(0, 1fr); }
.windows-device-delivery > label { display: block; margin: 0; color: var(--secondary); font-weight: 400; }
.windows-link-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; }
.windows-link-value { flex: 1 1 240px; min-width: 0; width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: var(--text); }
.windows-link-row > button { flex: 0 0 auto; }

.windows-device-delivery > .message { margin: 0; min-height: 0; }
.windows-device-delivery > .message:empty { display: none; }
.windows-device-delivery + .windows-password { margin-top: 16px; }

/* Keep the account section heading subordinate to the page title. */
#vpnCard .card-topline > h2 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
}

/* Promo entry is a secondary account action, opened on demand. */
html[data-tolf-ui="vpn"] .header-actions-row {
  display: block;
}
html[data-tolf-ui="vpn"] .header-actions-row .site-nav {
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
}
.account-promo { margin-top: 24px; }
.account-promo summary {
  display: list-item;
  width: fit-content;
  cursor: pointer;
  color: var(--secondary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  padding-block: 10px;
}
.account-promo summary:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}
.account-promo .promo-input {
  box-sizing: border-box;
  min-height: 42px;
  height: 42px;
  padding-block: 0;
}
.account-promo #promoGranted {
  color: var(--success);
  font-size: 14px;
  line-height: 1.45;
}

/* Equal-width promo input and action fill the account card. */
html[data-tolf-ui="vpn"] .account-promo .promo-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 10px;
}
html[data-tolf-ui="vpn"] .account-promo .promo-actions > :is(input, button) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 42px;
  min-height: 42px;
  padding: 0 8px;
}

/* Empty status slots must not reserve space below account and VPN actions. */
.message:empty, .passkey-message:empty, .recovery-message:empty, .promo-message:empty { display:none; }
.card-content { padding-bottom:20px; }
.card-content > :last-child { margin-bottom:0; }
.delete-section:has(> .delete-button.hidden) { display:none; }
.account-navigation { color:var(--text); font-size:14px; font-weight:600; text-decoration:none; border:1px solid var(--border); border-radius:10px; padding:10px 12px; min-height:42px; display:inline-flex; align-items:center; }
.card-topline { flex-wrap:wrap; gap:12px; }

/* Collapsible routing settings */
#routingRulesSection {
  margin: 0 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
#routingRulesSection > summary {
  display: list-item;
}
#routingRulesSection > summary > .settings-title {
  display: inline;
  font: inherit;
  color: inherit;
}
#routingRulesSection[open] > summary {
  margin-bottom: 10px;
}

/* Compact entry address and recommendation */
.server-address {
  justify-content: flex-start;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
}
.server-address-value {
  text-align: left;
  font-weight: 400;
}



#profileSettings {
  margin-top: 16px;
}

/* Account and sign-out actions share one layout */
#vpnCard .vpn-account-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
html[data-tolf-ui] #vpnCard .vpn-account-actions > :is(#accountNavigation, #signOutButton) {
  box-sizing: border-box;
  flex: 0 0 auto;
  width: auto;
  min-height: 38px;
  margin: 0;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--tolf-outline, var(--border));
  border-radius: 10px;
  background: var(--tolf-card, var(--card));
  color: var(--tolf-action-text, var(--text));
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}
@media (max-width: 380px) {
  html[data-tolf-ui] #vpnCard .vpn-account-actions > :is(#accountNavigation, #signOutButton) {
    padding-inline: 8px;
    font-size: 13px;
  }
}

/* Recommendation above the corresponding entry point card. */
.server-recommendations {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  padding:0 6px 7px;
}
.server-recommendations .server-recommendation {
  display:block;
  min-width:0;
  color:var(--secondary);
  font-size:13px;
  line-height:1.3;
  font-weight:600;
  text-align:center;
}
.server-recommendations .server-recommendation.hidden { display:none; }

.recovery-code-box > .recovery-file-button {
  display:block;
  width:100%;
  margin:12px 0;
}

.windows-setup-notice {
  margin: 18px 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  line-height: 1.5;
}
.windows-setup-notice > strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
}
.windows-setup-notice ol { margin: 12px 0 0; padding-left: 22px; }
.windows-setup-notice li + li { margin-top: 8px; }


/* Protocol row uses the same typography as the information rows. */
#vpnOverviewTitle {
  color:var(--secondary);
  font-size:15px;
  line-height:1.3;
  font-weight:400;
}
#vpnStatus {
  color:var(--text);
  font-size:15px;
  line-height:1.3;
  font-weight:600;
}

/* AnyConnect routing mode row — 2026-10-01. */
.anyconnect-mode-row {
  position:relative;
}
.anyconnect-mode-value {
  display:contents;
}
.anyconnect-mode-meta {
  min-width:0;
  color:var(--secondary);
  font-size:12px;
  line-height:1.3;
  white-space:nowrap;
  text-align:right;
}
#anyConnectModeHelp {
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:2px;
  white-space:nowrap;
}
#anyConnectModeHelp > span {
  display:block;
}
#anyConnectModeStatus {
  position:absolute;
  right:16px;
  bottom:3px;
  color:var(--success);
  font-size:10px;
  line-height:1;
  white-space:nowrap;
}
#anyConnectModeStatus:empty { display:none; }
#anyConnectModeStatus.status-error { color:var(--error); }

.anyconnect-mode-controls {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  height:36px;
}
.anyconnect-auto-button,
.anyconnect-explicit-modes {
  height:36px;
  padding:3px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--segment-background);
  box-sizing:border-box;
}
.anyconnect-auto-button {
  min-width:66px;
  padding:0 12px;
}
.anyconnect-explicit-modes {
  display:grid;
  grid-template-columns:repeat(3,54px);
  align-items:center;
  align-content:center;
  gap:3px;
}
.anyconnect-mode-button {
  box-sizing:border-box;
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  height:28px;
  min-height:28px;
  max-height:28px;
  padding:0 10px;
  border:1px solid transparent;
  border-radius:7px;
  background:transparent;
  color:var(--secondary);
  font-family:inherit;
  font-size:13px;
  font-weight:500;
  line-height:1.2;
  cursor:pointer;
}
.anyconnect-auto-button.anyconnect-mode-button {
  height:36px;
  min-height:36px;
  max-height:36px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--segment-background);
  color:var(--text);
}
.anyconnect-auto-button.anyconnect-mode-button.active {
  background:var(--card);
}
.anyconnect-auto-button.anyconnect-mode-button:hover:not(:disabled) {
  background:var(--card);
}
.vpn-overview .anyconnect-mode-row {
  align-items:center;
  padding-top:12px;
  padding-bottom:12px;
}
.anyconnect-mode-controls,
.anyconnect-mode-meta {
  align-self:center;
}
.anyconnect-mode-button {
  margin:0;
}
.anyconnect-mode-button.active {
  color:var(--text);
  background:var(--card);
  border-color:var(--border);
}
.anyconnect-mode-button.active::before {
  content:"";
  width:6px;
  height:6px;
  flex:0 0 6px;
  margin-right:6px;
  border:1px solid var(--border);
  border-radius:50%;
  background:transparent;
  box-sizing:border-box;
}
.anyconnect-mode-controls.policy-confirmed .anyconnect-mode-button.active::before {
  border-color:#34c759;
  background:#34c759;
}
.anyconnect-mode-button:disabled { opacity:.55; cursor:default; }

@media (min-width:760px) {
  .vpn-overview .anyconnect-mode-row {
    height:72px;
    min-height:72px;
    grid-template-columns:126px minmax(150px,1fr) auto;
    gap:14px;
  }
}
@media (max-width:759px) {
  .vpn-overview .anyconnect-mode-row {
    grid-template-columns:110px minmax(120px,1fr) auto;
    gap:10px;
  }
  .anyconnect-explicit-modes {
    grid-template-columns:repeat(3,48px);
  }
  .anyconnect-auto-button { min-width:62px; }
}
@media (max-width:520px) {
  .vpn-overview .anyconnect-mode-row {
    grid-template-columns:1fr;
    gap:7px;
  }
  .anyconnect-mode-value {
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }
  .anyconnect-mode-meta { text-align:left; }
  #anyConnectModeHelp { align-items:flex-start; }
  .anyconnect-mode-controls { justify-content:flex-start; }
  #anyConnectModeStatus {
    position:static;
    font-size:11px;
    margin-top:2px;
  }
}

.vpn-setup-actions{display:flex;flex-wrap:wrap;gap:12px}
.vpn-setup-actions > a{box-sizing:border-box;flex:1 1 220px;min-height:42px;display:flex;align-items:center;justify-content:center;margin:0;text-align:center}
#vpnCard,#signedOutCard{scroll-margin-top:100px}

#quickSetupCard .vpn-setup-actions{margin-top:20px}
html[data-tolf-ui="vpn"] body:not(.manual-setup-open) #vpnCard,
html[data-tolf-ui="vpn"] body:not(.manual-setup-open) .header-switchers{display:none!important}

#myVpnProtocolField .vpn-protocol-field{margin:20px 0 12px}
.vpn-protocol-explanation p{margin:8px 0;color:var(--secondary);font-size:14px;line-height:1.5}
.vpn-setup-actions > .hidden{display:none!important}

/* Platform choice belongs to both setup modes in My VPN. */
#myVpnPlatforms { width:100%; margin:20px 0 12px; }
#myVpnPlatforms .platform-switcher {
 display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px;
 width:100%; height:44px; padding:4px;
 border:1px solid var(--border); border-radius:11px; background:var(--segment-background);
}
#myVpnPlatforms .platform-button {
 display:inline-flex; align-items:center; justify-content:center; gap:6px;
 width:100%; min-width:0; height:34px; min-height:34px; max-height:34px;
 padding:0 4px; font-size:14px; font-weight:500; line-height:1.2;
 border:1px solid transparent; border-radius:7px; color:var(--secondary); background:transparent;
}
#myVpnPlatforms .platform-button.active {
 color:var(--text); background:var(--card); border-color:var(--border); box-shadow:none;
}
#myVpnPlatforms .platform-icon { width:16px; height:16px; flex:0 0 16px; fill:currentColor; }
