/* AoW SMP documentation premium theme */
@import url("../portal.css");

:root{
  --doc-max:1120px;
}

body{
  background:
    linear-gradient(180deg,rgba(20,30,23,.7),rgba(6,9,8,.98) 460px,var(--bg-deep)),
    radial-gradient(1100px 360px at 28% -4%,rgba(121,211,111,.1),rgba(6,9,8,0) 58%),
    #08100c;
  overflow-x:hidden;
}

*{
  box-sizing:border-box;
}

.topnav{
  position:sticky;
  top:0;
  z-index:60;
  border-bottom:1px solid rgba(137,228,119,.16);
  background:
    linear-gradient(180deg,rgba(7,13,10,.94),rgba(7,13,10,.82)),
    radial-gradient(420px 140px at 0% 0%,rgba(121,211,111,.12),rgba(7,13,10,0));
  box-shadow:0 16px 38px rgba(0,0,0,.24);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}

.topnav .inner{
  width:min(var(--doc-max), calc(100% - 24px));
  margin:0 auto;
  min-height:78px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 0;
  flex-wrap:wrap;
}

.topnav .brand{
  margin-right:4px;
  color:var(--text);
  font-size:0;
  letter-spacing:.01em;
  font-weight:950;
  text-transform:uppercase;
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:35px;
  padding:0 2px 0 0;
  color:transparent;
  position:relative;
}

.topnav .brand::before{
  content:"";
  width:30px;
  height:30px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.18);
  background:
    linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,0)),
    url("../assets/aow-smp-crest-v2.webp") center / contain no-repeat,
    rgba(7,13,10,.65);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 10px 22px rgba(0,0,0,.34);
}

.topnav .brand::after{
  content:"AOW SMP";
  position:relative;
  left:auto;
  top:auto;
  width:auto;
  height:auto;
  transform:none;
  opacity:1;
  background:none;
  color:var(--text);
  font-size:15px;
  letter-spacing:.06em;
}

.topnav .brand span{
  display:none;
}

.topnav .brand:hover::after,
.topnav .brand:focus-visible::after{
  text-shadow:0 0 12px rgba(121,211,111,.38);
}

.topnav .brand:hover,
.topnav .brand:focus-visible{
  transform:translateY(-1px);
}

.topnav a{
  color:var(--muted);
  font-size:13.5px;
  font-weight:900;
  text-transform:none;
  display:inline-flex;
  align-items:center;
  min-height:35px;
  padding:0 11px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  white-space:nowrap;
  transition:border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
  position:relative;
  line-height:1;
}

.topnav a:hover,
.topnav a:focus-visible,
.topnav a.active,
.topnav a[aria-current="page"]{
  color:#fff;
  border-color:rgba(121,211,111,.45);
  background:rgba(121,211,111,.12);
  transform:translateY(-1px);
}

.topnav a.active::after,
.topnav a[aria-current="page"]::after{
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  bottom:6px;
  height:2px;
  border-radius:999px;
  background:linear-gradient(90deg,rgba(121,211,111,0),rgba(107,185,235,.75),rgba(241,191,82,.58),rgba(121,211,111,0));
}

.topnav a:focus-visible{
  outline:none;
  box-shadow:var(--focus-ring);
}

.topnav .spacer{
  flex:1;
}

.topnav .ip{
  padding:6px 10px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:999px;
  background:rgba(0,0,0,.26);
  color:var(--text);
  font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
  font-size:12px;
  white-space:nowrap;
}

.wrap{
  width:min(var(--doc-max), calc(100% - 24px));
  margin:0 auto;
  padding-left:0;
  padding-right:0;
}

.page-head{
  position:relative;
  padding:56px 0 32px;
}

.page-head::after{
  content:"";
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:0;
  width:100%;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(241,191,82,.24),rgba(107,185,235,.24),transparent);
}

.eyebrow{
  color:var(--gold);
  letter-spacing:.11em;
  text-transform:uppercase;
  font-size:.73rem;
  font-weight:950;
}

h1{
  margin:10px 0 8px;
  font-size:clamp(2.05rem,6vw,4.2rem);
  max-width:28ch;
  line-height:.96;
}

p, .lead{
  color:var(--muted);
}

.page-sub{
  max-width:860px;
  color:var(--muted);
  font-size:1.02rem;
  margin:0;
}

main{
  padding-top:32px;
  padding-bottom:52px;
}

main section{
  padding:42px 0 0;
}

h2{
  margin:0;
  font-size:clamp(1.35rem,2.7vw,2.05rem);
}

h2 .n{
  color:var(--green);
  font-weight:950;
}

.lead{
  margin-top:10px;
  max-width:80ch;
}

.cards{
  margin-top:14px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:12px;
}

