/* Weekly AI: the logo's black, paper white and amber. */
:root {
  color-scheme: dark;
  --ground: #060608;
  --surface: #121012;
  --line: #2a2420;
  --line-2: #4a3b2c;
  --paper: #faf7f0;
  --ash: #a89f92;
  --amber: #fdb10a;
  --flame: #fc7a02;
  --danger: #ff6a5a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--paper);
  font: 17px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: var(--amber); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.hp { position: absolute; left: -9999px; }

/* ---- the header: the whole logo on the home page, the name alone elsewhere ---- */
.header { padding: 40px 16px 8px; text-align: center; }
.logo { margin: 0 auto; width: min(100%, 1100px); }
.logo img { display: block; width: 100%; height: auto; }
.logo .stack { display: none; }
.brand { display: inline-block; }
.brand img { display: block; width: min(72vw, 340px); height: auto;
             /* a window on the logo file; the clip cuts off the tip of the bird's wing */
             clip-path: polygon(0 0, 94.5% 0, 94.5% 33%, 97.7% 33%, 97.7% 100%, 0 100%); }
.tagline { margin: 4px 0 0; color: var(--ash); }

@media (max-width: 640px) {
  .logo .wide { display: none; }
  .logo .stack { display: block; }
  /* each picture is a window on the one logo file; the clips cut off the corner of its neighbour */
  .logo .bird { width: min(78%, 320px); margin: 0 auto;
                clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 61%, 11.5% 61%, 11.5% 39.5%, 0 39.5%); }
  .logo .name { margin-top: 4px; clip-path: polygon(0 0, 94.5% 0, 94.5% 33%, 97.7% 33%, 97.7% 100%, 0 100%); }
}

main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 16px 16px 56px; }
.home main { text-align: center; }

.soon { margin: 8px 0 0; font-size: clamp(1.3rem, 3.4vw, 2rem); line-height: 1.2;
        font-weight: 800; font-stretch: expanded; letter-spacing: .14em; color: var(--amber); }
.lead { margin: 10px 0 32px; font-size: 1.15rem; }

/* ---- messages after the signup ---- */
.flash { margin: 0 0 24px; padding: 12px 16px; text-align: center;
         border: 1px solid var(--amber); border-radius: 10px; background: var(--surface); }
.flash-error { border-color: var(--danger); }

/* ---- the signup ---- */
.signup { margin: 0 0 48px; text-align: left; }
.signup-prompt { margin: 0 0 12px; font-weight: 650; }
.signup-form { display: flex; flex-direction: column; gap: 10px; }
.signup-note { margin: 10px 0 0; color: var(--ash); font-size: .88rem; }
.home .signup { max-width: 520px; margin-left: auto; margin-right: auto; }
.home .signup-note { text-align: center; }

.input { flex: 1; min-width: 0; height: 50px; padding: 0 16px;
         border: 1px solid var(--line-2); border-radius: 10px;
         background: var(--surface); color: var(--paper); font: inherit; }
.input::placeholder { color: #7d7468; }
.btn { height: 50px; padding: 0 26px; border: 0; border-radius: 10px;
       background: linear-gradient(180deg, var(--amber), var(--flame)); color: #140b02;
       font: inherit; font-weight: 750; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
@media (min-width: 480px) { .signup-form { flex-direction: row; } }

/* ---- the archive ---- */
.empty { padding: 32px 0; text-align: center; color: var(--ash); }
.issue-list, .items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; text-align: left; }
.issue-list { border-top: 1px solid var(--line); }
.issue-link { display: flex; flex-direction: column; gap: 4px; padding: 20px 4px;
              border-bottom: 1px solid var(--line); color: var(--paper); text-decoration: none; }
.issue-link:hover .row-title { color: var(--amber); }
.number { font-weight: 750; font-size: .85rem; letter-spacing: .06em; color: var(--amber); }
.row-title { font-size: 1.25rem; font-weight: 650; line-height: 1.35; }
.row-meta, .kicker { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; color: var(--ash); font-size: .88rem; }

.pages, .issue-nav { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center;
                     margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .9rem; }
.pages a, .issue-nav a { color: var(--paper); }
.pages a:hover, .issue-nav a:hover { color: var(--amber); }
.pages-now { color: var(--ash); }

/* ---- one issue ---- */
.issue-header { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.kicker { margin: 0 0 12px; }
.issue-title { margin: 0; font-size: clamp(1.7rem, 5vw, 2.3rem); line-height: 1.2; font-weight: 800; }
.intro { margin-bottom: 40px; font-size: 1.1rem; }
.intro p { margin: 0 0 16px; }
.intro img { max-width: 100%; height: auto; border-radius: 10px; }
.intro a { color: var(--amber); }
.hb-video-embed { position: relative; aspect-ratio: 16 / 9; margin: 0 0 16px; border-radius: 10px; overflow: hidden; background: var(--surface); }
.hb-video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.items { gap: 32px; margin-bottom: 48px; }
.item-sponsored { padding: 16px 20px 20px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.sponsored { margin: 0 0 6px; font-size: .8rem; font-weight: 750; letter-spacing: .06em; color: var(--flame); }
.item-title { margin: 0 0 8px; font-size: 1.25rem; font-weight: 650; line-height: 1.35; }
.item-title a { color: var(--paper); text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.item-title a:hover { color: var(--amber); }
.item-summary { margin: 0 0 8px; }
.item-source { margin: 0; color: var(--ash); font-size: .88rem; }

.footer { padding: 24px 16px 32px; text-align: center; color: var(--ash); font-size: .88rem; }
.footer p { margin: 0; }
.footer a { color: inherit; }
.footer a:hover { color: var(--amber); }
