@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

/* Sorting room: steel grey-green walls, dark letter plate, yellow slot */
:root {
  --paper: #e3e8e4;
  --card: #ffffff;
  --ink: #17262b;
  --muted: #536466;
  --line: #c4cec9;
  --yellow: #f3c53a;
  --blue: #245a7c;
  --focus: #245a7c;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 "Archivo", system-ui, sans-serif;
}
a { color: var(--blue); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* header */
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0; font-size: 15px; }
.brand { font-weight: 800; font-stretch: 112%; font-size: 18px; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.brand svg { width: 30px; height: 22px; }
.top nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 16px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }
.top nav a[aria-current] { box-shadow: inset 0 -3px 0 var(--yellow); }
.top .lang { font-weight: 700; color: var(--ink); }

/* hero */
.hero { padding: 30px 0 8px; }
h1 {
  margin: 0;
  max-width: 11em;
  font-size: clamp(42px, 8.4vw, 92px);
  line-height: .95;
  font-weight: 820;
  font-stretch: 118%;
  letter-spacing: -.035em;
}
.lead { max-width: 36em; margin: 20px 0 30px; font-size: 19px; color: var(--muted); }

/* the letter slot: a dark plate with a yellow mouth */
.slot {
  position: relative;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}
.slot-inner {
  border: 2px dashed rgba(243, 197, 58, .55);
  border-radius: 8px;
  padding: 26px 16px 22px;
  transition: border-color .15s ease, background-color .15s ease;
}
.slot-ico { display: block; width: 96px; height: 80px; margin: 0 auto 14px; }
.slot-letter { transition: transform .2s ease; }
.slot.over .slot-inner { border-style: solid; border-color: var(--yellow); background: rgba(243, 197, 58, .08); }
.slot.over .slot-letter { transform: translateY(10px); }
.drop-title { margin: 0 0 6px; font-size: 26px; font-weight: 750; font-stretch: 108%; line-height: 1.2; letter-spacing: -.01em; }
.drop-hint { margin: 0 0 22px; color: #b7c4c4; font-size: 15px; }
.slot input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pick {
  display: inline-block;
  padding: 14px 28px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 750;
  border-radius: 6px;
  cursor: pointer;
}
.pick:hover { background: #ffd552; }
.slot input:focus-visible + .pick { outline: 3px solid #fff; outline-offset: 3px; }
.privacy { margin: 16px 0 0; font-size: 14px; color: #b7c4c4; }
.privacy svg { width: 13px; height: 13px; vertical-align: -1px; margin-right: 5px; }

/* supported formats as postage stamps */
.fmts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.fmts span { margin-right: 2px; }
.fmt, .stamp {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  height: 40px;
  padding: 0 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  font-stretch: 90%;
  text-decoration: none;
  background: radial-gradient(circle at 50% 50%, transparent 2.6px, #fff 3px) -4px -4px / 8px 8px;
  position: relative;
  isolation: isolate;
}
.fmt::before, .stamp::before { content: ""; position: absolute; inset: 4px; background: #fff; border: 1px solid var(--line); z-index: -1; }
.fmt.on::before { background: var(--yellow); border-color: var(--yellow); }
.fmt:hover::before { border-color: var(--ink); }

/* results */
#out:empty { display: none; }
#out { margin-top: 28px; display: grid; gap: 20px; scroll-margin-top: 12px; }
.letter {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px 24px 26px;
  min-width: 0;
}
#out > .letter { animation: drop .4s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes drop { from { opacity: 0; transform: translateY(-22px); } }
@media (prefers-reduced-motion: reduce) { #out > .letter { animation: none; } .slot-letter, .slot-inner { transition: none; } }
.letter.nested { margin-left: 22px; border-left: 4px solid var(--blue); }
.letter.error { border-left: 4px solid #b3261e; }
.source { margin: 0 0 4px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.letter h2 { margin: 0 0 14px; font-size: 27px; line-height: 1.15; font-weight: 750; font-stretch: 100%; overflow-wrap: anywhere; letter-spacing: -.01em; }
.letter h3 { margin: 26px 0 10px; font-size: 17px; font-weight: 700; }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; font-size: 15px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; overflow-wrap: anywhere; }

.atts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.att { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.stamp { min-width: 54px; height: 46px; }
.stamp::before { background: var(--paper); }
.att-name { font-weight: 600; overflow-wrap: anywhere; line-height: 1.3; }
.att-name small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; margin-top: 2px; }
.att-act { display: flex; gap: 8px; }
.btn {
  display: inline-block;
  padding: 9px 16px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: 6px;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--blue); border-color: var(--blue); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn:disabled { opacity: .45; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.body { border: 1px solid var(--line); background: #fff; }
.mail-html { display: block; width: 100%; height: 420px; border: 0; }
.mail-text { padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.5; max-height: 70vh; overflow: auto; }
.note { margin: 0; padding: 10px 14px; font-size: 14px; color: var(--muted); }
.body .note { border-bottom: 1px solid var(--line); }

/* mbox: list of letters (the rack) and the reading pane */
.box { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 18px 18px 20px; min-width: 0; }
.box-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.box-head > div:first-child { flex: 1 1 260px; min-width: 0; }
.box-status { margin: 0; font-size: 20px; font-weight: 750; }
.box-tools { display: flex; gap: 8px; }
.bar { height: 6px; background: var(--paper); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--yellow); }
.search { width: 100%; margin: 14px 0 12px; padding: 11px 14px; font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.search:focus { outline: 3px solid var(--focus); outline-offset: 1px; background: #fff; }
.panes { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 18px; align-items: start; }
.rack { min-width: 0; }
.shown { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.mlist { list-style: none; margin: 0; padding: 0; max-height: 75vh; overflow: auto; border-top: 1px solid var(--line); }
.mrow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  width: 100%;
  padding: 10px 10px 11px;
  text-align: left;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.mrow:hover { background: var(--paper); }
.mrow.on { background: #fff6d6; box-shadow: inset 4px 0 0 var(--yellow); }
.m-from { font-weight: 650; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-date { font-size: 13px; color: var(--muted); white-space: nowrap; }
.m-subj { grid-column: 1 / -1; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more { width: 100%; margin-top: 10px; }
.reader { min-width: 0; display: grid; gap: 16px; }
.reader .letter { border-radius: 4px; }
.reader .choose { border: 1px dashed var(--line); border-radius: 6px; padding: 40px 16px; text-align: center; }
.back { display: none; justify-self: start; }

/* content */
.content { padding: 60px 0 24px; }
.content section { max-width: 40em; margin-bottom: 44px; }
.content h2 { font-size: 30px; line-height: 1.1; font-weight: 780; font-stretch: 110%; letter-spacing: -.02em; margin: 0 0 14px; }
.content p, .content li { margin: 0 0 12px; }
.content ol, .content ul { padding-left: 1.3em; }
.content code { font-size: 15px; background: #fff; border: 1px solid var(--line); padding: 1px 5px; border-radius: 3px; overflow-wrap: anywhere; }
.path { font-weight: 650; }
details { border-top: 1px solid var(--line); padding: 12px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 650; }
details p { margin: 10px 0 0; }

footer { display: flex; flex-wrap: wrap; gap: 6px 18px; border-top: 1px solid var(--line); margin-top: 40px; padding: 22px 0 40px; font-size: 14px; }
footer a { color: var(--muted); }
.legal { max-width: 40em; }
.legal h2 { font-size: 20px; margin-top: 28px; }

@media (max-width: 860px) {
  .panes { grid-template-columns: 1fr; }
  .mlist { max-height: 60vh; }
  .back { display: inline-block; }
  .reader { scroll-margin-top: 10px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .top { align-items: flex-start; }
  .top nav { gap: 2px 12px; font-size: 14px; }
  .lead { font-size: 17px; }
  .slot { padding: 10px; }
  .slot-inner { padding: 20px 12px 18px; }
  .slot-ico { width: 76px; height: 64px; margin-bottom: 10px; }
  .drop-title { font-size: 21px; }
  .letter { padding: 18px 16px 22px; }
  .letter.nested { margin-left: 10px; }
  .letter h2 { font-size: 23px; }
  .att { grid-template-columns: auto 1fr; }
  .att-act { grid-column: 1 / -1; }
  .att-act .btn { flex: 1; text-align: center; }
  .box { padding: 14px 12px 16px; }
  .content h2 { font-size: 25px; }
}

@media print {
  body.print-one { background: #fff; }
  body.print-one .top, body.print-one .hero > :not(#out), body.print-one .content, body.print-one footer,
  body.print-one .actions, body.print-one .att-act, body.print-one .box-head, body.print-one .search,
  body.print-one .rack, body.print-one .back, body.print-one .h1 { display: none !important; }
  body.print-one h1, body.print-one .lead, body.print-one .slot, body.print-one .fmts { display: none !important; }
  body.print-one #out > :not(.box):not(.printing), body.print-one .reader > .letter:not(.printing) { display: none !important; }
  body.print-one .box { border: 0; padding: 0; }
  body.print-one .panes { display: block; }
  body.print-one .letter { border: 0; animation: none; padding: 0; }
  body.print-one .mail-html { height: auto; }
}

/* sample button */
.try { margin-top: 14px; padding: 4px 2px; background: none; border: 0; color: #fff; font: inherit; font-size: 15px; text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 4px; text-decoration-thickness: 2px; cursor: pointer; }
.try:hover { color: var(--yellow); }
.try:disabled { opacity: .5; cursor: progress; }

/* screenshot of the result */
.content section.wide { max-width: none; }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.shot figcaption, .pic figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* format picture next to "What … is" */
.content section.with-pic { max-width: 52em; display: grid; grid-template-columns: 1fr 190px; column-gap: 40px; }
.with-pic > :not(.pic) { grid-column: 1; }
.pic { grid-column: 2; grid-row: 1 / span 6; margin: 4px 0 0; }
.pic svg { display: block; width: 100%; height: auto; }

/* how it works: file -> browser -> email, server crossed out */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 10px 14px; max-width: 640px; margin: 8px 0 20px; padding: 22px 20px 18px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.flow-step { display: grid; justify-items: center; gap: 10px; text-align: center; font-size: 14px; font-weight: 650; line-height: 1.3; }
.flow-step svg { height: 64px; width: auto; }
.arr { width: 36px; height: 16px; }
.flow-no { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 8px; padding-top: 14px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 14px; }
.flow-no svg { width: 30px; height: 30px; }

@media (max-width: 600px) {
  .content section.with-pic { grid-template-columns: 1fr; }
  .pic { grid-column: 1; grid-row: auto; width: 150px; margin: 0 0 16px; }
  .flow { grid-template-columns: 1fr auto 1fr auto 1fr; padding: 16px 10px 14px; gap: 8px 6px; }
  .flow-step { font-size: 12.5px; }
  .flow-step svg { height: 44px; }
  .arr { width: 22px; }
}
