/* ==============================================
   Site shell
   Full-bleed content band below the timer plus the
   shared, minimal site footer. Loaded last so it wins
   over the older glass-card footer styling.
   ============================================== */

body {
  --outro-surface: #ffffff;
  --outro-text: #23262e;
  --outro-muted: #626976;
  --outro-border: rgba(20, 26, 38, 0.12);
  --outro-hover: rgba(20, 26, 38, 0.055);
  --outro-accent: #c43127;
  --scrollbar-thumb: #c2c6cd;
  --scrollbar-thumb-hover: #a7acb5;
}

body.theme-dark,
body.theme-yourname,
body.theme-custom,
body.theme-rain {
  --outro-surface: #14161b;
  --outro-text: #f2f3f5;
  --outro-muted: #a6acb7;
  --outro-border: rgba(255, 255, 255, 0.13);
  --outro-hover: rgba(255, 255, 255, 0.08);
  --outro-accent: #ff8a80;
  --scrollbar-thumb: #454b55;
  --scrollbar-thumb-hover: #5b626d;
}

/*
 * The scrollbar track was transparent, so the gutter showed whatever was
 * behind it: the timer colour above, still the timer colour beside the
 * content band. That reads as the band failing to reach the edge, and it is
 * most obvious on the image and dark themes. Painting the track with the
 * band's own surface makes the gutter continuous with the footer and reads
 * as ordinary browser chrome above it. color-scheme keeps the corner and any
 * agent-drawn parts on the right side of light/dark.
 */
body {
  color-scheme: light;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--outro-surface);
}

body.theme-dark,
body.theme-yourname,
body.theme-custom,
body.theme-rain {
  color-scheme: dark;
}

body::-webkit-scrollbar {
  width: 10px;
}

body::-webkit-scrollbar-track {
  background-color: var(--outro-surface);
}

body::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border: 2px solid var(--outro-surface);
  border-radius: 999px;
}

body::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

body::-webkit-scrollbar-corner {
  background-color: var(--outro-surface);
}

/* ---------------------------------------------- full-bleed content band */

.page-outro {
  width: 100vw;
  max-width: none;
  margin-top: clamp(2.5rem, 7vw, 4.5rem);
  margin-left: calc(50% - 50vw);
  color: var(--outro-text);
  text-align: left;
  background: var(--outro-surface);
  border-top: 1px solid var(--outro-border);
}

/* The band has to reach the bottom edge, so the page padding that keeps the
   timer off the viewport edge is dropped once a band is present. */
body:has(.page-outro) {
  padding-bottom: 0;
}

body:has(.page-outro) > .container {
  margin-bottom: 0;
}

.page-outro-inner {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(2.25rem, 6vw, 3.5rem) 1.25rem 0;
}

body.focus-mode-active .page-outro {
  display: none !important;
}

/* Article + FAQ blocks lose their glass cards inside the band: on a solid
   surface they read as one continuous document. */
