/* Task navigation, upload-first workspaces and a reachable ORIGINAL site footer. */
.v5-sidebar .v5-nav-section { margin: 3px 0; border: 0; }
.v5-sidebar summary { cursor: pointer; list-style: none; }
.v5-sidebar summary::-webkit-details-marker { display: none; }
.v5-sidebar summary::after { content: '+'; margin-left: 6px; flex: 0 0 auto; color: #d2dcd5; }
.v5-sidebar details[open] > summary::after { content: '−'; }
.v5-sidebar summary small { margin-left: auto; }
.v5-sidebar .v4-nav-group { align-items: center; margin: 0; font-size: 16px !important; }
.v5-sidebar .v5-nav-section[open] > summary { background: #263b30; color: #d9eee0 !important; }
.v5-sidebar .v5-nav-content { padding: 6px 7px 12px 12px; }
.v5-sidebar .v5-nav-subgroup { border: 0; padding: 0; margin: 3px 0; }
.v5-sidebar .v5-nav-subgroup > summary { display: flex; align-items: center; gap: 6px; padding: 10px 7px; font-size: 15px; color: #e2e8e4; }
.v5-sidebar .v5-nav-subgroup small { font-size: 12px; color: #c1ccc5; }
.v5-sidebar .v5-nav-list, .v5-sidebar .v5-nav-subgroup ul { list-style: none; padding: 0 0 0 10px; margin: 0; }
.v5-sidebar .v5-nav-content a { display: block; min-height: 44px; padding: 10px 6px; color: #e2e8e4; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; text-decoration: none; }
.v5-sidebar .v5-nav-content a:hover, .v5-sidebar a[aria-current=page] { color: #fff; background: #2b4434; border-radius: 4px; }
.v5-sidebar .v5-category-overview { border-bottom: 1px solid #3b4740; margin: 0 0 6px; }
.v5-sidebar .v5-nav-label { color: #edf1ee; font-size: 14px; margin: 12px 6px 4px; }
.v5-sidebar summary:focus-visible, .v5-sidebar a:focus-visible { outline: 2px solid #d0dfd4; outline-offset: 2px; }

/* Keep every shared sidebar label metrically stable across a full-page navigation.
 * The current AI link used to switch to a synthetic bold weight for one paint,
 * which made professional and enterprise tool links visibly jump before settling. */
.v5-sidebar .v4-nav-group,
.v5-sidebar .v5-nav-section > summary,
.v5-sidebar .v5-nav-subgroup > summary,
.v5-sidebar .v5-nav-content a,
.v5-sidebar a.v5-nav-direct {
  font-family: inherit;
  font-synthesis: none;
  font-weight: 400;
}
.v5-sidebar .v5-nav-content a[aria-current="page"] {
  font-weight: 400 !important;
}
.v5-sidebar .v5-nav-content a,
.v5-sidebar a.v5-nav-direct {
  transition-property: background-color, color, border-color !important;
}
.v5-card-subgroup { margin: 20px 0 28px; }
.v5-card-subgroup > h3 { border-bottom: 1px solid #e1e6e3; padding-bottom: 10px; font-size: 16px; color: #202823; }
.v5-card-subgroup h3 small { font-weight: 400; color: #64736a; }
.v5-pdf-workbench .yuqi-suite-header { display: none; }
.v5-pdf-workbench .yuqi-suite-upload-row { padding: 22px 18px; border: 1px dashed #b4c1b8; border-radius: 7px; background: #fafcfb; margin: 0 0 20px; }
.v5-pdf-workbench .yuqi-suite-card--pdf { border: 0; padding: 0; background: #fff; }
.v5-pdf-workbench [data-v4-pdf-initial] { margin: 0 0 18px; }
.v5-pdf-workbench .v4-pdf-current { margin-top: 10px; }
.v5-media-heading { font-size: 19px; margin: 8px 0 14px; color: #111; }
.v5-media-modes, .v5-media-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.v5-media-modes button, .v5-media-actions button { min-height: 42px; padding: 8px 14px; border: 1px solid #bdc8c1; background: #fff; color: #202923; border-radius: 5px; }
.v5-media-modes button[aria-pressed=true], .v5-media-actions button[aria-pressed=true] { background: #edf5ef; color: #14552d; border-color: #477b56; font-weight: 600; }
.v5-media-settings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; max-width: 640px; }
.v5-media-settings label { min-width: 0; }
.v5-media-help { font-size: 13px; color: #4e6055; line-height: 1.8; }
.v5-media-settings [hidden], .v5-pdf-workbench [hidden] { display: none !important; }
/* The old desktop shell trapped wheel scrolling and made the footer unreachable. */
body .yuqi-tools-page.yuqi-tools-ux-v2 .yuqi-tools-app { height: auto; min-height: calc(100dvh - 80px); overflow: visible; overscroll-behavior: auto; align-items: start; }
body .yuqi-tools-page.yuqi-tools-ux-v2 .yuqi-tools-workspace { height: auto; min-height: calc(100dvh - 80px); overflow: visible; overscroll-behavior: auto; }
body .yuqi-tools-page.yuqi-tools-ux-v2 .yuqi-tools-reference-sidebar { position: sticky; top: var(--f-header-height,80px); height: auto; max-height: calc(100dvh - var(--f-header-height,80px)); overflow: auto; }
body .v5-sidebar .v4-navigation { max-height: none; overflow: visible; }
body.yuqi-tools-hub-site footer.site-footer { display: block !important; position: relative; visibility: visible; }
.v4-date-dialog .v4-warning:empty { display: none; }
/* Match the PDF row specificity to the tree links above; never stack its mark. */
.v5-sidebar .yuqi-pdf-nav { margin: 8px 0 12px; }
.v5-sidebar .v5-nav-content a.yuqi-pdf-task { display: flex; align-items: center; gap: 8px; }
.v5-sidebar .yuqi-pdf-task > span:last-child { flex: 1 1 auto; min-width: 0; }
.v5-sidebar .yuqi-pdf-task strong { font-size: inherit; line-height: 1.5; font-weight: 400; }
.v5-sidebar .yuqi-pdf-nav .yuqi-pdf-task-group h3 { font-size: 14px; line-height: 1.5; color: #cbd6ce; }
/* The tree is the navigation. Retain legacy URLs, not the redundant top switch. */
.yuqi-tools-page .yuqi-tools-mode-tabs { display: none !important; }
/* Radio controls are not text fields: undo the inherited 46px minimum height. */
.yuqi-tools-page.yuqi-tools-ux-v2 .yuqi-tax-format { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 16px; }
.yuqi-tools-page.yuqi-tools-ux-v2 .yuqi-tax-format > label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; line-height: 1.5; }
.yuqi-tools-page.yuqi-tools-ux-v2 .yuqi-tax-radio { cursor: pointer; white-space: nowrap; }
.yuqi-tools-page.yuqi-tools-ux-v2 .yuqi-tax-format input[type="radio"] { appearance: auto; -webkit-appearance: radio; box-sizing: border-box; flex: 0 0 18px; width: 18px; height: 18px; min-width: 18px; min-height: 18px; max-width: 18px; max-height: 18px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: transparent; accent-color: #237641; }
.yuqi-tools-page.yuqi-tools-ux-v2 .yuqi-tax-format input[type="radio"]::after { content: none; display: none; }
/* The active V2 shell sizes the rail through this custom property. */
@media (min-width: 721px) {
 .yuqi-tools-page.yuqi-tools-ux-v2 { --ux-sidebar-width: 288px; }
}
@media (max-width: 720px) {
 .v5-sidebar .v5-nav-content a, .v5-sidebar .v5-nav-subgroup > summary { font-size: 16px; }
 body .yuqi-tools-page.yuqi-tools-ux-v2 .yuqi-tools-reference-sidebar { position: static; height: auto; max-height: none; }
 body .v5-sidebar .v4-navigation { max-height: 68dvh; overflow: auto; }
 .v5-media-settings { grid-template-columns: 1fr; }
 .v5-pdf-workbench .yuqi-suite-upload-row { padding: 15px 10px; }
}
@media (max-width: 480px) {
 .yuqi-tools-page.yuqi-tools-ux-v2 .yuqi-tax-format > label:first-child { flex-basis: 100%; min-height: 24px; }
}
@media print { body .yuqi-tools-page.yuqi-tools-ux-v2 .yuqi-tools-reference-sidebar { display: none !important; } }

/* The prompt library is a direct first-level heading, never an interactive child. */
.v5-sidebar a.v5-nav-direct { display: flex; min-height: 46px; padding: 10px 8px; margin: 8px 0 3px; color: #e2e8e4; text-decoration: none; line-height: 1.6; border-top: 1px solid #35433a; }
.v5-sidebar a.v5-nav-direct::after { content: none; }

/* Versioned disclaimer shown before the first use of common tools. */
body.yuqi-tools-disclaimer-open { overflow: hidden; }
.yuqi-tools-disclaimer { position: fixed; inset: 0; z-index: 100200; display: grid; place-items: center; padding: 16px; }
.yuqi-tools-disclaimer[hidden] { display: none !important; }
.yuqi-tools-disclaimer-backdrop { position: absolute; inset: 0; background: rgba(10,18,13,.68); }
.yuqi-tools-disclaimer-panel { position: relative; z-index: 1; box-sizing: border-box; width: min(760px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 30px 32px; border: 1px solid #d3ddd6; border-radius: 10px; background: #fff; box-shadow: 0 24px 70px rgba(0,0,0,.28); color: #1c2b22; overflow-wrap: anywhere; }
.yuqi-tools-disclaimer-panel h2 { margin: 0 0 12px; font-size: 24px; line-height: 1.35; }
.yuqi-tools-disclaimer-panel p { margin: 0 0 12px; color: #4d5f54; font-size: 15px; line-height: 1.78; }
.yuqi-tools-disclaimer-intro { margin-bottom: 18px !important; }
.yuqi-tools-disclaimer-list { margin: 0 0 22px; padding: 0; list-style: none; color: #35473d; font-size: 15px; line-height: 1.78; }
.yuqi-tools-disclaimer-item { margin: 0; padding: 0; }
.yuqi-tools-disclaimer-item + .yuqi-tools-disclaimer-item { margin-top: 16px; }
.yuqi-tools-disclaimer-item-title { display: block; margin: 0 0 4px; color: #1c2b22; font-size: 15px; line-height: 1.5; font-weight: 750; }
.yuqi-tools-disclaimer-item-text { margin: 0 0 10px !important; }
.yuqi-tools-disclaimer-item-text:last-child { margin-bottom: 0 !important; }
.yuqi-tools-disclaimer-support { margin-top: 20px !important; padding-top: 16px; border-top: 1px solid #e2e9e3; color: #35473d !important; }
.yuqi-tools-disclaimer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.yuqi-tools-disclaimer-actions button { min-height: 44px; padding: 10px 17px; border-radius: 6px; cursor: pointer; font-size: 15px; line-height: 1.4; font-weight: 700; }
.yuqi-tools-disclaimer-accept { border: 1px solid #237641; background: #237641; color: #fff; }
.yuqi-tools-disclaimer-decline { border: 1px solid #9aa9a0; background: #fff; color: #33463a; }
.yuqi-tools-disclaimer-actions button:focus-visible { outline: 3px solid rgba(35,118,65,.25); outline-offset: 2px; }
@media (max-width: 560px) {
 .yuqi-tools-disclaimer { padding: 10px; }
 .yuqi-tools-disclaimer-panel { width: 100%; max-height: calc(100dvh - 20px); padding: 22px 18px 18px; border-radius: 8px; }
 .yuqi-tools-disclaimer-panel h2 { font-size: 22px; }
 .yuqi-tools-disclaimer-panel p,
 .yuqi-tools-disclaimer-list { font-size: 15px; line-height: 1.75; }
 .yuqi-tools-disclaimer-item-title { font-size: 15px; }
 .yuqi-tools-disclaimer-actions { display: grid; grid-template-columns: 1fr; }
 .yuqi-tools-disclaimer-actions button { width: 100%; min-height: 46px; }
}

/* Prompt category parents expand to one level of actual content filters. */
.v5-sidebar .v5-prompt-group{margin:2px 0}
.v5-sidebar .v5-prompt-group>summary{min-height:40px;white-space:normal;overflow-wrap:anywhere}
.v5-sidebar .v5-prompt-group>.v5-prompt-category-list{margin-left:9px;border-left:2px solid #dbe4de;padding-left:7px}
.v5-sidebar .v5-prompt-group .v5-prompt-category-list a{white-space:normal;overflow-wrap:anywhere}
