/* Attentional — quiet, readable, phone-first. */

:root {
  --bg: #ffffff;
  --bg-raised: #ffffff;
  --ink: #111111;
  --muted: #4a4a4a;
  --line: #c8c8c8;
  --accent: #111111;
  --danger: #8b1e16;
  --ok: #1f3d24;
  --focus: #111111;
  --font: Palatino, "Palatino Linotype", "Iowan Old Style", "Book Antiqua", Georgia, "Times New Roman", serif;
  --ui: "Helvetica Neue", Helvetica, "Segoe UI", system-ui, sans-serif;
  --measure: 38rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  font-weight: 400;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
}

a {
  color: inherit;
}

a:hover {
  text-decoration-thickness: 2px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.shell {
  width: min(var(--measure), 100%);
  margin: 0 auto;
  padding: 1.25rem 1.15rem 3.5rem;
  flex: 1;
}

.shell.wide {
  width: min(72rem, 100%);
}

.fav-cta {
  color: var(--ink) !important;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.82rem;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.25rem, 1fr));
  gap: 0.85rem 0.7rem;
  margin: 0.35rem 0 0.5rem;
}

.tile {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.tile-media {
  aspect-ratio: 3 / 4;
  background: #f4f4f4;
  border: 1px solid var(--line);
  overflow: hidden;
}

.tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #111;
}

.tile-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 0.55rem 0.5rem;
  font-size: 0.88rem;
  line-height: 1.25;
  color: var(--ink);
}

.tile-cap {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  line-height: 1.3;
}

.tile .marks {
  margin-top: 0.15rem;
}


.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0 0.7rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.6rem;
}

.mark {
  font-family: var(--font);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  font-weight: 400;
}

.mark:hover {
  text-decoration: underline;
}

.nav-actions {
  display: flex;
  gap: 0.75rem;
  font-family: var(--ui);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-actions a,
.nav-actions button.link {
  background: none;
  border: 0;
  padding: 0.35rem 0;
  color: var(--muted);
  text-decoration: none;
}

.nav-actions a:hover,
.nav-actions button.link:hover {
  color: var(--ink);
  text-decoration: underline;
}

.kicker {
  font-family: var(--ui);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.45rem;
}

h1 {
  font-size: 2.05rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.subtitle {
  font-style: italic;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.lede,
.prose p {
  margin: 0 0 1rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  border-radius: 2px;
  text-decoration: none;
  font-family: var(--ui);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.btn.secondary {
  background: transparent;
  color: var(--ink);
}

.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 1.25rem 0;
}

.field label {
  font-family: var(--ui);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input[type="password"],
.field input[type="search"],
.field textarea {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.7rem 0.75rem;
  color: var(--ink);
}

.field input[type="search"] {
  min-height: 2.75rem;
  -webkit-appearance: none;
  appearance: none;
}

.field textarea {
  min-height: 8.5rem;
  resize: vertical;
  line-height: 1.45;
}

.warn {
  font-size: 0.95rem;
  color: var(--muted);
  border-left: 2px solid var(--line);
  padding-left: 0.85rem;
  margin: 1.1rem 0 0;
}

.err {
  color: var(--danger);
  font-size: 0.95rem;
  margin: 0.4rem 0 0;
  min-height: 1.3em;
}

.phase {
  padding: 1.35rem 0 1.5rem;
  border-top: 1px solid var(--line);
}

.phase:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.phase h2 {
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
  font-weight: 400;
}

.blurb {
  color: var(--muted);
  font-size: 0.98rem;
  margin: 0 0 0.85rem;
}

.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.item-list li {
  border-top: 1px solid var(--line);
}

.item-list a {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  text-decoration: none;
  padding: 0.7rem 0;
  min-height: 2.75rem;
}

.item-list a:hover .item-title {
  text-decoration: underline;
}

.item-title {
  display: block;
}

.item-meta {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.12rem;
}

.marks {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  flex-shrink: 0;
  padding-top: 0.3rem;
}

.mark-done {
  font-family: var(--ui);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ok);
  flex-shrink: 0;
}

.mark-held {
  color: var(--muted);
}

.item-head h1 {
  font-size: 1.55rem;
  margin-bottom: 0.2rem;
}

.byline {
  color: var(--muted);
  margin: 0 0 1.35rem;
}

.facts {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 0.35rem 0.75rem;
  margin: 0 0 1.4rem;
  font-size: 0.98rem;
}

.facts dt {
  font-family: var(--ui);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.22rem;
}

.facts dd {
  margin: 0;
}

.heuristic {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  padding: 0.9rem 1rem;
  margin: 0 0 1.4rem;
}

.heuristic p {
  margin: 0;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0 0 1.25rem;
  min-height: 2.75rem;
}

.check input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.28rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.check span {
  padding-top: 0.1rem;
}

.back {
  display: inline-block;
  font-family: var(--ui);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 1.1rem;
}

.back:hover {
  color: var(--ink);
  text-decoration: underline;
}


.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.35rem;
}

.chip {
  font-family: var(--ui);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  color: var(--muted);
}

.chip.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1rem;
}

.tag {
  font-family: var(--ui);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.15rem 0.4rem;
}

.pair {
  margin: 0 0 1rem;
  font-size: 0.98rem;
}

.foot-note {
  margin-top: 2.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.empty-query {
  color: var(--muted);
  margin: 0.4rem 0 1.5rem;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--line);
}

.results {
  min-height: 2rem;
}

.busy {
  opacity: 0.65;
}

@media (max-width: 420px) {
  html,
  body {
    font-size: 17px;
  }

  h1 {
    font-size: 1.75rem;
  }

  .facts {
    grid-template-columns: 1fr;
    gap: 0.15rem 0;
  }

  .facts dt {
    margin-top: 0.45rem;
  }
}

.viewer {
  margin: 0 0 1.4rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  padding: 0.45rem 0.45rem 0.7rem;
}

.viewer img,
.viewer-frame {
  display: block;
  width: 100%;
  background: #1c1914;
}

.viewer.image img {
  height: auto;
  max-height: 70dvh;
  object-fit: contain;
  background: #111;
}

.viewer-frame.video, .viewer-frame.audio {
  min-height: 14rem;
  height: min(56vw, 22rem);
  border: 0;
}

.viewer-frame.html {
  min-height: 78dvh;
  height: 78dvh;
  border: 0;
  background: #fff;
}

.viewer figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.55rem 0.35rem 0.1rem;
}

