.catalog-header {
  height: 76px;
  background: radial-gradient(ellipse at 16% 0, #243b2e 0, #121e19 45%, #0e1815 100%);
  border-color: #45554a;
  box-shadow: inset 0 1px #a6cda221, 0 5px 18px #05090843;
}
.catalog-header .header-inner { gap: 18px }
.catalog-header .brand-mark {
  border-radius: 12px;
  border-color: #d6e7b6;
  background: radial-gradient(circle at 30% 15%, #f1f5d2, #c2dda5 54%, #90b083);
  box-shadow: inset 0 1px #fff9, 0 2px 0 #4b6b52, 0 0 20px #abd29325;
}
.catalog-header .navigation { flex: 1; justify-content: center; gap: clamp(3px, .7vw, 12px) }
.catalog-header .header-actions { display: none }
.catalog-header summary { cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent }
.catalog-header summary::-webkit-details-marker { display: none }
.catalog-header .header-group > summary,
.catalog-header .header-guides {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 clamp(7px, .9vw, 14px);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 16px;
  white-space: nowrap;
  font-weight: 600;
}
.header-group > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border: solid var(--muted);
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
  margin-inline: 2px;
}
.catalog-header .header-group[open] > summary,
.catalog-header .header-group > summary:hover,
.catalog-header .header-guides:is(:hover, [aria-current]),
.catalog-header .current-group { background: #263b2e; border-color: #536859; color: var(--mint) }
.catalog-header .header-guides { color: var(--ink) }
.catalog-header .navigation .header-guides::after { content: none }
.header-group[open] > summary::after { transform: translateY(2px) rotate(225deg) }
.header-links {
  background: linear-gradient(150deg, #22362d, #15221e 78%);
  border: 1px solid #566c5b;
  border-radius: 14px;
  padding: 13px;
}
.catalog-header .navigation .header-group {
  position: relative;
  --menu-width: min(620px, calc(100vw - 48px));
  --menu-gap: 15px;
  --menu-anchor: 50%;
  --menu-shift: -50%;
}
.catalog-header .navigation .header-links,
.catalog-header .navigation .header-group[open]::before {
  position: absolute;
  left: var(--menu-anchor);
  width: var(--menu-width);
  transform: translateX(var(--menu-shift));
}
.catalog-header .navigation .header-links {
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  top: calc(100% + var(--menu-gap));
  max-height: calc(100dvh - 90px);
  overflow: auto;
  box-shadow: 0 18px 34px #050c096e;
}
.catalog-header .navigation .header-group:not([open]) .header-links { display: none }
.catalog-header .navigation .header-group[open]::before {
  content: "";
  top: 100%;
  height: calc(var(--menu-gap) + 1px);
}
.catalog-header .navigation [data-group=legal] {
  --menu-width: 220px;
  --menu-anchor: 100%;
  --menu-shift: -100%;
}
.catalog-header .navigation [data-group=legal] .header-links {
  grid-template-columns: 1fr;
  padding: 8px;
}
.catalog-header .header-links a, .catalog-header .mobile-directory {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 45px;
  padding: 6px 8px;
  font-size: 16px;
  line-height: 1.3;
  white-space: normal;
  color: var(--ink);
  border-radius: 8px;
}
.catalog-header .header-links a::after { content: none }
.catalog-header .header-links a:hover,
.catalog-header .header-links a[aria-current=page],
.catalog-header .mobile-directory:hover { background: #364c3d; color: var(--mint) }
.header-links a > span {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 33px;
  background: #11201b;
  border: 1px solid #4e6254;
  border-radius: 7px;
  padding: 0 3px;
  color: var(--mint);
  font-size: 15px;
}

.catalog-header .mobile-nav > summary { width: 44px; height: 44px }

[data-group] { --accent: #c7e8ac; --glow: #456646 }
[data-group=emoji] { --accent: #f4ce96; --glow: #72583d }
[data-group=lettering] { --accent: #dfc3f4; --glow: #574364 }
[data-group=layouts] { --accent: #ffc6ad; --glow: #744f47 }
[data-group=unicode] { --accent: #bee4dc; --glow: #346c65 }

.tool-masthead, .legal-masthead {
  padding: clamp(24px, 3.6vw, 49px) 0 clamp(43px, 6vw, 87px);
  background: var(--masthead-ground);
  text-align: center;
}
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 15px }
.breadcrumbs a:hover { text-decoration: underline; color: var(--accent) }
.tool-masthead h1, .legal-masthead h1 {
  margin: 19px auto 12px;
  color: var(--ink);
  font: 760 clamp(39px, 6vw, 86px)/.92 var(--display);
  letter-spacing: -.073em;
  text-wrap: balance;
}
.tool-masthead p, .legal-masthead p { max-width: 60ch; margin-inline: auto; color: #d9e1d7; font-size: clamp(16px, 2vw, 19px); text-wrap: pretty }
.info-masthead { padding-bottom: clamp(24px, 4vw, 52px) }
.contact-form { border: 1px solid #44594c; border-radius: 16px }
.contact-form .button-row { flex-wrap: wrap; gap: 10px 16px }
.contact-form .button { font-size: 16px }
.contact-form [role=status] { color: var(--muted); font-size: 14px }
.tool-workspace, .tool-gallery, .directory {
  position: relative;
  margin-top: clamp(-65px, -4vw, -28px);
  margin-bottom: clamp(36px, 8vw, 100px);
}
.tool-workspace, .mix-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: 1px;
  border: 1px solid #44594c;
  background: #44594c;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 40px #040a084f;
}
.tool-form, .tool-result, .mix-tools { min-width: 0; padding: clamp(16px, 3vw, 32px) }
.tool-form, .mix-tools { display: grid; align-content: start; gap: 17px; background: linear-gradient(140deg, #1b2b24, #14211d 62%) }
.tool-form-head, .result-cap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
}
.tool-form h2, .tool-result h2, .mix-tools h2 { font: 690 25px/1.15 var(--display); letter-spacing: -.025em }
.tool-field { display: grid; gap: 7px; min-width: 0 }
.tool-field label { font-weight: 620 }
.tool-field .field { min-height: 50px; background: #0e1915; padding: 10px 12px; width: 100% }
.tool-field textarea { min-height: 105px }
.tool-field input[type=range] { min-height: 35px }
.studio-check { display: flex; align-items: center; gap: 10px; min-height: 38px; cursor: pointer }
.studio-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--mint) }
.studio-samples, .mix-actions { display: flex; flex-wrap: wrap; gap: 7px }
.studio-samples .chip, .mix-actions .chip { font-size: 15px; min-height: 39px; white-space: normal }
.text-button {
  color: var(--muted);
  border: 0;
  background: transparent;
  padding: 5px 6px;
  min-height: 33px;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-button:hover { color: var(--ink) }
.tool-result {
  display: grid;
  align-content: start;
  gap: 17px;
  background: radial-gradient(ellipse at 100% 0, color-mix(in srgb, var(--glow) 44%, transparent), transparent 66%), #101b17;
}
.result-cap [role=status] { color: var(--accent); overflow-wrap: anywhere }
.tool-result #tool-output, .point-details pre {
  background: #0b1411;
  padding: 15px;
  border: 1px solid #436052;
  border-radius: 8px;
  min-height: 122px;
  max-height: 340px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 17px/1.6 var(--body);
}
.point-details summary { color: var(--accent); cursor: pointer; margin-bottom: 6px }
.point-details pre { font-family: ui-monospace, monospace; font-size: 14px }
.result-empty { display: grid; place-items: center; min-height: 122px; border: 1px solid #43564b; border-radius: 8px; color: var(--muted) }
.tool-gallery {
  border: 1px solid #44594c;
  background: linear-gradient(150deg, #1b2a23, #111b17);
  padding: clamp(15px, 3vw, 30px);
  border-radius: 18px;
}
.mix-workspace { margin-bottom: 24px }
.gallery-controls { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px }
#gallery-count { color: var(--accent); margin: 17px 0 10px }
.glyph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 148px), 1fr)); gap: 8px }
.glyph-card {
  min-width: 0;
  min-height: 107px;
  display: grid;
  grid-template-rows: minmax(34px, auto) 1fr auto;
  place-items: center;
  gap: 3px;
  padding: 9px 5px;
  text-align: center;
  background: #101b17;
  border: 1px solid #4b6054;
  border-radius: 9px;
  overflow-wrap: anywhere;
}
.glyph-card:hover, .glyph-card[data-copied=true] { background: #31483a; border-color: #92ad8b }
.glyph-card[data-copied=true] small { color: var(--mint) }
.glyph-card strong { color: var(--accent); font: 26px/1.2 system-ui, sans-serif }
.glyph-card span { font-size: 15px; line-height: 1.25 }
.glyph-card small { font-size: 12px; color: var(--muted) }
.empty-state { padding: 20px 0; color: var(--muted) }
.directory-bar {
  display: grid;
  gap: 9px;
  padding: clamp(16px, 3vw, 28px);
  background: #1b2c23;
  border: 1px solid #496253;
  border-radius: 14px;
}
.directory-bar label { font-weight: 650 }
.directory-bar nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px }
.directory-bar nav a { min-height: 37px; display: grid; place-items: center; border-radius: 9px; border: 1px solid #637869; padding: 3px 11px; font-size: 15px }
.directory-bar nav a:hover { border-color: var(--mint); color: var(--mint) }
.directory-group { margin-top: clamp(34px, 6vw, 75px) }
.directory-group h2, .related-tools h2 {
  margin-bottom: 16px;
  font: 710 clamp(27px, 3.7vw, 44px)/1.1 var(--display);
  letter-spacing: -.045em;
}
.directory-group h2 { display: flex; align-items: baseline; gap: 12px }
.directory-group h2 > span[aria-hidden] { color: var(--accent); font-size: .85em }
.directory-group-title { min-width: 0 }
.tool-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px }
.tool-card {
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 93px;
  padding: 11px;
  background: linear-gradient(140deg, #203129, #15221e 83%);
  border: 1px solid #486052;
  border-radius: 10px;
}
.tool-card:hover { border-color: var(--accent); background: #263a30 }
.tool-card-mark {
  display: grid;
  place-items: center;
  height: 46px;
  background: color-mix(in srgb, var(--glow) 38%, #0d1714);
  border: 1px solid color-mix(in srgb, var(--accent) 42%, #233a30);
  border-radius: 9px;
  color: var(--accent);
  font-size: 21px;
}
.tool-card strong, .tool-card small { display: block }
.tool-card strong { font-size: 16px; line-height: 1.2 }
.tool-card small { margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.35 }
.card-arrow { color: var(--accent) }
.tool-reading, .legal-reading { padding: clamp(34px, 6vw, 78px) 0; border-top: 1px solid #3e564a }
.reading-copy { max-width: 920px; margin-inline: auto; font-size: 17px; line-height: 1.75; color: #d9e0d6 }
.info-content { max-width: 640px; margin-bottom: clamp(38px, 7vw, 78px) }
.reading-copy h2, .reading-copy h3 { color: var(--ink); font-family: var(--display); line-height: 1.13; text-wrap: balance }
.reading-copy h2 { margin-block: 1.34em .45em; font-size: clamp(27px, 4.6vw, 45px); letter-spacing: -.045em; font-weight: 730 }
.reading-copy h2:first-child { margin-top: 0 }
.reading-copy h3 { margin: 1.2em 0 .4em; font-size: clamp(21px, 3vw, 29px); letter-spacing: -.025em }
.reading-copy :is(p, ul, ol, blockquote, table) { margin-block: .72em }
.reading-copy ul, .reading-copy ol { padding-inline-start: 1.42em }
.reading-copy li + li { margin-top: .36em }
.reading-copy a { color: var(--mint); text-decoration: underline; text-underline-offset: 4px }
.reading-copy :is(code, strong) { color: #f6f1e5; overflow-wrap: anywhere }
.reading-copy blockquote { margin-inline: 0; padding: .34em 1.12em; border-inline-start: 2px solid #a8c69a; background: #182822; border-radius: 0 9px 9px 0 }
.reading-copy table { width: 100%; border-collapse: collapse; overflow-wrap: anywhere; font-size: .95em }
.reading-copy :is(td, th) { padding: .58em; border: 1px solid #4b6255; text-align: left; vertical-align: top }
.reading-copy th { background: #24392e; color: var(--ink) }
.tool-faq { margin-top: 2.8em }
.tool-faq details { border-block-end: 1px solid #476353 }
.tool-faq details:first-of-type { border-block-start: 1px solid #476353 }
.tool-faq summary { color: var(--ink); font-weight: 650; padding-block: .65em; cursor: pointer }
.tool-faq summary::marker { color: var(--mint) }
.tool-faq details div { padding: 0 0 .72em 1.15em }
.related-tools { margin-block: clamp(28px, 5vw, 60px) clamp(42px, 7vw, 82px) }
.related-tools > div:first-child { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: 10px }

@media (max-width: 1240px) {
  .catalog-header .navigation { display: none }
  .catalog-header .header-actions { display: flex }
  .catalog-header .mobile-nav { display: block }
  .catalog-header .mobile-nav nav {
    display: grid;
    gap: 5px;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, calc(100vw - 36px));
    max-height: calc(100dvh - 80px);
    overflow: auto;
    overscroll-behavior: contain;
    background: #15251d;
    border-color: #597062;
  }
  .catalog-header .mobile-directory { justify-content: space-between; padding-inline: 10px }
  .catalog-header .header-group > summary { width: 100%; height: auto; justify-content: space-between; font-size: 16px; padding-inline: 10px }
  .catalog-header .header-links { margin: 4px 0 7px; padding: 5px }
  .tool-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}
@media (max-width: 790px) {
  .catalog-header { height: 65px }
  .catalog-header .header-inner { gap: 8px }

}
@media (max-width: 645px) {
  .tool-workspace, .mix-workspace, .tool-cards { grid-template-columns: minmax(0, 1fr) }
  .tool-masthead h1 { margin-top: 18px }
  .reading-copy { font-size: 16px }
  .gallery-controls { grid-template-columns: minmax(0, 1fr) }
}
@media (max-width: 390px) {
  .catalog-header .header-actions { gap: 4px }
  .catalog-header .brand { font-size: 22px }
}
@media (max-width: 350px) {
  .glyph-grid { grid-template-columns: repeat(2, minmax(0,1fr)) }
}
@media (max-width: 300px) {
  .catalog-header .header-inner { gap: 4px }
  .catalog-header .brand { font-size: 20px }
  .catalog-header .header-guides { padding-inline: 5px }
}

.gallery-more { margin-top: 18px; min-height: 46px; font-size: 16px }
.glyph-card strong { white-space: nowrap; font-size: clamp(17px, 2vw, 25px) }
.glyph-card[data-filter="Phase sequences"] strong,
.glyph-card[data-filter="Progress rows"] strong { white-space: normal; font-size: 17px }
@media (min-width: 1241px) and (max-width: 1350px) {
  .catalog-header .header-inner { gap: 12px }
  .catalog-header .navigation { gap: 4px }
  .catalog-header .header-group > summary,
  .catalog-header .header-guides { gap: 6px; padding-inline: 8px }
}
