:root {
  --text: var(--brand-ink); --muted: #686775; --border: #e5e2dc;
  --surface: #fff; --accent: #5148cf; --accent-hover: #433ab5;
  --success: #286348; --success-bg: #edf6ef; --warning: #855218; --warning-bg: #fff3df;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--brand-cream); color: var(--text); font: 15px/1.55 var(--brand-font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
button, input { font: inherit; }
button, .button, input[type=submit] { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 16px; border: 1px solid transparent; border-radius: 8px; background: var(--accent); color: white; font-weight: 750; line-height: 1.35; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
button:hover, .button:hover, input[type=submit]:hover { background: var(--accent-hover); color: white; }
.button-secondary { background: white; border-color: var(--border); color: var(--text); }
.button-secondary:hover { background: #f6f5f9; border-color: #c9c5db; color: var(--text); }
.button-quiet { background: transparent; color: var(--muted); padding: 8px 10px; }
.button-quiet:hover { background: #eeebe5; color: var(--text); }
.button-danger { background: transparent; color: #9d3942; padding: 8px 10px; }
.button-danger:hover { background: #fceff0; color: #882b34; }
button:disabled, input[type=submit]:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid var(--brand-periwinkle); outline-offset: 3px; }
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 2; background: white; padding: 12px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-header { border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1120px; margin: auto; min-height: 88px; padding: 18px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; flex-shrink: 0; }
.brand img { display: block; width: 146px; height: auto; }
.account-nav { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.account-nav > a { color: var(--muted); text-decoration: none; font-weight: 700; }
.account-nav > a[aria-current=page] { color: var(--text); }
form { margin: 0; }
main { max-width: 960px; margin: 0 auto; padding: 48px 32px 32px; }
.page-heading { margin-bottom: 30px; }
.eyebrow { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .09em; text-transform: uppercase; margin: 0 0 8px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 32px; line-height: 1.2; letter-spacing: -.8px; font-weight: 800; overflow-wrap: anywhere; }
h2 { font-size: 17px; line-height: 1.4; font-weight: 800; letter-spacing: -.2px; }
h3 { font-size: 15px; font-weight: 800; }
.subtitle { margin-top: 10px; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 24px; overflow: hidden; }
.panel-heading { padding: 22px 24px; border-bottom: 1px solid var(--border); }
.panel-heading p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.connection-row { display: flex; align-items: center; gap: 16px; padding: 24px; }
.connection-row + .connection-row { border-top: 1px solid var(--border); }
.service-icon { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); font-size: 20px; font-weight: 800; }
.service-icon svg { width: 23px; height: 23px; }
.connection-info { flex: 1; min-width: 0; }
.connection-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.connection-info p { margin-top: 5px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 5px; padding: 3px 7px; font-size: 11px; line-height: 1.4; font-weight: 800; white-space: nowrap; }
.status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-success { background: var(--success-bg); color: var(--success); }
.status-warning { background: var(--warning-bg); color: var(--warning); }
.member-table { width: 100%; border-collapse: collapse; text-align: left; }
.member-table th { padding: 11px 24px; color: var(--muted); font-size: 12px; font-weight: 700; background: #fcfbf9; }
.member-table td { padding: 14px 24px; border-top: 1px solid var(--border); }
.member-table th:last-child, .member-table td:last-child { text-align: right; }
.member-name { display: flex; align-items: center; gap: 12px; overflow-wrap: anywhere; }
.avatar { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: #efedf9; color: #59528d; font-weight: 800; font-size: 12px; }
.you { color: var(--muted); font-size: 12px; margin-left: 5px; }
.role { font-size: 13px; color: var(--muted); }
code { background: #eeecf4; color: #514b70; padding: 3px 6px; border-radius: 4px; font-size: .9em; }
.notice { border: 1px solid #cce3d3; background: var(--success-bg); color: var(--success); padding: 13px 16px; border-radius: 8px; margin-bottom: 24px; }
.notice-error { border-color: #efcfd2; background: #fff3f3; color: #922f39; }
.narrow { max-width: 600px; margin: 0 auto; }
.back-link { display: inline-block; color: var(--muted); font-size: 13px; text-decoration: none; margin-bottom: 24px; }
.form-body { padding: 24px; }
.instructions { padding-left: 20px; margin: 0 0 24px; color: var(--muted); }
.instructions li { padding-left: 5px; margin-bottom: 10px; }
.instructions strong { color: var(--text); font-weight: 700; }
label { display: block; font-weight: 750; margin-bottom: 8px; }
input[type=password] { display: block; width: 100%; border: 1px solid #b9b5c2; border-radius: 8px; padding: 11px 12px; background: white; color: var(--text); }
input[aria-invalid=true] { border-color: #b74752; }
.field-help { font-size: 13px; color: var(--muted); margin: 10px 0 22px; }
.security-note { padding: 16px 24px; background: #fcfbf9; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.auth { max-width: 440px; margin: 40px auto 56px; }
.auth .panel { padding: 32px; }
.auth h1 { font-size: 28px; }
.auth .button { width: 100%; margin-top: 28px; }
.auth-secondary { text-align: center; color: var(--muted); font-size: 14px; }
.auth-detail { font-size: 13px; color: var(--muted); margin-top: 16px; }
.intro { max-width: 620px; margin: 36px auto; }
.intro h1 { font-size: clamp(36px, 5vw, 48px); line-height: 1.15; }
.intro .subtitle { font-size: 17px; max-width: 540px; margin-top: 20px; }
.setup-steps { list-style: none; counter-reset: step; padding: 0; margin: 28px 0; }
.setup-steps li { counter-increment: step; display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.setup-steps li::before { content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; background: #eeeafa; color: var(--accent); border-radius: 50%; font-size: 12px; font-weight: 800; }
@media (max-width: 640px) {
  .header-inner { padding: 18px 20px; min-height: 78px; gap: 12px; }
  .account-nav { gap: 8px; font-size: 12px; }
  .account-nav button { font-size: 12px; padding: 8px; }
  main { padding: 32px 20px 20px; }
  h1 { font-size: 28px; }
  .panel-heading, .form-body { padding: 20px; }
  .connection-row { padding: 20px; flex-wrap: wrap; gap: 12px; }
  .connection-info { flex: 1 0 calc(100% - 54px); }
  .connection-row > .button { margin-left: 54px; }
  .security-note { padding: 14px 20px; }
  .member-table th, .member-table td { padding: 12px 10px; }
  .member-table th:first-child, .member-table td:first-child { padding-left: 20px; }
  .member-table th:last-child, .member-table td:last-child { padding-right: 20px; }
  .member-table .avatar { display: none; }
  .member-table button { font-size: 12px; padding: 8px; }
  .member-table td:first-child { max-width: 130px; }
  .auth { margin: 24px auto; }
  .auth .panel { padding: 24px; }
  .intro { margin: 20px auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
