/* The footer's secret No Straight Lines Mode. Nothing here changes normal-mode layout. */
.no-straight-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  display: inline-block;
  vertical-align: middle;
  line-height: 0;
  cursor: pointer;
}
.no-straight-toggle[hidden] { display: none !important; }
.no-straight-toggle > .footer-badge { display: block; }
.no-straight-toggle:focus-visible {
  outline: 2px solid var(--focus, currentColor);
  outline-offset: 2px;
}
.sidebar-mode-bird .chirp-gay-exit {
  display: block;
  margin: .85rem auto 0;
}
.sidebar-mode-bird .chirp-gay-exit > img { width: 88px; height: 31px; }

/* Keep the original border widths and spacing. Only replace their visible ink. */
:root[data-no-straight-lines] .no-straight-position { position: relative; }
:root[data-no-straight-lines] .no-straight-top { border-top-color: transparent !important; }
:root[data-no-straight-lines] .no-straight-bottom { border-bottom-color: transparent !important; }
:root[data-no-straight-lines] .no-straight-top::before,
:root[data-no-straight-lines] .no-straight-bottom::after {
  content: "";
  position: absolute;
  display: block;
  left: 0;
  right: 0;
  height: 9px;
  pointer-events: none;
  -webkit-mask: url("/assets/images/footer/wonky-rule.svg") center / 48px 9px repeat-x;
  mask: url("/assets/images/footer/wonky-rule.svg") center / 48px 9px repeat-x;
}
:root[data-no-straight-lines] .no-straight-top::before {
  top: -5px;
  background: var(--no-straight-top-ink, currentColor);
}
:root[data-no-straight-lines] .no-straight-bottom::after {
  bottom: -5px;
  background: var(--no-straight-bottom-ink, currentColor);
}
:root[data-no-straight-lines] hr {
  border: 0 !important;
  height: 7px;
  background: var(--border, currentColor);
  -webkit-mask: url("/assets/images/footer/wonky-rule.svg") center / 48px 9px repeat-x;
  mask: url("/assets/images/footer/wonky-rule.svg") center / 48px 9px repeat-x;
}
:root[data-no-straight-lines] a { text-decoration-style: wavy !important; }
:root[data-no-straight-lines] .post-content img,
:root[data-no-straight-lines] .post-thumbnail-link img {
  border-radius: 1.8% 1% 2.5% .8% / 1% 2.5% 1% 2%;
}
:root[data-no-straight-lines] .footer-badges > :nth-child(odd) { transform: rotate(-3deg); }
:root[data-no-straight-lines] .footer-badges > :nth-child(even) { transform: rotate(3deg); }
:root[data-no-straight-lines] .sidebar-action-link,
:root[data-no-straight-lines] .archive-calendar-month {
  border-radius: 5px 2px 7px 3px;
}
.no-straight-glitter {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2147483647;
}

/* Use the retro rainbow arrow only where the ordinary arrow would be inherited.
   Native link hands, editing carets and other explicit cursors remain available. */
@media (any-pointer: fine) {
  :root[data-no-straight-lines] {
    cursor: var(--pride-cursor, url("/assets/images/footer/rainbow-cursor.svg")) 2 2, auto;
  }
  :root[data-no-straight-lines] :is(a[href], button, summary, [role="button"], label[for], select) {
    cursor: pointer;
  }
  :root[data-no-straight-lines] :is(input:not([type]), input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="password"], textarea, [contenteditable="true"]) {
    cursor: text;
  }
}

/* No Straight Lines means the entire visible composition is slightly askew.
   Rotate leaf blocks rather than the body or scroll/sticky containers, which
   would otherwise trap fixed overlays and create horizontal page overflow.
   Individual rotate/translate preserve existing transforms and layout flow. */
