/* MIT License - Copyright (c) fintonlabs.com */

@font-face {
  font-family: "Fredoka";
  src: url("/static/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --surface: #161616;
  --border: #2a2a2a;
  --text: #f8f8f8;
  --muted: #a8a8a8;
  --lime: #aef20c;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Fredoka", ui-rounded, system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.5;
}

a { color: var(--lime); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.page { max-width: 720px; margin: 0 auto; padding: 0 20px 48px; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.top img { display: block; height: 44px; width: auto; }

.about-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 150ms ease-out;
}
.about-button:hover { border-color: var(--muted); }

h1 { font-size: 40px; line-height: 1.1; font-weight: 700; margin: 32px 0 4px; }
h1 span { color: var(--lime); }
.date { color: var(--muted); margin: 0 0 24px; }
.hook { font-size: 24px; line-height: 1.3; font-weight: 500; margin: 0 0 28px; }

.stories { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.stories li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 4px 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.stories .n { color: var(--lime); font-weight: 700; font-size: 22px; line-height: 1.3; }
.stories h2 { font-size: 22px; line-height: 1.3; font-weight: 600; margin: 0; }
.stories p { margin: 6px 0 8px; color: var(--muted); }
.stories .body { grid-column: 2; }
.source { font-size: 16px; overflow-wrap: anywhere; }

.sowhat { margin: 24px 0 0; }
.sowhat strong { color: var(--lime); font-weight: 600; }
.watch { margin: 16px 0 0; }

.earlier { margin-top: 48px; }
.earlier h2 { font-size: 20px; font-weight: 600; margin: 0 0 8px; }
.earlier ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.earlier li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.earlier .when { display: block; color: var(--muted); font-size: 15px; }

.empty { color: var(--muted); margin: 24px 0; }

.foot {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 15px;
}

dialog {
  width: min(360px, calc(100vw - 40px));
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
dialog h2 { font-size: 20px; margin: 0 0 8px; }
dialog p { margin: 0 0 16px; color: var(--muted); }
dialog button {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

@media (max-width: 480px) {
  body { font-size: 17px; }
  h1 { font-size: 32px; }
  .hook { font-size: 21px; }
  .top img { height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
