:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #203c38;
  background: #f8faf7;
  font-synthesis: none;
  line-height: 1.5;
  --green: #21654c;
  --muted: #687973;
  --border: #dce4de;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
button, a, input, textarea, select, summary { outline-offset: 3px; }
:focus-visible { outline: 3px solid #8ab69b; }
button { transition: background .15s, border-color .15s; }
button.primary, button.quiet { min-height: 42px; border-radius: 6px; padding: 10px 16px; font-size: 12px; font-weight: 600; border: 1px solid var(--green); }
.primary { background: var(--green); color: #fff; }
.primary:hover:not(:disabled) { background: #154b37; }
button.quiet { background: #fff; border-color: #cad8cc; color: var(--green); }
.quiet:hover:not(:disabled) { background: #f0f6ee; }
button.small { min-height: 35px; padding: 7px 11px; font-size: 11px; }
.text-button { border: 0; background: none; padding: 4px 0; color: var(--green); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.topbar { max-width: 1376px; margin: auto; padding: 24px 48px; display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--border); }
.brand { text-decoration: none; font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 7px; letter-spacing: -.6px; white-space: nowrap; }
.brand .light { margin-left: -5px; }
.light, .muted { color: var(--muted); font-weight: 400; }
.brand-icon { display: grid; place-items: center; background: #214f3d; color: white; width: 34px; height: 34px; border-radius: 8px; font: 700 19px monospace; margin-right: 5px; }
nav { display: flex; align-items: center; gap: 27px; margin-left: auto; font-size: 12px; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover, nav a[aria-current="page"] { color: var(--green); }
nav a[aria-current="page"] { font-weight: 650; }
main { max-width: 1240px; margin: auto; padding: 0 28px; }
.intro { padding: 48px 0 32px; display: grid; grid-template-columns: 1fr 310px; gap: 40px; align-items: center; }
.eyebrow { font-size: 10px; letter-spacing: 1.8px; font-weight: 650; color: #60786a; margin: 0; }
.eyebrow span { margin: 0 9px; color: #a2b5a6; }
h1 { font-size: clamp(34px, 4.2vw, 52px); line-height: 1.12; letter-spacing: -2px; font-weight: 550; margin: 19px 0 17px; }
h1 span { color: #58866c; }
.intro-copy { color: #62756a; font-size: 14px; line-height: 1.8; margin: 0; }
.badges { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 21px; font-size: 11px; color: #597365; }
.balance-card { border: 1px solid #d5e2d5; border-radius: 10px; background: #eef4e9; padding: 24px; }
.balance { display: flex; align-items: baseline; gap: 10px; margin: 9px 0 4px; }
.balance strong { font-size: 49px; font-weight: 500; line-height: 1.2; letter-spacing: -2px; }
.balance span { color: #647e67; font-size: 13px; }
.balance-card p { margin: 8px 0 0; overflow-wrap: anywhere; font-size: 12px; }
.balance-card p.muted { font-size: 11px; line-height: 1.7; border-top: 1px solid #d5e2d5; padding-top: 12px; margin-top: 15px; }
.card { border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: 0 6px 24px #264a3707; }
.auth-card { display: grid; grid-template-columns: .85fr 1.2fr; gap: 45px; padding: 27px; margin-bottom: 28px; }
h2 { font-size: 20px; line-height: 1.3; font-weight: 550; letter-spacing: -.5px; margin: 6px 0 10px; }
.auth-card > div > p { font-size: 12px; color: var(--muted); max-width: 350px; margin: 0; line-height: 1.8; }
.segmented { display: inline-flex; padding: 3px; background: #eff4ed; border-radius: 6px; margin-bottom: 16px; gap: 3px; }
.segmented button { border: 0; border-radius: 4px; padding: 6px 13px; background: transparent; color: var(--muted); font-size: 11px; }
.segmented button[aria-pressed="true"] { background: #fff; color: var(--green); box-shadow: 0 1px 5px #203c3812; }
.auth-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: block; font-size: 11px; color: #526e5c; margin-bottom: 6px; }
input, select { width: 100%; min-width: 0; border: 1px solid #cedbcf; border-radius: 5px; background: #fff; color: #203c38; padding: 10px 11px; font-size: 12px; }
input::placeholder { color: #87998c; }
.form-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 11px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 30px 0 17px; }
.section-heading h2 { margin: 7px 0 0; }
.pill { border: 1px solid var(--border); border-radius: 4px; font-size: 9px; letter-spacing: .7px; padding: 4px 7px; color: #637d6a; white-space: nowrap; }
.workspace { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.editor-pane { padding: 24px; min-width: 0; }
.editor-pane + .editor-pane { border-left: 1px solid var(--border); }
.output-pane { background: #fdfefc; }
.pane-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
h3, .pane-heading h2 { font-size: 14px; font-weight: 600; letter-spacing: 0; margin: 0; }
.step { color: #91a498; font: 11px monospace; margin-right: 9px; }
.tiny { font-size: 9px; letter-spacing: .7px; color: #7d8b82; }
.provider-row { display: flex; align-items: end; gap: 16px; margin-bottom: 18px; }
.provider-row > div { flex: 1; }
.provider-row button { margin-bottom: 2px; }
.code-editor { display: block; width: 100%; height: 270px; min-height: 160px; resize: vertical; border: 1px solid #d6e0d7; border-radius: 6px 6px 0 0; background: #fbfcfa; padding: 14px; font: 11px/1.75 ui-monospace, SFMono-Regular, Consolas, monospace; color: #254e3e; white-space: pre; overflow: auto; }
.code-editor::placeholder { color: #8b9d90; white-space: normal; }
.code-editor:focus { border-color: #75a587; }
#invoice-xml { height: 355px; }
.editor-foot { border: 1px solid #d6e0d7; border-top: 0; border-radius: 0 0 6px 6px; padding: 7px 10px; display: flex; justify-content: space-between; gap: 8px; color: #7a8b7d; font-size: 9px; }
.action-row { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; margin-top: 17px; font-size: 11px; }
.validation-actions { gap: 9px; }
.validation-result { margin-top: 19px; border: 1px dashed #d1dfd2; background: #f6f9f3; border-radius: 6px; padding: 15px; font-size: 12px; overflow-wrap: anywhere; }
.validation-result strong { font-size: 12px; }
.validation-result p { color: #6b7f6e; margin: 5px 0 0; font-size: 11px; }
.validation-result ul { margin: 10px 0 0; padding-left: 18px; }
.validation-result li { margin: 5px 0; }
.validation-result[data-tone="success"] { border: 1px solid #b4d6b8; background: #eef8ef; }
.validation-result[data-tone="error"] { border: 1px solid #e4c6ba; background: #fff7f3; }
.scope-note { display: flex; gap: 12px; margin: 20px 0 10px; padding: 17px 20px; border-radius: 7px; background: #eef3e9; color: #4d6754; font-size: 12px; }
.scope-note > span { font-size: 19px; line-height: 1.2; }
.scope-note strong { font-weight: 600; }
.scope-note p { margin: 4px 0 0; font-size: 11px; line-height: 1.8; }
.privacy-note { font-size: 11px; color: var(--muted); line-height: 1.8; margin: 12px 2px 0; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.account-panel { padding: 24px; min-width: 0; }
.account-panel > .muted { font-size: 12px; margin: -6px 0 18px; }
.inline-form { display: flex; align-items: end; gap: 9px; }
.inline-form > div { flex: 1; min-width: 0; }
.inline-form button { flex-shrink: 0; }
.key-list { margin: 21px 0 0; padding: 0; list-style: none; }
.key-list li { border-top: 1px solid #e5ebe4; padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; overflow-wrap: anywhere; }
.key-list li > div { min-width: 0; }
.key-list strong { font-weight: 550; }
.key-meta { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.revoked { color: #8b786e; font-size: 10px; white-space: nowrap; }
.secret-panel { background: #eff6e9; border: 1px solid #bfd2b3; border-radius: 7px; padding: 16px; margin-top: 18px; font-size: 12px; }
.secret-panel p { font-size: 11px; line-height: 1.7; }
#new-key { font: 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
th { font-size: 9px; color: #748778; font-weight: 550; letter-spacing: .5px; text-transform: uppercase; border-bottom: 1px solid var(--border); padding: 9px 9px 9px 0; }
td { padding: 14px 9px 14px 0; border-bottom: 1px solid #edf0eb; overflow-wrap: anywhere; max-width: 320px; }
td:last-child, th:last-child { padding-right: 0; }
td .key-meta { max-width: 240px; }
.numeric { text-align: right; }
.empty-state { padding: 25px 0; color: var(--muted); font-size: 12px; }
.small-copy { font-size: 10px !important; margin-top: 17px !important; }
.message { margin: 13px 0 0; padding: 10px 12px; border-radius: 5px; background: #edf4ea; color: #355b41; font-size: 12px; overflow-wrap: anywhere; white-space: pre-line; }
.message[data-tone="error"], .notice[data-tone="error"] { background: #fff2ec; color: #92482d; border-color: #e6cbbb; }
.notice { border: 1px solid #d1dfd0; background: #eff6eb; color: #3e6146; padding: 13px 16px; margin-top: 20px; border-radius: 6px; font-size: 12px; }
details { font-size: 12px; margin-top: 16px; }
summary { cursor: pointer; color: var(--green); font-weight: 550; }
pre { overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; color: #355e45; background: #f3f7ef; padding: 16px; border-radius: 5px; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.api-details { margin-top: 28px; padding: 21px 24px; }
.api-details summary { font-size: 13px; }
.api-details summary .muted { margin-left: 10px; font-size: 11px; }
.api-details-content { margin-top: 18px; max-width: 850px; color: var(--muted); font-size: 12px; }
.admin-heading { margin-top: 48px; align-items: start; }
.gate { padding: 35px; margin: 25px 0; }
.gate p { color: var(--muted); font-size: 13px; }
.gate a { font-size: 13px; color: var(--green); }
.grant-panel { padding: 24px; margin-top: 20px; }
.grant-panel > p { font-size: 13px; overflow-wrap: anywhere; }
.grant-form { display: grid; grid-template-columns: 160px 1fr auto; align-items: end; gap: 14px; }
.admin-actions { display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.status-pill { font-size: 10px; background: #eff5ea; color: #4b704e; padding: 3px 6px; border-radius: 4px; white-space: nowrap; }
.status-pill.suspended { background: #f9eee6; color: #91634a; }
footer { max-width: 1240px; margin: 40px auto 0; padding: 23px 28px 30px; border-top: 1px solid var(--border); color: #708273; display: flex; justify-content: space-between; gap: 20px; font-size: 10px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { display: block; padding: 14px; background: #fff; }
@media (max-width: 960px) {
  .topbar { padding: 21px 28px; gap: 18px; }
  nav { gap: 16px; }
  .intro { grid-template-columns: 1fr 270px; gap: 22px; }
  .auth-card { gap: 22px; grid-template-columns: .8fr 1.2fr; }
  .auth-fields { grid-template-columns: 1fr; }
  .editor-pane, .account-panel { padding: 19px; }
  .action-row { gap: 9px; }
  .account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topbar { padding: 18px 20px; flex-wrap: wrap; gap: 15px; }
  .brand { font-size: 20px; }
  nav { order: 3; width: 100%; justify-content: space-between; margin: 0; gap: 10px; }
  #logout { margin-left: auto; }
  main { padding: 0 18px; }
  .intro { padding-top: 31px; grid-template-columns: 1fr; gap: 24px; }
  h1 { font-size: 39px; }
  .intro-copy { font-size: 13px; }
  .desktop { display: none; }
  .balance-card { padding: 20px; }
  .balance { margin: 4px 0; }
  .balance strong { font-size: 42px; }
  .auth-card, .workspace { grid-template-columns: 1fr; }
  .auth-card { padding: 21px; gap: 20px; }
  .auth-fields { grid-template-columns: 1fr 1fr; }
  .editor-pane + .editor-pane { border-left: 0; border-top: 1px solid var(--border); }
  #invoice-xml { height: 280px; }
  .scope-note { padding: 16px; }
  .section-heading > .pill { display: none; }
  .api-details { padding: 18px; }
  .api-details summary .muted { display: block; margin: 5px 0 0; }
  .grant-form { grid-template-columns: 1fr; }
  .admin-heading { flex-direction: column; }
  footer { padding: 22px 18px; flex-direction: column; gap: 8px; }
}
@media (max-width: 400px) {
  .auth-fields { grid-template-columns: 1fr; }
  .provider-row { gap: 9px; }
  .badges { gap: 9px; }
  .validation-actions { align-items: stretch; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
