/* The user and administrator guides: a help-center layout on top of tizz-ui.css and landing.css. */

.gd-page { background: var(--ui-bg); }

/* ── Hero: breadcrumb, title, audience tabs, search ── */
.gd-hero { background: var(--ui-surface); border-bottom: 1px solid var(--ui-line); padding: 28px 0 0; }
.gd-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--ui-subtle); }
.gd-crumbs a { color: var(--ui-link); text-decoration: none; }
.gd-crumbs a:hover { text-decoration: underline; }
.gd-title { margin: 10px 0 6px; font-size: 36px; line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; color: var(--ui-text); }
.gd-lede { margin: 0 0 22px; max-width: 680px; font-size: 17px; line-height: 1.55; color: var(--ui-muted); }
.gd-hero-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }

.gd-tabs { display: flex; gap: 4px; }
.gd-tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-size: 14px; font-weight: 500; color: var(--ui-muted); text-decoration: none; border-bottom: 2px solid transparent; }
.gd-tabs a:hover { color: var(--ui-text); }
.gd-tabs a[aria-current="page"] { color: var(--ui-text); border-bottom-color: var(--ui-primary); }

.gd-search { position: relative; flex: 0 1 380px; margin-bottom: 12px; }
.gd-search svg { position: absolute; left: 12px; top: 13px; color: var(--ui-subtle); pointer-events: none; }
.gd-search input { width: 100%; box-sizing: border-box; min-height: 42px; padding: 0 12px 0 36px; border: 1px solid var(--ui-line-strong); border-radius: var(--ui-radius); background: var(--ui-bg); color: var(--ui-text); font: inherit; font-size: 14px; }
.gd-search input:focus { outline: 2px solid var(--ui-primary); outline-offset: 1px; background: var(--ui-surface); }
.gd-results { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: var(--ui-radius-lg); box-shadow: 0 12px 32px rgba(11, 18, 32, .14); max-height: 60vh; overflow-y: auto; }
.gd-results a { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: var(--ui-radius); color: var(--ui-text); text-decoration: none; }
.gd-results a:hover, .gd-results a.is-picked { background: var(--ui-primary-tint); }
.gd-results small { color: var(--ui-subtle); font-size: 12px; }
.gd-r-title { font-weight: 500; font-size: 14px; }
.gd-none { padding: 10px; color: var(--ui-subtle); font-size: 14px; }

/* ── Three columns ── */
.gd-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr) 210px; gap: 40px; align-items: start; padding-top: 32px; padding-bottom: 64px; }
.gd-side, .gd-toc { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; }

/* Left: parts and sections */
.gd-side-box > summary { display: none; }
.gd-parts { list-style: none; margin: 0; padding: 0; counter-reset: part; }
.gd-parts > li { counter-increment: part; }
.gd-parts a { display: block; padding: 6px 10px; border-radius: var(--ui-radius); color: var(--ui-muted); font-size: 14px; line-height: 1.35; text-decoration: none; }
.gd-parts a:hover { color: var(--ui-text); background: var(--ui-surface); }
.gd-parts > li > a { color: var(--ui-text); font-weight: 500; }
.gd-parts > li > a::before { content: counter(part); display: inline-block; min-width: 18px; margin-right: 6px; font-family: var(--ui-mono); font-size: 12px; color: var(--ui-subtle); }
.gd-parts ul { list-style: none; margin: 2px 0 8px 24px; padding: 0 0 0 8px; border-left: 1px solid var(--ui-line); display: none; }
.gd-parts > li.is-open ul { display: block; }
.gd-parts ul a { font-size: 13px; padding: 4px 10px; }
.gd-parts a.is-active { color: var(--ui-link); background: var(--ui-primary-tint); }

/* Right: on this page */
.gd-toc-title { margin: 0 0 8px; font-family: var(--ui-mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ui-subtle); }
.gd-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--ui-line); }
.gd-toc a { display: block; margin-left: -1px; padding: 5px 0 5px 12px; border-left: 2px solid transparent; color: var(--ui-muted); font-size: 13px; line-height: 1.4; text-decoration: none; }
.gd-toc a:hover { color: var(--ui-text); }
.gd-toc a.is-active { color: var(--ui-link); border-left-color: var(--ui-primary); }
.gd-top { display: inline-block; margin-top: 16px; font-size: 13px; color: var(--ui-subtle); text-decoration: none; }
.gd-top:hover { color: var(--ui-text); }

/* ── Article ── */
.gd-article { max-width: 760px; color: var(--ui-text); font-size: 16px; line-height: 1.7; }
.gd-article h2, .gd-article h3, .gd-article h4 { position: relative; scroll-margin-top: 20px; color: var(--ui-text); }
.gd-article h2 { display: flex; align-items: center; gap: 12px; margin: 56px 0 14px; padding-top: 8px; font-size: 26px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.gd-article > h2:first-of-type { margin-top: 0; }
.gd-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: var(--ui-primary-tint); color: var(--ui-link); font-family: var(--ui-mono); font-size: 15px; font-weight: 500; }
.gd-article h3 { margin: 34px 0 10px; font-size: 19px; line-height: 1.35; font-weight: 600; }
.gd-article h4 { margin: 24px 0 8px; font-size: 16px; font-weight: 600; }
.gd-article p { margin: 0 0 14px; }
.gd-article ul, .gd-article ol { margin: 0 0 16px; padding-left: 24px; }
.gd-article li { margin: 4px 0; }
.gd-article li > ul, .gd-article li > ol { margin: 6px 0 4px; }
.gd-article a { color: var(--ui-link); }
.gd-article code { font-family: var(--ui-mono); font-size: .88em; padding: 1px 6px; border: 1px solid var(--ui-line); border-radius: 4px; background: var(--ui-surface); }

