:root {
  color-scheme: light;
  --page: #151515;
  --surface: #ffffff;
  --text: #202020;
  --muted: #595959;
  --on-dark: #cccccc;
  --gold: #c49a6c;
  --gold-hover: #b68b5d;
  --border: #767676;
  --divider: #dddddd;
  --soft: #f5f3ef;
  --disabled: #e5e5e5;
  --error: #9b2823;
  --error-bg: #fff4f1;
  --focus-dark: #151515;
  --focus-light: #ffffff;
  font-family: "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--page);
  line-height: 1.55;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus-dark); outline-offset: 3px; box-shadow: 0 0 0 3px var(--focus-light); }
.page-shell { max-width: 1060px; margin: auto; padding: 0 32px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--divider); }
.header-content { max-width: 1060px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 32px; }
.brand { flex-shrink: 0; }
.brand { color: var(--text); font-size: 1.5rem; font-weight: 700; letter-spacing: .08em; }
.header-label, footer { font-size: .875rem; }
.header-label { color: var(--muted); }
main { max-width: 620px; margin: 56px auto 0; }
.intro { margin-bottom: 32px; color: var(--surface); }
.eyebrow { margin: 0 0 12px; text-transform: uppercase; letter-spacing: .13em; font-size: .75rem; font-weight: 700; color: var(--gold); }
h1 { margin: 0 0 14px; font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.18; letter-spacing: -.035em; }
.intro > p:last-child { max-width: 550px; margin: 0; color: var(--on-dark); }
.portal-card { background: var(--surface); border: 1px solid var(--divider); border-radius: 4px; padding: 32px; }
.steps { display: flex; justify-content: space-between; padding: 0 0 24px; margin: 0 0 24px; border-bottom: 1px solid var(--divider); list-style: none; gap: 8px; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--muted); }
.steps span { width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.steps [aria-current="step"] { font-weight: 700; color: var(--text); }
.steps [aria-current="step"] span { background: var(--gold); color: var(--text); border-color: var(--text); }
h2 { font-size: 1.35rem; line-height: 1.3; letter-spacing: -.02em; margin: 0 0 12px; }
.section-description { color: var(--muted); margin: 0 0 24px; font-size: .9375rem; }
label { display: block; margin-bottom: 8px; font-size: .9375rem; font-weight: 600; }
input { width: 100%; min-width: 0; min-height: 48px; border: 1px solid var(--border); border-radius: 4px; padding: 10px 12px; background: var(--surface); color: var(--text); }
input[aria-invalid="true"] { border: 2px solid var(--error); }
.code-input { font-size: 1.5rem; letter-spacing: .3em; }
.field-help, .field-error { margin: 8px 0 20px; font-size: .8125rem; }
.field-help { color: var(--muted); }
.field-error { color: var(--error); font-weight: 600; }
.feedback { margin: 0 0 24px; border-radius: 4px; background: var(--soft); border: 1px solid var(--divider); color: var(--text); padding: 12px 14px; font-size: .875rem; overflow-wrap: anywhere; }
.feedback:empty { display: none; }
.feedback.is-error { background: var(--error-bg); border-color: var(--error); border-left-width: 3px; color: var(--error); }
.button { min-height: 46px; border-radius: 4px; padding: 10px 16px; font-size: .875rem; font-weight: 600; border: 1px solid transparent; transition: background-color .15s; overflow-wrap: anywhere; }
.primary { color: var(--text); background: var(--gold); border-color: var(--text); }
.primary:hover:not(:disabled) { background: var(--gold-hover); }
.secondary { color: var(--text); background: var(--surface); border-color: var(--border); }
.secondary:hover:not(:disabled), .text-button:hover:not(:disabled) { background: var(--soft); }
.text-button { background: transparent; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.button:disabled { cursor: not-allowed; color: var(--muted); background: var(--disabled); border: 1px dashed var(--border); }
.full-width { width: 100%; }
.secondary-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.connection-details { margin: 0 0 24px; }
.connection-details > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--divider); }
dt { color: var(--muted); font-size: .875rem; }
dd { min-width: 0; margin: 0; text-align: right; font-size: .875rem; font-weight: 600; overflow-wrap: anywhere; }
#current-ip { font-variant-numeric: tabular-nums; }
.access-actions { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.notice { margin: 24px 0 0; background: var(--soft); border-left: 3px solid var(--gold); padding: 14px 16px; font-size: .8125rem; }
.notice strong { font-size: .875rem; }
.notice p { margin: 6px 0 0; }
.privacy-note { text-align: center; color: var(--on-dark); font-size: .8125rem; margin: 22px 12px; }
footer { text-align: center; padding: 24px 0; color: var(--on-dark); }
.skip-link { position: absolute; top: -100px; left: 16px; background: var(--surface); color: var(--text); padding: 12px; z-index: 1; }
.skip-link:focus { top: 12px; }
@media (max-width: 540px) {
  .page-shell { padding: 0 16px; }
  .header-content { padding: 16px; gap: 16px; }
  .header-label { max-width: 130px; text-align: right; font-size: .75rem; }
  main { margin-top: 32px; }
  .portal-card { padding: 24px 18px; }
  .steps { gap: 6px; }
  .steps li { font-size: .75rem; gap: 5px; }
  .steps span { width: 22px; height: 22px; }
  .access-actions { grid-template-columns: 1fr; }
  .connection-details > div { flex-direction: column; gap: 4px; }
  dd { text-align: left; }
  .secondary-actions .button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
