/* ==========================================================================
   OEAC Digital Library — feature layer
   Styles for: the install page, the About page, ratings & reviews,
   reading lists, and the reading-statistics dashboard.
   Loaded after app.css and advanced.css.
   ========================================================================== */

/* ==========================================================================
   INSTALL PAGE
   ========================================================================== */
.cta-actions {
  display: flex;
  gap: .7rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}
.install-hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 2.5rem;
  align-items: center;
}
.install-hero-copy > p {
  color: var(--txt-dim);
  font-size: .98rem;
  line-height: 1.85;
  margin-bottom: 1.1rem;
  max-width: 62ch;
}
.install-hero-copy code {
  background: var(--surface-2);
  border: 1px solid var(--gray-line);
  border-radius: 6px;
  padding: .08rem .38rem;
  font-size: .85em;
}
.install-actions {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 .2rem;
}

.install-hero-visual { display: flex; justify-content: center; }
.install-phone {
  width: 240px;
  border: 2px solid rgba(255, 107, 0, .35);
  border-radius: 30px;
  background: linear-gradient(170deg, var(--black-card), var(--black-soft));
  padding: .7rem .7rem 1.6rem;
  box-shadow: var(--shadow-card), 0 0 60px -18px var(--orange-glow);
  position: relative;
}
.install-phone-bar {
  width: 64px;
  height: 5px;
  border-radius: 6px;
  background: var(--gray-line);
  margin: 0 auto .8rem;
}
.install-phone-screen {
  border-radius: 20px;
  background: radial-gradient(ellipse at 50% 20%, rgba(255, 107, 0, .16), transparent 70%);
  padding: 2rem .8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  min-height: 220px;
  justify-content: center;
}
.install-phone-screen strong { font-size: 1.05rem; letter-spacing: -.4px; }
.install-phone-hint {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--orange);
}
@media (max-width: 900px) {
  .install-hero { grid-template-columns: 1fr; }
  .install-hero-visual { order: -1; margin-bottom: .5rem; }
}

/* ==========================================================================
   ABOUT PAGE
   ========================================================================== */
.about-hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 2.5rem;
  align-items: start;
}
.about-lead {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.8;
  color: var(--txt);
  margin-bottom: 1.2rem;
}
.about-lead strong { color: var(--orange); }

.about-parent {
  background: linear-gradient(150deg, rgba(255, 107, 0, .10), transparent 70%);
  border: 1px solid rgba(255, 107, 0, .3);
  border-radius: 20px;
  padding: 1.6rem;
}
.about-parent .eyebrow {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  color: var(--orange);
  font-weight: 700;
  margin-bottom: .5rem;
}
.about-parent h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: .6rem; letter-spacing: -.4px; }
.about-parent p { font-size: .88rem; color: var(--txt-dim); line-height: 1.75; margin-bottom: 1rem; }

.prose { max-width: 74ch; color: var(--txt-dim); font-size: .96rem; line-height: 1.85; }
.prose p + p { margin-top: 1rem; }
.prose strong { color: var(--txt); }
.prose a { color: var(--orange); }

.about-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  margin-top: 1.6rem;
}
.about-card {
  background: var(--black-card);
  border: 1px solid var(--gray-line);
  border-radius: 18px;
  padding: 1.4rem;
}
.about-card h4 { font-size: .98rem; font-weight: 800; margin-bottom: .5rem; display: flex; gap: .5rem; align-items: center; }
.about-card p { font-size: .86rem; color: var(--txt-dim); line-height: 1.7; }

.about-axes { display: flex; flex-direction: column; gap: .55rem; margin-top: 1.1rem; }
.about-axis {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: .9rem;
  align-items: start;
  background: var(--surface-2);
  border: 1px solid var(--gray-line);
  border-radius: 14px;
  padding: .85rem 1rem;
}
.about-axis .ic { font-size: 1.35rem; text-align: center; }
.about-axis b { display: block; font-size: .87rem; margin-bottom: .12rem; }
.about-axis span { font-size: .8rem; color: var(--txt-dimmer); line-height: 1.6; }