.cards.three{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.card{
  background:
    linear-gradient(180deg,rgba(19,31,25,.96),rgba(8,14,12,.98));
  border:1px solid rgba(255,255,255,.09);
  border-radius:var(--radius);
  padding:16px 16px;
  transition:border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.card:hover{
  border-color:rgba(121,211,111,.3);
  transform:translateY(-2px);
}

.card .nm{
  color:var(--text);
  font-size:1.02rem;
  margin:0 0 7px;
  font-weight:950;
}

.card .cm{
  color:var(--gold);
  display:block;
  margin-bottom:8px;
  font-size:.86rem;
  font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
}

.card p,
.grp + .cards p{
  color:var(--muted);
  font-size:.95rem;
}

.card .i{
  margin-top:9px;
}

.asset-preview{
  width:100%;
  border:1px solid rgba(255,255,255,.12);
  border-radius:calc(var(--radius) + 2px);
  background:rgba(0,0,0,.2);
  object-fit:contain;
  display:block;
}

.asset-row{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  gap:10px;
  margin:10px 0 0;
}

.asset-row img{
  background:rgba(255,255,255,.03);
}

.asset-row .asset-caption{
  margin:6px 0 0;
  font-size:.74rem;
  color:var(--muted);
}

.asset-tile{
  text-align:center;
}
.grp{
  margin:22px 0 10px;
  color:var(--cyan);
  font-size:.95rem;
  font-weight:920;
  letter-spacing:.01em;
}

.join{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.btns{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

.btn{
  border-radius:var(--radius);
  min-height:40px;
  padding:0 14px;
  border-color:rgba(255,255,255,.12);
}

.btn.p{
  border-color:rgba(137,228,119,.72);
  background:
    linear-gradient(180deg,rgba(255,255,255,.12),transparent 42%),
    linear-gradient(180deg,#4f9148,#2f6c3a);
}

.stats,
.brand-stats{
  margin-top:14px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.stat{
  background:rgba(255,255,255,.02);
  border:1px solid rgba(255,255,255,.13);
  border-radius:var(--radius);
  padding:8px 12px;
  min-width:0;
  color:var(--muted);
  font-size:.86rem;
}

.stat b{
  color:var(--text);
  display:block;
  font-size:1rem;
}

code,.cmd{
  color:#ebffec;
  background:#070b0a;
  border:1px solid rgba(255,255,255,.12);
  border-radius:8px;
  padding:0 7px;
  font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
  font-size:.86rem;
}

pre{
  background:#070b0a;
  border:1px solid rgba(255,255,255,.11);
  border-radius:var(--radius);
  padding:14px 16px;
  overflow:auto;
  color:#d9e3ec;
  line-height:1.5;
}

pre code{
  color:inherit;
  background:none;
  border:0;
  padding:0;
}

table{
  width:100%;
  max-width:100%;
  border-collapse:collapse;
  color:var(--muted);
  margin:14px 0;
  font-size:.9rem;
}

th,td{
  border-bottom:1px solid rgba(255,255,255,.1);
  padding:10px 8px;
  text-align:left;
  vertical-align:top;
}

th{
  color:#d9ead7;
  font-size:.72rem;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.callout{
  margin:12px 0 0;
  border:1px solid rgba(255,255,255,.11);
  border-left-width:4px;
  border-left-color:var(--gold);
  border-radius:var(--radius);
  padding:14px 16px;
  background:rgba(8,14,12,.84);
  color:var(--muted);
  font-size:.95rem;
}

.callout b{
  color:var(--text);
}

.callout.tip{ border-left-color:var(--green); }
.callout.warn{ border-left-color:var(--gold); }
.callout.info{ border-left-color:var(--cyan); }

.badge{
  display:inline-block;
  margin-left:4px;
  border:1px solid rgba(255,255,255,.2);
  border-radius:8px;
  padding:1px 7px;
  font-size:.74rem;
  color:var(--muted);
  background:rgba(255,255,255,.04);
}

.badge.v{
  color:#9fcdf0;
  border-color:rgba(107,185,235,.36);
  background:rgba(107,185,235,.1);
}

.pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.pill{
  border:1px solid rgba(255,255,255,.13);
  border-radius:999px;
  padding:6px 10px;
  background:rgba(255,255,255,.02);
  color:var(--text);
  font-size:.78rem;
}

.pill b{
  margin-right:8px;
}

.pill.cx{
  border-color:rgba(121,211,111,.42);
  background:rgba(121,211,111,.08);
}

footer{
  margin-top:60px;
  border-top:1px solid rgba(255,255,255,.06);
  padding:28px 0 32px;
  color:var(--muted);
  text-align:left;
  font-size:.9rem;
  line-height:1.45;
  background:
    linear-gradient(180deg,rgba(7,13,10,.12),rgba(4,7,5,.94)),
    radial-gradient(900px 140px at 10% -18%,rgba(121,211,111,.09),rgba(7,13,10,0));
  border-radius:14px 14px 0 0;
}

footer b{
  color:var(--text);
}

footer a{
  color:#dff7d8;
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-color:rgba(121,211,111,.35);
}

footer a:hover,
footer a:focus-visible{
  color:#fff;
  text-decoration-color:rgba(121,211,111,.72);
}

footer code{
  display:inline-flex;
  align-items:center;
  min-height:23px;
  padding:2px 8px;
  margin:0 1px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:9px;
  background:rgba(255,255,255,.01);
}

footer .wrap{
  width:min(var(--doc-max), calc(100% - 24px));
  display:grid;
  gap:10px 14px;
  align-items:center;
}

.plugin-toolbar{
  display:grid;
  gap:10px;
  grid-template-columns:1fr auto;
  align-items:center;
  margin-top:12px;
}

.plugin-toolbar .filter-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-start;
}

.filter-chip{
  min-height:34px;
}

.plugin-search{
  min-height:40px;
  border-radius:var(--radius);
  border:1px solid rgba(255,255,255,.13);
  padding:0 12px;
  background:rgba(0,0,0,.22);
  color:var(--text);
  width:100%;
  max-width:440px;
}

.plugin-search:focus-visible{
  outline:none;
  box-shadow:var(--focus-ring);
  border-color:rgba(121,211,111,.6);
}

.plugin-grid{
  margin-top:12px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:10px;
}

.plugin-card{
  min-height:128px;
  padding:14px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:var(--radius);
  background:linear-gradient(180deg,rgba(16,24,20,.95),rgba(8,14,12,.94));
  display:grid;
  gap:8px;
}

.plugin-card h3{
  margin:0;
  color:#f5f7ee;
  font-size:1.02rem;
}

.plugin-card p{
  margin:0;
  color:var(--muted);
  font-size:.9rem;
}

.plugin-card .meta-line{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
  font-size:.74rem;
  color:var(--muted);
}

.plugin-card .meta-line code{
  color:var(--text);
  font-size:.72rem;
}

.plugin-card .tag{
  border-radius:999px;
  padding:2px 8px;
  border:1px solid rgba(255,255,255,.14);
  color:var(--dim);
}

.plugin-card .tag[data-type="custom"]{
  border-color:rgba(121,211,111,.42);
  color:#d1f1ca;
}

.plugin-card .tag[data-type="thirdparty"]{
  border-color:rgba(107,185,235,.4);
  color:#cce3ff;
}

.empty-state{
  border:1px dashed rgba(255,255,255,.24);
  border-radius:var(--radius);
  padding:14px;
  color:var(--muted);
  background:rgba(255,255,255,.02);
}

@media (max-width:960px){
  .topnav .inner,
  .wrap{
    width:min(var(--doc-max), calc(100% - 18px));
  }

  .topnav .brand span{
    display:none;
  }
}

@media (max-width:820px){
  .topnav .brand{
    width:auto;
    min-width:100%;
    margin-right:0;
    justify-content:flex-start;
  }

  .topnav .spacer{
    display:none;
  }

  .topnav .ip{
    margin-left:0;
  }

  .cards,
  .cards.three,
  .join{
    grid-template-columns:1fr;
  }

  .plugin-toolbar{
    grid-template-columns:1fr;
  }

  .plugin-toolbar .filter-chips{
    justify-content:stretch;
  }

  .filter-chip{
    width:100%;
    justify-content:center;
  }

  table{
    display:block;
    overflow-x:auto;
    white-space:normal;
    -webkit-overflow-scrolling:touch;
  }
}

/* Docs brand-system alignment with public AOWMC pages */
.topnav{
  border-bottom:1px solid rgba(207,228,198,.12);
  background:
    linear-gradient(180deg,rgba(3,7,5,.96),rgba(5,10,8,.9)),
    linear-gradient(90deg,rgba(121,211,111,.07),transparent 45%,rgba(107,185,235,.055));
  box-shadow:0 16px 34px rgba(0,0,0,.34);
  overflow:hidden;
}

.topnav::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:7px;
  background:
    linear-gradient(90deg,rgba(121,211,111,.8),rgba(241,191,82,.9),rgba(107,185,235,.65)),
    url("../assets/terrain-border.webp") left bottom / auto 30px repeat-x;
  pointer-events:none;
}

.topnav .inner{
  width:min(1240px, calc(100% - 32px));
  min-height:76px;
  gap:8px;
  flex-wrap:nowrap;
}

.topnav .brand{
  min-width:max-content;
  margin-right:10px;
  padding:5px 12px 5px 5px;
  border:1px solid rgba(207,228,198,.14);
  border-radius:8px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.04),rgba(0,0,0,.16)),
    rgba(10,17,14,.78);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 12px 26px rgba(0,0,0,.22);
}

.topnav .brand::before{
  width:44px;
  height:44px;
  border-radius:6px;
  border-color:rgba(121,211,111,.28);
}

.topnav .brand::after{
  content:"AOW SMP";
  display:block;
  color:#fff;
  font-family:Impact,"Arial Black",system-ui,sans-serif;
  font-size:1.1rem;
  letter-spacing:.05em;
  text-shadow:0 2px 0 #000;
}

.topnav a{
  min-height:40px;
  padding:0 11px;
  border-radius:6px;
  border-color:rgba(207,228,198,.12);
  background:
    linear-gradient(180deg,rgba(255,255,255,.045),rgba(0,0,0,.16)),
    rgba(21,29,25,.78);
  color:#c9d5c4;
  font-size:.78rem;
  font-weight:950;
  letter-spacing:.03em;
  text-transform:uppercase;
  clip-path:polygon(7px 0,100% 0,100% calc(100% - 7px),calc(100% - 7px) 100%,0 100%,0 7px);
}

.topnav a:hover,
.topnav a:focus-visible,
.topnav a.active,
.topnav a[aria-current="page"]{
  border-color:rgba(121,211,111,.44);
  background:
    linear-gradient(180deg,rgba(121,211,111,.18),rgba(121,211,111,.06)),
    rgba(18,30,23,.86);
}

.topnav .ip{
  min-height:40px;
  display:inline-flex;
  align-items:center;
  border-radius:6px;
  border-color:rgba(241,191,82,.24);
  background:rgba(16,19,14,.78);
  clip-path:polygon(7px 0,100% 0,100% calc(100% - 7px),calc(100% - 7px) 100%,0 100%,0 7px);
}

.wrap{
  width:min(1240px, calc(100% - 36px));
}

.page-head{
  padding:64px 0 36px;
  background:
    linear-gradient(90deg,rgba(4,8,6,.88),rgba(4,8,6,.48),rgba(4,8,6,.9)),
    url("../assets/aow-hero-world-v3.png") center / cover no-repeat;
  border-bottom:1px solid rgba(207,228,198,.12);
}

.eyebrow{
  color:var(--gold);
  text-shadow:0 2px 0 rgba(0,0,0,.32);
}

.page-head h1{
  font-size:clamp(2.5rem,6.8vw,5rem);
  text-shadow:0 6px 0 rgba(0,0,0,.22);
}

.cards{
  gap:14px;
}

.card{
  position:relative;
  overflow:hidden;
  border-color:rgba(207,228,198,.13);
  border-radius:8px;
  background:
    linear-gradient(180deg,rgba(31,42,35,.86),rgba(8,13,11,.98)),
    radial-gradient(420px 140px at 18% 0%,rgba(121,211,111,.08),transparent 70%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.055),
    inset 0 0 0 1px rgba(0,0,0,.28),
    0 20px 54px rgba(0,0,0,.2);
}

.card::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:9px;
  background:url("../assets/terrain-border.webp") left bottom / auto 28px repeat-x;
  image-rendering:pixelated;
  opacity:.3;
}

.card .nm{
  color:#fff;
  font-size:1.08rem;
}

.btn{
  border-radius:6px;
  clip-path:polygon(7px 0,100% 0,100% calc(100% - 7px),calc(100% - 7px) 100%,0 100%,0 7px);
}

footer{
  margin-top:28px;
  border-top:1px solid rgba(207,228,198,.12);
  background:
    linear-gradient(180deg,rgba(5,9,7,.86),rgba(2,4,3,.98)),
    url("../assets/aow-hero-world-v3.png") center bottom / min(1800px,140vw) auto no-repeat,
    #030504;
  position:relative;
}

footer::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:10px;
  background:
    linear-gradient(90deg,rgba(121,211,111,.65),rgba(241,191,82,.76),rgba(107,185,235,.55)),
    url("../assets/terrain-border.webp") left bottom / auto 30px repeat-x;
  pointer-events:none;
}

footer .wrap{
  padding:34px 0 36px;
}

.docs-footer-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(360px,.9fr);
  gap:24px;
  align-items:start;
}

