/* Reserve the scrollbar lane so the layout does not jump sideways while a page loads and its scrollbar appears. */
html{scrollbar-gutter:stable}

/* Personality layer: each topic with its own colour, and the logo's squiggle
   as the recurring mark. Loaded after nx-app.css; everything here is decoration and degrades to the base look. */

/* Topic colours: topic-color.js sets --tag-h (one of eight hues) from the topic name. */
[data-tag-h]{--tc:oklch(.8 .12 var(--tag-h))}
:root[data-theme="light"] [data-tag-h]{--tc:oklch(.46 .13 var(--tag-h))}
:root[data-theme] .nx .mushitag-chips a[data-tag-h],
:root[data-theme] .nx .nx-tag[data-tag-h]{color:var(--tc) !important}
.nx .mushitag-chips a[data-tag-h]::before{content:"";display:inline-block;width:6px;height:6px;margin-right:6px;border-radius:50%;background:var(--tc);vertical-align:middle;position:relative;top:-1px}
.nx .nx-rail-tag[data-tag-h] .nx-tilde,.nx .nx-tile[data-tag-h] .nx-tilde{color:var(--tc)}
.nx .nx-tile[data-tag-h] .nx-meter span{background:var(--tc)}
.nx .nx-tile[data-tag-h]:hover{border-color:var(--tc)}
.nx .nx-topic-title[data-tag-h] .nx-tilde{color:var(--tc)}

/* The squiggle: active tab, section headings and headline hover. */
.nx-tabs [aria-selected="true"],.nx-tabs .is-active{position:relative;border-bottom-color:transparent}
.nx-tabs [aria-selected="true"]::after,.nx-tabs .is-active::after{
  content:"";position:absolute;left:0;right:0;bottom:-3px;height:6px;background:var(--accent);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='6' viewBox='0 0 14 6'%3E%3Cpath d='M0 3Q3.5 0 7 3T14 3' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x 0 50%/14px 6px;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='6' viewBox='0 0 14 6'%3E%3Cpath d='M0 3Q3.5 0 7 3T14 3' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x 0 50%/14px 6px}
.nx-h2{position:relative;padding-bottom:10px}
.nx-h2::after{
  content:"";position:absolute;left:0;bottom:0;width:42px;height:6px;background:var(--accent);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='6' viewBox='0 0 14 6'%3E%3Cpath d='M0 3Q3.5 0 7 3T14 3' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x 0 50%/14px 6px;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='6' viewBox='0 0 14 6'%3E%3Cpath d='M0 3Q3.5 0 7 3T14 3' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x 0 50%/14px 6px}
.nx-title a:hover,.nx-mini:hover strong,.nx-row h2 a:hover{
  text-decoration:underline wavy var(--accent);text-decoration-thickness:1.5px;text-underline-offset:5px}
@media (prefers-reduced-motion:no-preference){
  .nx-title a,.nx-mini strong{transition:text-decoration-color .15s ease}
}
