/* learnmingo.com - the desk: letters page styles (on top of /desk/desk.css; DESK.md). The builder's fields are the site's own
   (.field in /site.css: a plain label over a capsule input); the list is kit.table; a roster is rows on the desk's rails. Only
   what is the page's own is here: the form's two columns, the body's monospace box and token buttons, the preview's head, a
   row's two lines of buttons and its one line of news, the roster's rails and its two-line form on a phone. */

/* ---------- the builder ---------- */
.lt-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 16px; }
.lt-form .field { min-width: 0; }
.lt-form .lt-wide { grid-column: 1 / -1; }
.lt-form input, .lt-form textarea { font-size: 14px; }
.lt-form input::placeholder, .lt-form textarea::placeholder { color: var(--w-ink-2); opacity: 1; }
.lt-form textarea.lt-code { height: 220px; min-height: 120px; padding: 10px 14px; font: 500 13px/1.6 var(--w-mono); tab-size: 2; }
.lt-form input[type="datetime-local"] { font-variant-numeric: tabular-nums; }
.lt-label { font-size: 13px; font-weight: 600; }
.lt-form .dk-seg { align-self: flex-start; }
.lt-form .field:has(> .dk-seg) { justify-content: flex-start; }
.lt-form .dk-seg button { height: 30px; }
.lt-toks { display: flex; flex-wrap: wrap; gap: 6px; }
.lt-toks .dk-btn { padding: 0 9px; font: 500 12px var(--w-mono); }
.lt-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.lt-error { margin-top: 12px; }

/* ---------- a preview: the subject, who it is read as, the mail in its frame ---------- */
.lt-pv { margin-top: 16px; }
.lt-pv-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; min-height: 30px; margin: 0 0 8px; font-size: 13.5px; }
.lt-pv-subject { min-width: 0; overflow-wrap: anywhere; }
.lt-pv-subject b { font-weight: 600; }
.lt-pv-as { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.lt-pv-as > span { white-space: nowrap; }
.lt-select {
  min-width: 0; max-width: 220px; height: 30px; padding: 0 8px 0 12px; border: 1px solid var(--w-in-brd); border-radius: 999px;
  background: var(--w-card); color: var(--w-ink); font: 13px var(--w-font); cursor: pointer;
}
.lt-select:focus-visible { outline: none; border-color: color-mix(in srgb, var(--w-ink) 45%, transparent); box-shadow: var(--w-ring); }

/* ---------- the list ---------- */
.lt-title { display: block; min-width: 0; }
/* an open row: its actions, under them the four bulk sends (always four: one with nobody left is disabled, not gone), then
   the one line that says what the last send did (ink) or why a write failed (.dk-error) */
.lt-row-acts { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 2px; }
.lt-sends { margin-top: 6px; }
.lt-note { margin: 10px 0 0; font-size: 13px; }
.lt-cap { margin: 18px 0 2px; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--w-ink); }
.lt-roster { --cols: minmax(0, 1fr) minmax(0, 1.3fr) var(--rail-when) var(--rail-act); }
.lt-roster .dk-tr { min-height: 38px; }
.lt-roster .lt-a { white-space: nowrap; font-size: 12.5px; }

/* ---------- phone: the form in one column, a roster row on two lines (name · action, then address · stamp) ---------- */
@media (max-width: 620px) {
  .lt-form { grid-template-columns: minmax(0, 1fr); }
  .lt-form textarea.lt-code { height: 200px; }
  .lt-title .dk-name { white-space: normal; overflow-wrap: anywhere; }   /* a long title wraps; nothing is cut */
  .lt-title .dk-short { display: block; font-size: 12.5px; }
  .lt-pv-as { width: 100%; }
  .lt-select { flex: 1; max-width: none; }
  .lt-roster .dk-tr { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0; padding: 8px 0; }
  .lt-roster .lt-n { grid-column: 1; grid-row: 1; }
  .lt-roster .lt-a { grid-column: 2; grid-row: 1; }
  .lt-roster .lt-e { grid-column: 1; grid-row: 2; font-size: 12.5px; }
  .lt-roster .lt-t { grid-column: 2; grid-row: 2; }
  .lt-roster .lt-a:empty, .lt-roster .lt-t:empty { display: none; }
}
/* touch: the row's buttons and the token buttons are taller */
@media (pointer: coarse) {
  .lt-row-acts .dk-btn-sm, .lt-roster .dk-btn-sm, .lt-toks .dk-btn-sm { height: 34px; }
  .lt-select { height: 36px; }
}