.about-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.about-step {
  background: linear-gradient(155deg, var(--black-card), var(--black-soft));
  border: 1px solid rgba(255, 107, 0, .12);
  border-radius: 16px;
  padding: 1.2rem;
  position: relative;
}
.about-step .n {
  font-size: .68rem;
  font-weight: 900;
  color: var(--orange);
  letter-spacing: 2px;
  display: block;
  margin-bottom: .4rem;
}
.about-step h5 { font-size: .92rem; font-weight: 700; margin-bottom: .3rem; }
.about-step p { font-size: .82rem; color: var(--txt-dim); line-height: 1.65; }

/* ==========================================================================
   RATINGS & REVIEWS
   ========================================================================== */
.rate-box {
  background: var(--black-card);
  border: 1px solid var(--gray-line);
  border-radius: 18px;
  padding: 1.3rem;
}
.rate-stars { display: flex; gap: .3rem; margin: .5rem 0 .9rem; }
.rate-stars button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--gray-line);
  transition: transform .15s, color .15s;
  padding: 0;
}
.rate-stars button:hover { transform: scale(1.18); color: var(--orange-bright); }
.rate-stars button.on { color: var(--orange); }
.rate-summary { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.rate-big { font-size: 2.4rem; font-weight: 900; color: var(--orange); line-height: 1; }
.rate-bars { flex: 1; min-width: 170px; display: flex; flex-direction: column; gap: .25rem; }
.rate-bar { display: grid; grid-template-columns: 28px 1fr 34px; gap: .5rem; align-items: center; font-size: .72rem; color: var(--txt-dimmer); }
.rate-bar .track { height: 6px; background: var(--gray-line); border-radius: 6px; overflow: hidden; }
.rate-bar .track i { display: block; height: 100%; background: var(--orange); border-radius: 6px; }

.review-list { display: flex; flex-direction: column; gap: .7rem; margin-top: 1rem; }
.review {
  background: var(--surface-2);
  border: 1px solid var(--gray-line);
  border-radius: 14px;
  padding: .9rem 1.1rem;
}
.review-head { display: flex; justify-content: space-between; gap: .8rem; align-items: baseline; margin-bottom: .35rem; flex-wrap: wrap; }
.review-head b { font-size: .87rem; }
.review-head .stars { color: var(--orange); font-size: .78rem; letter-spacing: 1px; }
.review-head .when { font-size: .7rem; color: var(--txt-dimmer); }
.review p { font-size: .86rem; color: var(--txt-dim); line-height: 1.7; }

/* ==========================================================================
   READING LISTS
   ========================================================================== */
.shelf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.shelf-card {
  background: var(--black-card);
  border: 1px solid var(--gray-line);
  border-radius: 18px;
  padding: 1.2rem;
  transition: border-color .3s, transform .3s;
}
.shelf-card:hover { border-color: rgba(255, 107, 0, .45); transform: translateY(-4px); }
.shelf-card h4 { font-size: 1rem; font-weight: 800; margin-bottom: .2rem; }
.shelf-card .cnt { font-size: .74rem; color: var(--txt-dimmer); }
.shelf-card .desc { font-size: .82rem; color: var(--txt-dim); margin-top: .6rem; line-height: 1.6; min-height: 2.4em; }
.shelf-cover-stack { display: flex; gap: .3rem; margin: .9rem 0; }
.shelf-cover-stack span {
  width: 34px; height: 48px; border-radius: 5px; background-size: cover; background-position: center;
  border: 1px solid var(--gray-line); flex-shrink: 0;
}
.shelf-cover-stack span.gen { background: linear-gradient(135deg, var(--orange), #8B3A00); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: .9rem; }
.shelf-actions { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .8rem; }

/* ==========================================================================
   READING STATISTICS
   ========================================================================== */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.stat-card {
  background: linear-gradient(155deg, var(--black-card), var(--black-soft));
  border: 1px solid var(--gray-line);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
}
.stat-card .k { font-size: .64rem; text-transform: uppercase; letter-spacing: 1.6px; color: var(--txt-dimmer); }
.stat-card .v { font-size: 1.8rem; font-weight: 900; color: var(--orange); letter-spacing: -1px; line-height: 1.2; }
.stat-card .s { font-size: .72rem; color: var(--txt-dimmer); }

.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); gap: 3px; overflow-x: auto; padding-bottom: .4rem; }
.heatmap i {
  width: 13px; height: 13px; border-radius: 3px; background: var(--surface-2);
  border: 1px solid var(--gray-line); display: block;
}
.heatmap i.l1 { background: rgba(255, 107, 0, .28); border-color: transparent; }
.heatmap i.l2 { background: rgba(255, 107, 0, .52); border-color: transparent; }
.heatmap i.l3 { background: rgba(255, 107, 0, .78); border-color: transparent; }
.heatmap i.l4 { background: var(--orange); border-color: transparent; }
.heat-legend { display: flex; align-items: center; gap: .4rem; font-size: .7rem; color: var(--txt-dimmer); margin-top: .7rem; }
.heat-legend i { width: 11px; height: 11px; border-radius: 3px; display: block; }

.bars { display: flex; align-items: flex-end; gap: .5rem; height: 130px; margin-top: 1rem; }
.bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .35rem; height: 100%; }
.bars .bar i { width: 100%; background: linear-gradient(180deg, var(--orange), var(--orange-dark)); border-radius: 5px 5px 0 0; display: block; min-height: 2px; transition: height .5s cubic-bezier(.2,.9,.3,1); }
.bars .bar span { font-size: .64rem; color: var(--txt-dimmer); white-space: nowrap; }

