/* ==========================================================================
   app-render.css — how a file looks when you open it.

   Two registers. A document sits on PAPER: lighter than the chrome, with a
   hard shadow, because on this machine paper is the one surface that is not
   the machine. A screenshot sits in a WINDOW, because that is what it is a
   picture of — and the window in the picture is drawn with the same bevels
   as the window you are looking at it through, one generation degraded.
   ========================================================================== */

.doc, .shot-wrap { margin: 8px 0 0; min-width: 0; max-width: 100%; }

.doc-head {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .16em;
  color: var(--lo); text-transform: uppercase;
  padding-bottom: 4px; margin-bottom: 6px;
  border-bottom: 1px solid var(--lo);
  box-shadow: 0 1px 0 var(--hi);
}
.doc-kind { font-weight: 700; color: var(--ink); }
.doc-src { margin-left: auto; opacity: .8; letter-spacing: .1em; }
.doc-real .doc-src { color: var(--amber-dim); }

/* ------------------------------------------------------------------ paper */
.sheet {
  background: #efe9dd;
  border: 1px solid var(--lo);
  box-shadow: 3px 3px 0 rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.5);
  padding: 14px 15px;
  max-height: 460px; overflow-y: auto;
  direction: rtl;                          /* the scrollbar belongs on the left */
}
.sheet > * { direction: ltr; }
.sheet .p {
  margin: 0 0 8px; font-size: 11.5px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
}
.sheet .p.title {
  font-size: 15px; line-height: 1.28; font-weight: 700; margin-bottom: 10px;
  letter-spacing: -.01em;
}
.sheet .p.head {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--lo); margin: 12px 0 5px;
}
.sheet .p.runhead {
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em;
  color: var(--lo); border-bottom: 1px solid rgba(87,78,68,.4);
  padding-bottom: 4px; margin-bottom: 10px;
}
.sheet .p.authors { font-style: italic; font-size: 11px; color: var(--lo); }
.sheet .p.abshead { font-family: var(--mono); font-size: 9px; letter-spacing: .18em; margin-top: 10px; }
.sheet .p.abs { font-size: 10.5px; line-height: 1.55; padding-left: 10px; border-left: 2px solid rgba(87,78,68,.3); }
.sheet .p.meta2 { font-family: var(--mono); font-size: 9.5px; color: var(--rust); letter-spacing: .1em; }
.sheet .p.cut {
  font-family: var(--mono); font-size: 9px; letter-spacing: .14em;
  color: var(--lo); opacity: .7; text-align: center; margin: 12px 0 0;
}
.sheet .cols { display: flex; gap: 14px; }
.sheet .col2 { flex: 1 1 0; min-width: 0; }
.sheet .col2 .p { font-size: 9.5px; line-height: 1.45; text-align: justify; hyphens: auto; }

/* a real extract keeps the document's own line breaks, so it needs room */
.doc-real .sheet { font-family: var(--mono); }
.doc-real .sheet .p { font-size: 10.5px; line-height: 1.5; }
.doc-real .sheet .p.title { font-family: inherit; font-size: 13.5px; }

/* ------------------------------------------------------------------ slide */
.slide {
  background: #efe9dd; border: 1px solid var(--lo);
  box-shadow: 3px 3px 0 rgba(0,0,0,.28);
  aspect-ratio: 4 / 3; max-width: 100%;
  padding: 16px 18px; display: flex; flex-direction: column;
}
.s-title {
  font-size: 16px; font-weight: 700; line-height: 1.2;
  padding-bottom: 8px; border-bottom: 2px solid var(--ink); margin-bottom: 10px;
}
.s-bul { margin: 0; padding-left: 18px; flex: 1 1 auto; }
.s-bul li { font-size: 12px; line-height: 1.7; }
.s-foot {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 9px; color: var(--lo);
  border-top: 1px solid rgba(87,78,68,.4); padding-top: 5px;
}