.page-outro .pomodoro-preview,
.page-outro .seo-content,
.page-outro .seo-content-inner {
  max-width: none;
  margin: 0;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.page-outro .pomodoro-preview {
  padding: 0 0 clamp(1.75rem, 5vw, 2.5rem);
}

.page-outro .seo-content {
  --seo-surface: transparent;
  --seo-surface-hover: var(--outro-hover);
  --seo-border: var(--outro-border);
  --seo-divider: var(--outro-border);
  --seo-text: var(--outro-text);
  --seo-text-soft: var(--outro-muted);
  --seo-text-muted: var(--outro-muted);
  --seo-focus: var(--outro-accent);
  padding-bottom: clamp(1.75rem, 5vw, 2.5rem);
}

.page-outro .pomodoro-preview::before,
.page-outro .pomodoro-preview::after,
.page-outro .seo-content-inner::before {
  display: none;
}

.page-outro .seo-content-intro {
  padding: 0;
}

.page-outro .seo-content-details {
  margin-top: 1.5rem;
  border-top: 1px solid var(--outro-border);
}

.page-outro .article-title,
.page-outro .seo-content h2 {
  margin: 0 0 0.85rem;
  color: var(--outro-text) !important;
  font-size: clamp(1.35rem, 3.4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-outro .article-preview {
  color: var(--outro-muted) !important;
  font-size: 1rem;
  line-height: 1.75;
}

.page-outro .seo-content h3 {
  color: var(--outro-text);
}

.page-outro .feature-tag {
  color: var(--outro-text);
  background: var(--outro-hover);
  border-color: var(--outro-border);
  backdrop-filter: none;
}

.page-outro .learn-more-btn {
  color: var(--outro-text);
  background: var(--outro-hover);
  border-color: var(--outro-border);
  backdrop-filter: none;
}

.page-outro .learn-more-btn:hover {
  color: var(--outro-accent);
  background: var(--outro-hover);
  border-color: var(--outro-border);
}

/* ------------------------------------------------------ shared footer */

.footer {
  width: 100%;
  margin: 0;
  padding: clamp(1.75rem, 4vw, 2.25rem) 1.25rem clamp(2rem, 4vw, 2.5rem);
  color: var(--outro-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  text-align: center;
  background: none;
  border: 0;
  border-top: 1px solid var(--outro-border);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* When the band opens on the footer there is only one rule to draw. */
.page-outro > .footer:first-child {
  border-top: 0;
}

.footer-inner {
  display: flex;
  max-width: 46rem;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

/* ------------------------------------------------------------- brand mark */

.footer-brand,
.brand-lockup {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.55rem;
  color: var(--outro-text);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.footer-brand-mark,
.brand-mark {
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 auto;
  padding: 0.1rem;
  background: #fff;
  border-radius: 0.55rem;
}

/* ---------------------------------------------------------------- links */

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.1rem;
}

.footer-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0.3rem 0.6rem;
  color: var(--outro-muted);
  font-size: 0.85rem;
  font-weight: 550;
  text-decoration: none;
  border-radius: 0.5rem;
  transition:
    color 0.18s ease,
    background-color 0.18s ease;
}

.footer-nav a:hover {
  color: var(--outro-text);
  background: var(--outro-hover);
}

.footer-nav a[aria-current="page"] {
  color: var(--outro-accent);
  font-weight: 700;
}

/* ------------------------------------------------------------ meta line */

.footer-bottom {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--outro-border);
}

.footer-copy {
  margin: 0;
  color: var(--outro-muted);
  font-size: 0.78rem;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 0.9rem;
  margin: 0;
  font-size: 0.78rem;
}

.footer-meta a {
  display: inline-flex;
  align-items: center;
  color: var(--outro-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-meta a:hover {
  color: var(--outro-text);
  border-bottom-color: var(--outro-border);
}

/*
 * YabuTech in the copyright line is a plain redirect, not a styled link: it
 * inherits the surrounding colour so no user agent can paint it link-blue or
 * visited-purple against a themed background. :visited is stated explicitly
 * because that is the state agents most often colour on their own.
 */
.footer-copy a,
.footer-copy a:visited {
  color: inherit;
  text-decoration: none;
  border-bottom: 0;
}

.footer-copy a:hover {
  color: var(--outro-text);
}

.footer a:focus-visible {
  outline: 3px solid var(--outro-accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ------------------------------------------- action button over the band */

/*
 * js/radial-menu.js adds .is-over-outro while the floating button overlaps the
 * band. Painting it with the band's own tokens inverted guarantees contrast in
 * every theme: on the light surface it turns near-black with a white glyph, on
 * the dark surface near-white with a dark glyph — no per-theme rules to keep
 * in sync.
 */
.radial-menu-container.is-over-outro .radial-menu-toggle {
  color: var(--outro-surface);
  background: var(--outro-text);
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.radial-menu-container.is-over-outro .radial-menu-toggle svg {
  color: var(--outro-surface);
}

.radial-menu-container.is-over-outro .radial-menu-toggle:hover {
  background: var(--outro-text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

/*
 * Keep the last line clear of the floating action button. This is done in CSS
 * rather than JavaScript on purpose: site-footer.js is deferred and renders
 * before radial-menu.js builds the button, so it cannot detect one. :has()
 * re-evaluates when the button is added, whenever that happens.
 */
@media (max-width: 37.49rem) {
  body:has(.radial-menu-container) .footer {
    padding-bottom: 5.5rem;
  }

  .footer-nav a {
    padding: 0.3rem 0.5rem;
    font-size: 0.82rem;
  }

  .footer-meta {
    gap: 0 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-nav a,
  .footer-meta a {
    transition: none;
  }
}
