.help-guide {
    --g-ink: #17343f;
    --g-muted: #60747e;
    --g-accent: #087d73;
    --g-border: #dce6e9;
    max-width: 1320px;
    margin: 0 auto;
    color: var(--g-ink);
    font-size: 14px;
    line-height: 1.65;
}

.help-guide *, .help-guide *::before, .help-guide *::after { box-sizing: border-box; }
.help-guide a { color: #087368; text-decoration: none; }
.help-guide button { font: inherit; cursor: pointer; }
.help-guide [hidden] { display: none !important; }
.help-guide :focus-visible { outline: 3px solid #d18c24; outline-offset: 4px; }
.guide-icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.guide-icon { display: inline-block; flex-shrink: 0; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* A small welcome panel leaves room for the actual guides. */
.guide-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    padding: 24px 28px;
    border: 1px solid #21575b;
    border-radius: 18px;
    background: linear-gradient(115deg, #103f45, #15585b);
    color: #fff;
    box-shadow: 0 8px 24px #123e4510;
}
.guide-hero::before { content: ""; position: absolute; z-index: -1; right: 55px; top: -190px; width: 350px; height: 350px; border: 1px solid #ffffff18; border-radius: 50%; box-shadow: 0 0 0 42px #ffffff06, 0 0 0 84px #ffffff04; pointer-events: none; }
.guide-hero::after { content: ""; position: absolute; z-index: -1; right: 0; bottom: 0; width: 300px; height: 130px; background-image: radial-gradient(#b5e6d533 1px, transparent 1px); background-size: 14px 14px; mask-image: linear-gradient(90deg, transparent, #000); pointer-events: none; }
.guide-hero-copy { min-width: 0; }
.guide-eyebrow { display: flex; align-items: center; gap: 8px; color: #a8e6d5; font-size: 10px; font-weight: 800; letter-spacing: .15em; line-height: 1.5; }
.guide-eyebrow .guide-icon { width: 16px; height: 16px; }
.guide-hero h1 { margin: 6px 0 7px; color: #fff; font-size: clamp(25px, 2.5vw, 32px); font-weight: 800; letter-spacing: -.035em; line-height: 1.2; }
.guide-hero p { max-width: 780px; margin: 0; color: #d4e8e7; font-size: 14px; line-height: 1.55; }
.guide-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 14px; color: #c9e0df; font-size: 11px; line-height: 1.4; }
.guide-tags span { display: inline-flex; align-items: center; gap: 4px; }
.guide-tags span + span::before { content: ""; width: 3px; height: 3px; margin-right: 10px; border-radius: 50%; background: #85baae; }
.guide-tags b { color: #fff; font-weight: 750; }
.guide-print { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 8px; min-height: 38px; margin-top: 1px; padding: 8px 13px; border: 1px solid #d3eee0; border-radius: 9px; background: #effaf4; color: #164b48; font-size: 12px !important; font-weight: 750 !important; white-space: nowrap; transition: background .15s ease, transform .15s ease; }
.guide-print .guide-icon { width: 16px; height: 16px; }
.guide-print:hover { background: #fff; transform: translateY(-1px); }
.guide-print:disabled { opacity: .65; cursor: wait; }

.guide-toolbar { margin: 16px 0 20px; padding: 16px 18px 12px; border: 1px solid var(--g-border); border-radius: 14px; background: #fff; box-shadow: 0 3px 12px #17343f03; }
.guide-toolbar-main { display: grid; grid-template-columns: minmax(230px, .85fr) minmax(0, 1.65fr); align-items: end; gap: 22px; }
.guide-toolbar label, .guide-field-label { display: block; margin-bottom: 6px; color: #425c68; font-size: 11px; font-weight: 750; line-height: 1.4; }
.guide-search-field, .guide-role-field { min-width: 0; }
.guide-search-box { position: relative; }
.guide-search-box > .guide-icon { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; color: #76909b; transform: translateY(-50%); pointer-events: none; }
.guide-toolbar input { display: block; width: 100%; height: 50px; padding: 11px 34px 11px 40px; border: 1px solid #d4e1e5; border-radius: 9px; background: #f8fafb; color: var(--g-ink); font-size: 13px; line-height: 1.4; box-shadow: none; }
.guide-toolbar input::placeholder { color: #7a8c95; opacity: 1; }
.guide-toolbar input:focus { border-color: var(--g-accent); background: #fff; box-shadow: 0 0 0 3px #087d7310; }
.guide-hint { margin: 8px 0 0; color: var(--g-muted); font-size: 11px; line-height: 1.5; }
.guide-role-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.help-guide .guide-role { display: flex; align-items: center; gap: 9px; min-height: 50px; padding: 7px 10px; border: 1px solid #dee7ea; border-radius: 9px; background: #fff; color: #39545f; transition: border-color .15s ease, background .15s ease; }
.guide-role-icon { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: #f0f5f7; color: #6a858e; }
.guide-role-icon .guide-icon { width: 19px; height: 19px; }
.guide-role-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.35; }
.guide-role-copy strong { font-size: 12px; font-weight: 750; white-space: nowrap; }
.guide-role-copy > span { margin-top: 2px; color: #778b94; font-size: 10px; }
.help-guide .guide-role:hover { border-color: #91c9bd; background: #f7fbf9; }
.help-guide .guide-role[aria-current="true"] { border-color: #188b7e; background: #edf8f3; color: #086f62; box-shadow: 0 0 0 1px #188b7e; }
.guide-role[aria-current="true"] .guide-role-icon { background: #d9eee5; color: #087668; }
.guide-role[aria-current="true"] .guide-role-copy > span { color: #438276; }

.guide-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 24px; }
.guide-toc { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; overscroll-behavior: contain; padding: 17px 12px 12px; border: 1px solid var(--g-border); border-radius: 13px; background: #fff; scrollbar-width: thin; scrollbar-color: #bfcfd3 transparent; }
.guide-toc > strong { display: block; margin: 0 9px 12px; color: #7d9098; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.help-guide .guide-toc a { display: block; padding: 6px 9px; border-radius: 6px; color: #607681; font-size: 11px; line-height: 1.5; }
.help-guide .guide-toc a:hover { background: #edf6f2; color: #087368; }
.help-guide .guide-toc .guide-toc-start { display: flex; align-items: center; gap: 8px; padding: 9px; background: #f0f7f4; color: #24685d; font-weight: 700; }
.guide-toc-start .guide-icon { width: 15px; height: 15px; }
.help-guide .guide-toc .guide-toc-heading { margin: 12px 0 5px; color: #203f49; font-size: 12px; font-weight: 800; }
.guide-toc [data-toc-article] { position: relative; margin-left: 9px; padding-left: 13px !important; border-left: 1px solid #e3ebee; border-radius: 0 6px 6px 0 !important; }
.help-guide .guide-toc .guide-toc-help { display: flex; justify-content: space-between; margin-top: 13px; padding-top: 13px; border-top: 1px solid #e9eff1; border-radius: 0; color: #447369; font-weight: 700; }
.guide-main { min-width: 0; }
.guide-content-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; margin-bottom: 14px; }
.guide-results { margin: 0; color: #768a94; font-size: 11px; line-height: 1.5; }
.guide-results:empty { display: none; }
.guide-expand-controls { display: inline-flex; flex-shrink: 0; align-items: center; gap: 4px; }
.guide-expand-controls button { padding: 5px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #4e6b75; font-size: 10px; font-weight: 700; line-height: 1.4; }
.guide-expand-controls button:hover { border-color: #d6e4e3; background: #fff; color: #087368; }
.guide-section { margin-bottom: 27px; scroll-margin-top: 105px; }
.guide-section-heading { margin-bottom: 13px; }
.guide-section-heading > span, .guide-support-label { color: #158778; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.guide-section-title { display: flex; align-items: center; gap: 10px; margin: 3px 0; }
.guide-section h2 { margin: 0; color: #1b3b46; font-size: 22px; font-weight: 800; letter-spacing: -.025em; line-height: 1.4; }
.guide-topic-count { padding: 2px 7px; border: 1px solid #dfe9eb; border-radius: 5px; color: #6c858f; font-size: 9px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.guide-section-heading p { margin: 0; color: var(--g-muted); font-size: 12px; }
.guide-start { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; padding: 13px 15px; border: 1px solid #eadfc6; border-radius: 9px; background: #fffbf2; font-size: 12px; line-height: 1.6; }
.guide-start-marker { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid #f0dfbc; border-radius: 7px; background: #fff6df; color: #aa7d2d; font-size: 10px; font-weight: 800; }
.guide-start strong { color: #83652e; font-size: 11px; }
.guide-start p { margin: 2px 0 0; color: #82745c; }

.guide-article { margin-bottom: 9px; overflow: hidden; border: 1px solid var(--g-border); border-radius: 10px; background: #fff; scroll-margin-top: 105px; transition: border-color .15s ease, box-shadow .15s ease; }
.guide-article:hover { border-color: #bad3d4; }
.guide-article summary { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 14px 17px; cursor: pointer; list-style: none; }
.guide-article summary::-webkit-details-marker { display: none; }
.guide-article summary h3 { flex: 1; min-width: 0; margin: 0; color: #2d4c58; font-size: 14px; font-weight: 700; line-height: 1.55; }
.guide-article-meta { display: inline-flex; flex-shrink: 0; align-items: center; gap: 12px; color: #91a0a7; font-size: 10px; white-space: nowrap; }
.guide-visual-label { display: inline-flex; align-items: center; gap: 4px; color: #7c939b; }
.guide-visual-label .guide-icon { width: 13px; height: 13px; }
.guide-article-toggle { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 25px; height: 25px; border: 1px solid #e5edef; border-radius: 7px; background: #f8fafb; color: #6e8b92; transition: background .15s ease; }
.guide-article-toggle .guide-icon { width: 15px; height: 15px; transition: transform .15s ease; }
.guide-article details[open] > summary { border-bottom: 1px solid #e4edee; background: #fbfdfc; }
.guide-article details[open] > summary h3 { color: #087567; }
.guide-article details[open] > summary .guide-article-toggle { border-color: #d0e9df; background: #e7f5ee; color: #087567; }
.guide-article details[open] > summary .guide-article-toggle .guide-icon { transform: rotate(180deg); }
.guide-article-body { padding: 18px 20px 16px; }
.guide-path { margin: 0 0 10px; padding: 9px 12px; border: 1px solid #e0efea; border-radius: 7px; background: #f2f9f6; color: #3a7166; font-size: 12px; overflow-wrap: anywhere; }
.guide-path strong { margin-right: 4px; color: #2a655a; font-weight: 750; }
.guide-before { margin: 0 0 19px; color: #71858e; font-size: 12px; }
.guide-before strong { color: #4d6974; font-weight: 700; }
.guide-body-label { margin: 0 0 8px; color: #3d5a66; font-size: 12px; font-weight: 800; }
.guide-article ol { margin: 0 0 18px; padding-left: 26px; list-style: decimal outside; }
.guide-article li { padding: 3px 0 8px 5px; color: #506b76; font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; }
.guide-article li::marker { color: #168573; font-size: 12px; font-weight: 800; }
.guide-callouts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.guide-result, .guide-troubleshooting { padding: 13px 14px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; line-height: 1.65; }
.guide-result { border-color: #dcece1; background: #f1f9f2; color: #587562; }
.guide-troubleshooting { border-color: #eee6d5; background: #fffbf2; color: #8b7b60; }
.guide-callouts strong { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; font-size: 11px; font-weight: 800; }
.guide-result strong { color: #3d7d52; }
.guide-troubleshooting strong { color: #9c7c3d; }
.guide-callouts strong > span { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; line-height: 1; }
.guide-callouts p { margin: 0; }
.guide-article-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding-top: 13px; border-top: 1px solid #eaf0f1; font-size: 11px; }
.guide-article-footer a { font-weight: 700; }
.guide-article-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.help-guide .guide-permalink { color: #82959d; font-weight: 500; }
.guide-screenshot { margin: 17px 0 0; overflow: hidden; border: 1px solid #dce7ea; border-radius: 9px; background: #f4f8f9; }
.guide-screenshot a { display: block; }
.guide-screenshot img { display: block; width: 100%; height: auto; max-height: 400px; object-fit: contain; object-position: top center; background: #f0f5f6; }
.guide-screenshot a > span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; border-top: 1px solid #dfeaec; background: #f7fbfa; color: #358273; font-size: 11px; font-weight: 700; }
.guide-screenshot a > span .guide-icon { width: 14px; height: 14px; }
.guide-screenshot a:hover > span { background: #e8f5ee; }
.guide-screenshot figcaption { padding: 6px 10px; color: #879ba3; font-size: 10px; text-align: center; }
#guide-empty { padding: 20px; border: 1px dashed #cddfe1; border-radius: 10px; background: #fff; color: var(--g-muted); font-size: 13px; }
.guide-support { position: relative; margin-bottom: 20px; padding: 20px 23px; border: 1px solid #d7e9e3; border-radius: 13px; background: linear-gradient(110deg, #eef7f3, #f8fbf9); scroll-margin-top: 105px; }
.guide-support h2 { margin: 3px 0 8px; color: #315f56; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.guide-support p { max-width: 790px; margin: 0 0 11px; color: #668078; font-size: 12px; }
.guide-support > a { font-size: 11px; font-weight: 700; }

@media (max-width: 1150px) {
    .guide-toolbar-main { grid-template-columns: minmax(0, .75fr) minmax(0, 1.65fr); gap: 16px; }
    .guide-role-picker { gap: 6px; }
    .help-guide .guide-role { gap: 6px; padding: 7px; }
    .guide-role-icon { width: 26px; height: 28px; }
    .guide-role-copy strong { font-size: 11px; }
    .guide-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 20px; }
}

@media (max-width: 960px) {
    .guide-hero { padding: 22px 24px; }
    .guide-hero h1 { font-size: 28px; }
    .guide-hero p { max-width: 520px; font-size: 13px; }
    .guide-toolbar-main { grid-template-columns: 1fr; gap: 12px; }
    .help-guide .guide-role { padding: 8px 12px; }
    .guide-role-icon { width: 30px; height: 30px; }
    .guide-role-copy strong { font-size: 12px; }
    .guide-toolbar input { height: 44px; }
    .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 13px; }
    .guide-toc { position: static; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; max-height: none; overflow: visible; padding: 0; border: 0; border-radius: 0; background: transparent; }
    .guide-toc > strong, .guide-toc [data-toc-article] { display: none !important; }
    .guide-toc [data-toc-role] { display: contents; }
    .help-guide .guide-toc a, .help-guide .guide-toc .guide-toc-start, .help-guide .guide-toc .guide-toc-heading, .help-guide .guide-toc .guide-toc-help { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 6px 10px; border: 1px solid #dbe6e8; border-radius: 7px; background: #fff; font-size: 11px; font-weight: 600; line-height: 1.5; }
    .help-guide .guide-toc .guide-toc-start { border-color: #d1e6dc; background: #edf7f2; }
    .guide-content-tools { margin-bottom: 12px; }
}

@media (max-width: 600px) {
    .guide-hero { flex-wrap: wrap; gap: 14px; padding: 19px 18px; border-radius: 13px; }
    .guide-hero h1 { font-size: 26px; }
    .guide-hero p { font-size: 12px; }
    .guide-eyebrow { font-size: 9px; letter-spacing: .1em; }
    .guide-tags { gap: 5px 11px; margin-top: 11px; font-size: 10px; }
    .guide-tags span + span::before { margin-right: 5px; }
    .guide-print { min-height: 34px; margin: 0; padding: 7px 11px; font-size: 11px !important; }
    .guide-toolbar { margin: 12px 0 14px; padding: 13px; border-radius: 11px; }
    .guide-role-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    .help-guide .guide-role { gap: 9px; min-height: 48px; padding: 7px 10px; }
    .guide-hint { font-size: 10px; }
    .guide-content-tools { align-items: flex-start; flex-wrap: wrap; gap: 5px; }
    .guide-results { flex-basis: 100%; font-size: 10px; }
    .guide-expand-controls { margin-left: -8px; }
    .guide-section h2 { font-size: 20px; }
    .guide-section-heading p { font-size: 11px; }
    .guide-article summary { gap: 9px; min-height: 55px; padding: 12px; }
    .guide-article summary h3 { font-size: 13px; }
    .guide-article-meta { gap: 0; font-size: 9px; }
    .guide-visual-label { display: none; }
    .guide-article-toggle { width: 23px; height: 23px; }
    .guide-article-body { padding: 14px; }
    .guide-article li { font-size: 12px; }
    .guide-path, .guide-before { font-size: 11px; }
    .guide-callouts { grid-template-columns: minmax(0, 1fr); }
    .guide-start { padding: 11px 12px; font-size: 11px; }
    .guide-support { padding: 17px; }
    .guide-support h2 { font-size: 19px; }
    .guide-support p { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    .help-guide *, .help-guide *::before, .help-guide *::after { transition: none !important; animation: none !important; }
}

@media print {
    .app-sidebar, .modern-header, .modern-footer, .app-backdrop, .guide-toc, .guide-toolbar, .guide-print, .guide-article-footer, .guide-content-tools, #guide-image-dialog { display: none !important; }
    .app-content { margin: 0 !important; width: 100% !important; }
    .help-guide { max-width: none; font-size: 11pt; color: #182c32; }
    .guide-layout { display: block; }
    .guide-hero { display: block; padding: 10px 0 16px; border: 0; border-bottom: 2px solid #275e58; border-radius: 0; background: #fff; color: #123c40; box-shadow: none; }
    .guide-hero::before, .guide-hero::after, .guide-tags, .guide-article-meta, .guide-article-toggle { display: none; }
    .guide-hero h1 { color: #123c40; font-size: 25pt; }
    .guide-hero p, .guide-eyebrow { color: #325d5a; }
    .guide-section { margin-top: 20px; }
    .guide-section-heading { break-after: avoid; }
    .guide-article { break-inside: auto; margin-bottom: 12px; }
    .guide-article summary { min-height: 0; padding: 12px 16px; break-after: avoid; }
    .guide-article summary h3 { font-size: 13pt; }
    .guide-article-body { padding: 14px 16px; }
    .guide-article li { padding-bottom: 5px; font-size: 10pt; }
    .guide-screenshot { break-inside: avoid; }
    .guide-screenshot img { max-height: none; }
    .guide-screenshot a > span { display: none; }
    .guide-callouts { grid-template-columns: minmax(0, 1fr); }
    .guide-support { break-inside: avoid; }
    .guide-section[hidden] { display: none !important; }
}
