/* Glossary index — slim A–Z bar, list and mini-cards.
   Know How thin bar (61px) comes from kh-thin-bars.css.
   27 Nov 2026 goa2: A–Z aligns with the theme menu; both bars use the
   section-menu shadow 0 5px 10px rgba(60,60,60,.4). */

.draft-banner{
  margin:0;
  padding:6px 16px;
  background:#fff3cd;
  border-bottom:2px solid var(--eo-ink,#16141f);
  font:600 .82rem/1.35 var(--eo-sans,system-ui,sans-serif);
  color:var(--eo-ink,#16141f);
}
.draft-banner span{
  font-weight:500;
  margin-left:.6em;
  color:#5c5748;
}

.gi-sr{
  position:absolute;
  width:1px;height:1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
}

/* Title bar + theme menu + slim A–Z stick as one block.
   GH-A: Glossary title strip (flat sage, no dots).
   Theme menu and A–Z bar each use the same section-menu drop shadow. */
.gi-stick{
  position:sticky;
  top:0;
  z-index:40;
  background:#fff;
  box-shadow:none;
}
.gi-stick .eo-subnav{
  position:relative;
  z-index:2;
  box-shadow:0 5px 10px rgba(60,60,60,.4);
}
.gi-stick .eo-mast{
  position:relative;
  background-color:#c0da99;
  background-image:none;
}
/* Plain flat sage — drop the dotted overlay on this strip only. */
.gi-stick .eo-mast::after{
  content:none !important;
  display:none !important;
  background:none !important;
  opacity:0 !important;
}

/* Slim A–Z bar — white, same section-menu shadow as the theme menu.
   Full-bleed like .eo-subnav ul, so All + letters line up with the theme All.
   Current letter uses an inset line so nothing hangs under the bar. */
.gi-azbar{
  background:#fff;
  border-top:0;
  box-shadow:0 5px 10px rgba(60,60,60,.4);
  position:relative;
  z-index:1;
}
.gi-azbar-inner{
  display:flex;
  align-items:center;
  gap:8px;
  max-width:none;
  margin:0;
  padding:0 12px;
  min-height:36px;
}
.gi-az{
  flex:1 1 0%;
  min-width:0;
  overflow:hidden;
  margin:0;
}
.gi-az ul{
  list-style:none;
  margin:0;
  padding:4px 0 6px;
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:0;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.gi-az ul::-webkit-scrollbar{display:none}
.gi-az li{flex:0 0 auto}
.gi-az a,
.gi-az span,
.gi-az-all{
  display:block;
  padding:6px 8px 7px;
  font:600 .86rem/1.1 var(--eo-label,system-ui,sans-serif);
  color:#16141f;
  text-decoration:none;
  border:0;
  background:transparent;
  cursor:pointer;
  box-shadow:none;
}
.gi-az-all{
  flex:0 0 auto;
  font:600 .78rem/1.1 var(--eo-label,system-ui,sans-serif);
  letter-spacing:.04em;
  text-transform:uppercase;
  padding:6px 10px 7px 12px;
  font-family:var(--eo-label,system-ui,sans-serif);
}
.gi-az a:hover,
.gi-az a:focus-visible,
.gi-az-all:hover,
.gi-az-all:focus-visible{
  box-shadow:inset 0 -3px 0 #16141f;
  outline:none;
}
.gi-az a[aria-current],
.gi-az-all[aria-current]{
  font-weight:800;
  box-shadow:inset 0 -3px 0 #16141f;
}
.gi-az a.is-off{color:#a9a6b2}
.gi-az span,
.gi-az a[aria-disabled="true"]{
  color:#a9a6b2;
  cursor:default;
  box-shadow:none;
  pointer-events:none;
}

/* Compact search on term pages, in the sticky bar */
.gi-az-search{
  flex:0 1 14rem;
  display:flex;
  min-width:8rem;
  margin:4px 0;
}
.gi-az-search input{
  width:100%;
  box-sizing:border-box;
  font:.9rem/1.2 var(--eo-sans,system-ui,sans-serif);
  padding:6px 12px;
  outline:0;
}

.gi-h1{margin:12px 0 8px}
.gi-intro{
  margin:0 0 16px;
  font-size:1.02rem;
  line-height:1.5;
  max-width:66ch;
}

/* Search + type chips (index only) */
.gi-controls{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:0 0 8px;
}
.gi-controls input[type="search"]{
  width:100%;
  max-width:28rem;
  box-sizing:border-box;
  font:1rem/1.3 var(--eo-sans,system-ui,sans-serif);
  padding:8px 12px;
  outline:0;
}

/* Match the header Search site bar: no ink border, white, 4px radius,
   exact shadow from cookery-header.css (body .rx-searchbar .cs-row). */
.gi-az-search input,
.gi-controls input[type="search"]{
  border:0;
  border-radius:4px;
  background:#fff;
  box-shadow:0 2px 10px rgba(32,33,36,.32);
  transition:box-shadow .15s ease;
  -webkit-appearance:none;
  appearance:none;
}
.gi-az-search input:hover,
.gi-az-search input:focus,
.gi-az-search input:focus-visible,
.gi-controls input[type="search"]:hover,
.gi-controls input[type="search"]:focus,
.gi-controls input[type="search"]:focus-visible{
  box-shadow:0 6px 24px 4px rgba(32,33,36,.5);
  outline:0;
}
.gi-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px 16px;
}
.gi-chips{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.gi-chip,
.gi-view{
  font:600 .78rem/1.2 var(--eo-label,system-ui,sans-serif);
  letter-spacing:.02em;
  border:2px solid var(--eo-ink,#16141f);
  background:#fff;
  color:var(--eo-ink,#16141f);
  padding:6px 10px;
  cursor:pointer;
  border-radius:0;
  text-decoration:none;
}
.gi-chip small{font-weight:600;opacity:.7;margin-left:.15em}
.gi-chip:hover,
.gi-chip:focus-visible,
.gi-view:hover,
.gi-view:focus-visible{
  background:#ffd400;
  outline:none;
}
.gi-chip.is-on,
.gi-view.is-on{
  background:var(--eo-ink,#16141f);
  color:#fff;
}
.gi-chip.is-on small{opacity:.85;color:#fff}
.gi-views{display:flex;gap:0}
.gi-views .gi-view:first-child{border-right-width:1px}
.gi-views .gi-view:last-child{border-left-width:1px}

.gi-count{
  font-size:.9rem;
  color:var(--eo-muted,#5c5748);
  margin:0 0 8px;
  min-height:1.2em;
}
.gi-none{font-weight:600;margin:8px 0 16px}

/* List */
.gi-sec{
  scroll-margin-top:12px;
  margin:0 0 8px;
}
.gi-letter{
  display:flex;
  align-items:baseline;
  gap:10px;
  margin:18px 0 8px;
  padding-bottom:2px;
  border-bottom:2px solid var(--eo-ink,#16141f);
  font:400 1.45rem/1 var(--eo-display,Georgia,serif);
}
.gi-letter small{
  font:600 .72rem/1 var(--eo-label,system-ui,sans-serif);
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--eo-muted,#5c5748);
}
.gi-rows{list-style:none;margin:0;padding:0}
.gi-row{
  display:grid;
  grid-template-columns:44px minmax(8.5rem,15rem) 1fr;
  gap:6px 12px;
  padding:7px 0;
  border-bottom:1px solid #e6e4ea;
  align-items:center;
}
.gi-media{
  width:44px;
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 44px;
}
.gi-media img{
  width:44px;
  height:44px;
  object-fit:cover;
  border-radius:8px;
  display:block;
  background:#eee;
}
.gi-mark{
  width:28px;
  height:28px;
  border:1.5px solid var(--eo-ink,#16141f);
  border-radius:8px;
  background:#fff8d6;
  display:flex;
  align-items:center;
  justify-content:center;
}
.gi-mark svg{width:14px;height:14px;display:block}
.gi-term-cell{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:6px 8px;
  min-width:0;
}
.gi-term{
  font-weight:700;
  color:inherit;
  text-decoration:none;
  overflow-wrap:anywhere;
}
.gi-term:hover,
.gi-term:focus-visible{text-decoration:underline}
.gi-type{
  font:600 .62rem/1.2 var(--eo-label,system-ui,sans-serif);
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--eo-muted,#5c5748);
  border:1px solid #c9c6d1;
  padding:1px 5px;
  white-space:nowrap;
}
.gi-def{
  font-size:.95rem;
  line-height:1.4;
  color:#2a2833;
  min-width:0;
  overflow-wrap:anywhere;
}
.gi-guide{
  display:inline-block;
  margin-left:.4em;
  font:600 .72rem/1.2 var(--eo-label,system-ui,sans-serif);
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--eo-ink,#16141f);
  border-bottom:1.5px solid var(--eo-ink,#16141f);
  text-decoration:none;
  white-space:nowrap;
}
.gi-guide:hover,
.gi-guide:focus-visible{background:#ffd400}
.gi-hide{display:none !important}

/* Mini cards */
.gi-cards{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  align-items:stretch;
}
.gi-card{
  display:flex;
  flex-direction:column;
  gap:6px;
  height:100%;
  box-sizing:border-box;
  padding:10px;
  background:#fff;
  text-decoration:none;
  color:inherit;
  border-radius:8px;
  box-shadow:0 1px 0 #e6e4ea;
  border:1px solid #e6e4ea;
  min-width:0;
}
.gi-card:hover,
.gi-card:focus-visible{
  border-color:var(--eo-ink,#16141f);
  outline:none;
}
.gi-card .gi-media{
  width:100%;
  height:72px;
  justify-content:flex-start;
}
.gi-card .gi-media img{
  width:72px;
  height:72px;
}
.gi-card .gi-term{
  font-size:1.02rem;
}
.gi-card .gi-def{
  font-size:.88rem;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  flex:1 1 auto;
}
.gi-view-list .gi-cards,
.gi-view-cards .gi-rows{display:none}
.gi-view-cards .gi-cards{display:grid}
.gi-view-list .gi-rows{display:block}

/* Term page Full guide call-out */
.gi-fullguide{
  margin:14px 0 0;
  max-width:42ch;
  padding:10px 14px;
  background:#fff8d6;
  border-left:4px solid var(--eo-ink,#16141f);
  font-size:1rem;
  line-height:1.45;
}
.gi-fullguide a{font-weight:700;color:inherit}
body.kh-thin .gt-photo img{
  border:0;
  box-shadow:none;
  border-radius:8px;
}

@media (max-width:980px){
  .gi-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:620px){
  .gi-intro{font-size:.95rem}
  .gi-controls input[type="search"]{max-width:none}
  .gi-row{
    grid-template-columns:44px 1fr;
    gap:4px 10px;
  }
  .gi-def{grid-column:2;font-size:.9rem}
  .gi-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .gi-card{padding:8px}
  .gi-card .gi-media,
  .gi-card .gi-media img{height:56px;width:56px}
  .draft-banner span{display:block;margin:2px 0 0}
  .gi-az a,
  .gi-az span{padding:6px 7px 7px}
  .gi-azbar-inner{flex-wrap:wrap;padding:0 8px 4px}
  /* Keep All + letters on one slim line; only the term-page search drops under.
     Left padding matches .gi-stick .gi-themes ul (8px) + a (7px) at 390. */
  .gi-az-all{flex:0 0 auto;padding-left:7px}
  .gi-az{flex:1 1 0%;min-width:0}
  .gi-az-search{flex:1 1 100%;min-width:0;order:3;margin:0 0 8px}
  /* Five theme items should fit a 390px row without a scroll arrow. */
  .gi-stick .gi-themes ul{padding:6px 8px 8px}
  .gi-stick .gi-themes a{
    padding:8px 7px 7px;
    font-size:.78rem;
    letter-spacing:.05em;
  }
}

/* GB-B: small right-aligned link at the end of each letter list */
.gi-backtop{
  margin:2px 0 14px;
  text-align:right;
}
.gi-backtop a{
  font:600 .78rem/1.2 var(--eo-label,system-ui,sans-serif);
  color:var(--eo-ink,#16141f);
  text-decoration:underline;
  text-underline-offset:2px;
}
.gi-backtop a:hover,
.gi-backtop a:focus-visible{
  outline:none;
  text-decoration-thickness:2px;
}

/* Colour trial of the slim A–Z bar (preview only; default stays white like the menu).
   A: Know How title-strip green (sherbet sage #c0da99).
   B: pale cream/yellow, distinct from the sage title but in the same family. */
body.az-colour-a .gi-azbar{
  background-color:#c0da99;
  background-image:radial-gradient(rgba(22,20,31,.09) 1.3px,transparent 1.6px);
  background-size:9px 9px;
  border-top:1px solid rgba(22,20,31,.18);
}
body.az-colour-a .gi-az a.is-off,
body.az-colour-a .gi-az span,
body.az-colour-a .gi-az a[aria-disabled="true"]{
  color:#5e7050;
}
body.az-colour-b .gi-azbar{
  background-color:#fff3b0;
  border-top:1px solid rgba(22,20,31,.12);
}
body.az-colour-b .gi-az a.is-off,
body.az-colour-b .gi-az span,
body.az-colour-b .gi-az a[aria-disabled="true"]{
  color:#8a8468;
}

/* Preview: keep Glossary + chip + 371 terms visible at 390px. */
@media (max-width:620px){
  body.kh-thin .gi-stick .eo-mast{overflow:visible}
  body.kh-thin .gi-stick .eo-mast .eo-brand > span{
    flex-wrap:wrap;
    padding-right:0;
  }
  body.kh-thin .gi-stick .eo-mast .eo-count{
    position:static !important;
    transform:none;
    margin:0 0 0 auto;
  }
}
