:root {
  color-scheme: light;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #152238;
  background: #f4f7fb;
  --blue: #1358ca;
  --muted: #516079;
  --line: #dce5f1;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.55; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, input:focus-visible { outline: 3px solid #79a5ff; outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 4vw, 2.55rem); letter-spacing: -.045em; }
h2 { font-size: 1.25rem; letter-spacing: -.025em; }
h3 { font-size: .96rem; }
p + p { margin-top: .65rem; }

.wrap { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-content { display: flex; align-items: center; justify-content: space-between; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 1.15rem; font-weight: 700; letter-spacing: -.025em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #fff; background: var(--blue); font: 700 1.95rem/1 system-ui; }
.intro { padding-block: 40px 28px; }
.intro p, .entry p { margin-top: .5rem; color: var(--muted); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 20px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: clamp(18px, 3vw, 28px); box-shadow: 0 6px 20px #17355c07; }
.entry { max-width: 515px; margin: clamp(40px, 10vh, 110px) auto; }
.entry h1 { font-size: clamp(1.7rem, 4vw, 2.15rem); }
.entry button { margin-top: 1.25rem; }
.panel-heading, .tool-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
.panel-heading { margin-bottom: 22px; }
.tool-heading { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.pill { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; color: #42536d; background: #ecf1f7; border-radius: 50px; padding: 4px 9px; font-size: .76rem; font-weight: 650; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.good { color: #196047; background: #e6f6ee; }
.pill.wait { color: #174d9f; background: #e9f1ff; }
.pill.warn { color: #8a4126; background: #fff0e5; }
.pill.neutral::before { display: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 18px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 0; background: transparent; color: var(--muted); }
.tabs button[aria-pressed='true'] { border-color: var(--blue); color: var(--blue); }
label { display: block; font-size: .87rem; font-weight: 650; margin-bottom: 5px; }
form label:not(:first-child) { margin-top: 13px; }
input { width: 100%; min-width: 0; border: 1px solid #cad7e8; border-radius: 8px; background: #fff; color: #152238; padding: .58rem .7rem; }
input[readonly] { background: #f7f9fc; font: .86rem/1.55 ui-monospace, Consolas, monospace; }
input[type='file'] { font-size: .85rem; }
input::file-selector-button { font: inherit; color: var(--blue); background: #eef4ff; border: 0; border-radius: 5px; padding: .24rem .5rem; margin-right: .45rem; cursor: pointer; }
.input-action { display: flex; align-items: stretch; gap: 7px; }
.input-action button { flex: none; }
button { border: 1px solid #cad7e8; border-radius: 8px; padding: .51rem .72rem; font-size: .85rem; font-weight: 650; color: #263751; background: #fff; }
button:hover { background: #eef4ff; }
.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.primary:hover { background: #0e469f; }
.quiet { border-color: transparent; }
.danger { color: #9c302d; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.credential + .credential { margin-top: 16px; }
.field-note, .subtle, footer { color: var(--muted); font-size: .88rem; }
.field-note { margin: 9px 0 12px; }
.callout { border-radius: 9px; padding: 13px; background: #eff5ff; color: #2f496d; margin-top: 20px; font-size: .85rem; }
.callout p { margin-top: 4px; }
.facts { margin: 0 0 15px; }
.facts div { display: flex; flex-wrap: wrap; gap: 5px 14px; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); }
dt { color: var(--muted); font-size: .87rem; }
dd { margin: 0; font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
#pending { margin-top: 15px; }
#mfa-form { margin-top: 14px; }
#cancel { margin-top: 12px; }
.tool-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.tool-list li { position: relative; font-size: .84rem; color: #40516c; padding-left: 13px; }
.tool-list li::before { content: ''; position: absolute; inset: .66em auto auto 0; background: #6f9fe8; width: 5px; height: 5px; border-radius: 50%; }
.client-panel { margin-top: 20px; }
pre { overflow: auto; padding: 15px; color: #e5efff; background: #192940; border-radius: 9px; font: .82rem/1.65 ui-monospace, Consolas, monospace; }
.notice { margin: 0 0 16px; border: 1px solid #bad0f8; border-radius: 9px; padding: 10px 13px; background: #eaf2ff; color: #153e78; font-size: .9rem; }
.entry .notice { margin: 12px 0 0; }
.notice.error { border-color: #f1c9c8; color: #892e2a; background: #fff2f0; }
footer { padding: 19px 0 32px; }
dialog { width: min(450px, calc(100% - 36px)); border: 1px solid var(--line); border-radius: 14px; padding: 24px; color: #152238; }
dialog::backdrop { background: #101d31a0; }
dialog p { margin-top: 12px; color: var(--muted); }
dialog .actions { justify-content: flex-end; margin-top: 20px; }

@media (max-width: 760px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .wrap { width: calc(100% - 28px); }
  .intro { padding-block: 27px 21px; }
  .topbar-content { min-height: 60px; }
}
@media (max-width: 380px) {
  .tool-list { grid-template-columns: 1fr; }
}