/* Numbered steps: each step gets a round number, like most help centers */
.gd-article > ol { list-style: none; padding-left: 0; counter-reset: step; }
.gd-article > ol > li { position: relative; counter-increment: step; padding: 2px 0 6px 42px; margin: 0 0 6px; }
.gd-article > ol > li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 50%; background: var(--ui-surface); border: 1px solid var(--ui-line-strong); color: var(--ui-text); font-family: var(--ui-mono); font-size: 12px; font-weight: 500; line-height: 24px; text-align: center; }

/* Link icon on headings */
.gd-anchor { margin-left: 6px; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; color: var(--ui-subtle); opacity: 0; transition: opacity .15s; vertical-align: middle; }
.gd-article h2:hover .gd-anchor, .gd-article h3:hover .gd-anchor, .gd-article h4:hover .gd-anchor, .gd-anchor:focus-visible { opacity: 1; }
.gd-anchor:hover { background: var(--ui-surface); color: var(--ui-link); }
.gd-anchor.is-copied { opacity: 1; color: var(--ui-ok); }
@media (hover: none) { .gd-anchor { opacity: .5; } }

/* Callouts and menu paths */
.gd-callout { display: block; margin: 18px 0; padding: 14px 16px 14px 18px; border: 1px solid var(--ui-primary-line); border-left: 4px solid var(--ui-primary); border-radius: var(--ui-radius); background: var(--ui-primary-tint); font-size: 15px; }
.gd-callout > strong:first-child { display: block; margin-bottom: 2px; font-size: 12px; font-family: var(--ui-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ui-link); }
.gd-callout.is-warn { border-color: var(--ui-warn-line); border-left-color: var(--ui-warn-mark); background: var(--ui-warn-tint); }
.gd-callout.is-warn > strong:first-child { color: var(--ui-warn); }
.gd-path { display: inline-block; padding: 0 8px; border: 1px solid var(--ui-line); border-radius: 4px; background: var(--ui-surface); font-family: var(--ui-mono); font-size: .82em; font-weight: 500; line-height: 1.8; white-space: nowrap; }
td.gd-path { display: table-cell; border: 0; background: none; padding: 10px 14px; }

/* Tables */
.gd-table { margin: 16px 0 22px; overflow-x: auto; border: 1px solid var(--ui-line); border-radius: var(--ui-radius-lg); background: var(--ui-surface); }
.gd-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.gd-table th { text-align: left; padding: 10px 14px; background: var(--ui-surface-2); border-bottom: 1px solid var(--ui-line); font-family: var(--ui-mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ui-subtle); }
.gd-table td { padding: 10px 14px; border-bottom: 1px solid var(--ui-line); vertical-align: top; }
.gd-table tr:last-child td { border-bottom: 0; }

/* Previous / next, help box */
.gd-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 56px 0 0; padding-top: 24px; border-top: 1px solid var(--ui-line); }
.gd-pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius-lg); background: var(--ui-surface); color: var(--ui-text); text-decoration: none; }
.gd-pager a:hover { border-color: var(--ui-primary); }
.gd-pager a[hidden] { display: none; }
.gd-pager small { font-size: 12px; color: var(--ui-subtle); }
.gd-pager span { font-weight: 500; color: var(--ui-link); }
.gd-next { grid-column: 2; text-align: right; }
.gd-help { margin-top: 32px; padding: 22px 24px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius-lg); background: var(--ui-surface); }
.gd-article .gd-help-title { display: block; margin: 0 0 6px; padding: 0; font-size: 18px; }
.gd-help p { margin: 0 0 14px; color: var(--ui-muted); }
.gd-help-row { display: flex; flex-wrap: wrap; gap: 10px; }
.gd-article .gd-help a.ui-btn { text-decoration: none; }
.gd-article .gd-help a.ui-btn-primary { color: #fff; }

/* ── Narrower screens ── */
@media (max-width: 1180px) {
    .gd-grid { grid-template-columns: 230px minmax(0, 1fr); }
    .gd-toc { display: none; }
}
@media (max-width: 960px) {
    .gd-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 20px; }
    .gd-side { position: static; max-height: none; overflow: visible; }
    .gd-side-box { border: 1px solid var(--ui-line); border-radius: var(--ui-radius-lg); background: var(--ui-surface); }
    .gd-side-box > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 16px; font-weight: 600; cursor: pointer; list-style: none; }
    .gd-side-box > summary::-webkit-details-marker { display: none; }
    .gd-side-box > summary::after { content: '▾'; color: var(--ui-subtle); }
    .gd-side-box[open] > summary::after { content: '▴'; }
    .gd-side-box .gd-parts { padding: 0 8px 10px; }
    .gd-title { font-size: 28px; }
    .gd-search { flex-basis: 100%; }
    .gd-article h2 { font-size: 22px; margin-top: 44px; }
    .gd-pager { grid-template-columns: 1fr; }
    .gd-next { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { .gd-anchor { transition: none; } }

/* Shown when the guide has no translation in the chosen language yet. */
.gd-lang-note { margin: 0 0 28px; padding: 12px 16px; border: 1px solid var(--ui-line); border-left: 3px solid var(--ui-primary); border-radius: var(--ui-radius); background: var(--ui-surface); font-size: 14px; color: var(--ui-muted); }
