/* ============================================================
   RONE PLUGINS - the web user manuals (/manuals/ and /manuals/<plugin>/)
   Generated pages: scripts/build-web-manuals.py reads the same content
   modules as the PDF manuals (rone-plugins/docs/manuals/tools/content_*.py)
   and dresses them in the site's graphite language. The classes below are
   the PDF manual's classes (.ctl, .legend, .steps, .note, .recipe, .pill ...)
   mapped onto the site's variables; the plugin's accent comes from the
   body's acc-* class (--kn), exactly like a product page.
   ============================================================ */

/* ---- hero -------------------------------------------------- */
.man-hero {
    position: relative; text-align: center; padding: 76px 0 52px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(70% 90% at 50% -20%, var(--kn-soft, var(--neon-soft)) 0%, transparent 60%),
        linear-gradient(180deg, var(--panel) 0%, var(--ground) 100%);
}
.man-hero .picon-hero { width: 72px; height: 72px; filter: drop-shadow(0 0 18px var(--kn-glow, var(--neon-glow))); margin-bottom: 20px; }
.man-hero .eyebrow { justify-content: center; }
.man-hero h1 {
    font-family: var(--font-disp); font-weight: 800;
    font-size: clamp(28px, 4.6vw, 46px); letter-spacing: 0.02em; line-height: 1.12;
    margin: 14px auto 16px; max-width: 22ch; text-wrap: balance;
}
.man-hero h1 i { font-style: normal; color: var(--kn, var(--neon)); text-shadow: 0 0 22px var(--kn-glow, var(--neon-glow)); }
.man-hero .tag { color: var(--text2); font-size: 17px; font-weight: 500; line-height: 1.65; max-width: 64ch; margin: 0 auto; text-wrap: balance; }
.man-meta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.man-chip {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--text2); border: 1px solid var(--line2); border-radius: 999px; padding: 7px 13px; background: rgba(0,0,0,0.25);
}
.man-chip b { color: var(--kn, var(--neon)); font-weight: 600; }
.man-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.man-ctas .btn.fill { background: var(--kn, var(--neon)); color: #0F1114; box-shadow: 0 0 18px var(--kn-glow, var(--neon-glow)); }

/* ---- layout: sticky contents + the manual ------------------ */
.man-body { padding: 48px 0 84px; }
.man-grid { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 52px; align-items: start; }
.man-toc { position: sticky; top: 84px; }
.man-toc h2 { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--dim); margin: 0 0 12px; }
.man-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line2); }
.man-toc li a {
    display: flex; gap: 10px; align-items: baseline; padding: 7px 0 7px 14px; margin-left: -1px;
    border-left: 2px solid transparent; color: var(--text2); font-size: 13.5px; font-weight: 600; line-height: 1.35;
}
.man-toc li a:hover { color: var(--text); border-left-color: var(--kn, var(--neon)); }
.man-toc li a .n { font-family: var(--font-disp); font-weight: 800; color: var(--kn, var(--neon)); min-width: 18px; font-size: 12px; }
.man-toc .man-toc-links { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.man-article { min-width: 0; max-width: 840px; }

/* ---- the tutorial, first thing after the hero -------------- */
.man-video { margin: 0 0 40px; }
.man-video .yt-lite, .man-video .yt-frame {
    position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line2);
    border-radius: 12px; overflow: hidden; background: var(--card); padding: 0; cursor: pointer;
}
.man-video .yt-lite img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; transition: opacity .2s; }
.man-video .yt-lite:hover img { opacity: 1; }
.man-video .yt-play {
    position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; transform: translate(-50%, -50%);
    background: var(--kn, var(--neon)); border-radius: 14px; box-shadow: 0 0 28px var(--kn-glow, var(--neon-glow));
}
.man-video .yt-play::after { content: ""; position: absolute; left: 29px; top: 15px; border-style: solid; border-width: 10px 0 10px 18px; border-color: transparent transparent transparent #0F1114; }
.man-video .yt-frame { border: 0; }
.man-video .cap { font-size: 13px; color: var(--dim); margin-top: 10px; }
.man-video .cap a { color: var(--text2); border-bottom: 1px solid var(--line3); }

/* ---- the manual's own typography (dark port of the PDF) ---- */
.man-article section.page { padding: 38px 0 14px; border-top: 1px solid var(--line); }
.man-article section.page:first-of-type { border-top: 0; padding-top: 0; }
.man-article h2 {
    font-family: var(--font-disp); font-size: 26px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2;
    margin: 0 0 18px; padding-bottom: 12px; border-bottom: 2px solid var(--kn, var(--neon)); scroll-margin-top: 90px;
}
.man-article h2 .num { color: var(--kn, var(--neon)); margin-right: 12px; }
.man-article h3 { font-family: var(--font-disp); font-size: 18px; font-weight: 700; margin: 26px 0 10px; color: var(--text); }
.man-article h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text2); margin: 18px 0 8px; }
.man-article p, .man-article li { color: var(--text2); font-size: 15px; line-height: 1.7; }
.man-article p { margin: 0 0 12px; }
.man-article strong, .man-article b { color: var(--text); font-weight: 700; }
.man-article em { color: var(--text); }
.man-article ul, .man-article ol { margin: 0 0 14px; padding-left: 22px; }
.man-article li { margin: 0 0 6px; }
.man-article li::marker { color: var(--kn, var(--neon)); font-weight: 700; }
.man-article a { color: var(--text); border-bottom: 1px solid var(--kn, var(--neon)); }
.man-article code, .man-article .mono {
    font-family: var(--font-mono); font-size: 13px; color: var(--text);
    background: var(--card); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; word-break: break-all;
}
.man-article figure { margin: 16px 0 22px; }
.man-article figure img { width: 100%; height: auto; display: block; border-radius: 8px; border: 1px solid var(--line2); background: var(--card); }
.man-article figure.small img, .man-article figure.w60 img { width: 60%; margin: 0 auto; }
.man-article figure.w80 img { width: 80%; margin: 0 auto; }
.man-article figcaption { font-size: 13px; color: var(--dim); margin-top: 8px; line-height: 1.55; }
.man-article figcaption b { color: var(--text2); }
.man-article .two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.man-article .three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.man-article .legend { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 26px; margin: 10px 0 16px; font-size: 14px; }
.man-article .legend div { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--text2); line-height: 1.5; }
.man-article .legend .b {
    display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: 50%; flex: none;
    background: var(--kn, var(--neon)); color: #0F1114; font-family: var(--font-disp); font-weight: 800; font-size: 12px;
}
.man-article .ctl {
    display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 20px; margin: 0 0 12px; padding: 14px 16px;
    background: var(--card); border-left: 3px solid var(--kn, var(--neon)); border-radius: 0 8px 8px 0;
}
.man-article .ctl .name { font-family: var(--font-disp); font-weight: 800; font-size: 14px; letter-spacing: 0.06em; color: var(--text); }
.man-article .ctl .meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); margin-top: 5px; line-height: 1.45; }
.man-article .ctl .body p { margin: 0 0 6px; }
.man-article .ctl .tip { font-size: 13.5px; color: var(--text2); margin-top: 4px; }
.man-article .steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 14px; }
.man-article .steps li { position: relative; padding-left: 44px; margin: 0 0 12px; }
.man-article .steps li::before {
    counter-increment: s; content: counter(s); position: absolute; left: 0; top: 1px; width: 28px; height: 28px; border-radius: 50%;
    background: var(--kn, var(--neon)); color: #0F1114; font-family: var(--font-disp); font-weight: 800; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
}
.man-article .note {
    padding: 14px 16px; border-radius: 8px; background: var(--card); border-left: 3px solid var(--kn, var(--neon));
    margin: 14px 0 18px; font-size: 14.5px; color: var(--text2); line-height: 1.65;
}
.man-article .note .t { font-family: var(--font-disp); font-weight: 800; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--kn, var(--neon)); display: block; margin-bottom: 6px; }
.man-article .note.dark { background: #0C0D10; }
.man-article .recipe { border: 1px solid var(--line2); border-radius: 10px; padding: 16px 18px; margin: 0 0 16px; background: var(--card); }
.man-article .recipe h4 { margin-top: 0; color: var(--text); text-transform: none; letter-spacing: 0; font-size: 16px; font-family: var(--font-disp); }
.man-article .recipe .use { font-size: 13px; color: var(--dim); margin: -4px 0 10px; }
.man-article table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 14px; }
.man-article th { text-align: left; font-family: var(--font-disp); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); padding: 8px 10px; border-bottom: 2px solid var(--line2); }
.man-article td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text2); line-height: 1.55; }
.man-article td:first-child { font-weight: 700; color: var(--text); }
.man-article table.spec td:first-child { width: 160px; }
.man-article .pill {
    display: inline-block; padding: 1px 8px; border-radius: 999px; background: #0C0D10; border: 1px solid var(--line2);
    color: var(--kn, var(--neon)); font-family: var(--font-disp); font-weight: 700; font-size: 11px; letter-spacing: 0.06em; white-space: nowrap;
}
.man-article .dos { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.man-article .dos > div { padding: 14px 16px; border-radius: 8px; background: var(--card); }
.man-article .dos h4 { margin-top: 0; }
.man-article .dos ul { margin: 0; }
.man-article .kbd { display: inline-block; font-family: var(--font-mono); font-size: 12px; padding: 0 6px; border: 1px solid var(--line3); border-bottom-width: 2px; border-radius: 4px; }
.man-article .footer-note { font-size: 13px; color: var(--dim); margin-top: 28px; border-top: 1px solid var(--line); padding-top: 12px; }
.man-article .keep { break-inside: avoid; }

/* ---- the hub (/manuals/) ----------------------------------- */
.man-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.man-card {
    display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 14px;
    background: var(--card); border: 1px solid var(--line2); transition: border-color .2s, transform .2s;
}
.man-card:hover { border-color: var(--kn, var(--line3)); transform: translateY(-2px); }
.man-card .man-card-head { display: flex; align-items: center; gap: 14px; }
.man-card img { width: 48px; height: 48px; flex: none; filter: drop-shadow(0 0 12px var(--kn-glow, transparent)); }
.man-card h3 { font-family: var(--font-disp); font-size: 17px; font-weight: 700; letter-spacing: 0.02em; }
.man-card h3 a { color: var(--text); }
.man-card .kind { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--kn, var(--dim)); display: block; margin-bottom: 3px; }
.man-card p { color: var(--text2); font-size: 14px; line-height: 1.6; flex: 1; }
.man-card .man-card-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.man-card .man-card-links a {
    font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text2);
    border: 1px solid var(--line2); border-radius: 999px; padding: 6px 11px;
}
.man-card .man-card-links a:hover { border-color: var(--kn, var(--neon)); color: var(--kn, var(--neon)); }
.man-hub-section { padding: 56px 0 24px; }
.man-hub-section .sec-head { margin-bottom: 36px; }
.man-qa { max-width: 760px; margin: 0 auto; }
.man-qa h3 { font-family: var(--font-disp); font-size: 16px; font-weight: 700; color: var(--text); margin: 28px 0 8px; }
.man-qa h3:first-child { margin-top: 0; }
.man-qa p { font-size: 14.5px; line-height: 1.7; color: var(--text2); }
.man-qa a { color: var(--text); border-bottom: 1px solid var(--kn, var(--neon)); }

/* ---- small screens ----------------------------------------- */
@media (max-width: 900px) {
    .man-grid { grid-template-columns: 1fr; gap: 32px; }
    .man-toc { position: static; }
}
@media (max-width: 640px) {
    .man-hero { padding: 64px 0 40px; }
    .man-article .two, .man-article .three, .man-article .legend, .man-article .dos { grid-template-columns: 1fr; }
    .man-article .ctl { grid-template-columns: 1fr; }
    .man-article figure.small img, .man-article figure.w60 img, .man-article figure.w80 img { width: 100%; }
    .man-article table { display: block; overflow-x: auto; }
}
