@import url('/fonts.css');
/* The portal uses the selected terminal layout; management and feedback keep their routes. */
.terminal-portal { --red: #c91f2e; --ink: #2c1746; --paper: #fff; --line: #ded9e2; --muted: #756b7e; margin: 0; color: var(--ink); background: #fff; font: 16px/1.65 CangErYuYang, 'Microsoft YaHei', sans-serif; }
.terminal-portal * { box-sizing: border-box; }
.terminal-portal button { font: inherit; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 10px 16px; color: var(--ink); background: #fff; }
.skip-link:focus { top: 12px; }
.portal-sidebar { position: fixed; top: 0; left: 0; bottom: 0; z-index: 20; display: flex; flex-direction: column; width: 250px; padding: 24px 0 68px; color: #fff; background: var(--ink); }
.portal-sidebar .brand { gap: 10px; margin: 0 22px 40px; text-decoration: none; }
.portal-sidebar .brand strong { color: #fff; font-family: CangErYuMo, sans-serif; font-size: 27px; font-weight: 400; }
.portal-sidebar .brand i { color: #fff; }
.portal-sidebar .brand-mark { width: 41px; height: 37px; }
.portal-sidebar .brand-mark b { font-size: 24px; transform: translateY(4px); }
.product-navigation h2 { margin: 0; padding: 8px 24px 14px; color: #c9bbd5; font: 14px/1.5 CangErYuYang, sans-serif; }
.product-nav { display: flex; min-height: 53px; align-items: center; gap: 11px; padding: 12px 22px; color: #f4edf9; text-decoration: none; border-left: 3px solid transparent; font-size: 15px; }
.product-nav img { width: 18px; height: 20px; object-fit: contain; filter: brightness(0) invert(1); }
.product-nav span { flex: 1; white-space: nowrap; }
.product-nav small { padding: 2px 5px; color: #e2d7eb; background: #ffffff17; border-radius: 3px; font-size: 10px; white-space: nowrap; }
.product-nav.active { color: #fff; border-left-color: #fff; background: var(--red); }
.product-nav:not(.active):hover { background: #43285d; }
.portal-support { display: grid; gap: 8px; margin-top: auto; padding: 24px; }
.portal-support a { display: block; padding: 7px 0; color: #e0d5e9; font-size: 15px; text-decoration: none; }
.portal-support a:hover { color: #fff; text-decoration: underline; }
.portal-main { margin-left: 250px; padding: 28px 38px 70px 58px; max-width: 1750px; }
.portal-heading .portal-breadcrumb { color: var(--red); font-size: 14px; }
.portal-breadcrumb span { margin-left: 6px; color: var(--muted); }
.portal-heading h1 { margin: 18px 0 10px; font: 400 clamp(34px,3.8vw,52px)/1.25 CangErYuMo, sans-serif; letter-spacing: 0; }
.portal-heading em { margin-left: .32em; color: var(--red); font-style: normal; }
.portal-heading p { max-width: 780px; margin: 0 0 26px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.featured-product h2 { margin: 0 0 10px; font: 400 34px/1.3 CangErYuMo, sans-serif; }
.product-actions { display: flex; gap: 25px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.terminal-portal .primary { min-height: 40px; padding: 8px 20px; border: 1px solid var(--red); border-radius: 6px; color: #fff; background: var(--red); clip-path: none; }
.terminal-portal .primary:hover { background: #a91b28; }
.product-actions a { color: #2850a3; font-size: 14px; text-decoration: none; }
.product-actions a:hover { text-decoration: underline; }
.product-runtime { margin-left: auto; color: var(--muted); font-size: 12px; }
.product-preview { margin: 0; }
.product-preview > img { display: block; width: 100%; height: auto; border: 1px solid #d3ccd9; border-radius: 6px; }
.product-preview figcaption { margin-top: 6px; color: var(--muted); font-size: 11px; text-align: right; }
.terminal-portal .tool-directory { padding: 0; margin: 14px 0 32px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.tool-directory-grid { display: block; }
.tool-entry { display: grid; grid-template-columns: 26px minmax(145px,auto) minmax(100px,1fr) auto; gap: 14px; align-items: center; padding: 16px 18px; scroll-margin-top: 20px; }
.tool-entry + .tool-entry { border-top: 1px solid var(--line); }
.tool-entry > img { width: 24px; height: 26px; object-fit: contain; }
.tool-entry h3 { margin: 0; font: 400 19px/1.3 CangErYuMo, sans-serif; }
.tool-entry p { margin: 0; color: var(--muted); font-size: 14px; }
.tool-entry > span { padding: 2px 7px; color: var(--muted); background: #f4f1f6; border-radius: 3px; font-size: 12px; white-space: nowrap; }
.tool-entry a, .tool-entry button { border: 0; color: #2850a3; background: none; font-size: 14px; text-decoration: none; }
.terminal-portal .release-strip { display: flex; flex-wrap: wrap; gap: 10px 20px; padding: 20px 0; margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.release-strip > div { display: flex; gap: 12px; align-items: center; }
.release-strip small { color: var(--muted); font-size: 12px; }
.release-strip strong { color: var(--red); font-size: 20px; }
.release-strip p { flex: 1; min-width: 220px; color: var(--ink); font-size: 14px; }
.release-strip button { padding: 7px 12px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: #fff; font-size: 13px; }
.portal-details { padding: 22px 0; border-bottom: 1px solid var(--line); }
.portal-details > summary { color: var(--ink); font-size: 17px; cursor: pointer; }
.terminal-portal .modules { padding: 22px 0 0; }
.terminal-portal .module-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.terminal-portal .module-grid article { min-height: 0; padding: 18px 0; border: 0; box-shadow: none; background: #fff; }
.terminal-portal .module-grid article::after { content: none; }
.terminal-portal .module-number { position: static; color: var(--red); font-size: 12px; }
.terminal-portal .module-grid h3 { margin: 12px 0 5px; font-size: 24px; }
.terminal-portal .module-grid h4 { margin: 0; color: var(--red); font-size: 14px; }
.terminal-portal .module-grid p { max-width: none; font-size: 14px; }
.terminal-portal .update-panel { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 30px; padding: 32px 0; margin: 0; border: 0; background: #fff; }
.update-panel h2 { margin: 8px 0; font-size: 29px; }
.update-panel small, .update-panel p { color: var(--muted); font-size: 12px; }
.update-panel ol { margin: 0; padding-left: 23px; font-size: 14px; line-height: 1.8; }
.update-panel li { margin-bottom: 7px; }
.terminal-portal .support-panel { display: flex; gap: 24px; align-items: center; padding: 24px 0; border-top: 1px solid var(--line); }
.support-panel > div { flex: 1; }
.support-panel h2 { margin: 0 0 8px; font-size: 27px; }
.support-panel p { margin: 0; color: var(--muted); font-size: 14px; }
.sponsor-button { display: inline-block; padding: 10px 18px; color: var(--red); border: 1px solid var(--red); border-radius: 5px; text-decoration: none; font-size: 14px; white-space: nowrap; }
.terminal-portal .license { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 30px; padding: 24px 0 0; margin: 0; border-top: 1px solid var(--line); color: var(--ink); background: #fff; }
.license small { color: var(--muted); font-size: 10px; }
.license h2 { margin-top: 6px; font-size: 27px; }
.license p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.terminal-portal .portal-footer { position: relative; z-index: 30; display: flex; gap: 18px; justify-content: space-between; padding: 15px 24px; border-top: 1px solid var(--line); color: var(--muted); background: #fff; font-size: 12px; }
.portal-footer a { color: inherit; }
.terminal-portal dialog { border: 1px solid var(--line); border-radius: 7px; clip-path: none; }
.terminal-portal .dialog-shell { clip-path: none; }
.terminal-portal a:focus-visible, .terminal-portal button:focus-visible, .terminal-portal summary:focus-visible { outline: 2px solid #2850a3; outline-offset: 3px; }
@media(max-width:1100px) {
  .portal-sidebar { width: 208px; }
  .portal-sidebar .brand { margin-inline: 18px; }
  .product-nav { gap: 8px; padding-inline: 16px; font-size: 14px; }
  .portal-main { margin-left: 208px; padding-inline: 30px; }
  .product-runtime { display: none; }
  .tool-entry { grid-template-columns: 24px 1fr auto; }
  .tool-entry p { grid-column: 2; grid-row: 2; }
  .tool-entry > span, .tool-entry > a, .tool-entry > button { grid-column: 3; grid-row: 1 / span 2; }
}
@media(max-width:700px) {
  .portal-sidebar { position: static; width: 100%; padding: 15px 0 0; }
  .portal-sidebar .brand { margin: 0 18px 12px; }
  .product-navigation h2 { display: none; }
  .product-navigation { display: flex; flex-wrap: wrap; }
  .product-nav { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 4px; padding: 10px 4px; border-left: 0; border-bottom: 3px solid transparent; font-size: 13px; }
  .product-nav span { flex: initial; }
  .product-nav img { display: none; }
  .product-nav small { font-size: 9px; }
  .product-nav.active { border-bottom-color: #fff; }
  .portal-support { display: flex; gap: 26px; margin: 0; padding: 8px 20px; }
  .portal-support a { font-size: 13px; }
  .portal-main { margin-left: 0; padding: 24px 20px 36px; }
  .portal-heading h1 { font-size: 34px; }
  .portal-heading em { display: block; margin: 3px 0 0; }
  .featured-product h2 { font-size: 27px; }
  .product-actions { gap: 18px; }
  .product-preview figcaption { text-align: left; line-height: 1.5; }
  .tool-entry { gap: 8px; padding: 14px 12px; }
  .tool-entry h3 { font-size: 17px; }
  .terminal-portal .module-grid { grid-template-columns: 1fr; gap: 6px; }
  .terminal-portal .update-panel, .terminal-portal .license { grid-template-columns: 1fr; gap: 14px; }
  .terminal-portal .license p { grid-column: auto; }
  .terminal-portal .support-panel { flex-direction: column; align-items: flex-start; }
  .terminal-portal .portal-footer { flex-wrap: wrap; gap: 6px 14px; font-size: 11px; padding: 12px 20px; }
}
@media(prefers-reduced-motion:reduce) { .terminal-portal * { scroll-behavior: auto !important; } }