.docs-footer-brand{
  display:grid;
  gap:10px;
}

.docs-footer-brand b{
  color:#fff;
  font-family:var(--font-display);
  font-size:clamp(1.7rem,3vw,2.55rem);
  line-height:.92;
  text-transform:uppercase;
  text-shadow:0 3px 0 rgba(0,0,0,.42);
}

.docs-footer-brand p{
  max-width:62ch;
  margin:0;
  color:#b7c5b8;
}

.docs-footer-panel{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  padding:12px;
  border:1px solid rgba(207,228,198,.14);
  border-radius:8px;
  background:rgba(5,10,8,.68);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}

.docs-footer-panel span{
  display:flex;
  flex-wrap:wrap;
  gap:6px 10px;
  align-items:center;
  justify-content:space-between;
  min-height:38px;
  padding:8px 10px;
  border:1px solid rgba(207,228,198,.08);
  border-radius:6px;
  background:rgba(0,0,0,.18);
}

.docs-footer-panel strong{
  color:#94a39b;
  font-size:.78rem;
  letter-spacing:.03em;
  text-transform:uppercase;
}

.docs-footer-panel code,
.docs-footer-panel a{
  color:#f3f7ef;
  font-weight:900;
}

@media (max-width:1040px){
  .topnav .inner{
    flex-wrap:wrap;
  }

  .docs-footer-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:720px){
  .topnav .inner,
  .wrap{
    width:min(1240px, calc(100% - 20px));
  }

  .topnav a{
    min-height:38px;
  }

  .topnav .ip{
    display:none;
  }

  .page-head{
    padding:44px 0 28px;
  }

  .cards.three{
    grid-template-columns:1fr;
  }

  .docs-footer-panel{
    grid-template-columns:1fr;
  }
}

