:root{color-scheme:light;--ink:#172630;--muted:#657780;--line:#dde6e7;--accent:#087e75;--accent-dark:#05635c;--bg:#f5f8f8;--soft:#eaf5f2;--radius:16px}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:90px}
body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.7 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
button,input,textarea{font:inherit}
button,a,input,textarea{ -webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #62cbbd;outline-offset:3px}
.topbar{max-width:1224px;margin:auto;padding:22px 32px;display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid var(--line)}
.brand{font-size:23px;font-weight:800;letter-spacing:-.6px;display:flex;align-items:center;gap:10px;color:var(--ink)}
.brand:hover{text-decoration:none}
.brand-mark{display:inline-grid;place-items:center;width:35px;height:35px;border-radius:10px;background:var(--accent);color:white;font-size:22px}
.brand-logo{display:block;width:34px;height:34px;border-radius:9px;object-fit:cover;flex-shrink:0;background:#f2f6f4}
.brand-sub{font-size:12px;font-weight:500;letter-spacing:0;color:var(--muted);border-left:1px solid var(--line);padding-left:10px}
.topbar nav{display:flex;align-items:center;gap:22px;font-size:13px}
.container{max-width:1160px;padding:0 24px;margin:auto}
.hero{padding:68px 0 55px;display:grid;grid-template-columns:1.05fr 1fr;align-items:center;gap:56px}
.eyebrow{font-size:11px;letter-spacing:2px;font-weight:750;color:var(--accent);margin-bottom:12px}
h1,h2,h3,p{margin-top:0}
h1{font-size:36px;line-height:1.25;letter-spacing:-1.2px;margin-bottom:14px}
.hero h1{font-size:56px;line-height:1.2;letter-spacing:-2px}
.hero h1 span{color:var(--accent)}
.hero-copy{color:var(--muted);margin:22px 0 26px;line-height:1.9}
h2{font-size:21px;letter-spacing:-.5px;margin-bottom:12px}
h3{font-size:15px;margin:22px 0 10px}
p{margin-bottom:14px}
.hero-card{border:1px solid #cbe1db;background:linear-gradient(135deg,#ffffff,#eaf6f1);border-radius:22px;padding:34px;box-shadow:0 18px 55px #214f3910}
.hero-card>code{display:block;font-size:22px;margin:16px 0 24px;overflow-wrap:anywhere}
.method{display:inline-block;font-size:11px;letter-spacing:1px;padding:4px 10px;border:1px solid #acd4c8;border-radius:6px;color:var(--accent-dark);background:#e4f3ed;font-weight:800}
.flow-line{color:var(--muted);display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px}
.flow-line span{color:var(--accent)}
.hero-meta{display:flex;justify-content:space-between;gap:14px;font-size:12px;color:var(--muted)}
.dot{display:inline-block;width:7px;height:7px;margin-right:5px;background:#159278;border-radius:50%}
.panel{background:white;border:1px solid var(--line);border-radius:var(--radius);padding:28px;margin-bottom:24px;min-width:0}
.panel-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:20px}
.panel-heading h2{margin-bottom:4px}
.panel-heading p{margin-bottom:0;font-size:13px}
.panel-heading .eyebrow{margin-bottom:6px}
.button{border:1px solid var(--accent);background:var(--accent);border-radius:9px;color:#fff;display:inline-flex;justify-content:center;align-items:center;gap:12px;padding:10px 19px;cursor:pointer;font-weight:650;font-size:13px;line-height:1.6;white-space:nowrap;transition:background .15s}
.button:hover{background:var(--accent-dark);border-color:var(--accent-dark);text-decoration:none}
.button.secondary{background:white;color:var(--ink);border-color:var(--line)}
.button.secondary:hover{background:#f0f6f4;border-color:#bad8cc}
.button.danger{color:#b14147;background:#fff5f4;border-color:#f2d8d6}
.button.danger:hover{background:#fbe8e7}
.button.small{font-size:12px;padding:6px 11px}
.button:disabled{opacity:.6;cursor:wait}
.actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.actions form,.inline{display:inline;margin:0}
.muted{color:var(--muted)}
.footnote{font-size:12px;color:var(--muted);margin:14px 0 0;line-height:1.8}
.badge{font-size:11px;border:1px solid var(--line);background:#f7fafa;color:var(--muted);padding:4px 9px;border-radius:20px;white-space:nowrap}
.stack{display:flex;flex-direction:column;gap:17px}
label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:650;min-width:0}
label small{color:var(--muted);font-size:11px;font-weight:400}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),textarea{display:block;width:100%;background:#fbfcfc;border:1px solid #d5e0e1;border-radius:9px;padding:11px 13px;outline:none;color:var(--ink);font-size:14px;font-weight:400;min-width:0;transition:border-color .15s,box-shadow .15s}
input:focus,textarea:focus{border-color:#61aa99!important;box-shadow:0 0 0 3px #087e7510}
textarea{resize:vertical;line-height:1.8}
.checkbox{display:flex;flex-direction:row;align-items:center;gap:8px;font-weight:400}
input[type=checkbox]{width:16px;height:16px;accent-color:var(--accent)}
.two-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.test-columns{gap:28px}
.input-meta{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);margin-top:-10px}
.result-box{background:#f6f9f8;border:1px solid var(--line);padding:20px;border-radius:12px;min-width:0;min-height:310px}
.result-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;font-size:13px}
#test-status{font-size:13px}
#test-status.error{color:#b14147}
pre{margin:0 0 16px;background:#172c32;color:#d9eeea;padding:20px;border-radius:11px;overflow-x:auto;line-height:1.7;font-size:12px;tab-size:2;max-width:100%}
pre code{color:inherit;white-space:pre}
code{font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;font-size:.91em;color:#086e62}
.result-text{background:transparent;color:var(--ink);padding:0;font-size:15px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:360px;overflow:auto;margin-top:18px}
details{font-size:12px;margin-top:18px}
summary{cursor:pointer;color:var(--accent);margin-bottom:12px}
.endpoint{background:#f3f8f6;border:1px solid #d6e7df;border-radius:10px;padding:12px 16px;display:flex;align-items:center;gap:14px;margin:20px 0}
.endpoint code{overflow-wrap:anywhere}
.detail-list{padding-left:20px;font-size:13px;color:var(--muted)}
.detail-list li{margin-bottom:9px}
.info-strip{display:flex;align-items:center;justify-content:space-between;padding:16px 0 30px;gap:20px}
.info-strip p{font-size:13px;color:var(--muted);margin:4px 0 0}
footer{text-align:center;font-size:11px;color:#859297;padding:25px 20px 35px}
.page-heading{padding:38px 0 20px;display:flex;justify-content:space-between;align-items:center;gap:20px}
.page-heading h1{font-size:31px}
.page-heading p{margin:0}
.section-nav{display:flex;flex-wrap:wrap;gap:10px 22px;font-size:13px;margin:0 0 24px}
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:24px 0}
.stat{padding:22px;background:white;border:1px solid var(--line);border-radius:13px;display:flex;flex-direction:column;gap:5px}
.stat>span{font-size:12px;color:var(--muted)}
.stat strong{font-size:32px;line-height:1.3;letter-spacing:-1px}
.stat small{font-size:10px;color:var(--muted)}
.search-row{display:flex;align-items:center;gap:10px;margin:0 0 18px}
.search-row input{max-width:380px}
.search-row>a{white-space:nowrap;font-size:12px}
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}
th{color:var(--muted);font-size:11px;font-weight:650;background:#f6f9f8}
th,td{padding:13px 12px;border-bottom:1px solid #e7eeee;vertical-align:middle}
td{max-width:280px;overflow-wrap:anywhere}
td code{white-space:pre-wrap}
td:first-child{min-width:100px}
td:last-child{min-width:205px}
td:nth-child(3){min-width:90px}
.status{font-size:10px}
.status.enabled{color:var(--accent)}
.status.disabled{color:#a7a7a7}
.pagination{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:18px;font-size:12px}
.empty{text-align:center;color:var(--muted);padding:30px}
.notice{border-radius:10px;padding:13px 16px;margin:0 0 18px;font-size:13px;overflow-wrap:anywhere}
.notice.success{background:#eaf7ee;color:#206344;border:1px solid #cee8d6}
.notice.error{background:#fff0ef;color:#a33b3b;border:1px solid #f3d1cd}
.notice.warning{background:#fff9e9;color:#936b21;border:1px solid #f0e3b8}
.key{display:block;margin-top:8px;user-select:all;overflow-wrap:anywhere;font-size:13px}
.divider{height:1px;background:var(--line);margin:23px 0}
.login-wrap{min-height:75vh;display:flex;justify-content:center;align-items:center;padding:45px 20px}
.login-card{width:430px;padding:34px}
.login-card h1{font-size:28px}
[hidden]{display:none!important}
@media(max-width:850px){
.hero{gap:30px;padding:45px 0}.hero h1{font-size:44px}.hero-card{padding:24px}.hero-card>code{font-size:17px}
.stats-grid{grid-template-columns:repeat(2,1fr)}
.panel{padding:22px}.two-columns{gap:18px}.topbar{padding:18px 24px}
}
@media(max-width:640px){
html{scroll-padding-top:20px}.topbar{padding:16px}.topbar nav{gap:14px;font-size:12px}.brand{font-size:20px}.brand-sub{display:none}.brand-mark{width:30px;height:30px}.brand-logo{width:30px;height:30px}
.container{padding:0 16px}.hero{grid-template-columns:1fr;gap:27px;padding:38px 0 30px}.hero h1{font-size:43px;letter-spacing:-1.5px}.hero-copy{font-size:13px;margin:17px 0 21px}
.hero-card{padding:24px}.hero-card>code{font-size:19px;margin:12px 0 20px}.flow-line{font-size:12px}
.two-columns,.two-fields{grid-template-columns:1fr}.panel{padding:20px 16px;border-radius:13px;margin-bottom:18px}.two-columns>.panel{margin-bottom:0}.two-columns:has(>.panel){margin-bottom:18px}
.panel-heading{gap:10px}.panel-heading>.badge{display:none}h2{font-size:19px}.test-columns{gap:22px}
.result-box{min-height:210px;padding:16px}.page-heading{padding:28px 0 18px;align-items:flex-start}.page-heading h1{font-size:26px}.page-heading .eyebrow{font-size:10px}.page-heading p{font-size:12px}
.stats-grid{gap:10px;margin:18px 0}.stat{padding:16px 13px}.stat strong{font-size:27px}.stat small{font-size:9px}.section-nav{gap:9px 18px;font-size:12px}
.info-strip{align-items:flex-start;flex-direction:column;padding:10px 0 20px}.hero-meta{font-size:11px}.login-card{padding:27px 22px}
pre{padding:16px;font-size:11px}.detail-list{font-size:12px}.notice{font-size:12px}.endpoint{padding:12px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}

/* Compact public workspace */
.public-page .topbar{max-width:1128px;padding:20px 24px}
.public-page .topbar nav a[aria-current=page]{color:var(--ink);font-weight:700}
.public-container{max-width:1080px}
.public-heading{padding:38px 0 24px}
.public-heading h1{font-size:29px;letter-spacing:-.8px;margin-bottom:8px}
.public-heading p{font-size:14px;margin:0}
.public-page #playground{padding:26px}
.public-page .test-columns{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}
.public-page .test-columns>.stack{min-width:0}
.public-page .result-box{background:#f8faf9;min-height:0;min-width:0;align-self:start}
.public-page .result-heading{padding-bottom:12px;border-bottom:1px solid var(--line);margin-bottom:14px}
.public-page .result-text{font-family:inherit;font-size:14px;line-height:1.8;min-height:150px;max-height:230px;margin:14px 0;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.public-page textarea{min-height:250px}
.result-tools{display:flex;justify-content:flex-end;min-height:30px}
.json-trigger{background:transparent;border:0;border-radius:6px;padding:5px 0 5px 10px;font-size:12px;color:var(--accent);cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.json-trigger:hover{color:var(--accent-dark);text-decoration:underline}
body.json-modal-open{overflow:hidden}
.json-dialog{width:min(760px,calc(100% - 32px));max-width:none;max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);margin:auto;padding:0;border:1px solid #dce4e6;border-radius:16px;background:#fff;color:var(--ink);box-shadow:0 24px 90px rgb(10 30 38 / 22%);overflow:hidden}
.json-dialog:not([open]){display:none}
.json-dialog[open]{display:flex;flex-direction:column}
.json-dialog::backdrop{background:rgb(18 34 42 / 48%)}
.json-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-shrink:0;padding:20px 24px;border-bottom:1px solid var(--line)}
.json-dialog-header h2{font-size:18px;margin:0 0 3px;letter-spacing:0}
.json-dialog-header p{font-size:12px;color:var(--muted);margin:0}
.dialog-close{display:grid;place-items:center;flex-shrink:0;width:36px;height:36px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--muted);font-size:24px;line-height:1;cursor:pointer}
.dialog-close:hover{background:#f2f6f5;color:var(--ink)}
.json-dialog .json-dialog-code{flex:1 1 auto;min-height:0;max-height:58vh;max-height:58dvh;margin:0;border-radius:0;padding:22px 24px;background:#f6f8fa;color:#254450;font:13px/1.75 ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;white-space:pre-wrap;overflow-wrap:anywhere;overflow:auto;overscroll-behavior:contain;tab-size:2}
.json-dialog-footer{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px;flex-shrink:0;padding:14px 24px;border-top:1px solid var(--line)}
#json-copy-status{font-size:12px;color:var(--muted);margin-right:auto}
.test-note{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;color:var(--muted);font-size:11px;border-top:1px solid var(--line);padding-top:16px;margin-top:22px}
.docs-panel>.two-columns{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.docs-panel>.two-columns>div{min-width:0}
.public-page footer{padding-top:8px}

/* Homepage editor workspace. Scoped so admin and documentation stay unchanged. */
.workspace-page{background:#f4f6f7;color:#20302c}
.workspace-page>.topbar{max-width:none;background:#fff;padding:17px max(24px,calc((100vw - 1280px)/2 + 24px));border-bottom:1px solid #e4e9e7}
.workspace-page .brand{font-size:22px;letter-spacing:-.5px}
.workspace-page .brand-mark{width:32px;height:32px;border-radius:9px;font-size:20px}
.workspace-page .brand-logo{width:32px;height:32px;border-radius:9px}
.workspace-page .topbar nav{gap:26px;font-size:13px}
.workspace-page .topbar nav>a[aria-current=page]{color:var(--accent);font-weight:700}
.workspace-page .public-container{max-width:1280px;padding:0 24px}
.workspace-page .home-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:32px 0 24px}
.workspace-page .home-heading h1{font-size:27px;line-height:1.35;letter-spacing:-.6px;margin:0 0 6px;font-weight:750}
.workspace-page .home-heading p{font-size:13px;color:#7b8983;line-height:1.7;margin:0}
.workspace-page .home-rule-status{display:flex;align-items:center;gap:7px;color:#708078;font-size:12px;white-space:nowrap}
.workspace-page .home-rule-status .dot{width:6px;height:6px;margin:0}
.workspace-page #test-form{margin:0}
.workspace-page .home-access{display:flex;align-items:flex-start;gap:16px;padding:0 0 18px}
.workspace-page .home-access-label{display:flex;flex-direction:row;align-items:center;gap:8px;flex:0 0 100px;font-size:12px;line-height:40px;color:#4f6359}
.workspace-page .home-access-label svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5}
.workspace-page .home-key-control{width:440px;max-width:100%;min-width:0}
.workspace-page #api-key{height:40px;margin:0;padding:9px 12px;background:#fff;border-color:#dce4df;border-radius:7px;font-size:13px}
.workspace-page .home-key-control .field-error{margin-top:5px}
.workspace-page .home-access-help{line-height:40px;font-size:11px;color:#8a968f;white-space:nowrap}
.workspace-page #playground.home-workspace{padding:0;margin:0;border:1px solid #dfe7e2;border-radius:14px;background:#fff;overflow:hidden;box-shadow:0 4px 24px rgb(28 50 39 / 3%);--editor-height:clamp(260px,32vh,340px)}
.workspace-page .home-editors{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.workspace-page .home-pane{min-width:0}
.workspace-page .home-input-pane{border-right:1px solid #e6ece8}
.workspace-page .home-output-pane{background:#fcfdfc}
.workspace-page .home-pane-heading{height:60px;padding:0 24px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #edf1ee}
.workspace-page .home-pane-heading label,.workspace-page .home-pane-heading h2{font-size:14px;font-weight:650;line-height:1.5;margin:0;letter-spacing:0}
.workspace-page #char-count{font-size:11px;color:#909b95;font-variant-numeric:tabular-nums}
.workspace-page .home-state{font-size:11px;font-weight:500;padding:3px 9px;background:#f0f4f1;color:#819087;border-radius:5px;white-space:nowrap}
.workspace-page .home-state[data-tone=success]{color:#278057;background:#eaf5ed}
.workspace-page .home-state[data-tone=warning]{color:#9a7224;background:#fff5de}
.workspace-page .home-state[data-tone=error]{color:#bd5149;background:#fff0ed}
.workspace-page #test-text{display:block;position:relative;z-index:1;height:100%;min-height:0;max-height:none;width:100%;margin:0;border:0;border-radius:0;padding:21px 24px;background:transparent;color:#283f32;font-size:15px;font-weight:400;line-height:1.85;resize:none;outline:none;overflow:auto;box-shadow:none;tab-size:4}
.workspace-page #test-text::placeholder{color:#a1aca5}
.workspace-page #test-text:focus{box-shadow:inset 0 0 0 2px rgb(8 126 117 / 16%)}
.workspace-page .home-output{height:var(--editor-height);min-width:0;position:relative;overflow:hidden}
.workspace-page #result-text{height:100%;min-height:0;max-height:none;margin:0;padding:21px 24px;font-family:inherit;font-size:15px;line-height:1.85;background:transparent;color:#283f32;border:0;border-radius:0;white-space:pre-wrap;overflow-wrap:anywhere;overflow:auto;overscroll-behavior:contain}
.workspace-page #result-text:focus-visible{outline:2px solid #9fc8b6;outline-offset:-3px}
.workspace-page .home-empty{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:10px;padding:24px;text-align:center;color:#8a9990}
.workspace-page .home-empty-icon{display:grid;place-items:center;width:52px;height:52px;background:#f0f5f1;border-radius:14px;color:#98b3a3;margin-bottom:3px}
.workspace-page .home-empty-icon svg{width:29px;height:29px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.workspace-page .home-empty strong{font-size:13px;font-weight:550;color:#7d8e84}
.workspace-page .home-empty p{font-size:11px;margin:0;line-height:1.8;color:#a0ada5}
.workspace-page .home-output[aria-busy=true] .home-empty-icon svg{display:none}
.workspace-page .home-output[aria-busy=true] .home-empty-icon::after{content:"";width:20px;height:20px;border:2px solid #c7ddd0;border-top-color:var(--accent);border-radius:50%;animation:home-spin .8s linear infinite}
.workspace-page .home-pane-tools{height:52px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 24px;border-top:1px solid #edf1ee}
.workspace-page .home-tool-buttons{display:flex;align-items:center;gap:18px}
.workspace-page .home-text-button{border:0;background:transparent;padding:6px 0;border-radius:4px;font-size:12px;line-height:1.5;color:#637d6e;cursor:pointer;white-space:nowrap}
.workspace-page .home-text-button:hover{color:var(--accent)}
.workspace-page .home-text-button:disabled{opacity:.4;cursor:not-allowed}
.workspace-page .home-limit{font-size:10px;color:#98a49c;white-space:nowrap}
.workspace-page .home-copy-button{margin-left:auto;display:inline-flex;align-items:center;gap:6px;padding:6px 10px;background:#fff;border:1px solid #dfe8e2;border-radius:6px;color:#506e5d;cursor:pointer;font-size:11px;line-height:1.6;white-space:nowrap}
.workspace-page .home-copy-button svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.4}
.workspace-page .home-copy-button:hover{border-color:#93bba3;background:#f8fcf9}
.workspace-page .home-copy-button:disabled{color:#a5afa8;border-color:#e9eeea;background:transparent;cursor:not-allowed}
.workspace-page .home-actionbar{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:80px;padding:18px 24px;background:#fff;border-top:1px solid #dfe7e2}
.workspace-page #test-status{font-size:12px;line-height:1.8;color:#849288;overflow-wrap:anywhere;min-width:0}
.workspace-page #test-status.error{color:#b74d43}
.workspace-page #test-status.warning{color:#9a7224}
.workspace-page .home-submit-group{display:flex;align-items:center;gap:18px;flex-shrink:0}
.workspace-page .home-shortcut{font-size:10px;color:#a1aba5;white-space:nowrap}
.workspace-page #test-submit{min-width:144px;min-height:44px;padding:11px 18px;border-radius:8px;gap:14px;font-size:13px}
.workspace-page #test-submit svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.workspace-page .change-mark{border-radius:3px;padding:1px 1px;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.workspace-page .change-mark,.workspace-page .change-mark.is-local,.workspace-page .change-mark.is-cloud{background:#ffd9d2;color:#7c2620;box-shadow:inset 0 -1px 0 #eda49a}
.workspace-page .change-caret{display:inline-block;width:2px;height:1.1em;vertical-align:-.16em;margin:0 1px;border-radius:1px}
.workspace-page .change-caret,.workspace-page .change-caret.is-local,.workspace-page .change-caret.is-cloud{background:#d4574a}
.workspace-page .home-status-wrap{display:flex;flex-direction:column;gap:7px;min-width:0}
.workspace-page .home-legend{display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px;font-size:11px;line-height:1.6;color:#7e8d85}
.workspace-page .home-input-wrap{position:relative;height:var(--editor-height);min-width:0}
.workspace-page .home-input-backdrop{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;padding:21px 24px;font-size:15px;line-height:1.85;font-family:inherit;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;color:transparent;tab-size:4}
.workspace-page .home-input-backdrop>div{min-height:100%}
.workspace-page .orig-mark{background:#ffeaa0;color:transparent;border-radius:3px;box-shadow:inset 0 -1px 0 #e8c558}
.workspace-page .legend-item{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.workspace-page .legend-mark{width:12px;height:12px;border-radius:3px;display:inline-block}
.workspace-page .legend-item.is-local .legend-mark{background:#ffeaa0;box-shadow:inset 0 0 0 1px #e8c558}
.workspace-page .legend-item.is-cloud .legend-mark{background:#ffd9d2;box-shadow:inset 0 0 0 1px #eda49a}
.workspace-page .legend-count{margin-left:auto;color:#98a49c;font-size:10px}
.workspace-page .home-footnote{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px 20px;padding:15px 2px 0;color:#98a39d;font-size:11px;line-height:1.8}
.workspace-page .home-footnote a{color:#6a8878}
.workspace-page>footer{padding:26px 16px 20px;font-size:10px;color:#a7afa9}
@keyframes home-spin{to{transform:rotate(360deg)}}
@media(max-width:850px){
.workspace-page .home-shortcut{display:none}
.workspace-page .home-access-help{display:none}
.workspace-page .home-key-control{flex:1;width:auto}
.workspace-page .home-pane-heading,.workspace-page .home-pane-tools{padding-left:18px;padding-right:18px}
.workspace-page #test-text,.workspace-page #result-text,.workspace-page .home-input-backdrop{padding-left:18px;padding-right:18px}
}
@media(max-width:640px){
.workspace-page>.topbar{padding:14px 16px;gap:14px}
.workspace-page .topbar nav{gap:13px;font-size:12px}
.workspace-page .brand{font-size:20px}
.workspace-page .public-container{padding:0 16px}
.workspace-page .home-heading{padding:24px 0 20px;gap:12px;align-items:flex-start}
.workspace-page .home-heading h1{font-size:24px}
.workspace-page .home-heading p{font-size:12px}
.workspace-page .home-rule-status{font-size:10px;padding-top:7px}
.workspace-page .home-access{gap:10px;align-items:flex-start;padding-bottom:14px}
.workspace-page .home-access-label{flex:0 0 72px;font-size:11px;gap:6px}
.workspace-page .home-access-label svg{width:14px;height:14px}
.workspace-page #api-key{font-size:12px}
.workspace-page #playground.home-workspace{border-radius:11px;--editor-height:220px}
.workspace-page .home-editors{grid-template-columns:minmax(0,1fr)}
.workspace-page .home-input-pane{border-right:0;border-bottom:1px solid #dfe7e2}
.workspace-page .home-pane-heading{height:50px}
.workspace-page .home-pane-heading label,.workspace-page .home-pane-heading h2{font-size:13px}
.workspace-page #test-text,.workspace-page #result-text{font-size:14px;padding-top:16px;padding-bottom:16px}
.workspace-page .home-legend{gap:4px 10px;font-size:10px}
.workspace-page .home-input-backdrop{font-size:14px;padding-top:16px;padding-bottom:16px}
.workspace-page .home-pane-tools{height:46px;gap:8px}
.workspace-page .home-tool-buttons{gap:16px}
.workspace-page .home-limit{font-size:10px}
.workspace-page .home-actionbar{padding:16px;flex-direction:column;gap:12px;align-items:stretch}
.workspace-page .home-submit-group{display:flex}
.workspace-page #test-submit{width:100%}
.workspace-page #test-status{font-size:11px}
.workspace-page .home-footnote{font-size:10px;flex-direction:column;gap:4px;padding-top:12px}
.workspace-page>footer{padding:20px 16px}
}
@media(max-width:380px){
.workspace-page .home-heading{flex-direction:column;gap:10px}
.workspace-page .home-rule-status{padding-top:0}
.workspace-page .topbar nav{gap:10px;font-size:11px}
}
@media(prefers-reduced-motion:reduce){.workspace-page .home-output[aria-busy=true] .home-empty-icon::after{animation:none}}

/* Admin: persistent sidebar and one server-rendered view at a time */
.admin-page{background:#f6f8fa}
.admin-shell{min-height:100vh}
.admin-sidebar{position:fixed;inset:0 auto 0 0;width:224px;background:#fff;border-right:1px solid #e2e8ec;display:flex;flex-direction:column;padding:26px 16px 18px;overflow-y:auto;overscroll-behavior:contain;z-index:60}
.sidebar-heading{display:flex;align-items:center;justify-content:space-between;padding:0 12px}
.sidebar-heading .brand{font-size:24px}
.sidebar-caption{color:#859297;font-size:11px;padding:10px 12px 20px;margin:0}
.sidebar-nav{display:flex;flex-direction:column;gap:24px}
.nav-group-title{color:#8b979e;font-size:10px;font-weight:650;letter-spacing:1px;margin:0 0 8px;padding:0 13px}
.nav-link{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 13px;margin:3px 0;border-radius:8px;color:#52636c;font-size:13px}
.nav-link:hover{background:#f5f8f7;color:var(--ink);text-decoration:none}
.nav-link.active{background:#e9f4ef;color:#087263;font-weight:700}
.nav-chevron{font-size:18px;line-height:1;opacity:0}
.nav-link.active .nav-chevron{opacity:1}
.sidebar-bottom{margin-top:auto;padding:25px 12px 0;display:flex;flex-direction:column;gap:12px}
.sidebar-bottom>a{font-size:12px;color:#6d7c85;display:flex;justify-content:space-between}
.sidebar-bottom form{margin-top:8px}
.sidebar-bottom .button{width:100%;font-size:12px}
.sidebar-close{display:none;width:34px;height:34px;background:#f6f8f8;border:1px solid var(--line);border-radius:8px;color:var(--ink);font-size:24px;line-height:1;cursor:pointer}
.admin-main{margin-left:224px;min-width:0;min-height:100vh;display:flex;flex-direction:column}
.admin-topbar{height:68px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 28px;background:white;border-bottom:1px solid #e2e8ec}
.admin-breadcrumb{display:flex;align-items:center;gap:12px;color:#859297;font-size:12px;min-width:0}
.admin-breadcrumb strong{color:#52636c;font-weight:500}
.breadcrumb-divider{color:#c5cfd3}
.admin-home-link{font-size:12px;white-space:nowrap}
.menu-toggle{display:none}
.admin-content{width:100%;max-width:none;margin:0;padding:20px 28px 16px;min-width:0;flex:1}
.admin-content .page-heading{padding:30px 0 23px}
.admin-content .page-heading h1{font-size:26px;letter-spacing:-.6px;margin-bottom:8px}
.admin-content .page-heading p{font-size:13px}
.admin-content .panel{border-color:#e2e8ec;border-radius:12px;box-shadow:none}
.admin-content .stats-grid{margin:0 0 24px}
.admin-content .stat{border-color:#e2e8ec;padding:20px}
.admin-content .form-panel{width:100%;max-width:none}
.admin-content .form-panel>.stack>.button{align-self:flex-start;min-width:120px}
.admin-workspace{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(300px,1fr);gap:20px;align-items:start;margin-bottom:24px}
.admin-content .admin-workspace .panel{margin-bottom:0;padding:24px}
.admin-workspace>.panel,.admin-support{min-width:0}
.admin-support{display:flex;flex-direction:column;gap:20px}
.admin-workspace h2{font-size:19px}
.admin-workspace p.muted{font-size:13px;line-height:1.8}
.admin-support .panel-heading{align-items:center;margin-bottom:12px}
.admin-support .panel-heading h2{margin:0}
.admin-workspace textarea{min-height:300px;max-height:60vh;overflow:auto}
.import-submit{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.import-submit>span{font-size:12px}
.import-submit>.button{min-width:120px}
.import-guide dl{display:flex;flex-direction:column;gap:16px;margin:0}
.import-guide dt{font-size:13px;font-weight:650;margin-bottom:4px}
.import-guide dd{font-size:12px;line-height:1.8;color:var(--muted);margin:0;overflow-wrap:anywhere}
.import-guide .footnote{border-top:1px solid var(--line);padding-top:14px}
.admin-content #password>.stack{gap:20px}
.link-button{border:0;background:transparent;padding:0;font:inherit;color:var(--accent);cursor:pointer}
.link-button:hover{text-decoration:underline}
body.rule-modal-open{overflow:hidden}
.rule-dialog{width:min(560px,calc(100% - 32px));max-width:none;max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);margin:auto;padding:0;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--ink);box-shadow:0 24px 80px rgb(15 35 40 / 24%);overflow:hidden}
.rule-dialog:not([open]){display:none}
.rule-dialog[open]{display:flex;flex-direction:column}
.rule-dialog::backdrop{background:rgb(18 34 42 / 45%)}
.rule-dialog-header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:20px 24px;border-bottom:1px solid var(--line);flex-shrink:0}
.rule-dialog-header h2{margin:0 0 4px;font-size:20px}
.rule-dialog-header p{margin:0;color:var(--muted);font-size:12px}
.rule-dialog form{display:flex;flex-direction:column;min-height:0;margin:0}
.rule-dialog-body{padding:24px;overflow-y:auto;overscroll-behavior:contain;min-height:0}
.rule-dialog-body .notice{margin:0;padding:10px 12px;font-size:12px;flex-shrink:0}
.rule-dialog-body>label{flex-shrink:0}
.rule-dialog-body textarea{min-height:94px;max-height:180px}
.rule-dialog-footer{display:flex;justify-content:flex-end;gap:10px;padding:16px 24px;border-top:1px solid var(--line);flex-shrink:0;background:#fafcfb}
.rule-dialog-footer .button{min-width:96px}
@media(max-width:640px){
.rule-dialog{width:calc(100% - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);border-radius:12px}
.rule-dialog-header{padding:16px 18px}
.rule-dialog-header h2{font-size:18px}
.rule-dialog-body{padding:18px;gap:16px}
.rule-dialog-footer{padding:14px 18px}
}
@media(max-width:1100px){
.admin-workspace{grid-template-columns:minmax(0,1fr)}
.admin-support{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
}
@media(max-width:640px){
.admin-content .admin-workspace .panel{padding:20px 16px}
.admin-workspace,.admin-support{grid-template-columns:minmax(0,1fr);gap:16px}
.admin-workspace textarea{min-height:220px}
.import-submit{align-items:stretch;flex-direction:column;gap:10px}
.import-submit>.button{width:100%}
}
.admin-content .notice{max-width:100%;margin-bottom:20px}
.admin-content .notice a{color:inherit;text-decoration:underline;margin-left:8px}
.quick-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.quick-links>a{border:1px solid var(--line);border-radius:9px;padding:17px 18px;display:flex;flex-direction:column;gap:7px;color:var(--ink)}
.quick-links>a:hover{background:#f6faf8;border-color:#b6d8ca;text-decoration:none}
.quick-links strong{display:flex;justify-content:space-between;gap:10px;font-size:13px}
.quick-links strong>span{color:var(--accent)}
.quick-links>a>span{color:var(--muted);font-size:11px}
.config-summary{margin:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.config-summary>div{min-width:0}
.config-summary dt{font-size:11px;color:var(--muted);margin:0 0 5px}
.config-summary dd{font-size:13px;margin:0;overflow-wrap:anywhere}
.admin-main>footer{padding:16px 20px 24px}
.sidebar-backdrop{position:fixed;inset:0;background:rgb(18 34 42 / 40%);border:0;border-radius:0;padding:0;z-index:55;cursor:pointer}
body.sidebar-open{overflow:hidden}
@media(max-width:1100px){
.admin-content{padding-left:24px;padding-right:24px}
.admin-topbar{padding-left:24px;padding-right:24px}
.admin-content .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.quick-links{grid-template-columns:1fr}
.quick-links>a{padding:14px 16px}
.config-summary{grid-template-columns:1fr;gap:14px}
.config-summary>div{display:flex;justify-content:space-between;align-items:baseline;gap:16px}
.config-summary dt{margin:0;white-space:nowrap}
.config-summary dd{text-align:right}
}
@media(max-width:800px){
.admin-sidebar{position:relative;inset:auto;width:100%;height:auto;padding:18px;border-right:0;border-bottom:1px solid var(--line)}
.admin-main{margin-left:0}
/* Mobile: the sidebar sits above the content, so the fixed-height shell does
   not apply and the table keeps a bounded height instead. */
.rules-page{height:auto;overflow:auto}
.rules-page .admin-shell{height:auto;min-height:0}
.rules-page .admin-main{height:auto;min-height:0;overflow:visible}
.rules-page .admin-content{display:block;overflow:visible;min-height:0;padding-bottom:16px}
.rules-page #rules{display:block;flex:none;min-height:0;margin-bottom:16px;padding:14px 14px 10px}
.rules-page #rules .table-wrap{display:block;flex:none;min-height:0}
.rules-page #rules-scroll{flex:none;height:auto;max-height:60vh;overflow-y:auto}
.rules-page .rules-foot{padding-top:8px}
.rules-page .admin-main>footer{display:block}
.sidebar-caption{padding-bottom:14px}
.sidebar-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.sidebar-bottom{margin-top:18px;padding-top:12px;border-top:1px solid var(--line)}
.sidebar-ready .admin-sidebar{position:fixed;inset:0 auto 0 0;width:min(280px,85vw);height:100vh;height:100dvh;border-right:1px solid var(--line);border-bottom:0;padding:24px 16px}
.sidebar-ready .sidebar-nav{display:flex;gap:24px}
.sidebar-ready .sidebar-bottom{margin-top:auto;border-top:0;padding-top:24px}
.sidebar-ready .menu-toggle{display:inline-flex}
.sidebar-ready .sidebar-close{display:inline-grid;place-items:center}
.admin-content{padding-left:20px;padding-right:20px}
.admin-topbar{height:62px;padding:0 20px}
}
@media(max-width:640px){
.public-page .topbar{padding:16px}
.public-page .topbar nav{gap:13px}
.public-heading{padding:28px 0 20px}
.public-heading h1{font-size:24px}
.public-heading p{font-size:13px}
.public-page #playground{padding:18px 16px}
.public-page .test-columns,.docs-panel>.two-columns{grid-template-columns:minmax(0,1fr)}
.public-page textarea{min-height:190px}
.public-page .result-box{min-height:0}
.public-page .result-text{min-height:85px;max-height:210px}
.json-dialog{width:calc(100% - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);border-radius:12px}
.json-dialog-header{padding:16px}
.json-dialog-header h2{font-size:16px}
.json-dialog .json-dialog-code{padding:16px;font-size:12px;max-height:60vh;max-height:60dvh}
.json-dialog-footer{padding:12px 16px}
.test-note{font-size:10px;margin-top:18px}
.admin-content{padding:16px 16px 12px}
.admin-topbar{padding:0 16px;gap:8px}
.admin-breadcrumb{gap:8px;font-size:11px}
.admin-breadcrumb>span:first-of-type,.breadcrumb-divider{display:none}
.admin-home-link{font-size:11px}
.admin-content .page-heading{padding:24px 0 20px;gap:10px}
.admin-content .page-heading h1{font-size:23px}
.admin-content .page-heading p{font-size:12px}
.admin-content .page-heading>.button{font-size:12px;padding:8px 12px}
.admin-content .stats-grid{gap:10px;margin-bottom:18px}
.admin-content .stat{padding:16px 13px}
.admin-content .panel-heading>.badge{display:inline-block}
.admin-content .panel-heading{align-items:center}
.admin-content .panel-heading p{font-size:11px}
.admin-content .form-panel>.stack>.button{align-self:stretch}
.admin-content .table-wrap{margin:0 -4px}
.admin-content th,.admin-content td{padding:12px 9px}
.sidebar-nav{grid-template-columns:1fr}
}

/* Site-designed confirmations and floating feedback */
body.confirmation-open{overflow:hidden}
.ui-confirm-dialog{width:min(440px,calc(100% - 32px));max-width:none;max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);margin:auto;padding:0;border:1px solid #e2e8e8;border-radius:18px;background:#fff;color:var(--ink);box-shadow:0 28px 90px rgb(14 30 36 / 26%);overflow:hidden}
.ui-confirm-dialog:not([open]){display:none}
.ui-confirm-dialog[open]{display:flex;flex-direction:column}
.ui-confirm-dialog::backdrop{background:rgb(18 34 42 / 42%)}
.ui-confirm-content{padding:24px 26px 22px;overflow-y:auto;min-height:0;overscroll-behavior:contain}
.ui-confirm-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}
.ui-confirm-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:13px;background:#e7f4ef;color:var(--accent);font-size:23px;font-weight:700}
.ui-confirm-dialog.is-danger .ui-confirm-icon{background:#fff0ee;color:#c14942}
.ui-confirm-content h2{margin:0 0 10px;font-size:21px;line-height:1.4;letter-spacing:-.3px}
.ui-confirm-content>p{color:var(--muted);font-size:13px;line-height:1.85;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.ui-confirm-detail{padding:11px 13px;margin-top:16px;border:1px solid var(--line);background:#f7faf9;border-radius:8px;font-size:13px;line-height:1.7;overflow-wrap:anywhere;white-space:pre-wrap}
.ui-confirm-footer{display:flex;justify-content:flex-end;gap:10px;padding:16px 26px;background:#fafcfb;border-top:1px solid #e8eeec;flex-shrink:0}
.ui-confirm-footer .button{min-width:100px}
.ui-confirm-dialog.is-danger #ui-confirm-accept{background:#c94b44;border-color:#c94b44;color:white}
.ui-confirm-dialog.is-danger #ui-confirm-accept:hover{background:#b43e38;border-color:#b43e38}
.ui-submitting button[type=submit]{pointer-events:none;opacity:.6}
.toast-stack{position:fixed;top:22px;right:24px;z-index:1000;display:flex;flex-direction:column;gap:12px;width:min(390px,calc(100vw - 32px));max-height:calc(100vh - 44px);overflow-y:auto;pointer-events:none}
.ui-toast{display:flex;gap:12px;align-items:flex-start;padding:16px;border:1px solid #d7e6dd;border-radius:13px;background:#fff;box-shadow:0 10px 40px rgb(24 51 41 / 13%);pointer-events:auto;animation:toast-arrive .18s ease-out}
.ui-toast-icon{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#e5f5eb;color:#218157;flex-shrink:0;font-size:17px;font-weight:700}
.ui-toast-copy{min-width:0;flex:1}
.ui-toast-copy strong{display:block;font-size:13px;line-height:1.5;margin:2px 0 4px}
.ui-toast-copy p{font-size:12px;line-height:1.8;color:#60736c;white-space:pre-wrap;overflow-wrap:anywhere;margin:0}
.ui-toast-close{flex-shrink:0;border:0;background:transparent;color:#8b9991;width:24px;height:26px;font-size:22px;line-height:1;cursor:pointer;border-radius:5px;padding:0}
.ui-toast-close:hover{color:var(--ink);background:#f1f6f3}
.ui-toast-error{border-color:#edcfcb}
.ui-toast-error .ui-toast-icon{background:#fff0ed;color:#bc4840}
.ui-toast-warning{border-color:#eadcb9}
.ui-toast-warning .ui-toast-icon{background:#fff6df;color:#9a7726}
.ui-toast-info .ui-toast-icon{background:#edf3f8;color:#537b94}
.field-error{display:block;font-size:12px;line-height:1.6;font-weight:400;color:#b5453e;margin-top:2px}
input[aria-invalid=true],textarea[aria-invalid=true],select[aria-invalid=true]{border-color:#d16a63!important;box-shadow:0 0 0 3px rgb(201 75 68 / 7%)}
@keyframes toast-arrive{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:640px){
.ui-confirm-dialog{width:calc(100% - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);border-radius:14px}
.ui-confirm-content{padding:20px}
.ui-confirm-content h2{font-size:19px}
.ui-confirm-footer{padding:14px 20px}
.ui-confirm-footer .button{flex:1;min-width:0}
.toast-stack{top:12px;right:12px;width:calc(100% - 24px);max-height:calc(100dvh - 24px)}
.ui-toast{padding:14px}
}
@media(prefers-reduced-motion:reduce){.ui-toast{animation:none}}

/* Centered rule table with current-page selection */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.admin-content .rules-heading{align-items:center;gap:18px}
.rules-heading>.actions{justify-content:flex-end;flex-shrink:0}
.rules-bulk-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:12px 14px;margin:0 0 16px;background:#f6f9f8;border:1px solid var(--line);border-radius:9px}
.bulk-selection{display:flex;align-items:center;flex-wrap:wrap;gap:12px;font-size:12px}
#rules-selected-count{font-weight:650;color:var(--accent)}
.bulk-selection .muted{font-size:11px}
.rules-bulk-bar .button:disabled,.bulk-selection button:disabled{cursor:not-allowed;opacity:.45}
#rules .table-wrap{margin:0;overflow-x:auto}
.rules-table{width:100%;min-width:700px;margin:0 auto;table-layout:fixed}
.rules-table .rule-check-column{width:48px}
.rules-table .rule-number-column{width:72px}
.rules-table .rule-source-column{width:92px}
.rules-table .rule-status-column{width:90px}
.rules-table .rule-actions-column{width:236px}
.rule-source{display:inline-flex;align-items:center;justify-content:center;min-width:52px;padding:2px 8px;border-radius:20px;border:1px solid var(--line);background:#f6f9f8;color:#61736e;font-size:11px;line-height:1.7;white-space:nowrap}
.rule-source.is-local{border-color:#d9e5e0;color:#4f6f64;background:#f5f9f7}
.rule-source.is-cloud{border-color:#c7ddf1;color:#2f6d99;background:#f0f6fc}
.rule-source-picker{border:0;padding:0;margin:0;min-width:0;flex-shrink:0}
.rule-source-picker legend{padding:0;margin:0 0 8px;font-size:13px;font-weight:650}
.rule-source-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:260px;max-width:100%}
.rule-source-option{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;min-height:44px;margin:0;padding:10px 14px;border:1px solid #dce5e2;border-radius:8px;background:#fff;font-size:13px;font-weight:500;line-height:1.5;cursor:pointer;transition:border-color .15s,background .15s}
.rule-source-option:hover{border-color:#9fc7b7;background:#f7fbf9}
.rule-source-option input[type=radio]{display:block;width:16px;height:16px;min-width:16px;flex:0 0 16px;margin:0;padding:0;accent-color:var(--accent);cursor:pointer;box-shadow:none}
.rule-source-option span{display:inline;white-space:nowrap;line-height:1.5}
.rule-source-option:has(input:checked){border-color:var(--accent);background:#edf7f2;color:var(--accent-dark)}
.rule-source-option:has(input:focus-visible){outline:3px solid #62cbbd;outline-offset:2px}
.admin-content .rules-table th,.admin-content .rules-table td{min-width:0;max-width:none;text-align:center;vertical-align:middle;overflow-wrap:anywhere;padding:13px 10px}
.rules-table td>.actions{justify-content:center;flex-wrap:nowrap}
.rules-table td code{color:var(--accent);white-space:pre-wrap}
.rules-table .rule-number{color:#77878e;font-variant-numeric:tabular-nums}
.rule-check{position:relative;display:flex;align-items:center;justify-content:center;min-height:28px;min-width:28px;cursor:pointer}
.rule-check input{margin:0;cursor:pointer;flex-shrink:0}
.rules-table tbody tr:hover{background:#f9fcfa}
.rules-table tbody tr.is-selected{background:#edf7f2}
.admin-topbar{position:sticky;top:0;z-index:40}
.admin-main.is-navigating .admin-content{opacity:.55;transition:opacity .12s}
.admin-main.is-navigating::after{content:"";position:fixed;top:0;left:0;right:0;height:2px;background:linear-gradient(90deg,#087e75 0%,#62cbbd 50%,#087e75 100%);background-size:200% 100%;animation:admin-progress 1s linear infinite;z-index:70}
@keyframes admin-progress{from{background-position:0 0}to{background-position:-200% 0}}
.admin-content:focus{outline:none}
.admin-content:focus-visible{outline:2px solid #8fc4b3;outline-offset:-4px}
@media(prefers-reduced-motion:reduce){.admin-main.is-navigating::after{animation:none}}
/* Only the rule table scrolls: page chrome stays put and the next batch is
   appended as the reader reaches the bottom. */
.admin-content #rules-scroll{overflow-y:auto;overflow-x:auto;overscroll-behavior:contain;scrollbar-gutter:stable;border-radius:8px}
/* Rules page (desktop): the card fills the viewport and the table is the only
   scroll area, so the page itself never shows a second scrollbar. */
@media(min-width:801px){
.rules-page{height:100vh;height:100dvh;overflow:hidden}
.rules-page .admin-shell{height:100%;min-height:0}
.rules-page .admin-main{height:100%;min-height:0;overflow:hidden}
.rules-page .admin-content{display:flex;flex-direction:column;min-height:0;overflow:hidden;padding-bottom:8px}
.rules-page #rules{display:flex;flex-direction:column;flex:1;min-height:0;margin-bottom:8px;padding:18px 20px}
.rules-page #rules .panel-heading{margin-bottom:14px}
.rules-page #rules .search-row{margin-bottom:12px}
.rules-page #rules .rules-bulk-bar{margin-bottom:12px}
.rules-page #rules .table-wrap{flex:1;min-height:0}
.rules-page #rules-scroll{flex:1;min-height:0;max-height:none;height:auto;overflow-y:auto}
.rules-page .rules-foot{padding-top:8px;flex-shrink:0}
.rules-page .admin-main>footer{display:none}
}
.admin-content #rules-scroll:focus-visible{outline:2px solid #8fc4b3;outline-offset:-2px}
.admin-content #rules-scroll .rules-table thead th{position:sticky;top:0;z-index:2;background:#f6f9f8;box-shadow:inset 0 -1px 0 #e7eeee}
.rules-loader{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px;color:var(--muted);font-size:12px}
.rules-loader[hidden]{display:none}
.rules-loader-dot{width:14px;height:14px;border:2px solid #d5e5dd;border-top-color:var(--accent);border-radius:50%;animation:rules-spin .8s linear infinite}
@keyframes rules-spin{to{transform:rotate(360deg)}}
.rules-foot{padding-top:12px;font-size:11px;color:var(--muted)}
@media(prefers-reduced-motion:reduce){.rules-loader-dot{animation:none}}
@media(max-width:900px){.rules-page #rules{padding:14px 14px 10px}}
@media(max-width:640px){
.admin-content .rules-heading{flex-wrap:wrap;align-items:flex-start;gap:12px}
.rules-table .rule-source-column{width:74px}
.rule-source{min-width:0;padding:2px 6px;font-size:10px}
.rules-heading>.actions{width:100%;justify-content:space-between}
.rules-bulk-bar{padding:12px;gap:12px}
.rules-bulk-bar>.actions{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.rules-bulk-bar>.actions .button{min-width:0;font-size:11px;padding:7px 5px}
.bulk-selection{gap:8px}
.rules-table .rule-actions-column{width:218px}
.admin-content .rules-table th,.admin-content .rules-table td{padding:12px 8px}
}

/* One-time key reveal, independent of the settings page flow */
body.api-key-modal-open{overflow:hidden}
.api-key-dialog{width:min(560px,calc(100% - 32px));max-width:none;max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);margin:auto;padding:0;border:1px solid #dce7e1;border-radius:16px;background:#fff;color:var(--ink);box-shadow:0 28px 90px rgb(14 30 36 / 28%);overflow:hidden}
.api-key-dialog:not([open]){display:none}
.api-key-dialog[open]{display:flex;flex-direction:column}
.api-key-dialog::backdrop{background:rgb(18 34 42 / 48%)}
.api-key-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 24px;border-bottom:1px solid var(--line);flex-shrink:0}
.api-key-dialog-header>div{display:flex;align-items:center;gap:12px;min-width:0}
.api-key-dialog-header h2{margin:0;font-size:20px;line-height:1.4}
.api-key-success-icon{display:grid;place-items:center;width:36px;height:36px;flex-shrink:0;background:#e7f5ed;color:#218157;border-radius:11px;font-size:21px;font-weight:700}
.api-key-dialog-body{padding:22px 24px 12px;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.api-key-dialog-body>p:first-child{color:var(--muted);font-size:13px;line-height:1.8;margin:0 0 18px}
.api-key-dialog-body>label{font-size:12px;margin-bottom:8px}
.api-key-dialog #generated-api-key{width:100%;min-height:100px;max-height:180px;resize:none;margin:0;padding:14px;border:1px solid #cfe2d8;border-radius:10px;background:#f3f9f5;color:#185344;font:14px/1.9 ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-all;user-select:all}
#api-key-copy-status{min-height:22px;font-size:12px;line-height:1.8;margin:10px 0 0;color:var(--accent);overflow-wrap:anywhere}
.api-key-dialog-footer{display:flex;justify-content:flex-end;gap:10px;padding:16px 24px;border-top:1px solid var(--line);background:#fafcfb;flex-shrink:0}
.api-key-dialog-footer .button{min-width:110px}
@media(max-width:640px){
.api-key-dialog{width:calc(100% - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);border-radius:12px}
.api-key-dialog-header{padding:16px}
.api-key-dialog-header h2{font-size:18px}
.api-key-dialog-body{padding:18px 16px 10px}
.api-key-dialog-footer{padding:14px 16px;gap:8px}
.api-key-dialog-footer .button{flex:1;min-width:0;padding:10px 8px;font-size:12px}
.api-key-dialog #generated-api-key{font-size:13px}
}

/* API documentation: narrow navigation, one continuous reading column */
html.docs-root{scroll-padding-top:0}
.documentation-page{background:#fff}
.documentation-page .topbar{max-width:none;position:sticky;top:0;z-index:40;background:#fff;padding:17px max(24px,calc((100vw - 1160px)/2));border-bottom:1px solid #e6ecea}
.documentation-page .docs-container{max-width:1208px;padding:0 24px}
.docs-layout{display:grid;grid-template-columns:172px minmax(0,1fr);gap:48px;align-items:start;padding:36px 0 40px}
.docs-navigation{position:sticky;top:108px;min-width:0;padding:8px 0}
.docs-nav-label{display:block;padding:0 12px;margin-bottom:14px;font-size:11px;font-weight:650;color:#83908c;letter-spacing:.5px}
.docs-navigation nav{display:flex;flex-direction:column;gap:4px}
.docs-navigation nav a{display:block;padding:9px 12px;border-radius:7px;color:#61716c;font-size:13px;line-height:1.6}
.docs-navigation nav a:hover{background:#f5f8f6;color:var(--ink);text-decoration:none}
.docs-navigation nav a.is-active{background:#eaf5ef;color:#15745e;font-weight:650}
.docs-test-link{display:flex;align-items:center;justify-content:space-between;padding:16px 12px 0;border-top:1px solid #e6ece8;margin-top:22px;font-size:12px}
.docs-article{width:100%;max-width:880px;min-width:0}
.doc-section{padding:28px 0;border-bottom:1px solid #e7edeb;scroll-margin-top:98px}
.doc-section:first-child{padding-top:0}
.docs-intro{margin-bottom:22px}
.doc-kicker{display:block;font-size:10px;font-weight:750;letter-spacing:1.6px;color:var(--accent);margin-bottom:10px}
.docs-intro h1{font-size:31px;line-height:1.3;letter-spacing:-.8px;margin:0 0 10px}
.docs-intro>p{font-size:14px;line-height:1.8;color:#61716c;margin:0}
.doc-section h2{font-size:21px;line-height:1.4;letter-spacing:-.3px;margin:0 0 12px}
.doc-section>p{font-size:13px;line-height:1.85;color:#61716c;margin:0 0 16px}
.doc-endpoint{display:flex;align-items:center;gap:12px;background:#f7faf8;border:1px solid #dce9e1;border-radius:9px;padding:13px 15px;min-width:0}
.doc-endpoint>code{font-size:13px;flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.8;color:#245245}
.doc-endpoint .method{flex-shrink:0}
.doc-copy{border:1px solid #dbe4df;background:#fff;border-radius:6px;color:#5d7167;white-space:nowrap;font:600 11px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;padding:5px 9px;cursor:pointer;flex-shrink:0}
.doc-copy:hover{color:var(--accent);border-color:#a9cbbb;background:#f7fcf9}
.doc-copy:disabled{opacity:.65;cursor:wait}
.doc-meta{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:10px 0 20px;color:#82908a;font-size:11px}
.doc-auth-state{color:#57816d}
.doc-example-note{font-size:12px;line-height:1.9;color:#61716c;padding:10px 14px;border-left:3px solid #abcdbb;background:#f7faf8;margin-bottom:20px;overflow-wrap:anywhere}
.doc-section code{font-size:.94em;color:#22664f}
.doc-tabs{display:flex;align-items:center;gap:4px;border-bottom:1px solid #e1e8e3;margin:0 0 12px;overflow-x:auto;scrollbar-width:thin}
.doc-tabs button{border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:#708078;font-size:12px;font-weight:600;line-height:1.6;white-space:nowrap;padding:10px 14px;cursor:pointer}
.doc-tabs button[aria-selected=true]{border-bottom-color:var(--accent);color:var(--accent)}
.doc-tabs button:hover{color:var(--ink)}
.doc-example-panel{min-width:0;margin:0 0 12px}
.doc-example-panel:last-child{margin-bottom:0}
.doc-code-box{border:1px solid #dfe7e3;border-radius:9px;overflow:hidden;margin:0 0 16px;min-width:0;background:#f6f8f7}
.doc-example-panel .doc-code-box{margin-bottom:0}
.doc-code-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 14px;border-bottom:1px solid #e3e9e6;background:#fcfdfc;color:#7a8781;font-size:11px;line-height:1.6;min-width:0}
.doc-code-bar>span{min-width:0;overflow-wrap:anywhere}
.documentation-page .doc-code-box pre{background:#f6f8f7;color:#31473b;margin:0;padding:18px;border-radius:0;max-height:340px;overflow:auto;overscroll-behavior:contain;font:13px/1.8 ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;tab-size:4}
.documentation-page .doc-code-box pre code{font:inherit;color:inherit;white-space:pre}
.doc-section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.doc-section-title h2{margin:0}
.doc-response-status{font:600 11px/1.5 ui-monospace,Consolas,monospace;color:#33865c;padding:4px 8px;border-radius:5px;background:#edf7f0}
.doc-table-wrap{width:100%;min-width:0;overflow-x:auto;border:1px solid #e1e8e4;border-radius:9px;margin:0 0 16px}
.documentation-page .doc-table{width:100%;min-width:0;table-layout:fixed;font-size:12px;border-collapse:collapse}
.documentation-page .doc-table th,.documentation-page .doc-table td{min-width:0;max-width:none;padding:12px 14px;text-align:left;vertical-align:top;border-bottom:1px solid #e8eeeb;overflow-wrap:anywhere;line-height:1.8}
.documentation-page .doc-table th{background:#f8faf9;font-size:11px;color:#738279}
.documentation-page .doc-table td{color:#5a6d61}
.documentation-page .doc-table th:first-child{width:29%}
.documentation-page .doc-table th:nth-child(2){width:17%}
.documentation-page .doc-table tbody tr:last-child td{border-bottom:0}
.documentation-page .doc-table td code{white-space:normal;overflow-wrap:anywhere}
.documentation-page .doc-errors-table th:first-child{width:13%}
.documentation-page .doc-errors-table th:nth-child(2){width:28%}
.documentation-page .doc-limits-table th:first-child{width:22%}
.documentation-page .doc-limits-table th:nth-child(2){width:29%}
.doc-required{display:inline-block;margin-left:7px;color:#b26a47;font-size:10px}
.doc-disclosure{border:1px solid #e3eae5;border-radius:8px;margin:16px 0 0;background:#fff}
.doc-disclosure>summary{padding:12px 14px;margin:0;font-size:12px;color:#587064;font-weight:600}
.doc-disclosure[open]>summary{border-bottom:1px solid #e8eeea}
.doc-disclosure>ul{font-size:12px;color:#61716c;line-height:1.9;margin:12px 18px;padding-left:18px}
.doc-disclosure>ul>li{margin:7px 0}
.doc-disclosure>.doc-table-wrap{border:0;border-radius:0;margin:0}
.doc-section .doc-hint{font-size:12px;line-height:1.85;color:#829087;margin:10px 0 0}
.doc-bottom-link{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px 0;font-size:12px;color:#819087}
.documentation-page>footer{border-top:1px solid #edf0ee;margin:0;padding:20px}
@media(max-width:1000px){
.docs-layout{grid-template-columns:146px minmax(0,1fr);gap:28px}
.documentation-page .topbar{padding-left:24px;padding-right:24px}
}
@media(max-width:800px){
.docs-layout{display:block;padding-top:0}
.docs-navigation{position:sticky;top:75px;z-index:20;background:#fff;margin:0 -4px 24px;padding:8px 0;border-bottom:1px solid #e8edea}
.docs-nav-label,.docs-test-link{display:none}
.docs-navigation nav{flex-direction:row;gap:4px;overflow-x:auto;scrollbar-width:thin}
.docs-navigation nav a{padding:8px 11px;white-space:nowrap;font-size:12px;flex-shrink:0}
.docs-article{max-width:none}
.doc-section{scroll-margin-top:140px}
}
@media(max-width:640px){
.documentation-page .topbar{padding:14px 16px;gap:12px}
.documentation-page .topbar nav{gap:12px}
.documentation-page .docs-container{padding:0 16px}
.docs-navigation{top:63px;margin-bottom:20px}
.docs-navigation nav a{font-size:11px;padding:8px 10px}
.doc-section{padding:24px 0;scroll-margin-top:130px}
.docs-intro h1{font-size:25px;letter-spacing:-.4px}
.docs-intro>p{font-size:13px}
.doc-section h2{font-size:19px}
.doc-endpoint{gap:8px;padding:12px;flex-wrap:wrap}
.doc-endpoint>code{font-size:12px}
.doc-endpoint>.doc-copy{margin-left:auto}
.doc-meta{font-size:10px;gap:12px}
.doc-example-note{font-size:11px;padding:10px 12px}
.doc-tabs button{font-size:11px;padding:9px 11px}
.doc-code-bar{padding:9px 11px;font-size:10px;gap:8px}
.documentation-page .doc-code-box pre{font-size:12px;padding:14px;max-height:300px}
.documentation-page .doc-table{font-size:11px}
.documentation-page .doc-table th,.documentation-page .doc-table td{padding:10px 9px}
.documentation-page .doc-table th:first-child{width:32%}
.documentation-page .doc-table th:nth-child(2){width:18%}
.documentation-page .doc-errors-table th:first-child{width:16%}
.documentation-page .doc-errors-table th:nth-child(2){width:29%}
.documentation-page .doc-limits-table th:first-child{width:23%}
.documentation-page .doc-limits-table th:nth-child(2){width:30%}
.doc-required{display:block;margin:3px 0 0}
.doc-copy{font-size:10px;padding:5px 7px}
.doc-section>p{font-size:12px}
.doc-bottom-link{font-size:11px}
}

/* External provider configuration, scoped to the administration view */
#external-settings select{display:block;width:100%;padding:11px 13px;border:1px solid #d5e0e1;border-radius:9px;background:#fbfcfc;color:var(--ink);font:inherit;font-weight:400}
#external-settings select:focus{outline:2px solid #8cc6b7;outline-offset:1px}
#external-settings input[readonly]{font-size:12px;color:var(--muted)}
.cloud-flow{margin:0;padding-left:20px}
.cloud-flow li{padding-left:4px;margin-bottom:16px;font-size:13px}
.cloud-flow strong{display:block;margin-bottom:5px}
.cloud-flow span{display:block;color:var(--muted);font-size:12px;line-height:1.8}
.cloud-metrics{grid-template-columns:1fr;gap:12px}
.cloud-metrics>div{display:flex;justify-content:space-between;gap:16px}
.cloud-metrics dt{margin:0}
.cloud-metrics dd{font-variant-numeric:tabular-nums}