/* ════════════════ Wiki projet — vue Donneur d'ordre (style « plateforme docs ») ════════════════ */
.wk {
    /* Remap sur les vraies variables de thème → bascule clair/sombre automatique. */
    --wk-bg: var(--color-bg-primary, #fff);
    --wk-subtle: var(--color-bg-tertiary, #f5f6f8);
    --wk-fg: var(--color-text-primary, #1a1a1a);
    --wk-muted: var(--color-text-secondary, #6b7280);
    --wk-faint: var(--color-text-tertiary, #9ca3af);
    --wk-border: var(--color-border-strong, #e7e7e9);
    --wk-accent: var(--color-accent, #2383e2);
    --wk-side-w: 280px;
    --wk-toc-w: 240px;
    --wk-h: calc(100vh - var(--topbar-h, 64px));

    display: grid;
    grid-template-columns: var(--wk-side-w) minmax(0, 1fr) var(--wk-toc-w);
    height: var(--wk-h);
    margin: calc(-1 * var(--space-6, 24px));
    background: var(--wk-bg);
    color: var(--wk-fg);
    font-family: var(--font-sans, system-ui, -apple-system, "Segoe UI", sans-serif);
}
.wk * { box-sizing: border-box; }

/* ─────────── Menu de gauche ─────────── */
.wk-side {
    border-right: 1px solid var(--wk-border);
    overflow-y: auto;
    padding: 28px 18px 60px;
    background: var(--wk-subtle);
}
.wk-side-head { padding: 0 8px 18px; border-bottom: 1px solid var(--wk-border); margin-bottom: 18px; }
.wk-side-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--wk-accent); }
.wk-side-title { font-size: 16px; font-weight: 700; line-height: 1.3; margin-top: 6px; }
.wk-side-ref { font-size: 12px; color: var(--wk-faint); margin-top: 6px; }

.wk-search { position: relative; margin: 0 4px 22px; }
.wk-search input {
    width: 100%; padding: 9px 12px 9px 34px; border: 1px solid var(--wk-border); border-radius: 9px;
    background: var(--wk-bg); color: var(--wk-fg); font-size: 13px; outline: none;
}
.wk-search input:focus { border-color: var(--wk-accent); }
.wk-search-ic {
    position: absolute; left: 11px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%);
    border: 1.6px solid var(--wk-faint); border-radius: 50%;
    box-shadow: 8px 8px 0 -6px var(--wk-faint); /* fake handle */
}

.wk-navgroup { margin-bottom: 22px; }
.wk-navgroup-t {
    font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
    color: var(--wk-faint); padding: 0 8px; margin-bottom: 8px;
}
.wk-navlink {
    display: block; padding: 7px 10px; border-radius: 8px; font-size: 13.5px; line-height: 1.35;
    color: var(--wk-muted); text-decoration: none; transition: background .12s, color .12s;
    border-left: 2px solid transparent;
}
.wk-navlink:hover { background: var(--color-bg-hover, rgba(127,127,127,.08)); color: var(--wk-fg); }
.wk-navlink.active {
    color: var(--wk-accent); font-weight: 600;
    background: color-mix(in srgb, var(--wk-accent) 9%, transparent);
    border-left-color: var(--wk-accent);
}

/* ─────────── Contenu central ─────────── */
.wk-main { overflow-y: auto; scroll-behavior: smooth; }
.wk-doc { max-width: 760px; margin: 0 auto; padding: 48px 56px 120px; }

.wk-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--wk-accent); }
.wk-h1 { font-size: 34px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; margin: 10px 0 0; }
.wk-lead { font-size: 16.5px; line-height: 1.6; color: var(--wk-muted); margin: 18px 0 0; }
.wk-statut {
    display: inline-block; margin-top: 18px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
    background: color-mix(in srgb, var(--wk-accent) 12%, transparent); color: var(--wk-accent);
}

.wk-chapter { padding-top: 44px; scroll-margin-top: 24px; }
.wk-sub { padding-top: 30px; scroll-margin-top: 24px; }
.wk-h2 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--wk-border); }
.wk-h3 { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.wk-anchorlink {
    margin-left: 10px; font-weight: 400; color: var(--wk-faint); text-decoration: none; opacity: 0; transition: opacity .12s;
}
.wk-h2:hover .wk-anchorlink { opacity: 1; }

.wk-p { font-size: 15.5px; line-height: 1.7; margin: 0 0 14px; }
.wk-p b { font-weight: 700; }
.wk-ul { margin: 0 0 16px; padding-left: 22px; }
.wk-ul li { font-size: 15.5px; line-height: 1.7; margin-bottom: 4px; }

.wk-callout {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 11px; margin: 6px 0 18px;
    font-size: 14.5px; line-height: 1.6; border: 1px solid var(--wk-border);
    background: var(--wk-subtle);
}
.wk-callout-ic { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; margin-top: 1px; }
.wk-callout.info { border-color: color-mix(in srgb, #3b82f6 35%, var(--wk-border)); }
.wk-callout.info .wk-callout-ic { background: #3b82f6; }
.wk-callout.ok { border-color: color-mix(in srgb, #22a06b 35%, var(--wk-border)); }
.wk-callout.ok .wk-callout-ic { background: #22a06b; }

.wk-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 6px 0 18px; }
.wk-card { border: 1px solid var(--wk-border); border-radius: 12px; padding: 16px; background: var(--wk-subtle); }
.wk-card-k { font-size: 12px; color: var(--wk-muted); font-weight: 600; }
.wk-card-v { font-size: 26px; font-weight: 800; margin-top: 6px; letter-spacing: -.02em; }

.wk-tablewrap { overflow-x: auto; margin: 6px 0 18px; border: 1px solid var(--wk-border); border-radius: 12px; }
.wk-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wk-table th, .wk-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--wk-border); }
.wk-table th { font-weight: 700; background: var(--wk-subtle); font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--wk-muted); }
.wk-table tr:last-child td { border-bottom: none; }

.wk-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 60px; padding-top: 20px; border-top: 1px solid var(--wk-border); font-size: 12.5px; color: var(--wk-faint); }

/* ─────────── Sommaire de droite ─────────── */
.wk-toc { border-left: 1px solid var(--wk-border); overflow-y: auto; padding: 48px 20px 60px; }
.wk-toc-head { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--wk-faint); margin-bottom: 12px; }
.wk-toc-list { display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--wk-border); }
.wk-toc-link {
    display: block; padding: 5px 12px; margin-left: -1px; font-size: 13px; line-height: 1.4;
    color: var(--wk-muted); text-decoration: none; border-left: 2px solid transparent; transition: color .12s, border-color .12s;
}
.wk-toc-link.lvl-2 { padding-left: 24px; font-size: 12.5px; }
.wk-toc-link:hover { color: var(--wk-fg); }
.wk-toc-link.active { color: var(--wk-accent); font-weight: 600; border-left-color: var(--wk-accent); }

