/* presshelmai.com/docs: layout, search and components (uses the tokens from site.css). */
.docs-body { background: var(--surface); }
.docs-body .site-header { position: sticky; top: 0; z-index: 40; }

/* Shell: sidebar · article · on this page */
.docs-shell { display: grid; grid-template-columns: 272px minmax(0, 1fr) 220px; gap: 40px; max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.docs-side { position: sticky; top: 72px; align-self: start; height: calc(100vh - 72px); overflow-y: auto; padding: 24px 6px 40px 0; border-right: 1px solid var(--line); }
.docs-side::-webkit-scrollbar { width: 6px; } .docs-side::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.docs-group { margin: 22px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.docs-group:first-of-type { margin-top: 18px; }
.docs-nav { list-style: none; margin: 0; padding: 0; }
.docs-nav a { display: flex; align-items: center; gap: 9px; padding: 6px 10px; margin: 1px 0; border-radius: 8px; color: var(--text); font-size: 15px; line-height: 1.35; }
.docs-nav a svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.docs-nav a:hover { background: var(--soft); text-decoration: none; }
.docs-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); font-weight: 650; }
.docs-nav a[aria-current="page"] svg { color: var(--primary); }

/* Search trigger */
.docs-search-btn { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; text-align: left; }
.docs-search-btn:hover { border-color: var(--primary-line); }
.docs-search-btn svg { width: 17px; height: 17px; }
.docs-search-btn kbd { margin-left: auto; }
kbd { font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }

/* Article */
.docs-main { min-width: 0; padding: 34px 0 80px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.doc h1 { font-size: clamp(32px, 4vw, 44px); font-weight: 820; margin: 0 0 14px; }
.doc .lead { margin-bottom: 26px; }
.doc h2 { font-size: 26px; font-weight: 780; margin: 46px 0 12px; scroll-margin-top: 88px; padding-top: 4px; }
.doc h3 { font-size: 19px; margin: 28px 0 8px; scroll-margin-top: 88px; }
.doc h2 a.anchor, .doc h3 a.anchor { opacity: 0; margin-left: 8px; color: var(--muted); font-weight: 500; }
.doc h2:hover a.anchor, .doc h3:hover a.anchor { opacity: 1; text-decoration: none; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin: 5px 0; }
.doc li::marker { color: var(--primary); }
.doc code { font: .88em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; color: var(--ink); }
.doc strong { color: var(--ink); }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.tbl { max-width: 100%; overflow-x: auto; margin: 6px 0 22px; -webkit-overflow-scrolling: touch; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--soft); }
.doc td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }

/* Callouts */
.note { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--primary-line); background: var(--primary-soft); margin: 18px 0 22px; font-size: 16px; }
.note > svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--primary); }
.note p:last-child { margin: 0; }
.note.tip { border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-soft); }
.note.tip > svg { color: var(--ok); }
.note.warn { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); }
.note.warn > svg { color: var(--warn); }
.note b.t { display: block; color: var(--ink); margin-bottom: 2px; }

/* Steps */
.dsteps { list-style: none; padding: 0; margin: 10px 0 24px; counter-reset: s; }
.dsteps > li { position: relative; padding: 0 0 22px 52px; margin: 0; }
.dsteps > li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--primary), #a855f7); box-shadow: 0 6px 16px rgba(79, 70, 229, .25); }
.dsteps > li::after { content: ""; position: absolute; left: 16px; top: 38px; bottom: 4px; width: 2px; background: var(--line); }
.dsteps > li:last-child::after { display: none; }
.dsteps h3 { margin: 4px 0 6px; font-size: 18px; }

/* Chat example */
.chat-demo { border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, var(--soft), var(--surface)); padding: 16px; margin: 16px 0 24px; max-width: 640px; }
.chat-demo .cd-head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.chat-demo .cd-head img { width: 24px; height: 24px; }
.cd-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; margin: 8px 0; font-size: 15px; line-height: 1.5; box-shadow: 0 1px 1px rgba(15, 23, 42, .06); }
.cd-me { margin-left: auto; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.cd-bot { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.cd-bot .cd-title { font-weight: 750; color: var(--ink); margin-bottom: 4px; }
.cd-bot ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.cd-btns { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.cd-btns span { font-size: 13px; font-weight: 650; padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--soft); color: var(--text); }
.cd-btns span.yes { background: var(--primary); border-color: var(--primary); color: #fff; }
.cd-ok { color: var(--ok); font-weight: 700; }

/* Try saying */
.try { margin: 14px 0 26px; }
.try-title { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.try-title svg { width: 16px; height: 16px; color: var(--primary); }
.try ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.try li { margin: 0; }
.try button { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; font-size: 15.5px; color: var(--text); background: var(--surface); border: 1px dashed var(--primary-line); border-radius: 10px; padding: 10px 14px; cursor: pointer; }
.try button:hover { border-style: solid; background: var(--primary-soft); }
.try button::before { content: "“"; font-size: 26px; line-height: 0; color: var(--primary); font-weight: 800; transform: translateY(5px); }
.try button .copied { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--ok); }

/* Cards */
.dcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 14px 0 26px; }
.dcards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .dcards.two { grid-template-columns: minmax(0, 1fr); } }
.dcard { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; }
.dcard:hover { text-decoration: none; border-color: var(--primary-line); transform: translateY(-2px); box-shadow: var(--shadow); }
.dcard .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 10px; }
.dcard .ic svg { width: 20px; height: 20px; }
.dcard b { display: block; color: var(--ink); font-size: 16.5px; margin-bottom: 4px; }
.dcard span { font-size: 14.5px; color: var(--muted); line-height: 1.5; display: block; }