.viewer-out {
  margin: 0 0 1.35rem;
}

@media (max-width: 420px) {
  .viewer-frame.video, .viewer-frame.audio {
    height: 14.5rem;
  }
}

.viewer.reader {
  background: var(--bg-raised);
  padding: 0.75rem 0.85rem 0.7rem;
}

.opening {
  margin: 0 0 1rem;
  padding: 0 0 0 0.85rem;
  border-left: 2px solid var(--line);
  font-style: italic;
  text-align: left;
  text-wrap: pretty;
}

.reader-body {
  max-height: 78dvh;
  min-height: 24rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  text-align: left;
  font-size: 1.05rem;
  line-height: 1.62;
  padding: 0.15rem 0.15rem 1.25rem;
}

.reader-body p {
  margin: 0 0 0.95rem;
  text-align: left;
  text-wrap: pretty;
}

.viewer-frame.html {
  min-height: 78dvh;
  height: 78dvh;
}

.provenance {
  margin: 1.6rem 0 0;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.provenance summary {
  font-family: var(--ui);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}

.provenance .facts {
  margin-top: 0.85rem;
}

.bounce {
  margin-top: 0.4rem;
}

.note-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.note-list li {
  border-top: 1px solid var(--line);
  padding: 0.75rem 0 0.9rem;
}

.note-work {
  font-weight: 400;
  text-decoration: none;
}

.note-excerpt {
  margin: 0.35rem 0 0;
  color: var(--muted);
  white-space: pre-wrap;
}

.shell h2 {
  font-size: 1.2rem;
  margin: 1.6rem 0 0.6rem;
}

.sitting-card {
  padding: 1.25rem 0 1.4rem;
  border-top: 1px solid var(--line);
}

.sitting-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
}

.sitting-card h2 a {
  text-decoration: none;
}

.sitting-card h2 a:hover {
  text-decoration: underline;
}

.sitting-works {
  list-style: decimal;
  padding-left: 1.25rem;
  margin-top: 0.75rem;
}

.sitting-step .heuristic-line {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.25rem 0 0.35rem;
}

.sitting-step .pair {
  margin: 0 0 0.75rem;
}