.streak-flame { display: flex; align-items: center; gap: .9rem; }
.streak-flame .n { font-size: 2.6rem; font-weight: 900; color: var(--orange); line-height: 1; }
.streak-flame .l { font-size: .8rem; color: var(--txt-dim); }

/* ==========================================================================
   PALETTE ACTIONS
   ========================================================================== */
.palette-item .act { font-size: .68rem; color: var(--txt-dimmer); border: 1px solid var(--gray-line); border-radius: 20px; padding: .1rem .5rem; text-transform: uppercase; letter-spacing: 1px; }
.palette-sep { padding: .5rem 1.3rem .2rem; font-size: .62rem; text-transform: uppercase; letter-spacing: 1.8px; color: var(--txt-dimmer); }

@media (max-width: 900px) {
  .about-hero { grid-template-columns: 1fr; }
  .bars { height: 105px; }
}

/* ==========================================================================
   ==========================================================================
   UX REDESIGN — 2026 (append-only layer)
   Workstream: categories.php, contact.php, privacy.php.
   Every rule is scoped under a page body class (.ux-cat / .ux-contact /
   .ux-privacy) because .cat-card and table.tbl are shared with index.php,
   install.php and the dashboard. Nothing here can leak to another page.
   Colours come from the design-system variables so both themes work; literal
   colour values appear only inside gradients.
   --ux-navh is written by the page scripts to the live height of the fixed
   top nav; it is what the sticky bars offset themselves by. It is declared on
   :root, not on body, so the inline value the script sets on <html> is not
   shadowed by a body-level declaration.
   ==========================================================================
   ========================================================================== */
:root { --ux-navh: 66px; }
body.ux-cat, body.ux-contact, body.ux-privacy {
  --ux-radius: 18px;
  --ux-radius-lg: 22px;
}

/* ==========================================================================
   CATEGORIES PAGE  (body.ux-cat)
   ========================================================================== */