/* Docs-wide polish pass: command hall headers, custom panels, generated asset previews */
body:not(.docs-home)::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  pointer-events:none;
  background:
    linear-gradient(180deg,rgba(5,9,7,.74),rgba(5,9,7,.96) 56%,#050806),
    url("../assets/aow-command-hall-v1.webp") center top / min(1800px,145vw) auto no-repeat;
  opacity:.28;
}

body:not(.docs-home) .page-head{
  width:min(var(--doc-max), calc(100% - 24px));
  margin:34px auto 0;
  padding:42px 28px 34px;
  border:1px solid rgba(207,228,198,.14);
  border-radius:8px;
  overflow:hidden;
  background:
    linear-gradient(90deg,rgba(3,7,6,.97),rgba(3,7,6,.76) 55%,rgba(3,7,6,.46)),
    linear-gradient(180deg,rgba(3,7,6,.12),rgba(3,7,6,.88)),
    url("../assets/aow-command-hall-v1.webp") center / cover no-repeat;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 24px 70px rgba(0,0,0,.32);
  clip-path:polygon(0 0,calc(100% - 16px) 0,100% 16px,100% 100%,16px 100%,0 calc(100% - 16px));
}

body:not(.docs-home) .page-head::after{
  left:0;
  right:0;
  bottom:0;
  width:100%;
  transform:none;
  height:12px;
  background:
    linear-gradient(90deg,rgba(121,211,111,.52),rgba(241,191,82,.44),rgba(107,185,235,.34)),
    url("../assets/terrain-border.webp") left bottom / auto 34px repeat-x;
  image-rendering:pixelated;
}

body:not(.docs-home) .page-title,
body:not(.docs-home) .page-sub,
body:not(.docs-home) .eyebrow{
  position:relative;
  z-index:1;
}

body:not(.docs-home) .page-sub{
  color:#e4eee0;
  text-shadow:0 2px 8px rgba(0,0,0,.5);
}

.card,
.stat,
.callout,
table,
.docs-footer-panel,
.docs-home .playbook-card,
.docs-home .spine-card{
  clip-path:polygon(0 0,calc(100% - 12px) 0,100% 12px,100% 100%,12px 100%,0 calc(100% - 12px));
}

.card,
.stat,
.callout{
  position:relative;
  background:
    linear-gradient(180deg,rgba(24,38,31,.88),rgba(7,12,10,.98)),
    radial-gradient(320px 120px at 18% 0%,rgba(121,211,111,.08),transparent 70%);
  border-color:rgba(207,228,198,.13);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.055),
    inset 0 0 0 1px rgba(0,0,0,.25),
    0 18px 44px rgba(0,0,0,.2);
}

.card::after,
.stat::after,
.callout::after{
  content:"";
  position:absolute;
  right:9px;
  bottom:9px;
  width:16px;
  height:16px;
  border-right:2px solid rgba(241,191,82,.32);
  border-bottom:2px solid rgba(241,191,82,.32);
  pointer-events:none;
}

.asset-preview[src*="aow-edition"]{
  object-fit:contain;
  padding:0;
  background:
    radial-gradient(circle at 50% 42%,rgba(121,211,111,.14),transparent 68%),
    rgba(0,0,0,.2);
  filter:drop-shadow(0 16px 22px rgba(0,0,0,.42));
}

@media (max-width:720px){
  body:not(.docs-home) .page-head{
    width:min(var(--doc-max), calc(100% - 20px));
    margin-top:18px;
    padding:28px 18px;
  }
}