/* Approval card replica */
.appr { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 14px 0 22px; max-width: 560px; background: var(--surface); font-size: 15px; }
.appr .ah { padding: 10px 14px; background: var(--soft); font-weight: 750; color: var(--ink); border-bottom: 1px solid var(--line); }
.appr .ab { padding: 12px 14px; }
.appr dl { display: grid; grid-template-columns: 88px 1fr; gap: 6px 10px; margin: 10px 0 0; }
.appr dt { font-weight: 700; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; }
.appr dd { margin: 0; }

/* Flow diagram */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0 28px; }
.flow > div { position: relative; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.flow > div:not(:last-child)::after { content: "→"; position: absolute; right: -14px; top: 50%; transform: translateY(-50%); color: var(--primary); font-weight: 800; z-index: 1; }
.flow b { display: block; color: var(--ink); margin-bottom: 4px; }
.flow span { font-size: 14px; color: var(--muted); display: block; line-height: 1.45; }

/* Docs home hero */
.docs-hero { padding: 26px 0 8px; }
.docs-hero h1 { font-size: clamp(36px, 5vw, 54px); }
.docs-hero .big-search { margin: 22px 0 8px; max-width: 620px; padding: 15px 18px; font-size: 17px; border-radius: 14px; box-shadow: var(--shadow); background: var(--surface); }

/* Prev / next, feedback */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 50px; }
.pager a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
.pager a:hover { border-color: var(--primary-line); text-decoration: none; }
.pager small { display: block; color: var(--muted); font-size: 13px; }
.pager b { color: var(--primary); }
.pager .next { text-align: right; grid-column: 2; }
.help-box { margin-top: 26px; padding: 16px 18px; border-radius: 12px; background: var(--soft); font-size: 15px; color: var(--muted); }

/* On this page */
.docs-toc { position: sticky; top: 72px; align-self: start; padding: 34px 0; font-size: 14px; max-height: calc(100vh - 72px); overflow-y: auto; }
.docs-toc p { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.docs-toc ul { list-style: none; margin: 0; padding: 0 0 0 10px; border-left: 1px solid var(--line); }
.docs-toc a { display: block; padding: 4px 0 4px 10px; margin-left: -11px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.35; }
.docs-toc a:hover { color: var(--text); text-decoration: none; }
.docs-toc a.on { color: var(--primary); border-left-color: var(--primary); font-weight: 650; }

/* Mobile */
.docs-menu-btn { display: none; }
@media (max-width: 1180px) { .docs-shell { grid-template-columns: 250px minmax(0, 1fr); } .docs-toc { display: none; } }
@media (max-width: 860px) {
	.docs-shell { grid-template-columns: minmax(0, 1fr); padding: 0 16px; }
	.docs-side { position: fixed; inset: 64px 0 0 0; z-index: 35; height: auto; background: var(--surface); padding: 16px; border-right: 0; transform: translateX(-100%); transition: transform .2s; }
	.docs-open .docs-side { transform: none; }
	.docs-menu-btn { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; cursor: pointer; }
	.docs-menu-btn svg { width: 18px; height: 18px; }
	.docs-main { padding-top: 14px; }
	.flow { grid-template-columns: 1fr; }
	.flow > div:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -15px; transform: translateX(50%); }
	.pager { grid-template-columns: 1fr; } .pager .next { grid-column: 1; }
	.doc td:first-child { white-space: normal; min-width: 110px; }
	.doc th, .doc td { padding: 9px 8px; }
}

/* Search dialog */
.sd { position: fixed; inset: 0; z-index: 90; display: none; background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); padding: 9vh 16px 16px; }
.sd.open { display: block; }
.sd-box { max-width: 680px; margin: 0 auto; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--line); }
.sd-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sd-in svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.sd-in input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 18px; background: transparent; color: var(--ink); min-width: 0; }
.sd-res { max-height: 62vh; overflow-y: auto; padding: 8px; margin: 0; list-style: none; }
.sd-res li a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text); }
.sd-res li a:hover, .sd-res li a.sel { background: var(--primary-soft); text-decoration: none; }
.sd-res b { display: block; color: var(--ink); font-size: 15.5px; }
.sd-res small { display: block; color: var(--primary); font-size: 12.5px; font-weight: 650; margin-bottom: 2px; }
.sd-res span { display: block; color: var(--muted); font-size: 14px; line-height: 1.45; margin-top: 2px; }
.sd-res mark { background: color-mix(in srgb, var(--primary) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.sd-empty { padding: 26px 16px; text-align: center; color: var(--muted); }
.sd-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
