/* Secondary pages, 2026-11-25. Keep the public home composition in styles.css. */
:root { --workspace-radius: 16px; --workspace-line: #dce3eb; }
[hidden] { display: none !important; }
body[data-surface="workspace"] { background: #f5f7fa; }
body[data-surface="workspace"] .site-main { padding-bottom: 64px; }
body[data-surface="workspace"] :is(h1,h2,h3) { font-family: var(--font-body); letter-spacing: -.025em; }
body[data-surface="workspace"] .page-head { padding-top: 36px; padding-bottom: 28px; }
body[data-surface="workspace"] .page-head h1 { font-size: 32px; line-height: 1.25; margin-bottom: 12px; }
body[data-surface="workspace"] .page-head .lead { font-size: 16px; max-width: 780px; color: var(--color-text-secondary); }
body[data-surface="workspace"] .page-head .page-rule { display: none; }
body[data-surface="workspace"] .page-head .help { max-width: 780px; }
body[data-surface="workspace"] .page-shell { padding-bottom: 0; }
body[data-surface="workspace"] .btn { border-radius: 8px; min-height: 44px; font-size: 14px; }
body[data-surface="workspace"] :is(input,select,textarea) { border-radius: 8px; min-height: 46px; }
.workspace-caption { font-size: 13px; font-weight: 600; color: var(--color-text-secondary); margin: 0 0 10px; }
.workspace-section-title { font-size: 19px; margin: 0 0 18px; }
.workspace-note { padding: 14px 16px; border-left: 3px solid var(--color-navy); background: #eef3f8; color: #3d4c5c; font-size: 14px; border-radius: 0 8px 8px 0; }
.workspace-note p { margin: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.section-heading h2 { margin: 0; font-size: 19px; }
.account-shell { grid-template-columns: 184px minmax(0,1fr); gap: 32px; align-items: start; }
.account-rail { position: sticky; top: 100px; min-width: 0; }
.account-rail .workspace-caption { padding: 0 12px; margin-bottom: 14px; }
.account-nav { display: flex; flex-direction: column; gap: 5px; }
.account-nav a { padding: 10px 12px; border-radius: 8px; color: #526172; font-size: 14px; }
.account-nav a:hover { background: #eaf0f7; text-decoration: none; }
.account-nav a[aria-current="page"] { color: var(--color-navy); background: #e5edf6; font-weight: 700; box-shadow: inset 3px 0 0 var(--color-navy); }
.account-mobile { display: none; }
.account-main { min-width: 0; }
.account-main > .panel, .workspace-panel { background: #fff; border: 1px solid var(--workspace-line); border-radius: var(--workspace-radius); padding: 28px; box-shadow: none; }
.account-main > .panel h2 { font-size: 20px; margin-top: 0; }
.account-main > .panel + .panel { margin-top: 24px; }
.balance-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; margin-bottom: 24px; border-radius: var(--workspace-radius); background: #0a386b; color: #fff; }
.balance-panel .workspace-caption { color: #cfdfef; margin: 0; }
.balance-value { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 8px; }
.balance-value strong { font-size: 48px; line-height: 1.15; font-weight: 600; letter-spacing: -.03em; }
.balance-value span { color: #cfdfef; font-size: 14px; }
.balance-panel p { margin: 0; max-width: 540px; color: #cfdfef; font-size: 13px; }
.balance-panel .btn-primary { flex-shrink: 0; }
.account-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 24px; }
.ledger { font-size: 14px; }
.ledger th { background: #f6f8fb; color: #586779; font-weight: 500; }
.ledger th, .ledger td { padding: 14px 12px; }
.ledger th:last-child, .ledger td:last-child { text-align: right; }
.ledger td .help { font-size: 12px; }
.account-main .empty { padding: 36px 16px; background: #f8fafc; border: 1px dashed var(--workspace-line); border-radius: 10px; color: #667587; text-align: center; }
.purchase-layout { display: grid; grid-template-columns: minmax(0,1fr) 284px; gap: 24px; align-items: start; }
.purchase-options { min-width: 0; }
.purchase-options .workspace-panel { padding: 24px; }
.purchase-options h2, .order-summary h2 { margin: 0 0 8px; font-size: 19px; }
.purchase-options .help { margin: 0 0 20px; }
.purchase-options .sku-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 0; margin: 0; }
.purchase-options .sku-list.membership-skus { grid-template-columns: repeat(2,minmax(0,1fr)); }
.sku-card { position: relative; text-align: left; border: 1px solid #d5dce3; border-radius: 12px; background: #fff; padding: 20px 14px; min-width: 0; min-height: 148px; box-shadow: none; cursor: pointer; color: #122033; }
.sku-card:hover { border-color: #6986a7; background: #f8fbff; transform: none; }
.sku-card.is-selected { border-color: #0a386b; background: #eff5fc; box-shadow: inset 0 0 0 1px #0a386b; }
.sku-title { display: block; font-weight: 600; font-size: 15px; margin: 0 0 18px; }
.sku-card .price-tag { display: block; font-family: var(--font-body); font-size: 25px; line-height: 1.2; font-weight: 600; color: #0a386b; margin: 0 0 10px; }
.sku-card small { display: block; font-size: 12px; color: #526172; line-height: 1.65; }
.sku-selection { display: block; font-size: 12px; font-weight: 600; margin-top: 16px; color: #526172; }
.sku-selection svg { vertical-align: -3px; margin-right: 4px; }
.sku-card.is-selected .sku-selection { color: #0a386b; }
.order-summary { position: sticky; top: 100px; padding: 24px; border-radius: 16px; border: 1px solid var(--workspace-line); background: #fff; }
.order-summary dl { margin: 24px 0; }
.order-summary dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eef1f5; font-size: 14px; }
.order-summary dt { color: #526172; }
.order-summary dd { text-align: right; margin: 0; font-weight: 600; }
.order-summary .order-total dd { color: #0a386b; font-size: 26px; }
.order-summary > .btn { width: 100%; }
.order-summary .help { font-size: 12px; line-height: 1.7; margin: 14px 0 0; }
.purchase-balance { display: flex; gap: 10px; align-items: baseline; margin-bottom: 20px; color: #526172; font-size: 14px; }
.purchase-balance strong { font-size: 24px; color: #0a386b; font-weight: 600; }
.purchase-benefits { margin: 24px 0 0; padding: 18px 20px; background: #f7f9fc; border-radius: 10px; font-size: 13px; color: #526172; }
.purchase-benefits p { margin: 0 0 8px; }
.purchase-benefits p:last-child { margin-bottom: 0; }
.pending-order { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; margin-bottom: 20px; border: 1px solid #cbd9e8; background: #eaf1f9; border-radius: 12px; font-size: 14px; }
.pending-order p { margin: 4px 0 0; color: #526172; font-size: 13px; }
.pending-order .btn { flex-shrink: 0; }
.auth-shell { width: calc(100% - 32px); max-width: 480px; margin: 48px auto 16px; padding: 32px; border-radius: 20px; border: 1px solid var(--workspace-line); background: #fff; box-shadow: 0 12px 36px #12203308; }
.auth-shell h1 { font-size: 28px; margin: 0 0 10px; }
.auth-shell > .help { margin: 0 0 28px; font-size: 14px; }
.auth-shell .auth-panel { margin: 0; max-width: none; }
.auth-shell .field { margin-bottom: 20px; }
.auth-shell .field label { font-weight: 500; font-size: 14px; }
.phone-input { display: flex; align-items: center; gap: 12px; border: 1px solid #b8c2cd; border-radius: 8px; padding-left: 14px; }
.phone-input:focus-within { outline: 2px solid #0a386b; outline-offset: 2px; }
.phone-input input { border: 0; box-shadow: none; outline: none; min-width: 0; flex: 1; background: transparent; }
.phone-input span { font-size: 14px; padding-right: 12px; border-right: 1px solid #d5dce3; }
.code-input { display: flex; gap: 10px; }
.code-input input { flex: 1; min-width: 0; letter-spacing: .15em; }
.code-input .btn { flex-shrink: 0; }
#sms-status:empty { display: none; }
#sms-status { margin: -8px 0 20px; font-size: 13px; }
#sms-submit { width: 100%; margin-top: 4px; }
.sms-agreement { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; font-size: 14px; cursor: pointer; }
.sms-agreement input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: #0a386b; }
.sms-agreement a { text-decoration: underline; }
.auth-switch { text-align: center; padding-top: 22px; margin: 24px 0 0; border-top: 1px solid #e7ecf2; font-size: 14px; }
.auth-back { text-align: center; font-size: 14px; }
.models-toolbar { padding: 20px 24px; background: #fff; border: 1px solid var(--workspace-line); border-radius: 12px; }
.models-filter { min-width: 180px; }
.model-card { box-shadow: none; border-radius: 16px; padding: 24px; border: 1px solid var(--workspace-line); transition: border-color 150ms, box-shadow 150ms; }
.model-card:hover { transform: none; border-color: #8ba4c0; box-shadow: 0 5px 20px #12335508; }
.model-card h3 { font-size: 19px; }
.model-card .model-date { display: none; }
.model-card .model-summary { font-size: 14px; line-height: 1.75; }
.catalog-state { display: flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 16px; border-top: 1px solid #e6ecf2; color: #59697a; font-size: 13px; }
.model-card-actions .btn { background: transparent; padding: 0; border: 0; min-height: 32px; font-weight: 600; }
.model-workspace { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 24px; align-items: start; }
.model-content { min-width: 0; background: white; border: 1px solid var(--workspace-line); border-radius: 16px; overflow: hidden; }
.model-overview-header { padding: 28px; border-bottom: 1px solid #e7ecf2; }
.model-overview-header .model-lead { font-size: 16px; margin: 18px 0 0; }
.model-tabs { display: flex; gap: 24px; padding: 0 28px; border-bottom: 1px solid #e7ecf2; }
.model-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; color: #526172; min-height: 54px; padding: 10px 0; cursor: pointer; white-space: nowrap; font-size: 14px; }
.model-tabs button[aria-selected="true"] { color: #0a386b; border-bottom-color: #0a386b; font-weight: 700; }
.model-tab-panel { padding: 28px; }
.model-tab-panel h2 { font-size: 21px; margin: 0 0 16px; }
.model-tab-panel p { font-size: 14px; line-height: 1.85; }
.model-tab-panel .pack-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
.model-tab-panel .pack-card { padding: 16px; background: #f8fafc; }
.model-tab-panel .pack-card .muted { font-size: 12px; }
.model-tab-panel .tool-guide-grid { grid-template-columns: 1fr; }
.model-tab-panel .tool-guide { border: 0; border-top: 1px solid #e7ecf2; border-radius: 0; padding: 20px 0 0; }
.model-tab-panel .tool-guide h3 { font-size: 17px; }
.model-access { position: sticky; top: 100px; }
.model-access .workspace-panel { padding: 24px; }
.model-access h2 { font-size: 18px; margin: 0 0 16px; }
.model-access p { font-size: 14px; }
.model-access .btn { width: 100%; }
.model-access .help { font-size: 12px; }
.model-access .balance-value strong { font-size: 32px; color: #0a386b; }
.model-access .balance-value span { color: #526172; }
body[data-surface="workspace"] .projects-page { padding-top: 0; }
body[data-surface="workspace"] .projects-page-wash { display: none; }
body[data-surface="workspace"] .project-tile { border: 1px solid var(--workspace-line); border-radius: 16px; box-shadow: none; background: #fff; overflow: hidden; }
body[data-surface="workspace"] .project-tile h3 { font-size: 22px; }
body[data-surface="workspace"] .news-card { border: 1px solid var(--workspace-line); border-radius: 14px; background: #fff; padding: 24px; }
body[data-surface="workspace"] .article-body { max-width: 760px; margin: 0 auto; padding: 32px; background: #fff; border: 1px solid var(--workspace-line); border-radius: 16px; font-size: 17px; line-height: 2; white-space: pre-line; }
body[data-page="article"] .page-head { max-width: 856px; }
body[data-surface="workspace"] .form-card.form-card-inpage { background: #fff; padding: 28px; border: 1px solid var(--workspace-line); border-radius: 16px; }
body[data-surface="project"] :is(h1,h2,h3) { font-family: var(--font-body); }
body[data-surface="project"] .project-detail-wash { background: #edf2f8; opacity: .8; }
body[data-surface="project"] .project-hero h1 { font-size: 38px; }
body[data-surface="project"] .project-hero { padding-top: 36px; padding-bottom: 36px; gap: 40px; }
body[data-surface="project"] .project-hero-visual { border-radius: 16px; }
body[data-surface="project"] .project-cta-row { border-top: 1px solid var(--workspace-line); margin-top: 24px; padding-top: 24px; }
/* Dialogs keep one entry/exit path for keyboard, pointer and payment lifecycle. */
.dialog-overlay { padding: 24px; background: rgba(10,26,46,.48); backdrop-filter: blur(4px); }
.dialog { width: min(100%,540px); max-width: 540px; padding: 0; border: 1px solid #dce3eb; border-radius: 18px; max-height: min(90dvh,820px); overflow: hidden; box-shadow: 0 24px 70px #06172d38; }
.dialog.dialog-confirm { max-width: 440px; }
.dialog.dialog-payment { width: min(100%,680px); max-width: 680px; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 28px; border-bottom: 1px solid #e7ecf2; flex-shrink: 0; }
.dialog .dialog-header h2 { font: 600 21px/1.4 var(--font-body); margin: 0; color: #122033; }
.dialog-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; flex-shrink: 0; border: 0; border-radius: 8px; background: #f1f4f8; color: #526172; cursor: pointer; }
.dialog-close:hover { background: #e3eaf3; }
.dialog[data-lock="1"] .dialog-close { visibility: hidden; }
.dialog .dialog-body { padding: 24px 28px; overflow: auto; overscroll-behavior: contain; }
.dialog-body > :first-child { margin-top: 0; }
.dialog-body > :last-child { margin-bottom: 0; }
.dialog .dialog-actions { padding: 18px 28px; margin: 0; border-top: 1px solid #e7ecf2; background: #f8fafc; flex-shrink: 0; }
.dialog-actions .btn { font-size: 14px; border-radius: 8px; min-height: 44px; }
.payment-summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; background: #f3f6fa; border-radius: 12px; margin-bottom: 20px; }
.payment-summary p { margin: 0; font-size: 13px; color: #526172; }
.payment-summary strong { display: block; font-size: 16px; }
.payment-amount { color: #0a386b; font-size: 30px; font-weight: 600; white-space: nowrap; }
.payment-reference { font-size: 12px; color: #627386; overflow-wrap: anywhere; }
.dialog .pay-code { margin: 16px auto; text-align: center; }
.dialog .pay-code svg { width: 188px; height: 188px; margin: 0 auto; padding: 8px; background: #fff; border: 1px solid #dce3eb; border-radius: 8px; }
.dialog .pay-code p { margin: 8px 0 0; font-size: 13px; }
#pay-status { margin: 18px 0; padding: 14px 16px; background: #eef4fa; border-radius: 10px; font-size: 14px; color: #0a386b; }
#pay-status.is-success { background: #e8f6ee; color: #0f6b3a; }
#pay-status.is-error { background: #fff6e5; color: #8a5a00; }
.payment-dismiss-note { font-size: 12px; color: #627386; }
/* Header must fit even with an authenticated account at 360px. */
.header-inner { gap: 16px; }
.header-tools { min-width: 0; }
.account-bar { min-width: 0; }
@media (max-width:1199px) {
  .header-inner { gap: 12px; }
  .nav-pills { gap: 0; }
  .nav-pills a { padding-left: 10px; padding-right: 10px; }
  .account-bar .badge-member { display: none; }
  .purchase-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .order-summary dl { margin: 12px 0 20px; }
  .order-summary > .btn { max-width: 280px; }
  .model-tab-panel .pack-list { grid-template-columns: 1fr; }
}
@media (max-width:960px) {
  .account-shell { grid-template-columns: 1fr; gap: 20px; }
  .account-rail { position: static; }
  .account-rail > .workspace-caption, .account-rail .account-nav { display: none; }
  .account-mobile { display: flex; align-items: center; gap: 14px; font-size: 14px; color: #526172; }
  .account-mobile select { flex: 1; max-width: 360px; min-width: 0; border: 1px solid #d5dce3; background: #fff; padding: 10px 12px; }
  .model-workspace { grid-template-columns: minmax(0,1fr) 230px; gap: 18px; }
  .header-inner { padding: 0 24px; }
  .header-tools { gap: 8px; }
  .account-bar { gap: 6px; }
}
@media (max-width:720px) {
  .header-inner { padding: 0 16px; flex-wrap: wrap; gap: 0 12px; }
  .brand { margin-right: auto; }
  .brand img { width: 28px; height: 28px; }
  .brand span { font-size: 18px; }
  .header-tools { gap: 6px; }
  .header-tools .lang-switch { position: absolute; left: 16px; top: 58px; }
  .header-inner { min-height: 104px; align-content: flex-start; align-items: center; padding-top: 12px; padding-bottom: 50px; }
  :root { --header-h: 104px; }
  .header-tools .account-bar > .chip-points { display: none; }
  .header-tools .btn, .menu-toggle { min-height: 36px; padding: 7px 10px; font-size: 13px; }
  .header-tools .menu-toggle { position: absolute; right: 16px; top: 58px; }
  .lang-switch button { min-height: 32px; padding: 4px 10px; }
  .header-inner > a.btn-text { position: absolute; right: 16px; top: 58px; min-height: 32px; padding: 4px 0; font-size: 13px; }
  body[data-surface="workspace"] .page-head { padding-top: 26px; padding-bottom: 22px; }
  body[data-surface="workspace"] .page-head h1 { font-size: 26px; }
  body[data-surface="workspace"] .page-head .lead { font-size: 14px; }
  .account-shell { gap: 20px; }
  .balance-panel { padding: 24px; align-items: flex-start; flex-direction: column; gap: 18px; }
  .balance-value strong { font-size: 44px; }
  .balance-panel .btn-primary { width: 100%; }
  .account-main > .panel, .workspace-panel { padding: 20px; }
  .account-shortcuts { margin-bottom: 20px; }
  .ledger-responsive thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .ledger-responsive, .ledger-responsive tbody { display: block; width: 100%; }
  .ledger-responsive tr { display: grid; grid-template-columns: minmax(0,1fr) auto; padding: 16px 0; border-bottom: 1px solid #e7ecf2; }
  .ledger-responsive td { border: 0; padding: 3px 0; font-size: 13px; }
  .ledger-responsive .ledger-date { grid-column: 1; color: #627386; font-size: 12px; }
  .ledger-responsive .ledger-project { grid-column: 1; font-weight: 600; }
  .ledger-responsive .ledger-description { grid-column: 1; }
  .ledger-responsive .ledger-amount { grid-column: 2; grid-row: 1 / span 3; font-size: 18px; align-self: center; padding-left: 12px; }
  .purchase-options .workspace-panel { padding: 20px; }
  .purchase-options .sku-list { grid-template-columns: 1fr; gap: 10px; }
  .purchase-options .sku-list.membership-skus { grid-template-columns: 1fr; }
  .sku-card { min-height: 100px; padding: 16px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
  .sku-card .sku-title { margin: 0; font-size: 15px; }
  .sku-card .price-tag { margin: 0; font-size: 24px; grid-column: 2; grid-row: 1 / span 2; }
  .sku-selection { margin-top: 4px; grid-column: 1 / -1; }
  .order-summary { padding: 20px; }
  .order-summary > .btn { max-width: none; }
  .pending-order { align-items: flex-start; flex-direction: column; }
  .auth-shell { margin-top: 28px; padding: 24px; }
  .auth-shell h1 { font-size: 26px; }
  .auth-shell .btn { padding-left: 14px; padding-right: 14px; }
  .models-toolbar { padding: 16px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .models-filter { min-width: 0; width: 100%; }
  .models-filter select { width: 100%; min-width: 0; }
  .models-grid { grid-template-columns: 1fr; }
  .model-card { padding: 20px; }
  .model-workspace { grid-template-columns: 1fr; }
  .model-access { position: static; }
  .model-overview-header, .model-tab-panel { padding: 20px; }
  .model-tabs { padding: 0 20px; gap: 20px; overflow-x: auto; }
  .model-tab-panel .tool-guide-grid { display: block; }
  .model-access .workspace-panel { padding: 20px; }
  body[data-surface="workspace"] .article-body { padding: 22px; font-size: 16px; }
  body[data-surface="workspace"] .project-tile h3 { font-size: 20px; }
  body[data-surface="project"] .project-hero h1 { font-size: 30px; }
  body[data-surface="project"] .project-hero { padding-top: 24px; gap: 24px; }
  .dialog-overlay { padding: 12px; }
  .dialog { max-height: 92dvh; border-radius: 16px; }
  .dialog-header { padding: 18px 20px; }
  .dialog .dialog-header h2 { font-size: 19px; }
  .dialog .dialog-body { padding: 20px; }
  .dialog .dialog-actions { padding: 16px 20px; gap: 10px; }
  .dialog-actions .btn { flex: 1; white-space: normal; }
  .payment-summary { padding: 14px; align-items: flex-start; }
  .payment-summary strong { font-size: 14px; }
  .payment-amount { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .model-card { transition: none; } }
/* Each news row has a single, full-card link without duplicating tab stops. */
body[data-surface="workspace"] .news-card { position: relative; }
body[data-surface="workspace"] .news-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
body[data-surface="workspace"] .news-card:hover { border-color: #8ba4c0; }
body[data-surface="workspace"] .news-card:focus-within { outline: 2px solid #0a386b; outline-offset: 3px; }