/* ---- hero ---------------------------------------------------------------- */
.ux-cat .cat-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 2.4rem;
  align-items: start;
}
.ux-cat .cat-hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.04;
  margin-bottom: 1rem;
}
.ux-cat .cat-hero h1 .accent { color: var(--orange); }
.ux-cat .cat-lead {
  font-size: clamp(.95rem, 1.3vw, 1.08rem);
  line-height: 1.8;
  color: var(--txt-dim);
  max-width: 62ch;
  margin-bottom: 1.1rem;
}
.ux-cat .cat-lead strong { color: var(--txt); }

.ux-cat .cat-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 1.4rem;
}
.ux-cat .cat-stat {
  background: linear-gradient(155deg, var(--black-card), var(--black-soft));
  border: 1px solid var(--gray-line);
  border-radius: var(--ux-radius);
  padding: 1.05rem 1.15rem;
  transition: border-color .3s, transform .3s;
}
.ux-cat .cat-stat:hover { border-color: rgba(255,107,0,.4); transform: translateY(-3px); }
.ux-cat .cat-stat .n {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--orange);
  line-height: 1.15;
}
.ux-cat .cat-stat .l {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--txt-dimmer);
  margin-top: .2rem;
}

.ux-cat .cat-axes-panel {
  background: linear-gradient(150deg, rgba(255,107,0,.10), transparent 70%);
  border: 1px solid rgba(255,107,0,.30);
  border-radius: var(--ux-radius-lg);
  padding: 1.4rem;
}
.ux-cat .cat-axes-panel .eyebrow {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  color: var(--orange);
  font-weight: 700;
  margin-bottom: .4rem;
}
.ux-cat .cat-axes-panel h2 { font-size: 1.1rem; font-weight: 800; letter-spacing: -.4px; margin-bottom: .8rem; }
.ux-cat .cat-axes-list { display: flex; flex-direction: column; gap: .35rem; }
.ux-cat .cat-axes-list a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
  padding: .5rem .6rem;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .25s, border-color .25s, transform .25s;
}
.ux-cat .cat-axes-list a:hover {
  background: var(--surface-2);
  border-color: rgba(255,107,0,.35);
  transform: translateX(4px);
}
.ux-cat .cat-axes-list .ic { font-size: 1.15rem; text-align: center; }
.ux-cat .cat-axes-list b { display: block; font-size: .86rem; }
.ux-cat .cat-axes-list span { font-size: .73rem; color: var(--txt-dimmer); line-height: 1.5; }

/* ---- sticky axis navigator ---------------------------------------------- */
.ux-cat .axis-nav {
  position: sticky;
  top: var(--ux-navh, 66px);
  z-index: 60;
  background: var(--nav-bg-solid);
  backdrop-filter: blur(18px);
  border-block: 1px solid var(--gray-line);
}
.ux-cat .axis-nav-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: .55rem 2.5rem;
  display: flex;
  gap: .4rem;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ux-cat .axis-nav-inner::-webkit-scrollbar { display: none; }
