/*
 * Colours, type and page frame of the BeeNewsroom reader (D33).
 * Same palette as the app (lib/ui/theme): brand honey and brown around the
 * news only; headline and summary in neutral, high-contrast colours (D27).
 * Heebo is served from the plugin (no request to Google, D25).
 */
@font-face {
  font-family: "Heebo";
  src: url("../fonts/heebo.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* --honey, --brown, --cream: brand.css, generated from the app (D39). */
  --bg: #fff8f0;
  --card: #ffffff;
  --text: #1a1a1a;
  --text-2: #4a4a4a;
  --line: #eadfce;
  --read: #8a8a8a;
  --danger: #b3261e;
  --focus: #0b57d0;
  --bar-bg: var(--brown);
  --bar-text: #ffffff;
  --text-scale: 1;
  --radius: 14px;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15120d;
    --card: #221d16;
    --text: #f2f2f2;
    --text-2: #c4c4c4;
    --line: #3a3127;
    --read: #8d877e;
    --cream: #2b2417;
    --focus: #8ab4f8;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

/* The hidden attribute must win over display rules (toast, version list). */
[hidden] { display: none !important; }

html { font-size: calc(16px * var(--text-scale)); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Heebo", system-ui, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 8px; top: 8px; background: var(--card); padding: 8px; z-index: 10; }

.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px var(--gutter);
  background: var(--bar-bg); color: var(--bar-text);
}
.brand { display: flex; gap: 8px; align-items: center; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.bar-actions { display: flex; gap: 4px; }
.bar-link {
  display: inline-flex; align-items: center; gap: 2px;
  min-width: 44px; min-height: 44px; justify-content: center;
  text-decoration: none; font-size: 0.9rem; border-radius: 10px; padding: 0 8px;
}
/* Line icons (D39); labels only where there is room. */
.bar-link [data-icon] { display: inline-flex; }
.bar-label { display: none; margin-inline-start: 4px; }
@media (min-width: 900px) { .bar-label { display: inline; } }
.bar-link:hover { background: rgb(255 255 255 / 0.12); }
.bar-link .count { font-size: 0.75rem; font-weight: 700; color: var(--honey); }

main { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter) 48px; outline: none; }
/* The feed gets a side column on a wide screen (D39, side-column.css). */
@media (min-width: 1100px) { main[data-screen="feed"] { max-width: 1080px; } }

.btn {
  border: 0; border-radius: 999px; padding: 8px 18px; min-height: 40px;
  background: var(--brown); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
  display: inline-flex; gap: 6px; align-items: center; justify-content: center; text-decoration: none;
}
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }

.toast {
  position: fixed; inset-inline: 0; bottom: 16px; margin: 0 auto; width: fit-content; max-width: calc(100% - 32px);
  display: flex; gap: 12px; align-items: center;
  background: #2b2b2b; color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 20;
}
.toast button { background: none; border: 0; color: var(--honey); font: inherit; font-weight: 700; cursor: pointer; }

.foot {
  max-width: 1080px; margin: 0 auto; padding: 24px var(--gutter) 40px;
  display: flex; flex-direction: column; gap: 4px; color: var(--text-2); font-size: 0.85rem;
}
.empty { text-align: center; color: var(--text-2); padding: 48px 0; white-space: pre-line; }
.noscript { text-align: center; padding: 32px; }