/* ------------------------------------------------------------ screenshots */
.shot {
  border: 1px solid var(--lo);
  box-shadow: 2px 2px 0 rgba(0,0,0,.3), inset 1px 1px 0 var(--hi);
  background: var(--gray);
  /* a screenshot of this machine, taken by this machine: one generation of
     loss, which is why it is slightly desaturated against the live chrome */
  filter: saturate(.86) contrast(1.04);
}
.shot-bar {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 6px; background: var(--gray-lt);
  border-bottom: 1px solid var(--lo); box-shadow: inset 0 1px 0 var(--hi);
  font-family: var(--mono); font-size: 9px; color: var(--lo);
}
.shot-bar i {
  width: 7px; height: 7px; flex: 0 0 7px;
  border: 1px solid var(--lo); background: var(--gray);
  box-shadow: inset 1px 1px 0 var(--hi);
}
.shot-bar span { margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-body { padding: 7px 8px; min-height: 120px; max-height: 300px; overflow: hidden; }

.shot-term {
  margin: 0; font-family: var(--mono); font-size: 8.5px; line-height: 1.45;
  white-space: pre; overflow: hidden; color: #1a1510;
}
.shot-term .bad { color: var(--rust); }
.shot-term .dim { opacity: .6; }
.shot-term, .shot-trace .shot-body, .shot-code .shot-body { background: #17130f; }
.shot-trace .shot-term, .shot-code .shot-term, .shot-term-dark { color: #d8d0be; }
.shot-term .bad { color: #d9663f; }

.shot-rows { display: flex; flex-direction: column; gap: 4px; }
.srow { display: flex; gap: 8px; align-items: center; }
.srow i, .srow b {
  display: block; height: 6px; background: var(--lo); opacity: .45;
}
.srow.unread b { opacity: .9; height: 7px; }

.shot-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.shot-grid .tile {
  width: 62px; height: 44px; background: #2a241d;
  border: 1px solid var(--lo);
  background-image: radial-gradient(circle at 50% 38%, rgba(246,240,228,.30) 0 18%, transparent 19%);
}
.shot-grid .tile.off { background-image: none; opacity: .5; }

/* --------------------------------------------------------------- tabular */
.sheet table.csv { border-collapse: collapse; font-family: var(--mono); font-size: 9.5px; width: 100%; }
.sheet table.csv th, .sheet table.csv td {
  border: 1px solid rgba(87,78,68,.45); padding: 2px 5px;
  text-align: left; white-space: nowrap;
}
.sheet table.csv th { background: var(--gray-lt); font-weight: 700; letter-spacing: .04em; }
.sheet table.csv tr:nth-child(even) td { background: rgba(87,78,68,.06); }

/* ----------------------------------------------------------------- video */
.vid-frame {
  aspect-ratio: 16 / 9; background: #100d0a;
  border: 1px solid var(--lo); box-shadow: inset 0 0 40px rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
}
.vid-tri {
  width: 0; height: 0; border-style: solid; border-width: 13px 0 13px 22px;
  border-color: transparent transparent transparent rgba(246,240,228,.5);
}
.vid-bar { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.vid-bar i {
  display: block; height: 5px; background: var(--ink); min-width: 2px;
  border: 1px solid var(--lo); flex: 0 0 auto;
}
.vid-bar .meta { font-family: var(--mono); font-size: 9px; }

/* ------------------------------------------------------------------- hex */
pre.hex {
  margin: 0; font-family: var(--mono); font-size: 9.5px; line-height: 1.45;
  white-space: pre; overflow-x: auto; color: #241d16;
}
pre.hex .dim { opacity: .6; }

@media (max-width: 520px) {
  .sheet .cols { display: block; }
  .sheet .col2 .p { font-size: 10.5px; }
  .sheet { max-height: 360px; }
}

/* a table is the one thing allowed to be wider than the pane, and only
   inside its own scroller */
.sheet { overflow-x: auto; }
.doc .sheet > table.csv { min-width: 420px; }

/* ==========================================================================
   The file that is not here.

   A catalogue entry on top, a render that came apart underneath, and an
   overlay saying so. Nothing in it pretends to be a document: the point of
   the view is that you can tell at a glance which files this machine still
   has and which it only remembers.
   ========================================================================== */
.gh { display: flex; flex-direction: column; gap: 10px; }

.gh-head {
  display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--lo); box-shadow: 0 1px 0 var(--hi);
}
.gh-kind {
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em;
  padding: 1px 4px; background: var(--gray-dk); color: #2a2721;
  border: 1px solid var(--lo); box-shadow: inset 1px 1px 0 var(--hi);
}
.gh-name {
  flex: 1 1 auto; min-width: 0; font-weight: 700; font-size: 12.5px;
  word-break: break-word;
}
.gh-size { font-family: var(--mono); font-size: 9.5px; opacity: .6; white-space: nowrap; }

.gh-cat {
  padding: 8px 10px; background: var(--gray-lt);
  border: 1px solid var(--lo); box-shadow: inset 1px 1px 0 var(--hi);
}
.gh-cat-h {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em;
  color: #3b4a6b; margin-bottom: 5px;
}
.gh-dl {
  margin: 0; display: grid; grid-template-columns: max-content 1fr;
  gap: 1px 12px; font-size: 11.5px;
}
.gh-dl dt { font-family: var(--mono); font-size: 10px; color: #55524a; }
.gh-dl dd { margin: 0; font-family: var(--mono); word-break: break-all; }
.gh-cat-act { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

.gh-stage {
  position: relative; overflow: hidden; background: #0b0a09;
  border: 1px solid var(--lo); box-shadow: inset 1px 1px 0 #2a2620;
}
.gh-canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; }

.gh-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 7px 9px; text-align: center;
  background: linear-gradient(transparent, rgba(8,7,5,.94) 46%);
}
.gh-fail {
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; color: #e5624a;
}
.gh-why {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em;
  color: rgba(232,228,218,.5); margin-top: 2px;
}

/* nothing to decode at all */
.gh-media {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; min-height: 190px; padding: 30px 20px 44px;
}
.gh-media-face {
  width: 54px; height: 54px; display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: rgba(232,228,218,.22);
  border: 1px solid rgba(232,228,218,.16); border-radius: 50%;
}
.gh-media-bar {
  width: min(280px, 70%); height: 4px; background: rgba(232,228,218,.1);
}
.gh-media-bar i { display: block; width: 0; height: 100%; background: var(--amber-dim); }

.gh-note { margin: 0; font-size: 11px; color: #3d3a34; max-width: 54ch; }