/* Docs index bookshelf/playbook polish */
.docs-home{
  background:
    linear-gradient(180deg,rgba(3,7,5,.86),rgba(6,10,8,.96) 520px,#050806 72%),
    radial-gradient(840px 320px at 16% 0%,rgba(121,211,111,.12),transparent 68%),
    radial-gradient(900px 360px at 82% 8%,rgba(107,185,235,.1),transparent 66%),
    #050806;
}

.docs-home::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  background:
    linear-gradient(180deg,rgba(4,8,6,.34),#050806 78%),
    url("../assets/aow-hero-world-v3.png") center top / min(1900px,150vw) auto no-repeat;
  opacity:.42;
  pointer-events:none;
}

.docs-home .docs-hero{
  overflow:hidden;
  padding:58px 0 44px;
  background:
    linear-gradient(90deg,rgba(3,6,5,.96),rgba(3,6,5,.78) 42%,rgba(3,6,5,.92)),
    linear-gradient(180deg,rgba(11,18,14,.24),rgba(5,8,6,.94)),
    url("../assets/aow-hero-world-v3.png") center / cover no-repeat;
}

.docs-home .docs-hero::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:11px;
  background:
    linear-gradient(90deg,rgba(121,211,111,.72),rgba(241,191,82,.84),rgba(107,185,235,.62)),
    url("../assets/terrain-border.webp") left bottom / auto 32px repeat-x;
  image-rendering:pixelated;
  pointer-events:none;
}

.docs-home .docs-hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(340px,440px);
  gap:30px;
  align-items:center;
}

.docs-home .docs-hero-copy{
  position:relative;
  z-index:1;
  max-width:760px;
}

.docs-home .docs-hero h1{
  max-width:12ch;
}

.docs-home .page-sub{
  max-width:720px;
  color:#dbe7d3;
  font-size:clamp(1rem,1.5vw,1.16rem);
}

.docs-home .docs-hero-actions{
  margin-top:18px;
}

.docs-home .docs-shelf-stats{
  margin-top:20px;
  display:grid;
  grid-template-columns:repeat(4,minmax(130px,1fr));
}

.docs-home .docs-shelf-stats .stat{
  min-height:68px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  border-color:rgba(232,221,197,.16);
  border-radius:6px;
  background:
    linear-gradient(180deg,rgba(22,30,25,.9),rgba(6,10,8,.96)),
    rgba(0,0,0,.2);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 14px 30px rgba(0,0,0,.2);
  clip-path:polygon(7px 0,100% 0,100% calc(100% - 7px),calc(100% - 7px) 100%,0 100%,0 7px);
}

.docs-home .docs-shelf-stats .stat strong{
  display:block;
  color:#fff;
  font-size:1.05rem;
  line-height:1.1;
}

.docs-library-panel{
  position:relative;
  overflow:hidden;
  min-height:430px;
  border:1px solid rgba(232,221,197,.18);
  border-radius:8px;
  background:#050806;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 28px 80px rgba(0,0,0,.36);
}

.docs-library-panel::before{
  content:"";
  position:absolute;
  z-index:2;
  left:0;
  right:0;
  top:0;
  height:9px;
  background:url("../assets/terrain-border.webp") left bottom / auto 28px repeat-x;
  image-rendering:pixelated;
  opacity:.55;
  pointer-events:none;
}

.docs-library-panel::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(180deg,rgba(0,0,0,.08),rgba(0,0,0,.72)),
    radial-gradient(380px 220px at 50% 28%,rgba(121,211,111,.16),transparent 72%);
  pointer-events:none;
}

.docs-library-art{
  position:absolute;
  inset:0;
}

.docs-library-art img{
  width:100%;
  height:100%;
  object-fit:cover;
  filter:saturate(1.04) contrast(1.06);
}

.docs-library-copy{
  position:absolute;
  z-index:3;
  left:22px;
  right:22px;
  bottom:22px;
  display:grid;
  gap:8px;
  text-shadow:0 3px 16px rgba(0,0,0,.88);
}

.docs-library-copy strong{
  color:#fff;
  font-size:1.28rem;
  line-height:1.1;
}

.docs-library-copy span{
  color:#e2ebdc;
  font-size:.94rem;
  line-height:1.45;
}

.docs-home main{
  padding-top:42px;
}

.docs-home main section{
  scroll-margin-top:96px;
}

.docs-home .section-head{
  position:relative;
  display:grid;
  grid-template-columns:minmax(240px,470px) minmax(0,1fr);
  gap:20px;
  align-items:end;
  margin-bottom:16px;
  padding-bottom:12px;
}

.docs-home .section-head::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:2px;
  background:linear-gradient(90deg,rgba(121,211,111,.72),rgba(241,191,82,.62),rgba(107,185,235,.36),transparent);
}

.docs-home .section-head .lead{
  justify-self:end;
  max-width:620px;
  margin:0;
}

.docs-home .playbook-cards{
  gap:16px;
}

.docs-home .playbook-card{
  isolation:isolate;
  min-height:220px;
  display:flex;
  flex-direction:column;
  padding:22px;
  border-color:rgba(232,221,197,.16);
  background:
    linear-gradient(135deg,rgba(9,15,12,.98),rgba(27,39,32,.82) 58%,rgba(4,8,7,.98)),
    radial-gradient(280px 170px at 14% 12%,rgba(121,211,111,.15),transparent 72%);
  clip-path:polygon(0 0,calc(100% - 17px) 0,100% 17px,100% 100%,17px 100%,0 calc(100% - 17px));
}

.docs-home .playbook-card::before{
  left:22px;
  right:22px;
  top:58px;
  height:2px;
  background:linear-gradient(90deg,var(--green),var(--gold),rgba(107,185,235,.52),transparent);
  opacity:.72;
}

.docs-home .playbook-card::after{
  content:"";
  position:absolute;
  inset:12px;
  z-index:-1;
  border:1px solid rgba(255,255,255,.055);
  clip-path:polygon(0 0,calc(100% - 12px) 0,100% 12px,100% 100%,12px 100%,0 calc(100% - 12px));
  pointer-events:none;
}

