:root { --hub-sidebar: 290px; --hub-coral: #e54b36; --hub-ink: #1d2130; --hub-muted: #697181; --hub-line: #e4e2df; }
* { box-sizing: border-box; }
.hub-page { background: #fff; color: var(--hub-ink); font-family: "Noto Sans SC", sans-serif; font-size: 14px; }
.hub-page [hidden] { display: none !important; }
.hub-page a { text-decoration: none; }
.hub-page button, .hub-page input, .hub-page select, .hub-page textarea { font: inherit; }
.hub-page a:focus-visible, .hub-page button:focus-visible, .hub-page summary:focus-visible, .hub-page input:focus-visible, .hub-page textarea:focus-visible, .hub-page select:focus-visible { outline: 3px solid #d04432; outline-offset: 4px; }
.hub-icon { display: block; flex: 0 0 auto; width: 24px; height: 24px; }
.hub-sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: var(--hub-sidebar); padding: 30px 26px 24px; background: #fbfaf8; border-right: 1px solid #f0eeeb; display: flex; flex-direction: column; }
.hub-brand { display: flex; align-items: center; gap: 14px; color: var(--hub-ink); font-size: 23px; font-weight: 800; white-space: nowrap; }
.hub-brand .brand-mark { width: 42px; height: 42px; border-radius: 13px; font: 800 18px "Noto Sans SC", sans-serif; color: #fff; background: #f2644e; }
.hub-navigation { flex: 1; display: flex; flex-direction: column; padding-top: 65px; min-height: 0; overflow-y: auto; }
.hub-navigation a { display: flex; gap: 17px; align-items: center; padding: 14px 14px; min-height: 52px; color: #262c3b; font-size: 16px; border-radius: 10px; font-weight: 500; }
.hub-navigation a:hover { background: #f0ede8; }
.hub-navigation a[aria-current="page"] { background: #f9eae4; color: #ce4631; }
.hub-navigation a[aria-current="page"] .hub-icon { filter: invert(35%) sepia(55%) saturate(1400%) hue-rotate(338deg); }
.hub-nav-primary, .hub-nav-categories { display: grid; gap: 10px; }
.hub-nav-caption { margin: 57px 12px 18px; font-size: 13px; color: #697181; }
.hub-nav-bottom { display: grid; gap: 10px; margin-top: auto; padding-top: 26px; border-top: 1px solid #dfddd9; }
.hub-nav-categories { margin-bottom: 40px; }
.hub-frame { margin-left: var(--hub-sidebar); min-height: 100vh; }
.hub-topbar { display: flex; align-items: center; gap: 58px; padding: 28px 40px 16px; min-height: 98px; }
.hub-search { display: flex; align-items: center; gap: 14px; flex: 1; margin: 0; border: 1px solid #dcdde0; border-radius: 13px; height: 52px; padding: 0 16px; min-width: 0; background: #fff; }
.hub-search > .hub-icon { width: 22px; height: 22px; opacity: .62; }
.hub-search input { border: 0; outline: 0; box-shadow: none; background: none; min-width: 0; width: 100%; height: 100%; padding: 0; font-size: 15px; color: var(--hub-ink); }
.hub-search:focus-within { border-color: var(--hub-coral); box-shadow: 0 0 0 3px #f9eae4; }
.hub-search input:focus-visible { outline: none; }
.hub-search input::placeholder { color: #7a8190; opacity: 1; }
.hub-search input::-webkit-search-cancel-button { display: none; }
.hub-login { display: grid; align-items: center; justify-items: center; min-width: 96px; max-width: 170px; min-height: 50px; border-radius: 13px; padding: 9px 19px; background: #eb503c; color: #fff; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.hub-login:hover { background: #cc3e2d; color: #fff; }
.hub-directory { padding: 48px 40px 0; }
.hub-intro h1 { margin: 0 0 12px; font-size: 38px; line-height: 1.45; letter-spacing: -.035em; font-weight: 800; }
.hub-intro > p { color: var(--hub-muted); margin: 0; font-size: 17px; line-height: 1.8; }
.hub-section-heading { display:flex; align-items:end; justify-content:space-between; gap:22px; margin:0 0 18px; }
.hub-section-heading > div { min-width:0; }
.hub-section-heading h2 { margin:2px 0 0; font-size:20px; line-height:1.45; letter-spacing:-.02em; }
.hub-section-heading > p { max-width:410px; margin:0; color:var(--hub-muted); font-size:12px; line-height:1.7; text-align:right; }
.hub-kicker { margin:0; color:#b44533; font-size:11px; font-weight:800; letter-spacing:.08em; }
.hub-starter-section { margin:34px 0 28px; }
.hub-starter-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.hub-starter-card { display:flex; gap:15px; min-width:0; padding:18px; border:1px solid #e8e4df; border-radius:14px; background:#fcfbf9; }
.hub-starter-card:hover { border-color:#eaa08f; box-shadow:0 8px 18px rgba(35,39,48,.05); }
.hub-starter-icon { display:grid; place-items:center; flex:0 0 42px; width:42px; height:42px; border-radius:12px; background:#f9ebe5; color:#b94230; font-size:20px; }
.hub-starter-card h3 { margin:4px 0 9px; font-size:14px; line-height:1.6; font-weight:650; }
.hub-starter-card ol { display:flex; flex-wrap:wrap; gap:4px 12px; margin:0 0 13px; padding:0; list-style:none; color:#6c7380; font-size:11px; }
.hub-starter-card li::before { content:'·'; margin-right:4px; color:#d64a36; }
.hub-starter-link { color:#bd4432; font-size:12px; font-weight:800; }
.hub-starter-link:hover { text-decoration:underline; }
.hub-profile-panel { margin:0 0 31px; border:1px solid #e8e4df; border-radius:13px; background:#fff; }
.hub-profile-panel > summary { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:15px 18px; cursor:pointer; list-style:none; }
.hub-profile-panel > summary::-webkit-details-marker { display:none; }
.hub-profile-panel > summary strong { display:block; font-size:14px; }
.hub-profile-panel > summary small { display:block; margin-top:4px; color:var(--hub-muted); font-size:11px; font-weight:400; }
.hub-profile-panel[open] > summary { border-bottom:1px solid #ece8e3; }
.hub-profile-form { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; padding:18px; }
.hub-profile-form label { display:grid; gap:6px; min-width:0; color:#4e5964; font-size:12px; font-weight:650; }
.hub-profile-form input,.hub-profile-form select { width:100%; min-width:0; min-height:40px; padding:8px 10px; border:1px solid #dadde0; border-radius:8px; background:#fff; color:var(--hub-ink); }
.hub-profile-form input[type="color"] { padding:3px; }
.hub-profile-actions { display:flex; align-items:end; gap:12px; grid-column:1/-1; }
.hub-profile-actions .button { min-height:40px; padding:8px 14px; font-size:12px; }
.hub-profile-status { margin:0; padding:0 18px 17px; color:var(--hub-muted); font-size:11px; line-height:1.7; }
.hub-flow-section { margin:31px 0 32px; }
.hub-flow-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.hub-flow-card { display:flex; min-height:210px; flex-direction:column; padding:18px; border:1px solid #e9e7e4; border-radius:13px; background:#fff; }
.hub-flow-card h3 { margin:0 0 7px; font-size:16px; }
.hub-flow-card p { margin:0; color:var(--hub-muted); font-size:12px; line-height:1.7; }
.hub-flow-card ol { display:grid; gap:8px; margin:17px 0; padding:0; list-style:none; }
.hub-flow-card li { display:flex; gap:8px; align-items:center; min-width:0; font-size:12px; }
.hub-flow-card li span { display:grid; place-items:center; flex:0 0 19px; width:19px; height:19px; border-radius:50%; background:#f7e9e4; color:#b74533; font-size:10px; font-weight:800; }
.hub-flow-card li a { color:#35404c; overflow-wrap:anywhere; }
.hub-flow-card li a:hover { color:#bf4431; text-decoration:underline; }
.hub-flow-card > .text-button { align-self:flex-start; margin-top:auto; color:#b94533; font-size:12px; }
.hub-project-home { margin:30px 0 24px; padding:20px; border:1px solid #e1e6e1; border-radius:14px; background:#fbfdfb; }
.hub-project-home .hub-section-heading { margin-bottom:10px; }
.hub-project-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:0; padding:0; list-style:none; }
.hub-project-list a { display:grid; gap:5px; min-height:68px; padding:12px; border:1px solid #e2e8e2; border-radius:9px; background:#fff; color:var(--hub-ink); }
.hub-project-list a:hover { border-color:#9eb9ab; }
.hub-project-list strong { overflow-wrap:anywhere; font-size:12px; }
.hub-project-list span { color:var(--hub-muted); font-size:10px; }
.hub-toolbar { display: flex; gap: 20px; align-items: center; margin: 31px 0 20px; min-height: 44px; }
.hub-toolbar > p { margin: 0 0 0 auto; color: var(--hub-muted); font-size: 13px; }
.hub-sorts { display: flex; gap: 12px; }
.hub-sorts button { min-height: 43px; border: 1px solid #e1e2e5; border-radius: 24px; padding: 8px 18px; background: #fff; color: #626b7a; cursor: pointer; font-size: 14px; white-space: nowrap; }
.hub-sorts button[aria-pressed="true"] { color: #ce4631; border-color: #ef8b7b; }
.hub-sorts button:hover { background: #fff6f2; }
.hub-tool-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.hub-tool { display: flex; align-items: center; gap: 10px; position: relative; min-width: 0; min-height: 134px; padding: 20px 20px 20px 0; border-bottom: 1px solid var(--hub-line); }
.hub-tool:nth-child(even) { padding-left: 29px; padding-right: 0; }
.hub-tool:nth-child(even)::before { content: ""; position: absolute; top: 20px; bottom: 20px; left: 0; width: 1px; background: var(--hub-line); }
.hub-tool:nth-last-child(-n+2) { border-bottom-color: transparent; }
.hub-tool-main { display: flex; align-items: center; gap: 22px; min-width: 0; flex: 1; padding-block: 5px; color: inherit; }
.hub-tool-main:hover h2 { color: #ce4631; }
.hub-tool-icon { display: grid; place-items: center; width: 70px; height: 70px; flex: 0 0 70px; border: 1px solid #edeae6; border-radius: 13px; background: #fcfbf9; }
.hub-tool-icon .hub-icon { width: 37px; height: 37px; }
.hub-tool-copy { min-width: 0; }
.hub-tool h2 { margin: 0 0 12px; font-size: 19px; line-height: 1.45; font-weight: 700; letter-spacing: -.02em; }
.hub-tool p { margin: 0; color: #697181; font-size: 14px; line-height: 1.6; }
.hub-tool-meta { display: flex; flex-direction: column; gap: 14px; align-items: flex-end; color: var(--hub-muted); font-size: 14px; min-width: 56px; flex: 0 0 auto; }
.hub-tool-meta a { color: var(--hub-muted); font-size: 14px; max-width: 82px; text-align: right; }
.hub-tool-meta a:hover { color: #ce4631; text-decoration: underline; }
.hub-icon-button { display: inline-grid; place-items: center; border: 0; padding: 0; width: 36px; height: 42px; flex: 0 0 auto; background: transparent; border-radius: 8px; cursor: pointer; color: #697181; }
.hub-icon-button:hover { background: #f6f2ee; }
.hub-favorite { margin-left: 10px; }
.hub-favorite .hub-icon, .hub-start .hub-icon { width: 21px; height: 21px; opacity: .58; }
.hub-favorite.is-saved .hub-icon { opacity: 1; filter: invert(35%) sepia(60%) saturate(1000%) hue-rotate(340deg); }
.hub-next { margin-top: 31px; padding: 29px 28px; display: flex; align-items: center; gap: 25px; border: 1px solid #e9e5df; border-radius: 16px; background: #fbf8f4; }
.hub-next > img { flex-shrink: 0; filter: invert(40%) sepia(90%) saturate(1400%) hue-rotate(336deg); }
.hub-next-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 23px; }
.hub-next h2 { font-size: 18px; margin: 0; font-weight: 700; line-height: 1.6; }
.hub-next-heading > span { border: 1px solid #dedbd6; color: #687181; border-radius: 6px; font-size: 12px; padding: 2px 10px; }
.hub-next p { margin: 7px 0 0; font-size: 14px; color: #697181; line-height: 1.7; }
.hub-rating-status:empty, .hub-toast:empty { display: none; }
.hub-rating-status { font-size: 12px; color: #855b20; margin: 5px 0; }
.hub-toast:not(:empty) { position: fixed; z-index: 70; bottom: 20px; left: calc(var(--hub-sidebar) + 40px); padding: 12px 18px; margin: 0; color: #fff; background: #29313f; border-radius: 10px; max-width: calc(100vw - var(--hub-sidebar) - 80px); font-size: 13px; pointer-events: none; }
.hub-empty { padding: 65px 20px; text-align: center; background: #fcfbf8; border-radius: 12px; }
.hub-empty img { opacity: .5; }
.hub-empty h2 { font-size: 21px; margin: 16px 0 7px; }
.hub-empty p { color: var(--hub-muted); }
.hub-empty .button { min-height: 44px; font-size: 14px; }
.hub-frame > footer { width: auto; margin: 0 40px; padding: 28px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; border: 0; color: #727782; }
.hub-frame > footer .brand { display: none; }
.hub-frame > footer p { margin: 0; font-size: 11px; }
.hub-frame > footer .footer-links { display: flex; gap: 15px; flex-wrap: wrap; }
.hub-skip { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 12px; background: #fff; color: #222; border: 1px solid; }
.hub-skip:focus { top: 10px; }
.hub-menu { display: none; }
.hub-overlay { position: fixed; inset: 0; border: 0; background: #20253360; z-index: 35; }
/* Existing functional pages keep their forms and APIs inside the shared shell. */
.hub-frame .section-shell { width: auto; margin-inline: 40px; }
.hub-frame .tool-page { padding-block: 24px 60px; }
.hub-frame .tool-intro { margin-bottom: 24px; }
.hub-frame .tool-intro h1 { font-size: 32px; }
.hub-frame .tool-intro > p:not(.eyebrow) { font-size: 14px; }
.hub-frame .tool-meta { display: flex; flex-wrap: wrap; gap: 10px 20px; background: transparent; border: 0; padding: 0; margin-top: 14px; font-size: 12px; }
.hub-frame .back-link { margin-bottom: 16px; }
.hub-frame .tool-run-layout { grid-template-columns: minmax(0,.86fr) minmax(0,1.14fr); }
.hub-frame .tool-form-card, .hub-frame .tool-result-card { padding: 23px; border-radius: 13px; }
.hub-frame .tool-form-card h2, .hub-frame .tool-result-card h2 { font-size: 20px; }
.hub-advanced { border-top: 1px solid var(--hub-line); padding-top: 14px; }
.hub-advanced summary { cursor: pointer; color: #687181; font-size: 13px; }
.hub-advanced > div { display: grid; gap: 14px; margin-top: 14px; }
.hub-frame .result-actions { position: sticky; top: 10px; z-index: 2; padding: 12px 0; background: #fff; margin: 0 0 10px; }
.hub-frame .result-actions .button { font-size: 12px; padding: 9px 12px; min-height: 40px; }
.hub-frame .result-empty { min-height: 230px; }
.hub-frame .tool-feedback { scroll-margin-top: 25px; }
.hub-frame .page-intro { padding-block: 35px 32px; }
.hub-frame .page-intro h1 { font-size: 38px; }
.hub-frame .auth-layout { gap: 45px; grid-template-columns: minmax(0,1fr) minmax(340px,1fr); }
.hub-frame .account-page { padding-block: 32px 70px; }
.hub-frame .auth-copy h1 { font-size: 40px; }
@media(min-width:1600px) { .hub-frame { max-width: 1500px; } }
@media(max-width:1250px) {
  :root { --hub-sidebar: 230px; }
  .hub-sidebar { padding-inline: 20px; }
  .hub-brand { font-size: 20px; gap: 10px; }
  .hub-topbar { padding-inline: 28px; gap: 24px; }
  .hub-directory { padding-inline: 28px; }
  .hub-tool { gap: 4px; padding-right: 12px; }
  .hub-tool:nth-child(even) { padding-left: 17px; }
  .hub-tool-main { gap: 12px; }
  .hub-tool-icon { width: 52px; height: 56px; flex-basis: 52px; }
  .hub-tool-icon .hub-icon { width: 30px; height: 30px; }
  .hub-tool h2 { font-size: 14px; }
  .hub-tool p { font-size: 12px; }
  .hub-favorite { margin-left: 0; }
  .hub-icon-button { width: 30px; }
  .hub-tool-meta { min-width: 47px; font-size: 12px; }
  .hub-tool-meta a { font-size: 12px; }
  .hub-frame .section-shell { margin-inline: 28px; }
}
@media(max-width:1020px) {
  .hub-tool-grid { grid-template-columns: 1fr; }
  .hub-flow-grid { grid-template-columns:1fr; }
  .hub-flow-card { min-height:0; }
  .hub-project-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .hub-tool { min-height: 110px; padding-right: 0; gap: 12px; }
  .hub-tool:nth-child(even) { padding-left: 0; }
  .hub-tool:nth-child(even)::before { display: none; }
  .hub-tool:nth-last-child(2) { border-bottom-color: var(--hub-line); }
  .hub-tool h2 { font-size: 16px; }
  .hub-tool p { font-size: 13px; }
  .hub-frame .tool-run-layout, .hub-frame .auth-layout { grid-template-columns: 1fr; }
}
@media(max-width:760px) {
  :root { --hub-sidebar: 0px; }
  .hub-sidebar { visibility: hidden; transform: translateX(-100%); width: 270px; transition: transform .18s ease; padding-top: 22px; }
  .hub-nav-open .hub-sidebar { visibility: visible; transform: translateX(0); }
  .hub-nav-open { overflow: hidden; }
  .hub-navigation { padding-top: 35px; }
  .hub-nav-caption { margin-top: 27px; }
  .hub-nav-categories { margin-bottom: 25px; }
  .hub-menu { display: inline-grid; }
  .hub-topbar { min-height: 78px; gap: 10px; padding: 16px; }
  .hub-search { height: 46px; padding-inline: 12px; gap: 8px; border-radius: 10px; }
  .hub-search > .hub-icon { width: 19px; height: 19px; }
  .hub-search input { font-size: 13px; }
  .hub-login { min-width: 55px; min-height: 44px; max-width: 90px; padding: 8px 10px; font-size: 12px; border-radius: 10px; }
  .hub-directory { padding: 24px 20px 0; }
  .hub-intro h1 { font-size: 26px; line-height: 1.45; }
  .hub-intro > p { font-size: 14px; }
  .hub-toolbar { margin-top: 24px; gap: 10px; flex-wrap: wrap; }
  .hub-starter-section { margin-top:25px; }
  .hub-section-heading { align-items:flex-start; flex-direction:column; gap:7px; }
  .hub-section-heading h2 { font-size:18px; }
  .hub-section-heading > p { max-width:none; text-align:left; }
  .hub-starter-grid { grid-template-columns:1fr; }
  .hub-starter-card { padding:15px; }
  .hub-profile-panel { margin-bottom:25px; }
  .hub-profile-form { grid-template-columns:1fr; padding:15px; gap:12px; }
  .hub-profile-actions { grid-column:auto; align-items:center; flex-wrap:wrap; }
  .hub-profile-status { padding:0 15px 15px; }
  .hub-flow-section { margin-top:25px; }
  .hub-project-home { padding:15px; }
  .hub-project-list { grid-template-columns:1fr; }
  .hub-toolbar > p { font-size: 12px; }
  .hub-sorts { gap: 9px; }
  .hub-sorts button { padding: 8px 15px; min-height: 42px; font-size: 13px; }
  .hub-tool { min-height: 123px; padding-block: 18px; gap: 5px; }
  .hub-tool-main { gap: 12px; align-items: flex-start; }
  .hub-tool-icon { width: 44px; height: 47px; flex-basis: 44px; border-radius: 10px; }
  .hub-tool-icon .hub-icon { width: 27px; height: 27px; }
  .hub-tool h2 { margin-bottom: 8px; font-size: 14px; }
  .hub-tool p { font-size: 12px; line-height: 1.7; }
  .hub-tool-meta { gap: 12px; min-width: 43px; font-size: 11px; }
  .hub-tool-meta a { font-size: 11px; max-width: 60px; }
  .hub-tool .hub-icon-button { width: 34px; height: 44px; }
  .hub-tool .hub-start { display: none; }
  .hub-next { margin-top: 24px; padding: 20px 18px; gap: 16px; align-items: flex-start; }
  .hub-next > img { width: 25px; height: 25px; margin-top: 4px; }
  .hub-next-heading { gap: 8px; }
  .hub-next h2 { font-size: 14px; }
  .hub-next p { font-size: 12px; }
  .hub-toast:not(:empty) { left: 20px; bottom: 18px; max-width: calc(100vw - 40px); }
  .hub-frame > footer { margin-inline: 20px; padding-top: 24px; }
  .hub-frame .section-shell { margin-inline: 20px; }
  .hub-frame .tool-intro h1 { font-size: 27px; }
  .hub-frame .tool-meta { gap: 8px; font-size: 11px; }
  .hub-frame .tool-form-card, .hub-frame .tool-result-card { padding: 18px; }
  .hub-frame .page-intro h1 { font-size: 31px; }
  .hub-frame .auth-copy h1 { font-size: 32px; }
  .hub-frame .auth-copy .auth-benefits, .hub-frame .auth-copy .account-legal, .hub-frame .auth-copy > .eyebrow { display: none; }
  .hub-frame .auth-copy h1 { font-size: 27px; margin-bottom: 12px; }
  .hub-frame .auth-copy .auth-lede { margin: 0; font-size: 13px; }
  .hub-frame .auth-layout { gap: 24px; }
  .hub-frame .account-page { padding-top: 20px; }
}
@media(max-width:520px) {
  .hub-tool { display:grid; grid-template-columns:minmax(0,1fr) 34px; column-gap:12px; row-gap:8px; min-height:0; }
  .hub-tool-main { grid-column:1; grid-row:1; }
  .hub-tool-copy { flex:1; }
  .hub-tool-meta { grid-column:1; grid-row:2; flex-direction:row; justify-content:flex-start; align-items:center; gap:14px; padding-left:56px; }
  .hub-tool .hub-icon-button { grid-column:2; grid-row:1 / span 2; align-self:center; }
}
@media(max-width:360px) { .hub-intro h1 { font-size:23px; } }
@media(prefers-reduced-motion:reduce) { .hub-sidebar { transition: none; } }
@media print { .hub-sidebar,.hub-topbar,.hub-overlay,.hub-toast,.hub-frame>footer { display:none!important; } .hub-frame { margin:0; } .hub-frame .section-shell { margin:0; } .hub-frame .result-actions { display:none!important; } }