.ux-cat .axis-chip {
  font-size: .8rem;
  font-weight: 600;
  padding: .42rem .95rem;
  border-radius: 60px;
  border: 1px solid var(--gray-line);
  background: var(--surface-2);
  color: var(--txt-dim);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .25s, border-color .25s, color .25s;
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  font-family: inherit;
}
.ux-cat .axis-chip:hover { border-color: var(--orange); color: var(--orange); }
.ux-cat .axis-chip.on { background: var(--orange); border-color: var(--orange); color: #050505; }
.ux-cat .axis-chip .cn { font-size: .68rem; opacity: .7; }

/* ---- instant filter ------------------------------------------------------ */
.ux-cat .cat-toolbar { border-top: none; }   /* the sticky bar supplies the rule above it */
.ux-cat .cat-filter {
  background: var(--surface);
  border: 1px solid rgba(255,107,0,.16);
  border-radius: var(--ux-radius-lg);
  padding: 1.05rem 1.2rem;
  backdrop-filter: blur(12px);
}
.ux-cat .cat-filter-row { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.ux-cat .cat-search { position: relative; flex: 1 1 320px; min-width: 0; }
.ux-cat .cat-search svg {
  position: absolute;
  left: .95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  fill: var(--txt-dimmer);
  pointer-events: none;
}
.ux-cat .cat-search input { padding-inline-start: 2.5rem; padding-block: .72rem; border-radius: 60px; }
.ux-cat .cat-filter-count { font-size: .8rem; color: var(--txt-dimmer); white-space: nowrap; }
.ux-cat .cat-filter-count b { color: var(--orange); }
.ux-cat .cat-filter-clear {
  border: 1px solid var(--gray-line);
  background: var(--surface-2);
  color: var(--txt-dim);
  border-radius: 60px;
  padding: .45rem .95rem;
  font-size: .78rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .25s, color .25s;
}
.ux-cat .cat-filter-clear:hover { border-color: var(--orange); color: var(--orange); }
.ux-cat .cat-no-match {
  display: none;
  margin-top: .9rem;
  padding: .9rem 1.1rem;
  border-radius: 12px;
  border: 1px dashed var(--gray-line);
  color: var(--txt-dim);
  font-size: .86rem;
}
.ux-cat .cat-no-match.show { display: block; }
.ux-cat .cat-no-match b { color: var(--orange); }

/* ---- axis sections ------------------------------------------------------- */
.ux-cat .cat-axis { scroll-margin-top: calc(var(--ux-navh, 66px) + 62px); }
.ux-cat .axis-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.3rem; flex-wrap: wrap; }
.ux-cat .axis-head-ico {
  width: 50px; height: 50px;
  flex-shrink: 0;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.45rem;
  background: linear-gradient(150deg, rgba(255,107,0,.16), transparent 70%);
  border: 1px solid rgba(255,107,0,.3);
}
.ux-cat .axis-head-txt { flex: 1 1 300px; min-width: 0; }
.ux-cat .axis-head h2 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: .3rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.ux-cat .axis-head p { color: var(--txt-dimmer); font-size: .9rem; max-width: 72ch; }
.ux-cat .axis-badge {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--orange);
  border: 1px solid rgba(255,107,0,.35);
  background: rgba(255,107,0,.08);
  padding: .18rem .55rem;
  border-radius: 60px;
}

/* ---- category cards ------------------------------------------------------ */
.ux-cat .cat-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
  gap: 1.05rem;
  margin-top: 0;
}
.ux-cat .cat-card {
  text-align: start;
  padding: 0;
  background: linear-gradient(155deg, var(--black-card), var(--black-soft));
  border: 1px solid var(--gray-line);
  border-radius: var(--ux-radius);
  transition: transform .35s cubic-bezier(.2,.9,.3,1), border-color .35s, box-shadow .35s;
}
.ux-cat .cat-card:hover {
  border-color: rgba(255,107,0,.55);
  transform: translateY(-6px);
  box-shadow: var(--shadow-card), 0 0 34px -6px var(--orange-glow);
}
/* top accent line — a real element so it never fights .cat-card::before */
.ux-cat .cat-card .cat-accent {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: .45;
  transition: opacity .35s;
  z-index: 2;
}
.ux-cat .cat-card:hover .cat-accent { opacity: 1; }
.ux-cat .cat-body {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: 1.3rem 1.2rem 1.15rem;
  height: 100%;
}
.ux-cat .cat-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.ux-cat .cat-card .cat-icon { font-size: 1.5rem; line-height: 1; margin: 0; transition: transform .35s; }
.ux-cat .cat-card:hover .cat-icon { transform: scale(1.12) rotate(-6deg); }
.ux-cat .cat-card .kind {
  position: static;
  font-size: .56rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--txt-dimmer);
  border: 1px solid var(--gray-line);
  padding: .12rem .48rem;
  border-radius: 20px;
}
.ux-cat .cat-name {
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: -.2px;
  line-height: 1.35;
  color: var(--txt);
}
.ux-cat .cat-count { font-size: .76rem; color: var(--txt-dimmer); margin-top: .3rem; }
.ux-cat .cat-foot {
  margin-top: auto;
  padding-top: .95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}