.docs-home .playbook-index{
  display:inline-grid;
  place-items:center;
  width:max-content;
  min-width:46px;
  height:46px;
  margin-bottom:27px;
  padding:0 9px;
  border:1px solid rgba(241,191,82,.42);
  border-radius:7px;
  color:var(--gold);
  background:
    linear-gradient(180deg,rgba(241,191,82,.18),rgba(241,191,82,.07)),
    rgba(0,0,0,.2);
  font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
  font-size:.78rem;
  font-weight:950;
  line-height:1;
}

.docs-home .playbook-card .nm,
.docs-home .playbook-card .cm,
.docs-home .playbook-card p,
.docs-home .playbook-card .btns{
  position:relative;
  z-index:1;
}

.docs-home .playbook-card p{
  flex:1;
}

.docs-home .docs-bookshelf{
  position:relative;
  overflow:hidden;
  margin-top:58px;
  padding:30px;
  border:1px solid rgba(232,221,197,.18);
  border-radius:8px;
  background:
    linear-gradient(180deg,rgba(3,6,5,.62),rgba(3,6,5,.78) 38%,rgba(3,6,5,.56)),
    url("../assets/aow-library-shelf-v1.png") center / cover no-repeat,
    #050806;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 28px 80px rgba(0,0,0,.3);
}

.docs-home .docs-bookshelf::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg,rgba(0,0,0,.42),transparent 18%,transparent 82%,rgba(0,0,0,.42)),
    radial-gradient(620px 260px at 50% 44%,rgba(42,208,132,.13),transparent 70%);
  pointer-events:none;
}

.docs-home .docs-bookshelf .section-head,
.docs-home .docs-book-grid{
  position:relative;
  z-index:1;
}

.docs-home .docs-bookshelf .section-head{
  text-shadow:0 4px 18px rgba(0,0,0,.72);
}

.docs-home .docs-bookshelf .section-head::after{
  opacity:.72;
}

.docs-home .docs-bookshelf .lead{
  color:#edf4e8;
}

.docs-home .docs-book-grid{
  grid-template-columns:repeat(7,minmax(94px,1fr));
  align-items:end;
  min-height:318px;
  gap:12px;
  padding:36px 20px 19px;
}

.docs-home .docs-book-grid::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:18px;
  border-radius:3px;
  background:
    linear-gradient(180deg,rgba(122,72,35,.72),rgba(38,21,12,.92)),
    linear-gradient(90deg,rgba(255,255,255,.12),transparent 22%,transparent 78%,rgba(255,255,255,.08));
  box-shadow:0 -9px 22px rgba(0,0,0,.34),0 8px 22px rgba(0,0,0,.48);
  pointer-events:none;
}

.docs-home .book-card{
  --book-a:#253b31;
  --book-b:#0b1411;
  --book-accent:#79d36f;
  --book-angle:-1deg;
  min-height:246px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:18px 12px 22px 18px;
  border-color:rgba(232,221,197,.22);
  border-radius:5px 10px 8px 5px;
  background:
    linear-gradient(90deg,rgba(0,0,0,.34) 0 12px,transparent 12px),
    linear-gradient(135deg,var(--book-a),var(--book-b) 70%),
    radial-gradient(180px 120px at 50% 0%,rgba(121,211,111,.14),transparent 70%);
  box-shadow:
    inset -9px 0 12px rgba(255,255,255,.035),
    inset 5px 0 10px rgba(0,0,0,.32),
    0 16px 26px rgba(0,0,0,.44);
  transform:rotate(var(--book-angle));
}

.docs-home .book-card::before{
  left:10px;
  top:14px;
  bottom:14px;
  width:4px;
  height:auto;
  right:auto;
  background:linear-gradient(180deg,transparent,var(--book-accent),transparent);
  opacity:.68;
}

.docs-home .book-card::after{
  content:"";
  position:absolute;
  inset:10px 9px 10px 22px;
  border:1px solid rgba(232,221,197,.18);
  border-radius:3px 8px 6px 3px;
  pointer-events:none;
}

.docs-home .book-card:nth-child(2){
  --book-a:#172f38;
  --book-b:#071217;
  --book-accent:#6bb9eb;
  --book-angle:1.1deg;
  min-height:258px;
}

.docs-home .book-card:nth-child(3){
  --book-a:#3a2b1f;
  --book-b:#130b07;
  --book-accent:#f1bf52;
  --book-angle:-.6deg;
  min-height:236px;
}

.docs-home .book-card:nth-child(4){
  --book-a:#263026;
  --book-b:#090d0a;
  --book-accent:#e7dfcb;
  --book-angle:.9deg;
  min-height:268px;
}

.docs-home .book-card:nth-child(5){
  --book-a:#12362c;
  --book-b:#06110e;
  --book-accent:#20d384;
  --book-angle:-1.1deg;
  min-height:248px;
}

.docs-home .book-card:nth-child(6){
  --book-a:#34233b;
  --book-b:#100912;
  --book-accent:#d58cff;
  --book-angle:.7deg;
  min-height:254px;
}

.docs-home .book-card:nth-child(7){
  --book-a:#2f3a22;
  --book-b:#0c1108;
  --book-accent:#a8dc6d;
  --book-angle:-.8deg;
  min-height:238px;
}

.docs-home .book-card:hover,
.docs-home .book-card:focus-visible{
  border-color:rgba(232,221,197,.46);
  box-shadow:
    inset -9px 0 12px rgba(255,255,255,.05),
    inset 5px 0 10px rgba(0,0,0,.32),
    0 20px 34px rgba(0,0,0,.5),
    0 0 0 1px rgba(121,211,111,.22);
  transform:translateY(-10px) rotate(0deg);
}

.docs-home .book-number{
  position:absolute;
  top:16px;
  right:14px;
  color:var(--book-accent);
  font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
  font-size:.72rem;
  font-weight:950;
  letter-spacing:.04em;
}

