/* Shared Modern Technical theme. Font files are bundled for intranet use. */
@font-face {
  font-family: 'Roboto Mono'; src: url('fonts/roboto-mono.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter'; src: url('fonts/inter.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
}
:root {
  --bg-body: #EAEAE8;
  --bg-card: #F6F6F5;
  --text-main: #333333;
  --text-mono: #555555;
  --accent-orange: #F2542D;
  --border-color: #d1d1d1;
  --font-mono: 'Roboto Mono', 'Fira Code', 'Microsoft YaHei UI', 'PingFang SC', 'Noto Sans CJK SC', monospace;
  --font-sans: 'Inter', system-ui, sans-serif;
  --radius-sm: 4px;
  --ink-on-orange: #191919;
  --link: #903717;
  --keyline: #82827e;
  --gutter: clamp(16px, 4vw, 56px);
  --measure: 66ch;
  --pad: clamp(18px, 2vw, 30px);
  color-scheme: light;
  font: 400 16px/1.55 var(--font-sans);
  color: var(--text-main); background: var(--bg-body);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 6rem; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-wrap: anywhere; }
main, .appbar, .footer-inner { width: min(1200px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
main { flex: 1; min-width: 0; padding-block: clamp(24px, 4vw, 56px) clamp(44px, 6vw, 88px); }
h1,h2,h3,h4,p,blockquote,figure,ol,ul,dl,dd,pre,fieldset { margin: 0; }
h1,h2,h3,h4,code,pre,kbd { font-family: var(--font-mono); }
h1,h2,h3,h4 { line-height: 1.18; letter-spacing: -.03em; font-weight: 650; }
h1 { font-size: clamp(2.4rem, 4vw, 4.1rem); }
h2 { font-size: clamp(1.35rem, 2.15vw, 1.85rem); }
h3 { font-size: 1.14rem; }
p,dd,li,.description { max-inline-size: var(--measure); }
p + p { margin-top: .75rem; }
small,.muted,.field-hint,.save-hint,dt { color: var(--text-mono); }
small { font-size: .82rem; }
a,summary { color: var(--link); text-underline-offset: .2em; }
a:hover,summary:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--text-main); outline-offset: 3px; }
main:focus:not(:focus-visible) { outline: none; }
[hidden] { display: none !important; }
.skip { position: fixed; inset: 6px auto auto var(--gutter); z-index: 30; background: var(--bg-card); padding: .6rem 1rem; }
.skip:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.site-header { position: sticky; top: 0; z-index: 8; border-bottom: 1px solid var(--border-color); background: rgb(246 246 245 / .95); backdrop-filter: blur(8px); }
.appbar,.brand,#nav,#account,.actions,.tabs,.filter-row,.meta,.dialog-head { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .9rem; }
.appbar { min-height: 68px; padding-block: 10px; gap: 10px clamp(12px,2.3vw,32px); }
.brand { color: var(--text-main); text-decoration: none; font: 600 .95rem/1.4 var(--font-mono); gap: 9px; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 31px; height: 31px; border-radius: var(--radius-sm); background: var(--accent-orange); color: var(--ink-on-orange); font-size: 1.1rem; letter-spacing: -2px; }
#nav { gap: 2px 4px; }
#nav a,.tabs a { display: inline-block; padding: 7px 9px; border: 1px solid transparent; border-radius: var(--radius-sm); text-decoration: none; color: var(--text-mono); font-size: .9rem; }
#nav [aria-current],.tabs [aria-current] { background: #e2e2de; border-color: var(--border-color); color: var(--text-main); font-weight: 650; }
#nav [aria-current] { box-shadow: inset 0 -2px var(--accent-orange); }
#nav a:hover,.tabs a:hover { color: var(--text-main); text-decoration: underline; }
#account { margin-inline-start: auto; font-size: .88rem; }
.account-link { display: inline-flex; align-items: center; gap: .45rem; padding: 5px 8px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text-main); font-weight: 650; }
.account-link:hover,.account-link[aria-current='page'] { background: #f5e6df; color: var(--link); }
.account-letter { display: grid; place-items: center; width: 1.55rem; height: 1.55rem; overflow: hidden; border-radius: 50%; background: #f5e6df; color: #8b361f; font: 650 .78rem/1 var(--font-mono); }
#account:empty { display: none; }
body[data-page='login'] #nav { margin-inline-start: auto; }
body:not([data-page]) .member-link,
body[data-page='login'] .member-link { display: none; }
/* Catalog masthead. */
.dx-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(24px,5vw,78px); padding-block: .5rem 2.5rem; border-bottom: 1px solid var(--border-color); }
.hero-copy,.code-block { min-width: 0; }
.hero-copy h1 { margin-block: .6rem .8rem; }
.hero-copy > p { color: var(--text-mono); }
.hero-copy .actions { margin-block-start: .8rem; }
.live-badge { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border-color); border-radius: 999px; color: var(--text-mono); background: var(--bg-card); padding: 3px 9px; font: 500 .75rem/1.5 var(--font-mono); }
.live-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-orange); }
.code-block { overflow: hidden; border: 1px solid #343434; border-radius: var(--radius-sm); background: #1a1a1a; color: #ecece6; box-shadow: 0 5px 15px rgb(25 25 25 / .07); }
.code-head { display: flex; gap: .85rem; align-items: center; padding: 12px 16px; background: #242424; color: #c7c7c1; border-bottom: 1px solid #393939; font: 500 .78rem/1.5 var(--font-mono); }
.code-head small { margin-inline-start: auto; color: inherit; font: inherit; }
.window-dots { display: inline-flex; align-items: center; flex: none; gap: 5px; }
.window-dots i { width: 8px; height: 8px; border-radius: 50%; background: #ef776c; }
.window-dots i:nth-child(2) { background: #edbd61; }
.window-dots i:nth-child(3) { background: #89bb83; }
.code-block pre { max-width: 100%; padding: clamp(14px, 2vw, 25px); overflow-x: auto; tab-size: 2; font: 400 clamp(.73rem,1vw,.9rem)/1.85 var(--font-mono); }
.code-block pre code { font-size: inherit; }
.code-block .kwd { color: #c678dd; }
.code-block .str { color: #98c379; }
.code-block .com { color: #a6a6a1; }
.code-block :focus-visible { outline-color: #fff; outline-offset: -3px; }
.code-block a { color: #ffb794; }
/* Forms, actions and reusable panels. */
button,.button,input,textarea,select { font: inherit; color: var(--text-main); border-radius: var(--radius-sm); }
button,.button,input::file-selector-button { display: inline-block; max-width: 100%; padding: 8px 14px; border: 1px solid var(--keyline); background: var(--bg-card); font-size: .9rem; line-height: 1.55; font-weight: 550; cursor: pointer; }
.button { text-decoration: none; text-align: center; }
button:hover,.button:hover { border-color: var(--text-main); background: #e8e8e4; text-decoration: none; }
button:active,.button:active { transform: translateY(1px); }
.primary,.button.primary,button.primary { background: var(--accent-orange); color: var(--ink-on-orange); border-color: #ca4525; }
.primary:hover,.button.primary:hover,button.primary:hover { background: #fa6946; border-color: #8a311b; }
#results .button.primary { color: var(--link); background: transparent; border-color: #a9604b; }
#results .button.primary:hover { background: #f9e5df; border-color: var(--link); }
[aria-pressed='true'] { color: var(--bg-card); background: var(--text-main); border-color: var(--text-main); }
[aria-pressed='true']:hover { background: #444; color: white; }
button:disabled,button[aria-disabled='true'] { color: #60605d; background: #e8e8e5; border-color: var(--border-color); cursor: not-allowed; }
label.field,label.search { display: grid; gap: .35rem; margin-bottom: 1rem; font-weight: 550; }
input:not([type='checkbox']):not([type='hidden']),textarea,select { display: block; width: 100%; min-width: 0; max-width: 100%; padding: .65rem .8rem; background: #fff; border: 1px solid var(--keyline); }
input::placeholder,textarea::placeholder { color: #626260; opacity: 1; }
input::file-selector-button { font-family: var(--font-sans); margin-right: .6rem; }
input[type='checkbox'] { accent-color: var(--text-main); }
textarea { resize: vertical; }
fieldset { min-width: 0; border: 1px solid var(--border-color); padding: 12px; margin-block: .75rem; }
.check,.save-hint { display: block; }
fieldset .check { padding-block: .2rem; }
.field-hint { margin: -.35rem 0 1rem; font-size: .875rem; }
.save-hint { margin-top: .65rem; }
.panel,.card,.empty,.distribution,.tutorial-content { border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-card); padding: var(--pad); }
.panel { max-width: 50rem; }
.panel h2 { margin-bottom: 1rem; }
.panel .actions,.panel [data-secret],.publish-options,details form { margin-top: 1rem; }
.publish-options { border-top: 1px solid var(--border-color); padding-top: 1rem; }
.publish-options h3 { margin-bottom: .5rem; }
.login-panel { max-width: 29rem; margin: clamp(1rem, 6vw, 4rem) auto; padding: clamp(20px, 5vw, 36px); }
.login-panel h1 { font-size: clamp(1.6rem, 5vw, 2.25rem); }
.login-panel h1 + p { margin: .6rem 0 1.5rem; }
.login-panel button { width: 100%; }
.login-help { border-top: 1px solid var(--border-color); margin-top: 1.4rem; padding-top: 1rem; font-size: .88rem; }
.account-settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(15px, 3vw, 28px); align-items: start; max-width: 55rem; }
.account-profile dl { margin: 0; }
.account-profile dl > div { padding: .7rem 0; border-top: 1px solid var(--border-color); }
.account-profile dt { margin-bottom: .3rem; font-size: .85rem; color: var(--text-mono); }
.account-profile dd { margin: 0; overflow-wrap: anywhere; font-weight: 650; }
.account-password h2 { margin-bottom: .4rem; }
.account-password h2 + p { margin-bottom: 1.25rem; }
.show-password { display: flex; align-items: center; gap: .5rem; cursor: pointer; width: fit-content; }
.password-error { margin-top: .85rem; color: #8a2116; background: #fdece8; border: 1px solid #d99d91; border-radius: var(--radius-sm); padding: .65rem .8rem; }
.account-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .85rem 1.15rem; margin-top: 1.25rem; }
@media (min-width: 680px) { .account-settings { grid-template-columns: minmax(11rem, 1fr) minmax(20rem, 2fr); } }
@media (max-width: 390px) { .account-letter { display: none; } .account-link { padding-inline: 4px; } }
.catalog-tools { margin-top: 1rem; }
.catalog-tools .search { margin-bottom: .3rem; }
#search { padding-block: .7rem; }
.filter-row { margin-top: .7rem; }
.tabs { gap: .4rem; }
.tabs button { padding: 5px 12px; }
/* The directory grid carries public packages. Dense management records use wider columns. */
.page-heading,.tutorial-hero { margin-bottom: 1.7rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); }
.page-heading small { font-family: var(--font-mono); }
.page-heading h1 { margin-top: .35rem; }
.page-heading .button,.tutorial-hero p,.tutorial-hero .button { margin-top: .8rem; }
.section-title { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; margin-block: 2rem 1rem; }
.section-title small,.section-title em { color: var(--text-mono); font: 450 .86rem/1.5 var(--font-mono); letter-spacing: normal; }
.grid,.stack,#agent-access { display: grid; gap: 24px; grid-template-columns: minmax(0,1fr); }
.grid { grid-template-columns: repeat(auto-fit,minmax(min(100%, 350px),1fr)); }
#results .grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.card { min-width: 0; }
.card > * + *,.publish-options > * + * { margin-top: .65rem; }
.skill-tile h3 { font-size: clamp(1.15rem,1.7vw,1.45rem); }
.skill-tile small { display: block; }
#results .skill-tile { display: flex; flex-direction: column; align-items: flex-start; }
#results .skill-tile:hover { border-color: var(--keyline); }
#results .skill-tile .actions { margin-top: auto; padding-top: 1rem; }
#results .skill-tile > small { padding-top: .2rem; padding-bottom: .2rem; }
.meta,.tag,.state-pill { font: 500 .78rem/1.45 var(--font-mono); color: var(--text-mono); }
.meta { gap: .55rem; }
.tag,.state-pill { display: inline-block; padding: 2px 7px; border: 1px solid var(--border-color); border-radius: 3px; }
.skill-tile.skill-important { border-color: #b88b38; border-inline-start: 4px solid #a87822; background: #fffaf0; }
#results .skill-tile.skill-important:hover { border-color: #8a6118; }
.tag.important-badge { color: #694400; background: #ffedbd; border-color: #b88b38; font-weight: 650; }
.important-badge > span { margin-inline-end: .15rem; }
.category-editor { border-top: 1px solid var(--border-color); padding-top: .5rem; }
.category-editor summary { min-height: 44px; padding-block: .6rem; font-weight: 600; }
.category-editor form { min-width: 0; }
.category-editor .field-hint { line-height: 1.6; }
#results .meta::before { content: ''; display: inline-block; width: 14px; height: 17px; border: 1px solid var(--text-mono); border-radius: 2px; background: linear-gradient(var(--text-mono),var(--text-mono)) 3px 5px/6px 1px no-repeat,linear-gradient(var(--text-mono),var(--text-mono)) 3px 9px/4px 1px no-repeat; }
.description { white-space: pre-line; }
.empty { color: var(--text-mono); }
.warning,blockquote { border-left: 3px solid var(--accent-orange); background: #efefea; padding: .65rem .9rem; }
.warning p { margin-top: .35rem; }
summary { padding: .35rem 0; cursor: pointer; }
summary small { margin-inline-start: .5rem; }
.feedback-picker,.tools,.review-queue { margin-bottom: 1rem; }
.feedback-options,.review-queue { display: grid; gap: .35rem; }
.feedback-options { max-height: 18rem; overflow: auto; padding: 5px; }
.feedback-options button,.review-queue button { text-align: left; }
.feedback-options small,.review-queue small { display: block; color: inherit; }
.distribution { margin-top: 2rem; }
.distribution p { margin-block: .45rem 1.25rem; color: var(--text-mono); }
.bar-list { list-style: none; padding: 0; max-width: 48rem; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 5rem) minmax(0, 1fr) 4ch;
  align-items: center;
  gap: .75rem;
  padding: .6rem 0;
  max-width: none;
  border-top: 1px solid var(--border-color);
  font: 500 .9rem/1.5 var(--font-mono);
}
.bar-row > :last-child { text-align: end; font-variant-numeric: tabular-nums; }
.bar-track { display: block; height: 7px; background: #deded9; }
.bar-fill { display: block; height: 100%; background: var(--accent-orange); transform-origin: left; }
@keyframes pulse { 50% { opacity: .4; } }
@keyframes draw-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: no-preference) {
  :root[data-pointer] :is(button, a, summary) { transition: opacity 150ms ease-out; }
  :root[data-pointer] :is(button, a, summary):active { opacity: .92; }
  .live-badge::before { animation: pulse 2s ease-in-out 2; }
  .bar-fill { animation: draw-bar .45s ease-out both; }
}
/* Announcements use plain text so published content cannot inject markup. */
.announcement-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; margin-bottom: 1.5rem; border: 1px solid var(--border-color); border-left: 3px solid var(--accent-orange); background: var(--bg-card); }
.announcement-banner > div { min-width: 0; }
.announcement-banner strong { margin-left: .65rem; overflow-wrap: anywhere; }
.announcement-banner p { margin-top: .5rem; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-mono); }
.announcement-banner > a { flex-shrink: 0; }
.announcement-compose { margin-top: 1.5rem; }
.announcement-list { margin-top: 1rem; }
.announcement-card { min-width: 0; }
.announcement-card h3,.announcement-meta { overflow-wrap: anywhere; }
.announcement-body { white-space: pre-wrap; overflow-wrap: anywhere; margin-block: 1rem; line-height: 1.8; }
.announcement-editor { margin-bottom: 1rem; }
.announcement-editor form { margin-top: 1rem; }
@media (width < 48rem) { .announcement-banner { align-items: flex-start; flex-direction: column; } }
/* Documents, audit history and the global footer. */
.tutorial-content { max-width: 58rem; }
.tutorial-content > * + * { margin-top: 1rem; }
.tutorial-content h2 { margin: 2rem 0 .65rem; }
.tutorial-content img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border-color); }
.tutorial-toc { display: flex; align-items: flex-start; gap: .45rem; flex-wrap: wrap; }
.tutorial-content pre { overflow: auto; padding: 1.1rem; border-radius: var(--radius-sm); color: #eaeae8; background: #1a1a1a; }
/* Generated API reference and guide tables. */
.tutorial-content .table-scroll { overflow-x: auto; margin-block: 1rem; }
.tutorial-content table { border-collapse: collapse; min-width: 32rem; }
.tutorial-content :is(th,td) { border: 1px solid var(--border-color); text-align: start; padding: .42em .7em; vertical-align: top; }
.tutorial-content th { background: #f1f1ef; font-weight: 700; }
.tutorial-content :not(pre) > code { padding: .12em .34em; border-radius: 3px; background: #f1f1ef; }
.tutorial-content blockquote { padding: .1rem 1rem; border-left: 3px solid var(--border-color); color: var(--text-mono); }
.doc-intro { max-width: 58rem; margin: 0 auto .8rem; }
.doc-intro .actions { display: flex; flex-wrap: wrap; gap: .6rem; }
code,pre { font-size: .9em; }
ol,ul { padding-left: 1.5em; }
.log-filter { max-width: 40rem; margin-bottom: 1rem; }
.log-list { list-style: none; padding: 0; margin-block: .75rem; }
.log-list li { max-width: none; }
.log-entry { width: 100%; border: 1px solid var(--border-color); border-bottom: 0; border-radius: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem 1rem; text-align: left; padding: 1rem; }
.log-list li:last-child .log-entry { border-bottom: 1px solid var(--border-color); }
.log-entry time,.log-user { color: var(--text-mono); font: .8rem var(--font-mono); }
.log-summary { flex: 1 1 16rem; }
.log-summary span { display: block; font-weight: 400; }
dialog { width: min(40rem,calc(100% - 2rem)); max-height: 85vh; overflow: auto; padding: var(--pad); border: 1px solid var(--keyline); border-radius: var(--radius-sm); color: var(--text-main); background: var(--bg-card); }
dialog::backdrop { background: rgb(20 20 19 / .55); }
.dialog-head { justify-content: space-between; margin-bottom: 1.2rem; }
dialog h3 { margin-block: 1.2rem .45rem; }
dt { margin-top: .65rem; padding-top: .65rem; border-top: 1px solid var(--border-color); }
#notice { pointer-events: none; }
#notice:not(:empty) { position: fixed; z-index: 9; right: var(--gutter); bottom: 1rem; max-width: min(34rem,calc(100% - 2 * var(--gutter))); border-left: 3px solid var(--accent-orange); border-radius: var(--radius-sm); background: #262626; color: white; padding: .75rem 1rem; }
#notice.error:not(:empty)::before { content: '错误 · '; }
.site-footer { border-top: 1px solid var(--border-color); background: var(--bg-card); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; padding-block: 24px 32px; }
.footer-brand strong { font: 600 .96rem/1.5 var(--font-mono); }
.footer-inner h2 { font-size: .9rem; }
.footer-inner a,.footer-brand p { display: block; width: fit-content; margin-top: .4rem; font-size: .84rem; color: var(--text-mono); }
.footer-inner a:hover { color: var(--link); }
@media (max-width: 62rem) {
  .appbar { gap: 6px 14px; }
  .appbar:has(#account:not(:empty)) #nav { flex-basis: 100%; order: 1; }
  #results .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  html { scroll-padding-top: 8rem; }
}
@media (width < 48rem) {
  html { scroll-padding-top: 12rem; }
  .appbar { padding-block: 7px; min-height: 52px; }
  #nav { gap: 0 2px; }
  #nav a { padding: 6px 7px; font-size: .84rem; }
  .code-head { gap: .55rem; padding-inline: 12px; }
  #account,.brand { gap: 5px; }
  #account button { padding: 4px 7px; }
  .dx-hero { grid-template-columns: minmax(0,1fr); gap: 18px; padding: 0 0 1.25rem; }
  #results .grid { grid-template-columns: minmax(0,1fr); }
  .section-title { margin-top: 1.45rem; }
  .log-entry { display: grid; }
  .log-arrow { display: none; }
  .footer-inner { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-brand { grid-column: 1/-1; }
}
@media (max-height: 34rem) { .site-header { position: static; } html { scroll-padding-top: 1rem; } }
.pagination { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:12px; margin:24px 0; }
.pagination span { color:var(--muted, #637083); font-size:13px; }
.skill-tile h3 a { color:inherit; text-decoration:none; }
.skill-tile h3 a:hover { text-decoration:underline; }
.metadata-list { display:grid; gap:18px; margin:24px 0; }
.metadata-list dt { font-weight:650; margin-bottom:6px; }
.metadata-list dd { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; color:var(--muted, #637083); line-height:1.7; }
.history-row { display:flex; align-items:center; justify-content:space-between; gap:20px; border-bottom:1px solid #e2e8f0; padding:14px 0; }
.history-row p { margin:5px 0; }
.draft-hint { padding:12px; border:1px solid #c9d9ec; background:#f3f7fc; border-radius:8px; }
.draft-hint button { margin:4px; }
.unread { border-left:3px solid #3971a8; }
#feature-host { min-width:0; }
#feature-host > .panel { margin-bottom:24px; }
#feature-host .card h3, #feature-host .card p { overflow-wrap:anywhere; }
#feature-host .tutorial-content { width:100%; max-width:100%; padding:0; }
#feature-host .tutorial-content pre { overflow:auto; }
.tabs { flex-wrap:wrap; }
.tutorial-editor { max-width: 960px; margin: 24px auto; }
.tutorial-editor textarea { min-height: 24rem; width: 100%; resize: vertical; font-family: var(--mono, monospace); line-height: 1.7; }
.tutorial-editor details { margin-block: 16px; }
.tutorial-editor { scroll-margin-top: 24px; }
.tutorial-editor > .actions { padding-block: 12px; border-bottom: 1px solid var(--border-color); }
.tutorial-editor [data-preview-panel] { overflow-wrap: anywhere; }
.tutorial-editor [data-tutorial-source] > summary { cursor: pointer; font-weight: 600; }
@media (max-width:640px) { .history-row {align-items:flex-start;flex-direction:column;gap:8px;} .pagination{gap:8px;} .pagination span{font-size:12px;} #feature-host .tools {flex-wrap:wrap;} }
