:root[data-theme="system"] {
  color-scheme: dark;
  --bg-color: #0c0f13;
  --text-color: #f3f4f6;
  --muted: #9ca3af;
  --primary-bg: #90b4ff;
  --button-text: #081022;
  --border-color: #263142;
  --link-color: #90b4ff;
  --card-bg: #181d26;
  --gold: #f2c46a;
}

:root[data-theme="light"] {
  color-scheme: light;
}
:root[data-theme="dark"] { color-scheme: dark; }

@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    color-scheme: light;
    --bg-color: #ffffff;
    --text-color: #081022;
    --muted: #6b7280;
    --border-color: #d1d5db;
    --link-color: #0645ad;
    --card-bg: #f9f9f9;
    --gold: #f2c46a;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg-color); color: var(--text-color); }
a { color: var(--link-color); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .13em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.hero { padding: 2.3rem 0 1.25rem; }
.eyebrow { display: inline-block; color: var(--gold); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { font-family: 'DM Serif Display', serif; line-height: 1.2; }
h1 { margin: .4rem 0 .8rem; font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { margin: 0 0 .7rem; font-size: clamp(1.3rem, 3vw, 1.7rem); }
h3 { margin: 0 0 .35rem; font-size: 1.1rem; }
p { margin: .65rem 0 1rem; }
.lead { max-width: 65ch; color: var(--muted); font-size: 1.08rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 1rem; margin: 1rem 0; }
.card { padding: clamp(1.1rem, 4vw, 1.65rem); background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; box-shadow: 0 8px 30px rgba(0, 0, 0, .1); margin: 1rem 0; }
.card > :last-child { margin-bottom: 0; }
.step-number { display: inline-grid; place-items: center; width: 2rem; height: 2rem; margin-bottom: .65rem; border-radius: 50%; background: var(--gold); color: #081022; font-weight: 700; }
.muted, .fine-print { color: var(--muted); }
.fine-print { font-size: .9rem; }
.detail-list { margin: 0; }
.detail-list div { padding: .65rem 0; border-top: 1px solid var(--border-color); }
.detail-list dt { color: var(--muted); font-size: .85rem; }
.detail-list dd { margin: .2rem 0 0; overflow-wrap: anywhere; font-weight: 600; }
.connection-list { list-style: none; margin: 0; padding: 0; }
.connection-list li { border-top: 1px solid var(--border-color); padding: 1.1rem 0; }
.connection-list li:first-child { border-top: 0; }
.connection-list strong { display: block; font-size: 1.05rem; }
.connection-list p { margin: .35rem 0; }
.connection-list form { margin-top: .9rem; }
.technical-details { margin: .7rem 0; }
.technical-details summary { color: var(--link-color); cursor: pointer; font-weight: 600; }
.technical-details[open] { padding-bottom: .3rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1.1rem; }
button, .button { display: inline-flex; width: auto; justify-content: center; align-items: center; min-height: 44px; padding: .7rem 1.1rem; border: 0; border-radius: 10px; background: var(--primary-bg); color: var(--button-text); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { filter: brightness(.93); text-decoration: none; }
.button-secondary, button.secondary { border: 1px solid var(--border-color); background: transparent; color: var(--text-color); }
.button-danger, button.danger { border: 1px solid #db6b70; background: transparent; color: #ffb8bc; }
:root[data-theme="light"] .button-danger, :root[data-theme="light"] button.danger { color: #9d1b23; }
form { margin: 0; }
code { display: inline-block; max-width: 100%; padding: .1rem .3rem; border: 1px solid var(--border-color); border-radius: 5px; overflow-wrap: anywhere; white-space: normal; }
.endpoint { display: block; padding: .75rem; margin: .8rem 0; font-size: 1rem; user-select: all; }
.scope-list { padding-left: 1.25rem; }
.scope-list li { margin-bottom: .65rem; }
.notice { padding: .8rem 1rem; border-left: 4px solid var(--gold); background: var(--card-bg); border-radius: 0 8px 8px 0; }
@media (max-width: 540px) { .hero { padding-top: 1.5rem; } .actions > *, .actions form, .actions form button { width: 100%; } }

/* The MCP page body has its own width; the header comes from site-header.js. */
.mcp-shell { max-width: 850px; }
.mcp-consent .hero { padding: .85rem 0 .15rem; }
.mcp-consent .hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: .2rem 0 .35rem; }
.consent-decision { margin-top: .4rem; padding: clamp(.85rem, 3vw, 1.2rem); border-color: var(--gold); }
.consent-status { margin: 0 0 .2rem; color: var(--success-text); font-weight: 700; }
.consent-lead { margin: .2rem 0 .55rem; line-height: 1.35; }
.consent-summary div { padding: .35rem 0; }
.consent-summary dt { font-size: .78rem; }
.consent-summary dd { margin-top: .1rem; }
.consent-actions { margin-top: .7rem; gap: .5rem; }
.consent-actions form { display: flex; flex-wrap: wrap; gap: .5rem; }
.consent-actions button[value="allow"] { min-height: 50px; font-size: 1.05rem; }
@media (max-width: 540px) {
  .consent-actions form { display: grid; }
  .consent-actions button.secondary { min-height: 40px; }
}

:root[data-theme="system"] .site-title { font-weight: normal; }
:root[data-theme="system"] .title-script,
:root[data-theme="system"] .title-main { display: block; line-height: 1; }
:root[data-theme="system"] .title-script {
  font-family: 'Great Vibes', cursive;
  color: var(--text-color);
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
  font-size: clamp(2.2rem, 1.8rem + 3vw, 3.5rem);
  margin: .2rem 0 .05rem;
}
:root[data-theme="system"] .title-main {
  font-family: 'DM Serif Display', serif;
  color: var(--gold);
  font-size: clamp(.95rem, .8rem + 1.2vw, 1.5rem);
  margin: 0;
  letter-spacing: .02em;
}
:root[data-theme="system"] h1,
:root[data-theme="system"] h2,
:root[data-theme="system"] h3 { font-family: 'DM Serif Display', serif; }
