/* ==========================================================================
   MAYDAY — a films manifest
   No rules, no borders, no lines of any kind. Type, whitespace and blue
   links only. One narrow column, black on white, lowercase labels.
   ========================================================================== */

@import url("./fonts/fonts.css");

:root {
  --ink: #000;
  --paper: #fff;
  --blue: #0000ee;
  --blue-hover: #0000a3;
  --wash: #f2f2f2;
  --display: "Special Elite", "Courier New", monospace;
  --text: "Courier Prime", "Courier New", monospace;
  --col: 720px;
  --pad: 22px;
}

* { box-sizing: border-box; }

/* entries are display:grid, which would otherwise beat the UA rule for [hidden] */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.62 var(--text);
  letter-spacing: 0.01em;
}

.shell {
  max-width: var(--col);
  margin: 0 auto;
  padding: 46px var(--pad) 64px;
}

/* --- links: the only colour on the page ---------------------------------- */
a { color: var(--blue); text-decoration: none; }
a:visited { color: var(--blue); }
a:hover, a:focus-visible {
  color: var(--blue-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}
:focus-visible { outline: 0; background: var(--wash); box-shadow: 0 0 0 4px var(--wash); }
input:focus-visible { background: #e6e6e6; box-shadow: 0 0 0 4px #e6e6e6; }

h1, h2 { font-family: var(--display); font-weight: 400; }

/* --- masthead ------------------------------------------------------------ */
.mark {
  font-size: 38px;
  line-height: 1;
  margin: 0 0 16px;
  letter-spacing: 0.02em;
}
.quote { margin: 0 0 18px; font-size: 14.5px; max-width: 58ch; }
.stats { margin: 0 0 34px; font-size: 13px; max-width: 62ch; }

/* --- controls ------------------------------------------------------------ */
.controls { margin-bottom: 18px; }
.field { display: block; margin-bottom: 14px; }
.field .lab, .chips .lab {
  display: block;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.chips .lab { display: inline; margin: 0 10px 0 0; }
.field input {
  width: 100%;
  font: inherit;
  padding: 9px 12px;
  border: 0;
  background: var(--wash);
  color: var(--ink);
}
.field input::placeholder { color: #555; }

.chips { font-size: 14px; }
.chip {
  font: inherit;
  font-size: 14px;
  border: 0;
  background: none;
  color: var(--ink);
  padding: 0;
  margin: 0 14px 6px 0;
  cursor: pointer;
}
.chip:hover { text-decoration: underline; text-underline-offset: 3px; }
.chip[aria-pressed="true"] { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

.count { font-size: 13px; margin: 6px 0 32px; }

/* --- the manifest -------------------------------------------------------- */
.entries { list-style: none; margin: 0; padding: 0; }
.entry {
  display: grid;
  grid-template-columns: 3.4ch minmax(0, 1fr);
  column-gap: 10px;
  margin-bottom: 26px;
}
.entry .no { font-size: 12.5px; padding-top: 8px; }
.entry .head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  column-gap: 18px;
  row-gap: 2px;
}
.entry .name { font-family: var(--display); font-size: 21px; line-height: 1.18; }
.entry .year { font-size: 12.5px; }
.entry .url {
  margin-left: auto;
  font-size: 12.5px;
  text-align: right;
  overflow-wrap: break-word;
}
.entry .meta { font-size: 13px; margin-top: 2px; }
.entry .review {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.78;
  max-width: 62ch;
}
.entry .review p { margin: 0 0 7px; }
.entry .review p:last-child { margin-bottom: 0; }
.stars { letter-spacing: 0.06em; white-space: nowrap; }

.empty { font-size: 14px; margin: 30px 0 0; max-width: 60ch; }

/* --- page top bar (about, 404) ------------------------------------------- */
.top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
  font-size: 12.5px;
  margin-bottom: 30px;
}
.selfurl { overflow-wrap: break-word; }

/* --- prose pages --------------------------------------------------------- */
.doc section { margin-bottom: 32px; }
.doc h2 { font-size: 20px; margin: 0 0 10px; }
.doc p { margin: 0 0 13px; max-width: 68ch; }
.doc ul { margin: 0 0 13px; padding-left: 1.2em; max-width: 68ch; }
.doc li { margin-bottom: 6px; }
.doc a { text-decoration: underline; text-underline-offset: 3px; }
.doc .k { font-weight: 700; }

/* --- footer -------------------------------------------------------------- */
.foot { margin-top: 46px; font-size: 13px; }
.foot .signal {
  font-family: var(--display);
  letter-spacing: 0.22em;
  margin-bottom: 12px;
}
.foot ul { list-style: none; margin: 0 0 8px; padding: 0; }
.foot li { margin-bottom: 3px; }
.foot .meta { font-size: 12px; margin-top: 12px; max-width: 62ch; }

/* CJK reviews fall back to a system face. give them room and no letter-spacing. */
.note:lang(zh), .review:lang(zh) { letter-spacing: 0; }

/* --- narrow -------------------------------------------------------------- */
@media (max-width: 640px) {
  .shell { padding: 32px 18px 48px; }
  .mark { font-size: 32px; }
  .entry { margin-bottom: 24px; }
  .entry .url { margin-left: 0; text-align: left; }
}

@media print {
  .controls, .top { display: none; }
  body { font-size: 11pt; }
  a { color: #000; text-decoration: none; }
  .entry { break-inside: avoid; }
}
