@font-face {
  font-family: "Lilita One";
  src: url("/fonts/lilita-one-latin.woff2") format("woff2");
  font-display: swap;
}

/* Everything is sized in rem, so the root size scales the whole page on big screens. */
html { font-size: 16px; }
/* Grows smoothly past 1600px wide: about 17px at 1080p, 22px at 1440p, 31px at 4K. */
@media (min-width: 1600px) { html { font-size: clamp(16px, 0.75vw + 2.6px, 34px); } }

:root {
  --blue: #4b8dca;
  --blue-dk: #2f6fab;
  --navy: #174a74;
  --teal: #157a8c;
  --teal-dk: #0f6373;
  --stripe: #f6c516;
  --page: #e6e7e9;
  --card: #f7f7f7;
  --bar: #f1f1f1;
  --ink: #262626;
  --muted: #676c72;
  --line: #d3d6da;
  --link: #1b5a92;
  --url: #2d7a32;
}
* { box-sizing: border-box; }
html { background: var(--page); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 0.9375rem/1.45 Arial, Helvetica, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--link); }
h1, h2, h3, p { margin: 0; }
.wrap { width: 100%; max-width: 76rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 720px) { .wrap { padding: 0 1.75rem; } }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--stripe); outline-offset: 2px; }

/* Masthead */
.masthead { background: var(--blue); border-bottom: 0.5rem solid var(--stripe); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .08); }
.mast-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.1rem; }
.logo { display: block; line-height: 0; flex: none; }
.logo-svg { width: 12.5rem; height: auto; overflow: visible; }
.weather { display: flex; align-items: center; gap: 0.9rem; color: #fff; }
.sun { width: 2.6rem; height: 2.6rem; }
.weather-text { display: flex; flex-direction: column; padding-left: 0.9rem; border-left: 2px solid rgba(255, 255, 255, .85); font-size: 0.8rem; line-height: 1.3; }
.weather-text strong { font-size: 1.05rem; font-weight: 400; }
.mast-search { display: flex; gap: 1rem; align-items: center; padding-top: 0.6rem; padding-bottom: 1.25rem; }
.search { flex: 1; display: flex; gap: 1rem; min-width: 0; }
.search-box { flex: 1; display: flex; align-items: center; gap: 0.75rem; height: 2.9rem; padding: 0 0.9rem; background: #fff; border-radius: 0.2rem; min-width: 0; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12); }
.search-box svg { width: 1.6rem; height: 1.6rem; flex: none; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; font: 1.15rem Arial, sans-serif; color: var(--ink); background: none; }
.search-box input::placeholder { color: #333; }
.search-box:focus-within { outline: 3px solid var(--stripe); outline-offset: 1px; }
.btn-random { flex: none; width: 13rem; height: 2.9rem; border: 0; border-radius: 0.2rem; background: var(--teal); color: #fff; font: 1.15rem Arial, sans-serif; letter-spacing: 0.04em; cursor: pointer; }
.btn-random:hover { background: var(--teal-dk); }
.btn-random:disabled { opacity: .7; cursor: progress; }

.masthead.is-compact .mast-compact { display: flex; align-items: center; gap: 1.5rem; padding-top: 0.7rem; padding-bottom: 0.8rem; }
.masthead.is-compact .logo-svg { width: 8.5rem; }
.masthead.is-compact .btn-random { width: auto; padding: 0 2rem; }

/* Categories */
.cats { background: var(--bar); border-bottom: 1px solid #c9ced3; box-shadow: 0 1px 0 #fff inset; }
.cats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
.cat { display: flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 3.6rem; padding: 0.5rem 0.6rem; font-size: 0.78rem; line-height: 1.2; text-transform: uppercase; color: #2b2b2b; text-decoration: none; text-align: center; border-left: 1px solid #d6dadf; }
.cat:first-child { border-left: 0; }
.cat svg { flex: none; width: 1.75rem; height: 1.75rem; }
.cat:hover { background: #e7e9ec; }
.cat.is-current { background: #fff; box-shadow: inset 0 -3px 0 var(--blue); }

/* Page and cards */
.page { flex: 1; padding: 1.4rem 0 2.5rem; }
.card { background: var(--card); border: 1px solid #dadde1; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); padding: 1.1rem 1.25rem 1.2rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; }
.card-head h1, .card-head h2 { font-size: 1.15rem; font-weight: 400; text-transform: uppercase; letter-spacing: 0.01em; color: #2b2b2b; display: flex; align-items: center; gap: 0.6rem; }
.more { display: inline-block; margin-top: 0.9rem; font-size: 0.8rem; color: #2b2b2b; text-decoration: none; letter-spacing: 0.02em; }
.more:hover { color: var(--link); text-decoration: underline; }

.front { display: grid; gap: 1.1rem; margin-bottom: 1.1rem; }
@media (min-width: 900px) { .front { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; } }
.col-main, .col-side { display: grid; gap: 1.1rem; align-content: start; }

.news .source { flex: none; padding: 0.4rem 0.7rem; background: #fff; border: 1px solid var(--line); color: #111; font: 700 0.95rem/1 Arial, sans-serif; letter-spacing: 0.02em; text-decoration: none; }
.news-title { font-size: 1.15rem; line-height: 1.3; margin-bottom: 0.8rem; }
.news-title a { color: var(--ink); text-decoration: none; }
.news-title a:hover { text-decoration: underline; }
.byline { font-size: 0.9rem; color: #3b3b3b; }
.excerpt { position: relative; max-height: 4.4em; overflow: hidden; color: #3b3b3b; margin-top: 0.4rem; }
.excerpt.is-long::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.6em; background: linear-gradient(rgba(247, 247, 247, 0), var(--card)); }

.minute-row { display: grid; grid-template-columns: 15rem 1fr; gap: 1rem; align-items: start; }
.minute-art { display: grid; place-items: center; aspect-ratio: 16 / 10; padding: 0.6rem; overflow: hidden; text-align: center; text-decoration: none; font-size: 1.3rem; font-weight: 700; line-height: 1.05; border: 1px solid rgba(0, 0, 0, .15); }
.minute-url { font-weight: 700; color: #111; text-decoration: none; }
.minute-url:hover { text-decoration: underline; }
.minute-copy p { margin-top: 0.35rem; color: #3b3b3b; }
@media (max-width: 520px) { .minute-row { grid-template-columns: 1fr; } }

.advert { background: var(--blue); border: 3px solid var(--blue); }
.advert-label { color: #fff; text-align: center; font-size: 0.85rem; padding: 0.15rem 0 0.25rem; }
.advert-art { display: grid; place-items: center; aspect-ratio: 16 / 10; padding: 0.8rem; overflow: hidden; text-align: center; text-decoration: none; font-size: 1.7rem; font-weight: 700; line-height: 1.05; }

.bird { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 0.3rem; background: #1d9bf0; color: #fff; font: 1.15rem/1 "Lilita One", "Arial Black", sans-serif; text-transform: none; }
.chirp-list { list-style: none; margin: 0; padding: 0; }
.chirp-list li + li { border-top: 1px solid #b9dcf3; }
.chirp-list a { display: block; padding: 0.55rem 0; color: var(--ink); text-decoration: none; }
.chirp-list a:hover .chirp-body { text-decoration: underline; }
.chirp-handle { display: block; color: #1d7fc4; font-size: 0.85rem; }
.chirp-body { display: block; overflow-wrap: anywhere; }

/* Sponsored row, GTA Online style */
.sponsored { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.1rem; margin-bottom: 1.6rem; }
.sponsored:empty { display: none; }
.slot { display: block; background: var(--teal); border: 3px solid var(--teal); border-top: 0; text-decoration: none; }
.slot::before { content: ""; display: block; height: 0.35rem; background: var(--stripe); margin: 0 -3px; }
.slot-label { display: block; color: #fff; font-size: 0.9rem; text-align: center; padding: 0.35rem 0; text-transform: uppercase; }
.slot-art { display: grid; place-items: center; aspect-ratio: 16 / 9; padding: 0 0.8rem; overflow: hidden; text-align: center; font-size: 1.6rem; font-weight: 700; line-height: 1.05; }
.slot:hover .slot-art { filter: brightness(1.06); }

/* Directory */
.dir-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.dir-head h1 { font-size: 1.15rem; font-weight: 400; text-transform: uppercase; }
.dir-count { color: var(--muted); font-size: 0.85rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.9rem; }
.tile { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid #c9ced3; text-decoration: none; color: var(--ink); overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.tile:hover { outline: 3px solid var(--stripe); outline-offset: -1px; }
.tile-shot { display: grid; place-items: center; aspect-ratio: 16 / 10; padding: 0.5rem; text-align: center; font-size: 1.35rem; font-weight: 700; line-height: 1.05; overflow: hidden; border-bottom: 1px solid #d8dce0; }
.tile-cap { display: flex; flex-direction: column; padding: 0.5rem 0.65rem 0.6rem; line-height: 1.2; }
.tile-name { font-size: 0.95rem; font-weight: 700; }
.tile-domain { font-size: 0.75rem; color: var(--url); margin-top: 0.15rem; }
.tile-badge { position: absolute; top: 0.4rem; right: 0.4rem; font-size: 0.65rem; padding: 0.15rem 0.4rem; background: rgba(0, 0, 0, .65); color: #fff; text-transform: uppercase; letter-spacing: 0.04em; }
/* Homepage previews fill their frame; without one the frame shows the site name in brand colours. */
.has-thumb { padding: 0 !important; background: #fff; }
.has-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.style-serif.tile-shot, .style-serif.slot-art, .style-serif.advert-art, .style-serif.minute-art { font-family: Georgia, "Times New Roman", serif; font-style: italic; }
.style-mono.tile-shot, .style-mono.slot-art, .style-mono.advert-art, .style-mono.minute-art { font-family: "Courier New", monospace; }
.style-display.tile-shot, .style-display.slot-art, .style-display.advert-art, .style-display.minute-art { font-family: "Lilita One", "Arial Black", sans-serif; font-weight: 400; letter-spacing: 0.02em; }

/* Category page: only the directory */
body.is-category .front, body.is-category .sponsored, body.is-category .welcome { display: none; }

/* Results */
.results-layout { display: grid; gap: 1.1rem; }
@media (min-width: 900px) { .results-layout { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; } }
.results-meta { color: var(--muted); margin-bottom: 1rem; }
.result-list { list-style: none; margin: 0; padding: 0; }
.result { padding: 0.8rem 0; border-top: 1px solid var(--line); }
.result-title { font-size: 1.15rem; line-height: 1.25; }
.result-url { color: var(--url); font-size: 0.85rem; margin: 0.15rem 0; word-break: break-all; }
.result-snippet { color: #444; }
.pager { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.pager a, .pager span { min-width: 2.2rem; padding: 0.35rem 0.6rem; border: 1px solid var(--line); background: #fff; text-align: center; text-decoration: none; }
.pager span { background: var(--blue); color: #fff; border-color: var(--blue); }

/* Footer */
.foot { background: #d9dcdf; border-top: 1px solid #c3c8cd; color: #4f555b; font-size: 0.8rem; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; padding-top: 0.8rem; padding-bottom: 0.8rem; }

@media (max-width: 720px) {
  .logo-svg { width: 9.5rem; }
  .sun { width: 2rem; height: 2rem; }
  .mast-search { flex-wrap: wrap; gap: 0.6rem; }
  .search { flex-basis: 100%; }
  .btn-random { width: 100%; }
  .masthead.is-compact .mast-compact { flex-wrap: wrap; gap: 0.6rem; }
  .masthead.is-compact .logo-svg { width: 7rem; }
  .masthead.is-compact .search { flex-basis: 100%; }
  .masthead.is-compact .btn-random { width: auto; padding: 0 1rem; }
  .cats-row { grid-template-columns: repeat(2, 1fr); }
  .cat { justify-content: flex-start; text-align: left; border-left: 0; border-top: 1px solid #d6dadf; min-height: 3rem; }
  .cat:nth-child(even) { border-left: 1px solid #d6dadf; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .minute-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Welcome bar */
.welcome { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 1rem; margin-bottom: 1rem; padding: 0.7rem 1rem; background: #fff; border: 1px solid #dadde1; border-left: 4px solid var(--blue); }
.welcome-hi { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.8rem; }
.welcome-hi strong { font-size: 1.25rem; font-weight: 400; color: #1f2a33; }
.welcome-hi span { color: var(--muted); font-size: 0.9rem; }
.linkish { padding: 0; border: 0; background: none; color: var(--link); font: inherit; font-size: 0.9rem; text-decoration: underline; cursor: pointer; }

/* Word of the day + lottery */
.duo { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.word-term { margin-bottom: 0.4rem; }
.word-term strong { font-size: 1.35rem; color: #1f2a33; }
.word-term em { color: var(--muted); }
.word-ex { margin-top: 0.5rem; color: var(--muted); font-style: italic; }
.lotto-name { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.6rem; }
.balls { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; margin: 0 0 0.7rem; padding: 0; }
.balls li { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: #fff; border: 2px solid var(--blue); color: #1f2a33; font-weight: 700; font-size: 1rem; }
.balls li.shot { background: var(--teal); border-color: var(--teal); color: #fff; }
.lotto-jackpot { font-size: 0.95rem; margin-bottom: 0.6rem; }
.lotto-jackpot b { font-size: 1.15rem; }
.fine { font-size: 0.72rem; line-height: 1.4; color: var(--muted); }

/* Horoscope */
.horo-pick select { height: 2rem; padding: 0 0.5rem; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 0.9rem; }
.horo-sign { margin-bottom: 0.35rem; }
.horo-sign strong { font-size: 1.1rem; }
.horo-sign span { color: var(--muted); font-size: 0.85rem; margin-left: 0.3rem; }
.horo-lucky { margin-top: 0.5rem; color: var(--muted); font-size: 0.85rem; }

/* Markets */
.mk-status { font-size: 0.75rem; padding: 0.2rem 0.5rem; text-transform: uppercase; letter-spacing: 0.04em; background: #e1e5e9; color: #444; }
.mk-status.is-open { background: #e3f1e4; color: #24692a; }
.mk-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.mk-cols h3 { font-size: 0.75rem; font-weight: 400; text-transform: uppercase; color: var(--muted); margin-bottom: 0.3rem; }
.mk-cols ul { list-style: none; margin: 0; padding: 0; }
.mk-cols li { display: flex; justify-content: space-between; gap: 0.4rem; padding: 0.3rem 0; border-top: 1px solid #e3e6e9; font-size: 0.9rem; }
.mk-cols li b { font-family: "Courier New", monospace; font-size: 0.95rem; }
.up { color: #24813a; }
.down { color: #c0392b; }
.mk-news { margin-top: 0.7rem; font-size: 0.85rem; color: #3b3b3b; }

/* Poll */
.poll-q { font-weight: 700; margin-bottom: 0.7rem; }
.poll fieldset { border: 0; margin: 0; padding: 0; }
.poll-opt { display: flex; align-items: center; gap: 0.55rem; padding: 0.35rem 0; cursor: pointer; }
.poll-opt input { width: 1.05rem; height: 1.05rem; accent-color: var(--blue); }
.poll-actions { display: flex; align-items: center; gap: 1rem; margin-top: 0.6rem; }
.btn-vote { height: 2.2rem; padding: 0 1.4rem; border: 0; border-radius: 0.2rem; background: var(--teal); color: #fff; font: 0.95rem Arial, sans-serif; letter-spacing: 0.04em; cursor: pointer; }
.btn-vote:hover { background: var(--teal-dk); }
.btn-vote:disabled { opacity: .6; cursor: default; }
.poll-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.poll-results li { font-size: 0.9rem; }
.poll-results .row { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.2rem; }
.poll-results .bar { height: 0.55rem; background: #e1e5e9; }
.poll-results .bar i { display: block; height: 100%; background: var(--blue); }
.poll-results li.mine .row span:first-child::after { content: " (your vote)"; color: var(--muted); }
.poll-meta { margin-top: 0.6rem; font-size: 0.8rem; color: var(--muted); }

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

/* Weather (in-game, from Bender_Weather) */
.wx-place { color: var(--muted); font-size: 0.85rem; }
.wx-now { display: grid; grid-template-columns: 3.6rem auto 1fr; gap: 0.8rem; align-items: center; }
.wx-now > svg { width: 3.6rem; height: 3.6rem; background: var(--blue); border-radius: 0.2rem; }
.wx-temp { font: 400 2rem/1 "Lilita One", "Arial Black", sans-serif; color: var(--navy); }
.wx-cond { font-size: 0.9rem; color: #3b3b3b; }
.wx-facts { display: grid; grid-template-columns: auto auto; gap: 0.05rem 0.6rem; margin: 0; justify-self: end; font-size: 0.8rem; }
.wx-facts dt { color: var(--muted); }
.wx-facts dd { margin: 0; text-align: right; }
.wx-next { margin-top: 0.6rem; font-size: 0.85rem; color: #3b3b3b; }
.wx-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.3rem; list-style: none; margin: 0.8rem 0 0; padding: 0.6rem 0 0; border-top: 1px solid var(--line); text-align: center; font-size: 0.78rem; }
.wx-row li { display: grid; justify-items: center; gap: 0.15rem; }
.wx-row svg { width: 2rem; height: 2rem; background: var(--blue); border-radius: 0.15rem; }
.wx-row strong { font-size: 0.9rem; }
.wx-row small { color: var(--muted); }
