/* What the printer gets. Nothing here touches the screen: the whole file is
   one @media print block, so the app looks exactly the same in the browser
   whether or not this sheet is loaded.

   The app's furniture is not part of the document. On paper the rail, the top
   bar, the flash strips and every control go away; what is left is the page's
   own content on white, in black, with no rounded panel and no grey ground —
   in the dark theme too, because a printer would otherwise put the dark
   surface on the sheet and the light text with it. */
@media print {
  /* The ground. data-theme sits on <html>, so the override has to be at least
     as specific as the token block it is undoing. */
  :root,
  :root[data-theme="dark"],
  :root[data-theme="light"] {
    --bg: #fff;
    --bg-solid: #fff;
    --panel: #fff;
    --card: #fff;
    --card2: #fff;
    --row: #fff;
    --hatch: none;
    --text: #000;
    --muted: #333;
    --ink: #000;
    --ink-text: #fff;
    --line: #999;
    --line-strong: #666;
    --hover: #fff;
    --shadow: none;
    color-scheme: light;
    /* The *-ink tokens are the only ones text is ever drawn in, and the soft
       *-bg tints are the grounds it is drawn on: black on white on paper. The
       bright hues themselves are left alone, so an icon or a bar keeps its
       shape. */
    --green-ink: #000;
    --orange-ink: #000;
    --red-ink: #000;
    --blue-ink: #000;
    --amber-ink: #000;
    --purple-ink: #000;
    --green-bg: #fff;
    --orange-bg: #fff;
    --red-bg: #fff;
    --blue-bg: #fff;
    --pink-bg: #fff;
    --red-line: #999;
  }

  html,
  body {
    background: #fff;
    color: #000;
  }

  /* The app around the page. */
  .rail,
  .topbar,
  .flash,
  dialog,
  .modal,
  .lightbox,
  .confirm {
    display: none !important;
  }

  /* Anything that is there to be operated. .btn and .iconbtn are named as
     well as <button>, because both are often an <a>. A link keeps its text —
     a link is content — it only stops being blue. */
  button,
  .btn,
  .iconbtn,
  .menu,
  .segment,
  input,
  select,
  textarea {
    display: none !important;
  }

  /* The page column: no offset for a rail that is gone, no rounded panel,
     no shadow, and the width of the paper rather than of the window. */
  main {
    margin: 0;
    padding: 0;
    background: #fff;
    border-radius: 0;
    min-height: 0;
    gap: 12px;
  }

  /* The surfaces the content sits on stop being cards. */
  .section,
  .row,
  .child,
  .card,
  .card2,
  .paper {
    background: #fff;
    border-radius: 0;
    box-shadow: none;
  }

  .row,
  .child {
    padding: 4px 0;
    border-bottom: 1px solid #ccc;
    break-inside: avoid;
  }

  .narrow {
    max-width: none;
  }

  /* A status word stays readable as a word, not as a coloured pill. Every
     tint is named, because .tag.green mixes its ground from --green and --card
     rather than reading a tint token, and a bare .tag would lose to it. */
  .tag,
  .tag.red,
  .tag.green,
  .tag.orange,
  .tag.blue,
  .tag.grey,
  .tag.soft-red,
  .tag.pink,
  .kind-tag {
    background: none;
    color: #000;
    box-shadow: inset 0 0 0 1px #666;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  @page {
    margin: 16mm;
  }
}