.docs-home .book-card .nm{
  position:relative;
  z-index:1;
  margin-bottom:8px;
  font-size:1.02rem;
  line-height:1.12;
  text-shadow:0 2px 8px rgba(0,0,0,.72);
}

.docs-home .book-card .cm,
.docs-home .book-card p{
  position:relative;
  z-index:1;
  text-shadow:0 2px 8px rgba(0,0,0,.72);
}

.docs-home .book-card p{
  font-size:.82rem;
  line-height:1.35;
}

.docs-home .role-library,
.docs-home .stack-library,
.docs-home .quick-link-band,
.docs-home .technical-playbooks,
.docs-home .community-playbooks{
  position:relative;
}

.docs-home .role-playbook-grid{
  gap:12px;
}

.docs-home .spine-card{
  min-height:132px;
  padding:18px 18px 18px 26px;
  background:
    linear-gradient(90deg,rgba(121,211,111,.2) 0 7px,transparent 7px),
    linear-gradient(135deg,rgba(18,27,23,.94),rgba(7,12,10,.98));
}

.docs-home .spine-card:nth-child(3n + 2){
  background:
    linear-gradient(90deg,rgba(107,185,235,.2) 0 7px,transparent 7px),
    linear-gradient(135deg,rgba(17,26,28,.94),rgba(7,12,10,.98));
}

.docs-home .spine-card:nth-child(3n){
  background:
    linear-gradient(90deg,rgba(241,191,82,.2) 0 7px,transparent 7px),
    linear-gradient(135deg,rgba(30,24,17,.94),rgba(7,12,10,.98));
}

.docs-home .quick-link-band{
  margin-top:50px;
  padding:24px;
  border:1px solid rgba(232,221,197,.14);
  border-radius:8px;
  background:
    url("../assets/terrain-border.webp") left top / auto 32px repeat-x,
    linear-gradient(135deg,rgba(11,17,14,.96),rgba(7,12,10,.9));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 20px 54px rgba(0,0,0,.18);
}

.docs-home .quick-link-band .section-head{
  margin-bottom:18px;
}

.docs-home .link-shelf{
  margin-top:0;
  gap:9px;
}

.docs-home .link-shelf .btn{
  min-height:38px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.055),rgba(0,0,0,.16)),
    rgba(21,29,25,.86);
}