/* ─────────── Sélecteur de projet ─────────── */
.wk-projpick {
    width: 100%; margin-top: 12px; padding: 8px 10px; border: 1px solid var(--wk-border); border-radius: 9px;
    background: var(--wk-bg); color: var(--wk-fg); font-size: 13px; font-weight: 600; outline: none; cursor: pointer;
}
.wk-projpick:focus { border-color: var(--wk-accent); }

/* ─────────── WBS (phases → opérations → tâches) ─────────── */
.wk-wbs { display: flex; flex-direction: column; gap: 16px; margin-top: 6px; }
.wk-wbs-phase { border: 1px solid var(--wk-border); border-radius: 12px; overflow: hidden; }
.wk-wbs .wk-wbs-phase { padding-top: 0; scroll-margin-top: 90px; }
.wk-wbs-phase-h {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 11px 16px; background: var(--wk-subtle); border-bottom: 1px solid var(--wk-border);
}
.wk-wbs-phase-n { font-weight: 700; font-size: 14.5px; }
.wk-wbs-phase-c { font-size: 12.5px; font-weight: 700; color: var(--wk-accent); }
.wk-wbs-ops { display: flex; flex-direction: column; }
.wk-wbs-op { padding: 12px 16px; border-bottom: 1px solid var(--wk-border); }
.wk-wbs-op:last-child { border-bottom: none; }
.wk-wbs-op-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.wk-wbs-op-n { font-weight: 600; font-size: 14px; }
.wk-wbs-op-c { font-size: 12.5px; color: var(--wk-muted); white-space: nowrap; }
.wk-wbs-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wk-stat { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; }
.wk-stat.todo { background: color-mix(in srgb, #9ca3af 16%, transparent); color: #6b7280; }
.wk-stat.prog { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #b45309; }
.wk-stat.done { background: color-mix(in srgb, #3b82f6 16%, transparent); color: #1d4ed8; }
.wk-stat.val  { background: color-mix(in srgb, #22a06b 18%, transparent); color: #15803d; }

/* ─────────── GED projet (Référentiels applicables) ─────────── */
.wk-ged-count {
    display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
    background: color-mix(in srgb, var(--wk-accent) 14%, transparent); color: var(--wk-accent); vertical-align: middle;
}
.wk-ged-list { display: flex; flex-direction: column; gap: 8px; }
.wk-ged-item {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
    padding: 11px 14px; border: 1px solid var(--wk-border); border-radius: 11px; background: var(--wk-bg);
    color: var(--wk-fg); font: inherit; transition: border-color .12s, background .12s;
}
.wk-ged-item:hover { border-color: var(--wk-accent); background: color-mix(in srgb, var(--wk-accent) 5%, transparent); }
.wk-ged-ic { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 6px; background: var(--wk-faint); }
.wk-ged-ic.pdf { background: #e0584a; }
.wk-ged-ic.img { background: #22a06b; }
.wk-ged-ic.doc { background: #3b82f6; }
.wk-ged-name { flex: 1; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-ged-meta { font-size: 12px; color: var(--wk-faint); white-space: nowrap; }

/* ─────────── Satisfaction (étoiles) ─────────── */
.wk-sat-list { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--wk-border); border-radius: 12px; overflow: hidden; }
.wk-sat-row {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 16px; border-bottom: 1px solid var(--wk-border);
}
.wk-sat-row:last-child { border-bottom: none; }
.wk-sat-label { font-size: 14.5px; font-weight: 500; }
.wk-sat-stars { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.wk-star {
    background: none; border: none; padding: 0 2px; cursor: pointer; line-height: 1;
    font-size: 22px; color: var(--wk-border); transition: color .1s, transform .1s;
}
.wk-star:hover { transform: scale(1.15); }
.wk-star.on { color: #f5a623; }
.wk-sat-note { margin-left: 10px; font-size: 12.5px; font-weight: 600; color: var(--wk-muted); min-width: 30px; text-align: right; }

/* ─────────── Matrice polycompétences ─────────── */
.wk-mx-wrap { overflow-x: auto; border: 1px solid var(--wk-border); border-radius: 12px; }
.wk-mx { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.wk-mx th, .wk-mx td { border-bottom: 1px solid var(--wk-border); border-right: 1px solid var(--wk-border); padding: 8px 10px; text-align: center; }
.wk-mx th:last-child, .wk-mx td:last-child { border-right: none; }
.wk-mx tbody tr:last-child th, .wk-mx tbody tr:last-child td { border-bottom: none; }
.wk-mx thead th { background: var(--wk-subtle); font-weight: 700; vertical-align: bottom; position: sticky; top: 0; }
.wk-mx-comp { max-width: 46px; }
.wk-mx-comp span { display: inline-block; writing-mode: vertical-rl; transform: rotate(200grad); white-space: nowrap; font-size: 12px; font-weight: 600; max-height: 130px; overflow: hidden; text-overflow: ellipsis; }
.wk-mx-emp { text-align: left !important; position: sticky; left: 0; background: var(--wk-bg); z-index: 1; min-width: 170px; }
.wk-mx thead .wk-mx-emp { z-index: 2; background: var(--wk-subtle); }
.wk-mx-name { display: block; font-weight: 600; }
.wk-mx-job { display: block; font-size: 11.5px; color: var(--wk-muted); }
.wk-mx-dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: var(--wk-border); }
.wk-mx-dot.lvl-0 { background: transparent; border: 1.5px dashed var(--wk-border); }
.wk-mx-dot.lvl-1 { background: #cfe3ff; }
.wk-mx-dot.lvl-2 { background: #6ba4f0; }
.wk-mx-dot.lvl-3 { background: #1d4ed8; }
.wk-mx-legend { display: flex; flex-wrap: wrap; gap: 16px; }
.wk-mx-leg { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--wk-muted); }

/* ─────────── OBS / Organigramme ─────────── */
.wk-org-list { display: flex; flex-direction: column; gap: 8px; }
.wk-org-item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 11px 14px; border: 1px solid var(--wk-border); border-radius: 11px; background: var(--wk-subtle);
}
.wk-org-name { font-weight: 600; font-size: 14px; }
.wk-org-role { font-size: 12.5px; color: var(--wk-muted); }

/* ─────────── Organigramme projet (arbre, style page Effectif) ─────────── */
.wk-org-scroll { overflow-x: auto; padding: 4px 0 8px; }
.wk-otree, .wk-otree ul { display: flex; justify-content: center; padding-top: 26px; position: relative; margin: 0; list-style: none; }
.wk-otree { padding: 10px 20px; width: max-content; min-width: 100%; }
.wk-otree li { display: flex; flex-direction: column; align-items: center; position: relative; padding: 26px 12px 0; }
.wk-otree li::before, .wk-otree li::after {
    content: ''; position: absolute; top: 0; width: 50%; height: 26px;
    border-top: 2px solid color-mix(in srgb, var(--wk-faint) 55%, transparent);
}
.wk-otree li::before { right: 50%; }
.wk-otree li::after { left: 50%; border-left: 2px solid color-mix(in srgb, var(--wk-faint) 55%, transparent); }
.wk-otree li:only-child::before, .wk-otree li:only-child::after { display: none; }
.wk-otree li:first-child::before, .wk-otree li:last-child::after { border: 0 none; }
.wk-otree li:last-child::before { border-right: 2px solid color-mix(in srgb, var(--wk-faint) 55%, transparent); border-radius: 0 6px 0 0; }
.wk-otree li:first-child::after { border-radius: 6px 0 0 0; }
.wk-otree ul::before {
    content: ''; position: absolute; top: 0; left: 50%; width: 0; height: 26px;
    border-left: 2px solid color-mix(in srgb, var(--wk-faint) 55%, transparent);
}
.wk-otree > li { padding-top: 0; }
.wk-otree > li::before, .wk-otree > li::after { display: none; }

.wk-otc {
    position: relative; display: flex; align-items: center; gap: 12px;
    width: 230px; padding: 12px 14px 12px 16px; box-sizing: border-box;
    background: var(--wk-bg); border: 1px solid var(--wk-border); border-radius: 16px;
    box-shadow: var(--neu-raised, 0 4px 14px rgba(0,0,0,.08)); overflow: hidden;
}
.wk-otc-co { width: 256px; background: var(--wk-subtle); }
.wk-otc-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.wk-otc-av { position: relative; flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; padding: 2.5px; background: var(--g); }
.wk-otc-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.wk-otc-fb { width: 100%; height: 100%; border-radius: 50%; align-items: center; justify-content: center; background: var(--wk-bg); color: var(--wk-muted); font-weight: 800; font-size: 15px; }
.wk-otc-txt { min-width: 0; flex: 1; }
.wk-otc-name { font-weight: 700; font-size: 14px; color: var(--wk-fg); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-otc-role { font-size: 11px; font-weight: 600; color: var(--wk-faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─────────── Suivi Facturation ─────────── */
.wk-fact-stat { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.wk-fact-stat.s-draft { background: color-mix(in srgb, #9ca3af 16%, transparent); color: #6b7280; }
.wk-fact-stat.s-issued { background: color-mix(in srgb, #3b82f6 16%, transparent); color: #1d4ed8; }
.wk-fact-stat.s-paid { background: color-mix(in srgb, #22a06b 18%, transparent); color: #15803d; }
.wk-fact-stat.s-cancelled { background: color-mix(in srgb, #e0584a 16%, transparent); color: #b91c1c; }

/* ─────────── Module autoformation (simulation) ─────────── */
.wk-tr-btn {
    display: inline-block; margin-top: 4px; padding: 11px 18px; border: none; border-radius: 11px;
    background: var(--wk-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.wk-tr-btn:disabled { opacity: .6; cursor: not-allowed; }
.wk-tr-quiz { margin-top: 16px; border: 1px solid var(--wk-border); border-radius: 12px; padding: 16px; }
.wk-tr-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--wk-faint); margin-bottom: 12px; }
.wk-tr-q { margin: 14px 0; padding: 14px; border-radius: 10px; background: var(--wk-subtle); }
.wk-tr-qt { font-weight: 600; font-size: 14.5px; margin-bottom: 8px; }
.wk-tr-opt { display: flex; gap: 9px; align-items: flex-start; padding: 6px 0; font-size: 14px; cursor: pointer; }
.wk-tr-opt input { margin-top: 3px; }
.wk-tr-ta { width: 100%; padding: 10px; border: 1px solid var(--wk-border); border-radius: 8px; font: inherit; background: var(--wk-bg); color: var(--wk-fg); }

/* ─────────── Panneau latéral de visualisation de documents ─────────── */
#wk-docpanel { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
#wk-docpanel .wk-dp-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0); transition: background .3s ease; }
#wk-docpanel .wk-dp-panel {
    position: absolute; top: 0; right: 0; height: 100%; width: min(760px, 92vw);
    background: var(--wk-bg); color: var(--wk-fg); box-shadow: -12px 0 40px rgba(0,0,0,.28);
    transform: translateX(100%); transition: transform .34s cubic-bezier(.22,.61,.36,1);
    display: flex; flex-direction: column;
}
#wk-docpanel.on { pointer-events: auto; }
#wk-docpanel.on .wk-dp-backdrop { background: rgba(15, 23, 42, .45); }
#wk-docpanel.on .wk-dp-panel { transform: translateX(0); }
.wk-dp-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--wk-border); flex-shrink: 0; }
.wk-dp-title { flex: 1; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-dp-dl, .wk-dp-close { width: 34px; height: 34px; border: 1px solid var(--wk-border); border-radius: 9px; background: var(--wk-subtle); color: var(--wk-fg); display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; font-size: 15px; }
.wk-dp-dl:hover, .wk-dp-close:hover { border-color: var(--wk-accent); color: var(--wk-accent); }
.wk-dp-body { flex: 1; min-height: 0; overflow: auto; background: var(--wk-subtle); }
.wk-dp-frame { width: 100%; height: 100%; border: 0; display: block; }
.wk-dp-imgwrap { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; }
.wk-dp-img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.wk-dp-loading { padding: 60px 20px; text-align: center; color: var(--wk-faint); }
.wk-dp-other { padding: 60px 24px; text-align: center; }
.wk-dp-other-ic { font-size: 52px; }
.wk-dp-other-t { color: var(--wk-muted); font-size: 14.5px; margin: 12px 0 18px; }
.wk-dp-other-btn { display: inline-block; padding: 11px 20px; border-radius: 11px; background: var(--wk-accent); color: #fff; text-decoration: none; font-weight: 600; }
/* Rendu Word (mammoth) */
.wk-dp-doc { max-width: 820px; margin: 0 auto; padding: 40px 46px 80px; background: var(--wk-bg); color: var(--wk-fg); line-height: 1.6; font-size: 15px; }
.wk-dp-doc h1 { font-size: 26px; font-weight: 800; margin: 22px 0 12px; }
.wk-dp-doc h2 { font-size: 21px; font-weight: 700; margin: 20px 0 10px; }
.wk-dp-doc h3 { font-size: 17px; font-weight: 700; margin: 16px 0 8px; }
.wk-dp-doc p { margin: 0 0 12px; }
.wk-dp-doc ul, .wk-dp-doc ol { margin: 0 0 14px; padding-left: 24px; }
.wk-dp-doc li { margin-bottom: 4px; }
.wk-dp-doc img { max-width: 100%; height: auto; }
.wk-dp-doc table { border-collapse: collapse; width: 100%; margin: 0 0 16px; font-size: 13.5px; }
.wk-dp-doc th, .wk-dp-doc td { border: 1px solid var(--wk-border); padding: 7px 10px; text-align: left; vertical-align: top; }
.wk-dp-doc th { background: var(--wk-subtle); font-weight: 700; }
.wk-dp-doc a { color: var(--wk-accent); }
.wk-dp-doc strong { font-weight: 700; }
/* Rendu Excel (SheetJS) */
.wk-xls { max-width: none; padding: 16px; }
.wk-xls-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; position: sticky; top: 0; background: var(--wk-bg); padding: 4px 0; z-index: 1; }
.wk-xls-tab { padding: 6px 12px; border: 1px solid var(--wk-border); border-radius: 8px; background: var(--wk-subtle); color: var(--wk-fg); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.wk-xls-tab.on { background: var(--wk-accent); color: #fff; border-color: var(--wk-accent); }
.wk-xls-sheet { overflow-x: auto; }
.wk-xls table { border-collapse: collapse; font-size: 12.5px; }
.wk-xls td, .wk-xls th { border: 1px solid var(--wk-border); padding: 4px 8px; white-space: nowrap; color: var(--wk-fg); }
.wk-xls tr:first-child td { background: var(--wk-subtle); font-weight: 600; }

/* ─────────── Responsive ─────────── */
@media (max-width: 1100px) {
    .wk { grid-template-columns: var(--wk-side-w) minmax(0, 1fr); }
    .wk-toc { display: none; }
    .wk-doc { padding: 40px 40px 100px; }
}
@media (max-width: 760px) {
    .wk { grid-template-columns: 1fr; height: auto; }
    .wk-side { display: none; }
    .wk-doc { padding: 28px 20px 80px; }
    .wk-h1 { font-size: 27px; }
}
