.cg-hub, .cg-guide {
  --cg-ink: #153f37;
  --cg-subtle: #415d54;
  --cg-line: #c5ded3;
  color: var(--cg-ink);
}
.cg-hub { margin-block: 1rem 1.65rem; }
.cg-hub h2 { margin: 0 0 .55rem; }
.cg-hub p, .cg-guide p { color: var(--cg-subtle); }
.cg-hub [hidden], .cg-guide [hidden] { display: none !important; }
.cg-search {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: min(100%, 36rem);
  margin: .6rem 0 .85rem;
}
.cg-search label {
  flex: 1 1 16rem;
  min-width: 0;
  font: 650 .925rem/1.45 var(--sans);
}
.cg-search input {
  width: 100%;
  min-width: 0;
  min-height: 2.9rem;
  padding: .62rem .95rem;
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  border-radius: .72rem;
  background: #fff;
  color: var(--cg-ink);
  border: 1px solid #a3c6b9;
}
.cg-search input::placeholder { color: #536e62; opacity: 1; }
.cg-search button, [data-cg-more] {
  min-height: 2.75rem;
  padding: .5rem .9rem;
  border: 1px solid #abcbbd;
  border-radius: .7rem;
  background: #f3faf6;
  color: #1f5649;
  font: 680 .91rem/1.38 var(--sans);
  cursor: pointer;
}
.cg-search button { flex: none; }
.cg-hub [data-cg-count]:empty { display: none; }
.cg-hub [data-cg-count] { margin: .45rem 0; font-size: .94rem; }
.cg-hub [data-cg-empty] {
  padding: 1rem; border: 1px solid var(--cg-line); border-radius: .8rem;
  background: #f3f8f5; line-height: 1.55;
}
.cg-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .5rem;
}
.cg-card {
  min-width: 0;
  min-height: 3.45rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .34rem .6rem;
  color: var(--cg-ink);
  text-decoration: none;
  border: 1px solid var(--cg-line);
  border-radius: .82rem;
  background: linear-gradient(150deg, #fff 22%, #f0f8f4);
  box-shadow: inset 0 1px 0 #fff, 0 2px 6px #164d3a0b;
  transition: border-color .17s ease, box-shadow .17s ease;
}
.cg-card-title {
  margin: 0;
  min-width: 0;
  color: var(--cg-ink);
  font: 690 .9rem/1.24 var(--sans);
  overflow-wrap: anywhere;
}
.cg-card .cg-art {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
}
.cg-art {
  width: clamp(3rem,4.6vw,3.85rem); height: clamp(3rem,4.6vw,3.85rem);
  position: relative; display: inline-grid; place-items: center; flex: none;
  border-radius: 30%;
  background: radial-gradient(ellipse at 28% 18%,var(--tone-highlight) 8%,var(--tone) 86%);
  border: 1px solid var(--tone-edge); box-shadow: inset 0 1px 0 #fff,0 2px 5px #143f3710;
}
.cg-art img { display: block; width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 2px 2px #143f3721); }
.cg-mark {
  position: absolute; inset: auto -.2rem -.08rem auto;
  display: grid; place-items: center; width: 43%; height: 43%;
  border-radius: 50%; border: 1px solid var(--tone-edge); color: var(--tone-ink);
  background: linear-gradient(145deg,#fff 33%,var(--tone));
  box-shadow: 0 1px 3px #17423428;
}
.cg-mark svg { width: 76%; height: 76%; }
.cg-card:hover, .cg-card:focus-visible {
  border-color: #5c9d86; box-shadow: 0 3px 11px #164d3a19;
}
.cg-hub :focus-visible,.cg-guide :focus-visible {
  outline: 3px solid #26775d; outline-offset: 3px;
}
.cg-hub [data-cg-more] { margin-top: .85rem; }
.cg-legacy { margin-block: .95rem .2rem; }
.cg-legacy summary, .cg-sources summary {
  width: fit-content; padding-block: .5rem; min-height: 2.75rem;
  color: #225948; font-weight: 700; cursor: pointer;
}
.cg-guide { padding-block: .8rem 2rem; }
.cg-hero {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: clamp(.8rem,3vw,2rem);
  margin: .7rem 0 1.05rem; padding: clamp(1rem,3vw,2rem);
  background: linear-gradient(111deg,#effaf4 0%,#f8faed 75%,#fff3d3 100%);
  border: 1px solid #c2decf; border-radius: 1.2rem;
}
.cg-hero h1 { margin: .17rem 0 .48rem; font: 550 clamp(1.95rem,4.2vw,3.3rem)/1.13 var(--serif); color: var(--cg-ink); overflow-wrap: anywhere; }
.cg-hero p, .cg-copy { max-width: 66ch; margin: .2rem 0 .45rem; line-height: 1.58; color: var(--cg-subtle); }
.cg-hero>.cg-art {width:clamp(4.5rem,10vw,7.1rem);height:clamp(4.5rem,10vw,7.1rem);}
.cg-badge { display: inline-block; color:#2b6352; font: 690 .9rem/1.4 var(--sans); }
.cg-actions, .cg-resource-list, .cg-related nav {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .65rem;
}
.cg-actions { margin: .75rem 0; }
.cg-sections {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
  gap: clamp(.7rem,1.5vw,1rem); margin: 1rem 0;
}
.cg-panel {
  min-width: 0; padding: clamp(.9rem,1.8vw,1.32rem);
  border: 1px solid var(--cg-line); border-radius: .9rem; background: #fff;
}
.cg-panel h2,.cg-guide .cg-related h2 {margin: 0 0 .45rem; font: 690 clamp(1.1rem,2vw,1.45rem)/1.28 var(--sans); color: var(--cg-ink); }
.cg-panel p { margin: .35rem 0 0; line-height: 1.58; }
.cg-help { background: #fff8e9; border-color: #e6d3a1; }
.cg-related { margin-block:1.1rem; }
.cg-resource-list { padding: 0; margin-block: .55rem; list-style: none; }
.cg-resource-list a, .cg-related nav a {
  display: inline-flex; align-items:center; min-height: 2.75rem; padding:.45rem .85rem;
  border-radius: .75rem; border: 1px solid #c1daca; color: #185446; background: #f3f9f5;
  text-decoration:none; font-weight: 620; line-height: 1.35;
}
.cg-resource-list a:hover,.cg-related nav a:hover {text-decoration:underline;text-underline-offset:.17em;}
.cg-sources { margin: 1.1rem 0 .75rem; padding: .3rem .85rem; border: 1px solid var(--cg-line); border-radius:.75rem; background: #fff; }
.cg-sources ul { padding-inline-start:1.3rem; margin: .12rem 0 .55rem; }
.cg-sources a { color: #1c5c4a; overflow-wrap: anywhere; }
@media (max-width: 68rem) {
 .cg-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 52rem) {
 .cg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 38rem) {
 .cg-grid { gap: .35rem; }
 .cg-card {
   flex-direction: column;
   justify-content: flex-start;
   gap: .28rem;
   min-height: 4.5rem;
   padding: .37rem .24rem .42rem;
   border-radius: .65rem;
   text-align: center;
 }
 .cg-card-title { font-size: .875rem; line-height: 1.22; text-wrap: balance; }
 .cg-card .cg-art { width: 2.15rem; height: 2.15rem; }
}
@media (max-width: 21rem) {
 .cg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
 .cg-hero {grid-template-columns: minmax(0,1fr); position:relative; padding: 1rem;}
 .cg-hero>div:first-child { min-width:0; }
 .cg-hero>.cg-art { grid-row:1; width:3.6rem; height:3.6rem; }
 .cg-hero h1 {font-size:clamp(1.85rem,7.2vw,2.35rem);}
 .cg-sections {grid-template-columns:minmax(0,1fr);}
}
@media (prefers-reduced-motion: reduce) { .cg-card {transition:none;} }