.docs-home .link-shelf .btn.p{
  background:
    linear-gradient(180deg,rgba(255,255,255,.12),transparent 42%),
    linear-gradient(180deg,#4f9148,#2f6c3a);
}

@media (max-width:1120px){
  .docs-home .docs-hero-grid{
    grid-template-columns:1fr;
  }

  .docs-library-panel{
    min-height:340px;
  }

  .docs-home .docs-shelf-stats{
    grid-template-columns:repeat(2,minmax(150px,1fr));
  }

  .docs-home .docs-book-grid{
    grid-template-columns:repeat(4,minmax(110px,1fr));
    min-height:auto;
    padding-top:26px;
    row-gap:28px;
  }
}

@media (max-width:820px){
  .docs-home .docs-hero{
    padding:42px 0 30px;
  }

  .docs-home .section-head{
    display:block;
  }

  .docs-home .section-head .lead{
    margin-top:10px;
  }

  .docs-home .docs-bookshelf{
    padding:22px;
  }

  .docs-home .docs-book-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:560px){
  .docs-home .docs-shelf-stats{
    grid-template-columns:1fr;
  }

  .docs-library-panel{
    min-height:300px;
  }

  .docs-library-copy{
    left:16px;
    right:16px;
    bottom:16px;
  }

  .docs-home .docs-hero-actions .btn,
  .docs-library-copy .btn,
  .docs-home .playbook-card .btn{
    width:100%;
    justify-content:center;
  }

  .docs-home .playbook-card{
    min-height:196px;
    padding:20px;
  }

  .docs-home .playbook-card::before{
    top:54px;
    left:20px;
    right:20px;
  }

  .docs-home .docs-book-grid{
    grid-template-columns:1fr;
    padding:16px 0 20px;
  }

  .docs-home .docs-book-grid::after{
    display:none;
  }

  .docs-home .book-card,
  .docs-home .book-card:nth-child(n){
    min-height:128px;
    transform:none;
  }

  .docs-home .book-card:hover,
  .docs-home .book-card:focus-visible{
    transform:translateY(-3px);
  }

  .docs-home .quick-link-band{
    padding:20px;
  }
}

/* Docs home repair pass: indexed field-manual panels instead of generic slabs */
.docs-home .section-head{
  grid-template-columns:minmax(0,560px) minmax(260px,1fr);
  gap:24px;
  padding-top:20px;
}

.docs-home .section-head::before{
  position:absolute;
  left:0;
  top:0;
  margin:0;
}

.docs-home .section-head h2{
  justify-self:start;
  max-width:13ch;
  font-size:clamp(1.95rem,3.6vw,3.35rem);
  line-height:.92;
  text-align:left;
}

.docs-home .section-head h2 .n{
  display:inline-grid;
  place-items:center;
  width:42px;
  height:42px;
  margin-right:10px;
  border:1px solid rgba(241,191,82,.42);
  border-radius:7px;
  color:var(--gold);
  background:
    linear-gradient(180deg,rgba(241,191,82,.15),rgba(0,0,0,.18)),
    rgba(7,12,10,.76);
  font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
  font-size:.92rem;
  line-height:1;
  vertical-align:.2em;
}

.docs-home .playbook-cards{
  gap:14px;
}

.docs-home .playbook-card{
  display:grid;
  grid-template-rows:auto auto 1fr auto;
  min-height:228px;
  padding:24px 22px 22px 78px;
  border-color:rgba(232,221,197,.18);
  background:
    linear-gradient(90deg,rgba(0,0,0,.22) 0 58px,transparent 58px),
    linear-gradient(135deg,rgba(12,19,16,.98),rgba(27,39,32,.82) 58%,rgba(5,9,7,.99)),
    radial-gradient(280px 180px at 16% 8%,rgba(121,211,111,.13),transparent 72%);
}

.docs-home .playbook-card:nth-child(3n + 2){
  background:
    linear-gradient(90deg,rgba(0,0,0,.22) 0 58px,transparent 58px),
    linear-gradient(135deg,rgba(13,18,20,.98),rgba(19,35,40,.78) 58%,rgba(5,9,7,.99)),
    radial-gradient(280px 180px at 16% 8%,rgba(107,185,235,.14),transparent 72%);
}

.docs-home .playbook-card:nth-child(3n){
  background:
    linear-gradient(90deg,rgba(0,0,0,.22) 0 58px,transparent 58px),
    linear-gradient(135deg,rgba(16,15,12,.98),rgba(39,30,18,.78) 58%,rgba(5,9,7,.99)),
    radial-gradient(280px 180px at 16% 8%,rgba(241,191,82,.13),transparent 72%);
}

.docs-home .playbook-card::before{
  left:58px;
  right:auto;
  top:22px;
  bottom:22px;
  width:1px;
  height:auto;
  background:linear-gradient(180deg,transparent,rgba(241,191,82,.56),rgba(121,211,111,.44),transparent);
  opacity:.8;
}

.docs-home .playbook-index{
  position:absolute;
  left:17px;
  top:22px;
  margin:0;
  width:42px;
  min-width:42px;
  height:42px;
  box-shadow:0 10px 24px rgba(0,0,0,.22);
}

.docs-home .playbook-card .nm{
  margin-bottom:8px;
  font-size:1.18rem;
  line-height:1.08;
}

.docs-home .playbook-card .cm{
  margin-bottom:12px;
}

.docs-home .playbook-card p{
  margin:0 0 16px;
  line-height:1.52;
}

.docs-home .playbook-card .btns{
  margin-top:auto;
}

.docs-home .role-playbook-grid{
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:11px;
}

.docs-home .spine-card{
  min-height:118px;
  padding:18px 18px 18px 58px;
  clip-path:polygon(0 0,calc(100% - 12px) 0,100% 12px,100% 100%,0 100%);
}

.docs-home .spine-card::after{
  content:"";
  position:absolute;
  left:18px;
  top:18px;
  bottom:18px;
  width:20px;
  border-left:4px solid rgba(241,191,82,.34);
  border-top:1px solid rgba(232,221,197,.16);
  border-bottom:1px solid rgba(232,221,197,.16);
  pointer-events:none;
}

.docs-home .quick-link-band{
  background:
    linear-gradient(90deg,rgba(0,0,0,.18),transparent 26%,transparent 74%,rgba(0,0,0,.18)),
    url("../assets/terrain-border.webp") left top / auto 32px repeat-x,
    linear-gradient(135deg,rgba(14,20,17,.98),rgba(6,11,9,.94));
}

.docs-home .quick-link-band .section-head h2{
  max-width:15ch;
}

.docs-home .section-head .lead{
  justify-self:start;
  text-align:left;
}

@media (max-width:820px){
  .docs-home .section-head h2{
    max-width:13ch;
  }

  .docs-home .section-head h2 .n{
    width:36px;
    height:36px;
    margin-right:8px;
    font-size:.82rem;
  }
}

@media (max-width:560px){
  .docs-home .playbook-card{
    min-height:206px;
    padding:72px 18px 18px;
  }

  .docs-home .playbook-card::before{
    left:18px;
    right:18px;
    top:58px;
    bottom:auto;
    width:auto;
    height:2px;
  }

  .docs-home .playbook-index{
    left:18px;
    top:16px;
  }

  .docs-home .spine-card{
    padding-left:52px;
  }
}

/* Full docs QA repair pass: mobile chrome, long snippets, and title breathing room */
.page-title,
.page-head h1,
.docs-home h1,
.docs-home h2{
  overflow:visible;
  padding-bottom:.08em;
  margin-bottom:-.08em;
}

.step-list{
  display:grid;
  gap:10px;
  margin-top:14px;
}

.step-list .step{
  display:grid;
  grid-template-columns:minmax(130px,.28fr) minmax(0,1fr);
  gap:12px;
  align-items:start;
  min-width:0;
}

.step-list .step > span{
  min-width:0;
  overflow-wrap:anywhere;
}

code,
.cmd,
td,
th,
.card,
.stat,
.pill,
.callout{
  overflow-wrap:anywhere;
}

pre{
  white-space:pre-wrap;
}

@media (max-width:720px){
  .topnav{
    overflow:visible;
  }

  .topnav .inner{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:8px;
    min-height:auto;
    padding:8px 0;
  }

  .topnav .brand{
    width:100%;
    min-width:0;
    margin:0;
    justify-content:flex-start;
    padding:5px 10px 5px 5px;
  }

  .topnav .brand::after{
    display:block;
    font-size:1rem;
    letter-spacing:.05em;
  }

  .topnav .inner > a:not(.brand){
    justify-content:center;
    min-height:34px;
    padding:0 7px;
    font-size:.68rem;
    letter-spacing:.01em;
    white-space:nowrap;
  }

  .topnav .inner{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }

  .topnav .brand{
    grid-column:1 / -1;
  }

  .page-head h1,
  body:not(.docs-home) .page-title{
    font-size:clamp(2.1rem,12vw,3.4rem);
    line-height:.95;
  }

  .step-list .step{
    grid-template-columns:1fr;
    gap:6px;
  }

  .cards,
  .cards.three{
    grid-template-columns:1fr;
  }
}

/* Copy-to-clipboard button for code blocks */
.copy-code-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1;
  color: #b8c4c0;
  background: rgba(8, 16, 12, 0.7);
  border: 1px solid rgba(184, 196, 192, 0.2);
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.copy-code-btn:hover {
  opacity: 1;
  color: #fff;
  background: rgba(8, 16, 12, 0.9);
}
pre:hover .copy-code-btn {
  opacity: 1;
}
