/* guide.css — the game guide (guide.html) and the Citavon Bot guide (bot-guide.html), on the info pages' look (info.css):
   the valley, the crest, the wood-and-iron frame round parchment; the frame spans the window, a sticky section menu on its left */
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
* { box-sizing: border-box; }
.page.guide { width: auto; max-width: none; margin: 0 28px; }
.guide .frame { padding: 54px 66px 50px; }
.layout { display: grid; grid-template-columns: 256px minmax(0, 1fr); gap: 34px; align-items: start; }
.doc { min-width: 0; }
code, pre, kbd { font-family: Consolas, 'Courier New', monospace; }

/* ---- the section menu: a parchment card that stays in view */
.side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 14px 10px 12px;
  border: 1px solid rgba(160,122,62,.75); border-radius: 4px; background: rgba(255,246,222,.62);
  box-shadow: 0 1px 3px rgba(90,58,20,.3), inset 0 0 0 1px rgba(255,250,236,.5); }
.side .brand { display: block; padding: 0 8px 10px; margin-bottom: 8px; border-bottom: 1px solid rgba(160,122,62,.55); text-decoration: none; }
.side .brand b { display: block; font-size: 17px; letter-spacing: 1px; color: #5a2a0c; }
.side .brand small { display: block; font-style: italic; font-size: 13px; color: var(--quiet); }
.toc { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a { display: flex; gap: 9px; align-items: baseline; padding: 5px 8px; border-left: 3px solid transparent; border-radius: 2px;
  color: #4a2a0c; text-decoration: none; font-size: 15px; line-height: 1.4; }
.toc a:hover { background: rgba(233,196,106,.25); }
.toc a.on { background: rgba(201,162,74,.42); border-left-color: #962a18; color: #3a1206; text-shadow: 0 0 .5px #3a1206; }
.toc .n { min-width: 18px; font-size: 13px; color: #a5781e; text-align: right; }
.toc a.on .n { color: #962a18; }
.side-foot { margin-top: 10px; padding: 8px 8px 0; border-top: 1px solid rgba(160,122,62,.55); }
.ver { font-family: Consolas, 'Courier New', monospace; font-size: 12px; color: var(--quiet); }

/* ---- the opening */
.opening { text-align: center; padding: 4px 0 6px; }
.eyebrow { margin: 0 0 4px; color: #7a5a30; font-style: italic; font-size: 14px; letter-spacing: .3px; }
.eyebrow::before, .eyebrow::after { content: '❦'; margin: 0 10px; color: #a5781e; font-style: normal; }
.guide h1 { font-size: 34px; margin-bottom: 12px; }
.opening .lead.quote { max-width: 980px; margin: 0 auto 6px; font-size: 19px; line-height: 1.55; }
.cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin: 22px 0 10px; }
.cta .play { margin: 0; }
.play.alt { color: #3a2410; border-color: #a07a3e; background: linear-gradient(#fbf0d6, #e6cf9c);
  box-shadow: inset 0 0 0 2px rgba(255,250,236,.6), 0 2px 4px rgba(0,0,0,.3); }
.play.alt:hover { background: linear-gradient(#fff6e0, #efd9a8); }
.play:active { transform: translateY(1px); }
.opening + .lead { max-width: 980px; margin: 16px auto 0; }

/* ---- type */
.guide h2 { margin: 0 0 6px; display: flex; gap: 12px; align-items: center; font-size: 25px; letter-spacing: .5px; }
h2 .n { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; font: 700 16px Georgia, serif;
  color: #fff4dc; text-shadow: 0 1px 0 #3a0a04; border: 1px solid #3a0a04; background: linear-gradient(#c4482e, #962a18 55%, #741c0e);
  box-shadow: inset 0 1px 0 rgba(255,210,170,.45), inset 0 0 0 2px rgba(233,196,106,.55), 0 1px 3px rgba(0,0,0,.4); }
.guide h3 { margin: 28px 0 8px; font: 700 19px Georgia, serif; color: #5a2a0c; padding-bottom: 3px; border-bottom: 1px solid rgba(160,122,62,.45); }
.guide h4 { margin: 0 0 4px; font: 700 16.5px Georgia, serif; color: #5a2a0c; }
section .lead { text-align: left; margin: 0 0 14px; font-size: 17px; }
section { position: relative; margin-top: 40px; padding-top: 40px; }
section::before { content: '❦'; position: absolute; top: 0; left: 0; right: 0; height: 1.6em; line-height: 1.6em; text-align: center;
  font-size: 18px; color: #a5781e; transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, rgba(160,122,62,.75) 12%, rgba(160,122,62,.75) calc(50% - 22px), transparent calc(50% - 22px),
    transparent calc(50% + 22px), rgba(160,122,62,.75) calc(50% + 22px), rgba(160,122,62,.75) 88%, transparent) center / 100% 1px no-repeat; }
.guide p { margin: 10px 0; }
.guide ul, .guide ol { margin: 10px 0; padding-left: 24px; }
.guide li { margin: 5px 0; }
.guide a:hover { color: #962a18; }
p code, li code, td code, .tile code, .callout code, .pw code {
  font-size: .9em; padding: 1px 5px; border-radius: 3px; color: #4a1a08; background: rgba(122,74,28,.13); overflow-wrap: anywhere; }
.ui { display: inline-block; padding: 0 7px; font-weight: 700; font-size: .9em; line-height: 1.55; white-space: nowrap; color: #3a2410;
  border: 1px solid #a07a3e; border-radius: 3px; background: linear-gradient(#fbf0d6, #e6cf9c); box-shadow: 0 1px 1px rgba(90,58,20,.3); }
kbd { padding: 1px 6px; font-size: .85em; color: #3a2410; border: 1px solid #a07a3e; border-bottom-width: 2px; border-radius: 3px; background: #fbf2dc; }

/* ---- downloads */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 18px 0; }
.card { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 20px 22px; border: 1px solid rgba(160,122,62,.8); border-radius: 4px;
  background: rgba(255,250,236,.62); box-shadow: 0 2px 6px rgba(90,58,20,.3), inset 0 0 0 1px rgba(255,250,236,.55); }
.card .os { display: flex; gap: 14px; align-items: center; }
.card .os .ic { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%; color: #f2d58a;
  background: radial-gradient(#5a3a18, #2a180a); box-shadow: 0 0 0 2px #b8913f, 0 0 0 3px #4a2e10, 0 2px 4px rgba(0,0,0,.4); }
.card .os .ic svg { width: 24px; height: 24px; }
.card h3 { margin: 0; padding: 0; border: 0; font-size: 21px; }
.card .meta { color: var(--quiet); font-size: 14.5px; font-style: italic; }
.play.big { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; margin: 0; padding: 14px 20px; font-size: 17px; }
.play.big svg { width: 22px; height: 22px; flex: none; }
.play.big .file { text-transform: none; letter-spacing: .5px; }
.hash { font-size: 13px; color: var(--quiet); }
.hash .row { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.hash code { flex: 1; min-width: 0; padding: 6px 9px; font-size: 13px; color: #f4e4c1; word-break: break-all; border-radius: 3px;
  background: #2a1a0c; box-shadow: inset 0 1px 3px rgba(0,0,0,.6), 0 0 0 1px #6e4f26; }

/* ---- code: a dark panel inset in the parchment; Copy is the game's small parchment button */
.code { position: relative; min-width: 0; margin: 12px 0 16px; border-radius: 4px; background: linear-gradient(#2a1a0c, #21140a);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 0 0 1px #6e4f26, 0 0 0 3px rgba(184,145,63,.45); }
.code .lbl { display: block; padding: 8px 14px 0; padding-right: 96px; font: italic 13.5px Georgia, serif; color: #e9c46a; }
.code pre { margin: 0; padding: 12px 96px 12px 16px; overflow-x: auto; font-size: 14.5px; line-height: 1.55; white-space: pre; tab-size: 2; color: #f4e4c1; }
.code .lbl + pre { padding-top: 6px; }
.cm { color: #b09868; font-style: italic; }
.copy { position: absolute; top: 8px; right: 10px; padding: 0 6px; font: 700 12.5px/1.5 Georgia, serif; cursor: pointer; color: #3a2410;
  background: none; border-radius: 0; border-style: solid; border-color: transparent; border-width: 5px 10px;
  border-image: url(img/ui/skin/btn-parch.webp) 20 36 fill / 5px 10px stretch; }
.copy:hover { filter: brightness(1.1); }
.copy:active { filter: brightness(.92); transform: translateY(1px); }
.copy.ok { color: #2e5e1e; }
.hash .copy { position: static; flex: none; }
.copy:focus-visible, .play:focus-visible, .toc a:focus-visible { outline: 2px solid #962a18; outline-offset: 2px; }

/* ---- callouts: gold for a tip, red-brown for a warning, crimson for a danger */
.callout { margin: 16px 0; padding: 12px 18px; border: 1px solid #b8862a; border-left-width: 5px; border-radius: 4px;
  background: rgba(255,240,196,.6); box-shadow: 0 1px 3px rgba(90,58,20,.25); }
.callout > :first-child { margin-top: 0; } .callout > :last-child { margin-bottom: 0; }
.callout .t { display: block; margin-bottom: 2px; font-weight: 700; color: #5a2a0c; }
.callout.warn { border-color: #8a4a1c; background: rgba(255,232,206,.62); }
.callout.warn .t { color: #7a3a10; }
.callout.danger { border-color: #962a18; background: rgba(255,222,210,.62); }
.callout.danger .t { color: #7a1a0c; }

.pw-wrap { margin: 18px 0; padding: 16px 20px; border: 1px solid #b8862a; border-radius: 4px; background: rgba(255,240,196,.5);
  box-shadow: 0 1px 3px rgba(90,58,20,.25); }
.pw-wrap > b { font-size: 17.5px; color: #5a2a0c; }
.pw { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 12px 0 0; }
.pw > div { min-width: 0; padding: 14px 18px; border: 2px solid; border-radius: 4px; background: rgba(255,250,236,.7); }
.pw .b { border-color: #962a18; } .pw .a { border-color: #a5781e; }
.pw .b h4 { color: #7a1a0c; } .pw .a h4 { color: #6e4318; }
.pw p { margin: 4px 0; font-size: 15.5px; }

/* ---- numbered steps: the crest's red and gold */
ol.steps { list-style: none; padding: 0; margin: 14px 0; counter-reset: st; }
ol.steps > li { position: relative; margin: 0; padding: 2px 0 10px 44px; counter-increment: st; }
ol.steps > li::before { content: counter(st); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 29px; height: 29px;
  border-radius: 50%; font: 700 14px Georgia, serif; color: #fff4dc; text-shadow: 0 1px 0 #3a0a04; border: 1px solid #3a0a04;
  background: linear-gradient(#c4482e, #962a18 55%, #741c0e); box-shadow: inset 0 0 0 2px rgba(233,196,106,.5), 0 1px 2px rgba(0,0,0,.35); }
ol.steps > li > .code { margin: 8px 0 6px; }

/* ---- tables and tiles */
.tblwrap { overflow-x: auto; }
.tbl { width: 100%; margin: 12px 0 16px; border-collapse: collapse; font-size: 15.5px; border: 1px solid rgba(160,122,62,.75);
  background: rgba(255,250,236,.45); }
.tbl th { padding: 8px 12px; text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; color: #f2d58a;
  background: linear-gradient(#5a3418, #3a2010); }
.tbl td { padding: 9px 12px; vertical-align: top; border-top: 1px solid rgba(160,122,62,.45); }
.tbl tr:nth-child(odd) td { background: rgba(233,196,106,.12); }
.tbl th:first-child { white-space: nowrap; }
.tbl td:first-child { width: 1%; font-weight: 700; white-space: nowrap; color: #5a2a0c; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.tiles.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { min-width: 0; padding: 12px 16px; border: 1px solid rgba(160,122,62,.75); border-radius: 4px; background: rgba(255,250,236,.58);
  box-shadow: 0 1px 2px rgba(90,58,20,.25); }
.tile > b { display: block; margin-bottom: 3px; color: #4a1a08; font-size: 16px; }
.tile p { margin: 0; font-size: 15px; }
.swatch { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(58,36,16,.4); }

/* ---- troubleshooting: the details boxes of info.css */
.guide details { margin: 0 0 10px; padding: 10px 14px; }
.guide summary { font-size: 16px; }
.guide details[open] { background: rgba(255,250,236,.6); }
.guide details[open] summary { margin-bottom: 4px; }
.guide details .body > :first-child { margin-top: 6px; }
.guide details .body > :last-child { margin-bottom: 2px; }

.guide .foot a[aria-current] { color: #fff; }

/* ---- narrower windows (960px is the floor, as on every Citavon page): the menu goes to the top of the frame */
@media (max-width: 1600px) {
  .tiles.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1300px) {
  .tiles.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .layout { display: block; }
  .side { position: static; max-height: none; margin: 0 0 28px; padding: 10px 12px; }
  .side .brand { display: flex; align-items: baseline; gap: 10px; padding: 0 4px 8px; }
  .toc { display: flex; flex-wrap: wrap; gap: 4px 6px; }
  .toc a { padding: 3px 9px; border-left: 0; border: 1px solid transparent; font-size: 14.5px; }
  .toc a.on { border-color: #962a18; }
  .side-foot { display: none; }
  .play.big { padding: 13px 12px; font-size: 15px; letter-spacing: 1px; gap: 9px; }
  .guide .frame { padding: 52px 64px 46px; }
}

/* ---- the menu's parts (Getting started, Goals, Scripts…) and the search box */
.toc .part { margin: 12px 0 3px; padding: 0 8px; font: 700 12px Georgia, serif; letter-spacing: 1.5px; text-transform: uppercase; color: #8a6430; }
.toc .part:first-child { margin-top: 0; }
.find { position: relative; margin: 0 0 10px; }
.find input { width: 100%; padding: 6px 9px; font: 15px Georgia, serif; color: #3a2410; border: 1px solid #a07a3e; border-radius: 3px;
  background: #fffaf0; box-shadow: inset 0 1px 2px rgba(90,58,20,.25); }
.find input:focus { outline: 2px solid #962a18; outline-offset: 1px; }
.hits { list-style: none; margin: 4px 0 0; padding: 0; max-height: 50vh; overflow-y: auto; }
.hits li a { display: flex; justify-content: space-between; gap: 8px; padding: 4px 8px; border-radius: 2px; color: #4a2a0c; text-decoration: none; font-size: 14.5px; }
.hits li a:hover, .hits li a.sel { background: rgba(201,162,74,.42); }
.hits li a code { background: none; padding: 0; color: #4a1a08; overflow-wrap: anywhere; }
.hits li a small { flex: none; color: var(--quiet); font-style: italic; }
.hits .none { padding: 4px 8px; color: var(--quiet); font-style: italic; font-size: 14px; }

/* ---- reference entries: one goal, config key, script command or in-line command */
.entry { margin: 18px 0 22px; padding: 12px 18px 6px; border: 1px solid rgba(160,122,62,.65); border-radius: 4px;
  background: rgba(255,250,236,.5); box-shadow: 0 1px 2px rgba(90,58,20,.2); scroll-margin-top: 16px; }
.entry:target { border-color: #962a18; box-shadow: 0 0 0 2px rgba(150,42,24,.35), 0 1px 2px rgba(90,58,20,.2); }
.entry h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 18px; }
.entry h4 code { padding: 0; font-size: 18px; color: #4a1a08; background: none; }
.entry h4 a.self { margin-left: auto; font: 14px Georgia, serif; color: #a5781e; text-decoration: none; opacity: .6; }
.entry h4 a.self:hover { opacity: 1; color: #962a18; }
.tag { display: inline-block; padding: 1px 8px; font: 700 10.5px/1.6 Georgia, serif; letter-spacing: 1.2px; text-transform: uppercase;
  color: #f2d58a; border-radius: 10px; background: linear-gradient(#5a3418, #3a2010); }
dl.use { display: grid; grid-template-columns: 112px minmax(0, 1fr); margin: 8px 0 12px; font-size: 15.5px;
  border: 1px solid rgba(160,122,62,.55); border-radius: 3px;
  background: linear-gradient(90deg, rgba(122,74,28,.1) 112px, rgba(255,250,236,.45) 112px); }
dl.use dt { grid-column: 1; padding: 6px 10px; font-weight: 700; color: #5a2a0c; border-top: 1px solid rgba(160,122,62,.35); }
dl.use dd { grid-column: 2; min-width: 0; margin: 0; padding: 6px 12px; border-top: 1px solid rgba(160,122,62,.35); }
dl.use dt + dd { border-top: 1px solid rgba(160,122,62,.35); }
dl.use dd + dd { border-top: 1px dashed rgba(160,122,62,.3); }
dl.use > :first-child, dl.use > dt:first-child + dd { border-top: 0; }
dl.use dd > .tblwrap:first-child .tbl, dl.use dd > .tbl:first-child { margin-top: 2px; }
dl.use dd > :last-child { margin-bottom: 0; }
dl.use dd code { overflow-wrap: anywhere; }
.entry > p:last-child, .entry > :last-child { margin-bottom: 8px; }
.tbl.wrap1 td:first-child { width: auto; white-space: normal; }
.tbl.num td:not(:first-child), .tbl.num th:not(:first-child) { text-align: right; }
.tbl td code { white-space: nowrap; }
.tbl.wrap1 td code { white-space: normal; }

/* ---- the A–Z index */
.az-letters { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 16px; }
.az-letters a { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; font-weight: 700; color: #3a2410;
  text-decoration: none; border: 1px solid #a07a3e; border-radius: 3px; background: linear-gradient(#fbf0d6, #e6cf9c); }
.az-letters a:hover { color: #962a18; }
.az { columns: 4 220px; column-gap: 28px; }
.az .grp { break-inside: avoid; margin: 0 0 14px; }
.az .grp > b { display: block; margin-bottom: 2px; font-size: 18px; color: #962a18; border-bottom: 1px solid rgba(160,122,62,.45); }
.az .grp a { display: block; padding: 1px 0; font-size: 14.5px; text-decoration: none; color: #4a2a0c; }
.az .grp a:hover { color: #962a18; }
.az .grp a small { color: var(--quiet); font-style: italic; }

/* ---- a guide's opening: the two guides point at each other */
.other { display: block; max-width: 980px; margin: 18px auto 0; padding: 10px 16px; text-align: center; font-size: 15.5px;
  border: 1px dashed rgba(160,122,62,.8); border-radius: 4px; background: rgba(255,246,222,.5); }
