/* coprctl wiki — copper theme, matching site/index.html design tokens */
:root{
  --bg:#131009;
  --bg-2:#1b1610;
  --line:#2c2418;
  --ink:#e8dfd0;
  --ink-dim:#a3998a;
  --ink-faint:#6f6559;
  --copper:#c97a3d;
  --copper-hi:#e79a5e;
  --copper-dark:#8f5427;
  --ok:#7d9b6a;
  --mono:"SFMono-Regular",ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
  --sans:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{background:var(--bg);color:var(--ink);font-family:var(--sans);line-height:1.65;-webkit-font-smoothing:antialiased}
a{color:var(--copper);text-decoration:none;border-bottom:1px solid transparent;transition:color .15s,border-color .15s}
a:hover{color:var(--copper-hi);border-bottom-color:currentColor}
pre,code,kbd{font-family:var(--mono)}
.wrap{max-width:1180px;margin:0 auto;padding:0 28px}

/* copper sheen background */
body::before{content:"";position:fixed;inset:0;z-index:-1;
  background:
    radial-gradient(1200px 500px at 20% -10%,rgba(201,122,61,.08),transparent 60%),
    radial-gradient(900px 500px at 90% 10%,rgba(201,122,61,.05),transparent 55%),
    linear-gradient(180deg,var(--bg) 0%,var(--bg) 100%);
}

/* header */
header{position:sticky;top:0;z-index:10;background:rgba(19,16,9,.85);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
nav.wrap{display:flex;align-items:center;justify-content:space-between;gap:16px;height:60px}
.brand{font-family:var(--mono);font-weight:700;letter-spacing:.5px;color:var(--ink);white-space:nowrap}
.brand .dollar{color:var(--copper)}
.brand b{color:var(--copper-hi)}
nav ul{display:flex;gap:26px;list-style:none;flex-wrap:wrap;justify-content:flex-end}
nav a{font-size:.85rem;color:var(--ink-dim);letter-spacing:.2px}
nav a:hover{color:var(--ink)}
nav a{border-bottom:none}

/* layout */
.layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:48px;padding-top:28px;padding-bottom:64px}
@media(max-width:860px){.layout{grid-template-columns:1fr}.sidebar{display:none}}

/* header on small screens: keep on one row, shrink */
@media(max-width:560px){
  nav.wrap{height:auto;padding:10px 16px;flex-wrap:wrap}
  nav ul{gap:14px}
  nav a{font-size:.78rem}
}

/* sidebar */
.sidebar{border-right:1px solid var(--line);padding-right:20px}
.side{padding-top:8px}
.side-sec{margin-bottom:22px}
.side-title{font-size:.72rem;text-transform:uppercase;letter-spacing:.12em;color:var(--ink-faint);margin-bottom:8px}
.side-title a{color:var(--ink-faint)}
.side-title a:hover{color:var(--copper)}
.side ul{list-style:none}
.side li{margin:2px 0}
.side a{font-size:.85rem;color:var(--ink-dim);border-bottom:none;display:block;padding:3px 0}
.side a:hover{color:var(--ink)}
.side li.active a{color:var(--copper-hi)}

/* breadcrumb */
.breadcrumb{font-size:.8rem;color:var(--ink-faint);margin-bottom:20px}
.breadcrumb a{color:var(--ink-dim);border-bottom:none}
.breadcrumb a:hover{color:var(--copper)}
.crumb-sep{color:var(--ink-faint);margin:0 6px}
.crumb-cur{color:var(--ink)}

/* article */
article h1{font-size:2rem;font-weight:800;letter-spacing:-.02em;margin:0 0 6px}
.page-meta{margin-bottom:20px}
.chip{display:inline-block;font-family:var(--mono);font-size:.68rem;padding:2px 10px;border-radius:99px;margin-right:8px;border:1px solid var(--line);color:var(--ink-dim)}
.chip-type{color:var(--copper-hi);border-color:var(--copper-dark)}
.chip-status{color:var(--ok);border-color:var(--line)}

article h2{font-size:1.4rem;font-weight:700;margin:1.6em 0 .5em;letter-spacing:-.01em}
article h3{font-size:1.12rem;font-weight:700;margin:1.4em 0 .4em}
article p{margin:.7em 0}
article ul,article ol{margin:.7em 0;padding-left:1.4em}
article li{margin:.25em 0}
article code{background:var(--bg-2);border:1px solid var(--line);border-radius:4px;padding:.1em .35em;font-size:.88em;color:var(--copper-hi);overflow-wrap:break-word;word-break:break-word}
article pre{background:var(--bg-2);border:1px solid var(--line);border-radius:8px;padding:14px 16px;overflow-x:auto;margin:.9em 0;max-width:100%}
article pre code{background:none;border:none;padding:0;color:var(--ink);white-space:pre-wrap;overflow-wrap:break-word;word-break:break-word}
article blockquote{border-left:3px solid var(--copper-dark);padding:.2em 1.1em;margin:.9em 0;color:var(--ink-dim)}
article table{border-collapse:collapse;margin:1em 0;width:100%;font-size:.9rem}
article th,article td{border:1px solid var(--line);padding:6px 12px;text-align:left}
article th{background:var(--bg-2);color:var(--copper-hi);font-weight:600}
article hr{border:none;border-top:1px solid var(--line);margin:1.6em 0}

/* TOC: open inline on desktop, collapsible dropdown on mobile */
.toc{border:1px solid var(--line);border-left:3px solid var(--copper-dark);border-radius:6px;padding:12px 16px;margin:1.4em 0}
.toc summary{font-size:.72rem;text-transform:uppercase;letter-spacing:.12em;color:var(--ink-faint);cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:8px}
.toc summary::-webkit-details-marker{display:none}
.toc summary::after{content:"▾";color:var(--ink-faint);font-size:.8em;transition:transform .15s}
.toc[open] summary::after{transform:rotate(180deg)}
.toc ul{list-style:none;padding:0;margin:10px 0 0}
.toc li{margin:3px 0;font-size:.86rem}
.toc li.l3{padding-left:14px;font-size:.82rem}
.toc a{color:var(--ink-dim);border-bottom:none}
.toc a:hover{color:var(--copper)}

/* mobile: TOC collapses to a toggle, list scrolls if long */
@media(max-width:560px){
  .toc{margin:1.2em 0;padding:10px 12px}
  .toc:not([open]){padding:10px 12px}
  .toc ul{max-height:50vh;overflow-y:auto}
  /* wrap code instead of forcing horizontal scroll */
  article pre code{white-space:pre-wrap;word-break:break-word}
}

/* footer */
footer{border-top:1px solid var(--line);padding:30px 0 48px;color:var(--ink-faint);font-size:.82rem}
footer .wrap{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}
footer .mono{font-family:var(--mono);color:var(--ink-dim)}