.ux-cat .cat-covers { display: flex; align-items: center; }
.ux-cat .cat-covers .cc {
  width: 26px; height: 36px;
  border-radius: 4px;
  border: 1px solid var(--gray-line);
  background-color: var(--surface-2);
  background-size: cover;
  background-position: center;
  margin-inline-start: -8px;
  box-shadow: 0 5px 12px -6px rgba(0,0,0,.75);
}
.ux-cat .cat-covers .cc:first-child { margin-inline-start: 0; }
.ux-cat .cat-covers .cc.gen {
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, #FF6B00, #8B3A00);
}
.ux-cat .cat-go {
  font-size: .76rem;
  font-weight: 700;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  white-space: nowrap;
}

/* a category with no books stays visible, visibly de-emphasised */
.ux-cat .cat-card.is-empty { opacity: .6; }
.ux-cat .cat-card.is-empty:hover { opacity: .82; }
.ux-cat .cat-card.is-empty .cat-name { color: var(--txt-dim); }
.ux-cat .cat-card.is-empty .cat-count { font-style: italic; }
.ux-cat .cat-card.is-empty .cat-go { color: var(--txt-dimmer); }

/* filter + collapse states are independent so one never hides the other's cards */
.ux-cat .cat-card.hide-collapse,
.ux-cat .cat-card.hide-filter { display: none; }

.ux-cat .axis-foot { display: flex; justify-content: center; margin-top: 1.3rem; }
.ux-cat .axis-more {
  border: 1px solid rgba(255,107,0,.35);
  background: var(--surface-2);
  color: var(--txt);
  border-radius: 60px;
  padding: .55rem 1.3rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .25s, border-color .25s, transform .25s;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.ux-cat .axis-more:hover { background: rgba(255,107,0,.12); border-color: var(--orange); transform: translateY(-2px); }
.ux-cat .axis-more[hidden] { display: none; }

.ux-cat .cat-popular .section-header { margin-bottom: 1.4rem; }

/* ==========================================================================
   CONTACT PAGE  (body.ux-contact)
   ========================================================================== */
.ux-contact .contact-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: 2rem;
  align-items: start;
}
.ux-contact .contact-hero h1 {
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin-bottom: .7rem;
}
.ux-contact .contact-hero h1 .accent { color: var(--orange); }
.ux-contact .contact-lead {
  color: var(--txt-dim);
  font-size: .98rem;
  line-height: 1.8;
  max-width: 60ch;
  margin-bottom: 1.4rem;
}

