/* randomword.com facelift (Oct 2026). Loaded after main.css; overrides only. */
:root {
  --rw-bg: #121212;
  --rw-ink: #fafafa;
  --rw-text: #e8e8e8;   /* body copy: ~15:1 on bg */
  --rw-soft: #c9c9c9;   /* definitions, nav: ~11:1 on bg */
  --rw-quiet: #a8a8a8;  /* hints, footer: ~7.8:1 on bg */
  --rw-line: rgba(255,255,255,.10);
  --rw-accent: #ffc861;
  --rw-link: #9cc5ff;
  --rw-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --rw-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}
html { background: var(--rw-bg); }
body {
  background: radial-gradient(ellipse 120% 70% at 50% -10%, #23211d 0%, var(--rw-bg) 60%) no-repeat var(--rw-bg);
  color: var(--rw-text);
  font-family: var(--rw-sans);
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--rw-link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover, a:focus { color: #fff; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--rw-accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Header ---------- */
.rw-header { text-align: center; padding: 28px 16px 0; }
.rw-brand {
  display: inline-block; font-family: var(--rw-serif); font-style: italic; font-weight: 500;
  font-size: 22px; letter-spacing: -.01em; color: var(--rw-ink); text-decoration: none; margin-bottom: 14px;
}
.rw-brand span { color: var(--rw-accent); font-style: normal; }
.rw-brand:hover { color: var(--rw-ink); }
.rw-nav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px;
  max-width: 900px; margin: 0 auto; padding: 0; list-style: none;
}
.rw-nav a {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  font-size: 14px; line-height: 1.4; font-weight: 500; color: var(--rw-soft); text-decoration: none;
  transition: background-color .15s, color .15s;
}
.rw-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.rw-nav a[aria-current="page"] { color: #111; background: var(--rw-ink); }
@media (max-width: 640px) {
  .rw-header { padding-top: 18px; }
  .rw-nav { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent);
    padding: 0 4px 4px; }
  .rw-nav::-webkit-scrollbar { display: none; }
  .rw-nav li { flex: 0 0 auto; }
}

/* ---------- Hero (the word) ---------- */
.mainmenu-wrapper { display: none; }
.section { padding: 0; transform: none; text-align: center; }
#shared_section {
  display: block; background: transparent; max-width: 1000px; margin: 0 auto; padding: 0 20px;
  min-height: 46vh; display: flex; flex-direction: column; justify-content: center;
}
#random_word {
  font-family: var(--rw-serif); font-weight: 600; color: var(--rw-ink);
  font-size: clamp(52px, 11vw, 136px); line-height: 1.02; letter-spacing: -.025em;
  margin: 56px 0 0; overflow-wrap: anywhere;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  animation: rw-rise .6s cubic-bezier(.2,.7,.2,1) both;
}
#random_word_definition {
  font-family: var(--rw-sans); color: var(--rw-soft); font-weight: 400;
  font-size: clamp(19px, 2.6vw, 28px); line-height: 1.45;
  max-width: 34ch; margin: 22px auto 0;
  animation: rw-rise .6s .12s cubic-bezier(.2,.7,.2,1) both;
}
#random_word_definition:empty { display: none; }
#next_random_word { width: auto !important; margin: 44px 0 10px !important; font-size: 0; line-height: 1; }
#next_random_word a {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--rw-sans); font-size: 17px; font-weight: 600; color: var(--rw-ink); text-decoration: none;
  padding: 14px 26px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
#next_random_word a::after { content: "\2192"; font-size: 18px; transition: transform .15s; }
#next_random_word a:hover { background: var(--rw-ink); color: #111; border-color: var(--rw-ink); }
#next_random_word a:hover::after { transform: translateX(3px); }
#next_random_word a:active { transform: scale(.97); }
.rw-hint { font-size: 13px; color: var(--rw-quiet); margin: 0 0 40px; }
.rw-hint kbd {
  font-family: var(--rw-sans); font-size: 12px; color: var(--rw-soft); background: transparent;
  border: 1px solid rgba(255,255,255,.22); border-radius: 5px; padding: 1px 6px; box-shadow: none;
}
@media (hover: none) { .rw-hint { display: none; } #next_random_word { margin-bottom: 40px !important; } }
@keyframes rw-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #random_word, #random_word_definition { animation: none; } }

/* ---------- Article copy ---------- */
body > div[style*="padding-left:5%"] {
  max-width: 680px; margin: 24px auto 0; padding: 48px 22px 0 !important;
  border-top: 1px solid var(--rw-line); text-align: left; color: var(--rw-text);
}
body > div[style*="padding-left:5%"] p,
body > div[style*="padding-left:5%"] li { color: var(--rw-text); font-size: 18px; line-height: 1.75; margin: 0 0 1.2em; }
h1, h2, h3, h4 { font-family: var(--rw-serif); color: var(--rw-ink); letter-spacing: -.015em; border: 0; }
body > div[style*="padding-left:5%"] h1 { font-size: clamp(30px, 4.5vw, 40px); font-weight: 600; line-height: 1.15; margin: 0 0 .7em; padding: 0; }
body > div[style*="padding-left:5%"] h2 { font-size: 24px; font-weight: 600; line-height: 1.3; margin: 1.8em 0 .6em; }
body > div[style*="padding-left:5%"] h3 { font-size: 20px; margin: 1.5em 0 .5em; }
/* Privacy page puts the header inside the article wrapper */
body > div[style*="padding-left:5%"] .rw-header { margin: -48px -22px 32px; }

/* ---------- Ads: keep slots, just breathe ---------- */
#RW_ATF_Desktop_and_Mobile, #RW_BTF_Desktop_and_Mobile { margin-left: auto; margin-right: auto; }

/* ---------- Footer ---------- */
.rw-footer {
  max-width: 680px; margin: 48px auto 0; padding: 28px 22px 120px;
  border-top: 1px solid var(--rw-line); text-align: center; font-size: 14px; color: var(--rw-quiet);
}
.rw-footer a { color: var(--rw-soft); text-decoration: none; margin: 0 10px; }
.rw-footer a:hover { color: #fff; text-decoration: underline; }
.rw-footer p { margin: 0 0 6px; color: var(--rw-quiet); font-size: 14px; }