:root[data-no-straight-lines] {
  --wonky-angle: .65deg;
  --wonky-counter-angle: -.8deg;
  --wonky-shift: 2px;
}
:root[data-no-straight-lines] :is(
  .logo-area > .site-logo, .logo-area > .textcycle, .logo-area > button,
  .nav-list > li > a, .widgettitle, .widget > ul > li,
  .sidebar-action-link, .archive-calendar-month, .archive-calendar-year,
  .post-title, .post-entry > h2, .post-meta-row, .post-content-preview,
  .content-area > :is(h1, h2, h3, p, ul, ol, figure),
  .post-content :is(h1, h2, h3, h4, p, li, blockquote, figure, table, pre),
  .post-thumbnail-link > img, .post-content :is(img, video, iframe),
  .post-navigation > a, .pagination-controls > *, .archive-month-header,
  .about-panel > summary, .about-panel > :is(p, ul, ol, figure),
  .pagefind-ui__result, .chirp-profile, .chirp-page-intro,
  .nest-year-title, .chirp-flock-more, .footer-details .footer-detail-line,
  .site-footer--chirp > p
) {
  rotate: var(--wonky-angle);
  translate: 0 var(--wonky-shift);
}
:root[data-no-straight-lines] :is(
  .nav-list > li:nth-child(even) > a, .widget:nth-child(even) .widgettitle,
  .widget > ul > li:nth-child(even), .archive-calendar-month:nth-child(even),
  .post-entry:nth-child(even) > :is(h2, .post-meta-row, .post-content-preview),
  .content-area > :nth-child(even):is(h1, h2, h3, p, ul, ol, figure),
  .post-content :nth-child(even):is(h1, h2, h3, h4, p, li, blockquote, figure, table, pre, img, video, iframe),
  .post-entry:nth-child(even) .post-thumbnail-link > img,
  .post-navigation > a:nth-child(even), .pagination-controls > :nth-child(even),
  .pagefind-ui__result:nth-child(even), .footer-detail-line:nth-child(even)
) {
  rotate: var(--wonky-counter-angle);
  translate: 0 calc(-1 * var(--wonky-shift));
}
/* Wide horizontal rules and cards get a gentler tilt. */
:root[data-no-straight-lines] :is(hr, .archive-month-header, .chirp-profile, .chirp-page-intro) {
  rotate: -.35deg;
}
:root[data-no-straight-lines] :is(.site-footer .footer-details p, .post-content > ul, .post-content > ol) {
  rotate: -.35deg;
}
:root[data-no-straight-lines] :is(.content-area, .sidebar) :is(input, textarea, select, button:not(.no-straight-toggle)) {
  rotate: -.45deg;
  border-radius: 5px 2px 6px 3px;
}
:root[data-no-straight-lines] .post-content :is(img, video, iframe) {
  border-radius: 2% 1% 3% 1% / 1% 3% 1% 2%;
}
@media (max-width: 750px) {
  :root[data-no-straight-lines] {
    --wonky-angle: .4deg;
    --wonky-counter-angle: -.5deg;
    --wonky-shift: 1px;
  }
}

/* Secret effects remain scoped to the existing mode, including Bird pages. */
:root[data-no-straight-lines] {
  --pride-gradient: linear-gradient(90deg, #ff3658, #ff9d24, #ffe74a, #36db76, #29b9ff, #b668ff);
}
:root[data-no-straight-lines][data-pride-palette="1"] { --pride-cursor: url("/assets/images/footer/rainbow-cursor-1.svg"); }
:root[data-no-straight-lines][data-pride-palette="2"] { --pride-cursor: url("/assets/images/footer/rainbow-cursor-2.svg"); }
:root[data-no-straight-lines][data-pride-palette="3"] { --pride-cursor: url("/assets/images/footer/rainbow-cursor-3.svg"); }
:root[data-no-straight-lines][data-pride-palette="4"] { --pride-cursor: url("/assets/images/footer/rainbow-cursor-4.svg"); }
:root[data-no-straight-lines][data-pride-palette="5"] { --pride-cursor: url("/assets/images/footer/rainbow-cursor-5.svg"); }
:root[data-no-straight-lines][data-pride-palette="6"] { --pride-cursor: url("/assets/images/footer/rainbow-cursor-6.svg"); }
:root[data-no-straight-lines][data-pride-palette="7"] { --pride-cursor: url("/assets/images/footer/rainbow-cursor-7.svg"); }
:root[data-no-straight-lines] a[href]:is(:hover, :focus-visible) {
  text-decoration: underline transparent !important;
  background-image: var(--pride-gradient);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 100% 2px;
}
:root[data-no-straight-lines] .textcycle :is(.phrase, .bird-tagline) {
  display: none !important;
}
:root[data-no-straight-lines] .textcycle .no-straight-tagline {
  display: block;
  font-size: clamp(.85rem, 2.8vw, 1.1rem);
  letter-spacing: .02em;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
@supports selector(::-webkit-scrollbar) {
  :root[data-no-straight-lines]::-webkit-scrollbar-thumb {
    background: linear-gradient(#ff3658, #ff9d24, #ffe74a, #36db76, #29b9ff, #b668ff);
    border-radius: 8px;
    border: 2px solid var(--border, #888);
  }
  :root[data-no-straight-lines]::-webkit-scrollbar-track { background: var(--border, #888); }
}
@supports not selector(::-webkit-scrollbar) {
  /* Firefox exposes a solid thumb colour, not a gradient. */
  :root[data-no-straight-lines] { scrollbar-color: #b668ff var(--border, #777); }
}
@media (prefers-reduced-motion: no-preference) {
  :root[data-no-straight-lines] [data-no-straight-loading]::after {
    content: "";
    display: inline-block;
    width: 1.8em;
    height: 1.8em;
    vertical-align: middle;
    margin-inline-start: .4em;
    background: url("/assets/images/footer/biggayroll.gif") center / contain no-repeat;
    pointer-events: none;
  }
}

@media (forced-colors: active) {
  :root[data-no-straight-lines] a[href]:is(:hover, :focus-visible) {
    text-decoration-color: currentColor !important;
    background-image: none;
  }
}