.ux-contact .contact-form-card {
  background: linear-gradient(155deg, var(--black-card), var(--black-soft));
  border: 1px solid rgba(255,107,0,.18);
  border-radius: var(--ux-radius-lg);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-card);
}
.ux-contact .cf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 1rem; }
.ux-contact .cf-field { display: flex; flex-direction: column; gap: .35rem; }
.ux-contact .cf-field + .cf-field { margin-top: 0; }
.ux-contact .cf-stack { display: flex; flex-direction: column; gap: 1rem; }
.ux-contact .cf-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.ux-contact .cf-label { font-size: .82rem; font-weight: 600; color: var(--txt); }
.ux-contact .cf-label .req { color: var(--orange); margin-inline-start: .15rem; }
.ux-contact .cf-input {
  background: var(--surface-2);
  border: 1px solid var(--gray-line);
  border-radius: 12px;
  padding: .72rem .9rem;
  font-size: .9rem;
  color: var(--txt);
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.ux-contact .cf-input::placeholder { color: var(--txt-dimmer); }
.ux-contact .cf-input:hover { border-color: rgba(255,107,0,.35); }
.ux-contact .cf-input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-glow);
  background: var(--black-card);
}
/* error styling adds a ring only — the reserved .cf-msg slot prevents any shift */
.ux-contact .cf-field.err .cf-input { border-color: rgba(255,90,90,.7); }
.ux-contact .cf-field.err .cf-input:focus { box-shadow: 0 0 0 3px rgba(220,60,60,.22); }
.ux-contact .cf-msg {
  min-height: 1.05rem;
  font-size: .76rem;
  line-height: 1.05rem;
  color: #ff8080;
  visibility: hidden;
}
.ux-contact .cf-msg.show { visibility: visible; }
.ux-contact .cf-counter { font-size: .72rem; color: var(--txt-dimmer); white-space: nowrap; }
.ux-contact .cf-counter.warn { color: #ffc247; }
.ux-contact .cf-counter.over { color: #ff8080; }
.ux-contact .cf-actions {
  display: flex;
  gap: .9rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1.2rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--gray-line);
}
.ux-contact .cf-note { font-size: .76rem; color: var(--txt-dimmer); }
.ux-contact .btn[aria-busy="true"] { opacity: .7; cursor: progress; transform: none !important; }

.ux-contact .cf-success {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: linear-gradient(150deg, rgba(40,180,90,.14), transparent 72%);
  border: 1px solid rgba(40,180,90,.45);
  border-radius: var(--ux-radius-lg);
  padding: 1.2rem 1.3rem;
  margin-bottom: 1.4rem;
}
.ux-contact .cf-success .ic { font-size: 1.7rem; line-height: 1.1; }
.ux-contact .cf-success h3 { font-size: 1.02rem; font-weight: 800; margin-bottom: .25rem; color: #4ade80; }
.ux-contact .cf-success p { font-size: .86rem; color: var(--txt-dim); line-height: 1.7; }

.ux-contact .contact-side { display: flex; flex-direction: column; gap: 1rem; }
.ux-contact .side-card {
  background: var(--black-card);
  border: 1px solid var(--gray-line);
  border-radius: var(--ux-radius);
  padding: 1.15rem 1.2rem;
  transition: border-color .3s, transform .3s;
}
.ux-contact .side-card:hover { border-color: rgba(255,107,0,.4); transform: translateY(-3px); }
.ux-contact .side-card h3 { font-size: .94rem; font-weight: 800; margin-bottom: .5rem; display: flex; align-items: center; gap: .5rem; letter-spacing: -.2px; }
.ux-contact .side-card h3 .ic { font-size: 1.05rem; }
.ux-contact .side-card p { font-size: .83rem; color: var(--txt-dim); line-height: 1.7; }
.ux-contact .side-card a { color: var(--orange); text-decoration: none; }
.ux-contact .side-card a:hover { text-decoration: underline; }
.ux-contact .side-mail { font-size: .85rem; line-height: 2; }
.ux-contact .side-mail .k { color: var(--txt-dimmer); font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; display: block; margin-top: .5rem; }
.ux-contact .side-meta {
  font-size: .72rem;
  color: var(--txt-dimmer);
  margin-top: .6rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.ux-contact .side-quick { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .7rem; }

/* shared <details> FAQ styling (about.php used inline styles; this is the
   scoped, reusable version for the pages in this workstream) */
.ux-contact .ux-faq details {
  background: var(--black-card);
  border: 1px solid var(--gray-line);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  margin-bottom: .7rem;
  transition: border-color .3s;
}
.ux-contact .ux-faq details[open] { border-color: rgba(255,107,0,.4); }
.ux-contact .ux-faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: .95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.ux-contact .ux-faq summary::-webkit-details-marker { display: none; }
.ux-contact .ux-faq summary::after { content: '+'; color: var(--orange); font-weight: 900; font-size: 1.1rem; line-height: 1; }
.ux-contact .ux-faq details[open] summary::after { content: '−'; }
.ux-contact .ux-faq p { margin-top: .65rem; color: var(--txt-dim); font-size: .89rem; line-height: 1.75; }

/* ==========================================================================
   PRIVACY PAGE  (body.ux-privacy)
   ========================================================================== */
.ux-privacy .privacy-hero h1 {
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
  font-weight: 900;
  letter-spacing: -1.6px;
  line-height: 1.05;
  margin-bottom: .8rem;
}
.ux-privacy .privacy-hero h1 .accent { color: var(--orange); }
.ux-privacy .privacy-updated { font-size: .8rem; color: var(--txt-dimmer); }

.ux-privacy .privacy-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 2.2rem;
  align-items: start;
}
.ux-privacy .privacy-toc {
  position: sticky;
  top: calc(var(--ux-navh, 66px) + 1rem);
  border: 1px solid var(--gray-line);
  border-radius: 16px;
  padding: 1rem;
  background: var(--surface-2);
}
.ux-privacy .privacy-toc .hd {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--txt-dimmer);
  margin-bottom: .55rem;
}
.ux-privacy .privacy-toc ol { list-style: none; display: flex; flex-direction: column; gap: .1rem; }
.ux-privacy .privacy-toc a {
  display: block;
  font-size: .82rem;
  color: var(--txt-dim);
  text-decoration: none;
  padding: .42rem .55rem;
  border-radius: 9px;
  border-inline-start: 2px solid transparent;
  transition: color .2s, background .2s, border-color .2s;
}
.ux-privacy .privacy-toc a:hover { color: var(--orange); background: rgba(255,107,0,.08); }
.ux-privacy .privacy-toc a.on {
  color: var(--orange);
  border-inline-start-color: var(--orange);
  background: rgba(255,107,0,.08);
  font-weight: 600;
}

.ux-privacy .privacy-sec { scroll-margin-top: calc(var(--ux-navh, 66px) + 1.2rem); padding-bottom: 2.4rem; }
.ux-privacy .privacy-sec:last-child { padding-bottom: 0; }
.ux-privacy .privacy-sec + .privacy-sec { border-top: 1px solid var(--gray-line); padding-top: 2.4rem; }
.ux-privacy .privacy-sec h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 900;
  letter-spacing: -.8px;
  margin-bottom: .5rem;
}
.ux-privacy .privacy-sec h2 .accent { color: var(--orange); }
.ux-privacy .privacy-sec .sub { color: var(--txt-dimmer); font-size: .88rem; margin-bottom: 1.2rem; }
.ux-privacy .privacy-note { color: var(--txt-dimmer); font-size: .82rem; margin-top: .9rem; max-width: 74ch; line-height: 1.7; }
.ux-privacy .privacy-tbl { margin-top: 1.3rem; }
/* table/cookie names are short identifiers — keep them on one line rather than
   letting the global `code { overflow-wrap: anywhere }` break them mid-word.
   The surrounding .table-wrap scrolls if a narrow screen cannot fit them. */
