
:root {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  line-height: 1.65;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); }
:is(section, article, li, main, aside) { scroll-margin-top: 1.5rem; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.23; }
h1 { font-size: clamp(2.4rem, 5.3vw, 4.65rem); letter-spacing: -.043em; }
h2 { font-size: clamp(1.55rem, 3.5vw, 2.35rem); letter-spacing: -.015em; }
h3 { font-size: 1.16rem; }
p, a { overflow-wrap: anywhere; }
img { display: block; width: 100%; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--link); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.shell { width: min(74rem, calc(100% - 4rem)); margin-inline: auto; }
.block { padding-block: clamp(2.5rem, 5vw, 4.2rem); }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; clip-path: inset(50%); }
.skip:focus { position: fixed; z-index: 3; left: 1rem; top: 1rem; padding: .7rem .9rem; color: #082f5d; background: #fff; }
.mast { background: var(--mast, var(--paper)); border-bottom: 1px solid var(--line); }
.topbar { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem 1.2rem; }
.identity { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); font-size: .99rem; line-height: 1.35; }
.mark { display: grid; place-items: center; flex: 0 0 2.55rem; width: 2.55rem; height: 2.55rem; background: var(--accent); color: var(--button-ink); border-radius: var(--r); font-weight: 750; font-size: 1.12rem; }
.identity small { display: block; color: var(--muted); font-size: .79rem; margin-top: .22rem; }
.topbar nav { display: flex; gap: clamp(.85rem, 3.2vw, 2.3rem); flex-wrap: wrap; }
.topbar nav a { color: var(--ink); font-weight: 650; text-decoration: none; padding-block: .55rem; font-size: .9rem; }
.topbar nav a:hover { text-decoration: underline; }
.kicker { font-size: .83rem; font-weight: 750; letter-spacing: .075em; color: var(--link); }
.sect-head { margin-bottom: 1.25rem; }
.sect-head h2 { margin-top: .32rem; }
.sect-head > p:not(.kicker) { margin-top: .5rem; color: var(--muted); }
.primary, .ghost { display: inline-flex; min-height: 2.85rem; align-items: center; text-decoration: none; border-radius: var(--r); padding: .55rem 1rem; font-weight: 710; }
.primary { background: var(--accent); border: 1px solid transparent; color: var(--button-ink); }
.primary:hover { background: var(--accent-hover); }
.ghost { border: 1px solid var(--line); color: var(--ink); }
.ghost:hover { border-color: var(--link); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.filters { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .7rem; }
.pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.pills button, .story-bar button, .tool-choices button, [data-clear-plan] {
  background: var(--paper); border: 1px solid var(--line); color: var(--ink); border-radius: var(--r);
  padding: .45rem .79rem; font-size: .9rem; min-height: 2.55rem;
}
.pills button:hover, .story-bar button:hover, .tool-choices button:hover { border-color: var(--link); }
.pills button[aria-pressed="true"], .story-bar button[aria-pressed="true"] { color: var(--button-ink); background: var(--accent); border-color: var(--accent); }
.search { flex: 0 1 17rem; }
.search input, textarea, select { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: .48rem .75rem; min-height: 2.65rem; }
.search input { width: 100%; }
.search input::placeholder, textarea::placeholder { color: var(--muted); }
.filter-count { font-size: .87rem; color: var(--muted); margin: .45rem 0 .85rem; }
.empty { padding: 1rem; border: 1px dashed var(--line); border-radius: var(--r); }
summary { cursor: pointer; color: var(--link); font-weight: 650; }
summary:hover { text-decoration: underline; }
details :is(p, ol) { margin: .55rem 0 0; }
details ol { padding-inline-start: 1.35rem; }
figcaption { font-size: .82rem; }
.foot { padding: 1.4rem 0; text-align: center; color: var(--muted); background: var(--paper); border-top: 1px solid var(--line); font-size: .88rem; }
.icp { display: inline-block; margin-top: .3rem; font-weight: 700; padding: .25rem 0; }
@media (max-width: 850px) {
  .shell { width: calc(100% - 2.4rem); }
  .topbar { flex-wrap: wrap; padding-block: .7rem; }
}
@media (max-width: 570px) {
  .shell { width: calc(100% - 1.7rem); }
  .topbar { gap: .3rem; }
  .topbar nav { width: 100%; justify-content: space-between; gap: .44rem; }
  .topbar nav a { padding-block: .42rem; }
  .identity { font-size: .88rem; }
  .mark { flex-basis: 2.13rem; height: 2.13rem; }
  .search { flex: 1 1 100%; }
}

.portal-site {
  --bg: #eaf0f5; --paper: #fff; --ink: #1a2d42; --muted: #486178; --line: #c6d6e4; --link: #075984;
  --accent: #075985; --accent-hover: #08476a; --button-ink: #fff; --focus: #147fbd; --r: .28rem;
}
.portal-site .mast { --mast: #123651; --ink: #f4fbff; --muted: #c4ddec; --line: #143b56; --accent: #d5f2ea; --button-ink: #12424a; }
.portal-site .mark { border-radius: .25rem; }
.portal-shell { padding-block: 1rem 2rem; }
.section-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; padding: .48rem .8rem; background: #d8e7f2; border: 1px solid var(--line); margin-bottom: .82rem; font-size: .92rem; }
.section-nav a { color: #174d70; font-weight: 650; }
.lead-grid { display: grid; grid-template-columns: minmax(0,2.1fr) minmax(0,.86fr); gap: .8rem; }
.p-lead { min-height: clamp(21rem,37vw,26rem); position: relative; isolation: isolate; background: #1a3b52; color: #fff; display: grid; align-items: center; }
.p-lead figure, .p-lead figure::after { position: absolute; inset: 0; z-index: -1; }
.p-lead figure img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 45%; }
.p-lead figure::after { content: ""; background: linear-gradient(90deg,#0a273bed,#0e2d45b8 49%,#102e4933 95%); z-index: 0; }
.p-lead figcaption { position: absolute; bottom: .55rem; right: .6rem; background: #142e40; padding: .18rem .4rem; z-index: 1; color: #e6f5fb; }
.p-lead figcaption a { color: inherit; }
.p-lead-copy { padding: clamp(1.35rem,5vw,3rem); }
.p-lead-copy .kicker { color: #a6e7ed; }
.p-lead-copy h1 { margin: .45rem 0 .8rem; font-size: clamp(2.5rem,4.65vw,4rem); }
.p-lead-copy > p:not(.kicker) { max-width: 27rem; }
.p-lead-copy .primary { margin-top: 1.05rem; --accent: #c6ecf0; --button-ink: #0f3244; --accent-hover: #e3fafd; }
.quick, .portal-module { padding: 1.12rem; border: 1px solid var(--line); background: var(--paper); }
.quick h2 { font-size: 1.2rem; padding-bottom: .55rem; border-bottom: 2px solid var(--accent); }
.quick a { display: block; padding: .6rem 0; text-decoration: none; }
.quick a + a { border-top: 1px solid var(--line); }
.quick a:hover strong { text-decoration: underline; }
.quick span { display: block; color: var(--muted); font-size: .88rem; margin-top: .1rem; }
.portal-middle { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,.9fr); gap: .8rem; margin-top: .8rem; align-items: start; }
.portal-module .sect-head h2 { font-size: clamp(1.3rem,2.75vw,1.85rem); }
.resource-list { list-style: none; padding: 0; margin: .65rem 0 0; }
.resource-list li { display: flex; align-items: center; justify-content: space-between; gap: .95rem; padding: .76rem 0; border-top: 1px solid var(--line); }
.resource-list li h3 { font-size: 1.05rem; margin: .24rem 0; }
.resource-list li p { color: var(--muted); }
.resource-list li > a { flex: 0 0 auto; font-size: .87rem; }
.resource-list li:target { background: #e5f4fb; }
.tag { display: inline-block; background: #e7f2f8; color: #154e70; font-size: .8rem; padding: .12rem .43rem; }
.side-projects article { padding-block: .75rem; border-top: 1px solid var(--line); }
.side-projects article h3 { margin: .4rem 0 .5rem; }
.tools, .p-about { margin-top: .85rem; }
.tool-choices { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem .65rem; margin-bottom: 1rem; }
.tool-workspace { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .9rem; }
.tool-workspace label { display: block; font-weight: 690; margin-bottom: .32rem; }
.tool-workspace textarea { resize: vertical; width: 100%; display: block; overflow-wrap: anywhere; }
.tool-workspace .primary { margin-top: .6rem; }
[data-tool-status] { margin-top: .4rem; color: var(--muted); }
.p-about h2 { font-size: 1.14rem; margin-bottom: .4rem; }
@media (max-width: 820px) {
  .portal-middle { grid-template-columns: 1fr; }
  .lead-grid { grid-template-columns: minmax(0,1.5fr) minmax(0,.75fr); }
}
@media (max-width: 615px) {
  .lead-grid, .tool-workspace { grid-template-columns: 1fr; }
  .quick { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 .7rem; }
  .quick h2 { grid-column: 1/-1; }
  .quick a { border-top: 1px solid var(--line); }
  .resource-list li { align-items: start; flex-direction: column; gap: .3rem; }
  .p-lead-copy { padding-bottom: 2.85rem; }
}