.ux-privacy .privacy-tbl code { color: var(--orange); font-size: .78rem; white-space: nowrap; }
.ux-privacy .privacy-card {
  background: var(--black-card);
  border: 1px solid var(--gray-line);
  border-radius: var(--ux-radius);
  padding: 1.2rem 1.3rem;
}

/* ==========================================================================
   RESPONSIVE — anything two-column collapses at 900px
   ========================================================================== */
@media (max-width: 1024px) {
  .ux-cat .axis-nav-inner { padding-inline: 1.6rem; }
}
@media (max-width: 900px) {
  .ux-cat .cat-hero { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
  .ux-cat .cat-axes-panel { order: 2; }
  .ux-contact .contact-hero { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
  .ux-privacy .privacy-layout { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .ux-privacy .privacy-toc { position: static; }
  .ux-privacy .privacy-toc ol { flex-direction: row; flex-wrap: wrap; gap: .4rem; }
  .ux-privacy .privacy-toc a { border: 1px solid var(--gray-line); border-radius: 60px; padding: .35rem .75rem; }
}
@media (max-width: 520px) {
  .ux-cat .axis-nav-inner { padding-inline: 1rem; }
  .ux-cat .cat-hero-stats { gap: .5rem; }
  .ux-cat .cat-stat { padding: .85rem .8rem; }
  .ux-contact .contact-form-card { padding: 1.2rem 1.05rem; }
}
