/* Reklara, the app: a rail, a conversation, and a sheet of paper on the desk. */

body.app { min-height: 100dvh; }
.icon { flex: none; }
.tag {
  display: inline-block; font: 700 .66rem/1 var(--ui); letter-spacing: .08em; text-transform: uppercase;
  padding: .34em .5em; border-radius: 5px; background: var(--desk-2); color: var(--ink-2); vertical-align: middle;
}
.pulse { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); display: inline-block; flex: none; }
.pulse::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; background: var(--hl); z-index: -1; animation: pulse 1.4s var(--ease-out) infinite; }
@keyframes pulse { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }

.boot, .loading { min-height: 60dvh; display: grid; place-content: center; justify-items: center; gap: 22px; isolation: isolate; }
.boot { min-height: 100dvh; }
.noscript { max-width: 34rem; margin: 14dvh auto; padding: 0 var(--gutter); display: grid; gap: 16px; justify-items: start; }
.noscript h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100dvh; }
.stage { min-width: 0; }
main:focus-visible, .pane:focus-visible, .state__sheet h1:focus-visible { outline: none; box-shadow: none; }
.topbar, .tabbar { display: none; }

.rail {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 18px;
  padding: 22px 16px 16px; border-right: 1px solid var(--line); overflow-y: auto;
}
.rail__logo { align-self: flex-start; margin-left: 4px; }
.rail__new { width: 100%; justify-content: flex-start; padding-left: 1em; margin-top: 6px; }
.rail__nav { display: grid; gap: 2px; }
.rail__link, .rail__item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--ink-2);
  transition: background-color .18s, color .18s;
}
.rail__link:hover, .rail__item:hover { background: var(--desk-2); color: var(--ink); }
.rail__link.is-on { color: var(--ink); background: var(--paper); box-shadow: var(--shadow-1); }
.rail__link .tag { margin-left: auto; }
.rail__recent { min-height: 0; margin-top: 4px; }
.rail__label { font: 700 .7rem/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 0 10px 8px; }
.rail__recent ul { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; padding: 0; margin: 0; list-style: none; }
.rail__item { font-weight: 500; font-size: .88rem; padding: 6px 10px; }
.rail__item.is-on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); }
.rail__thumb { width: 28px; height: 28px; border-radius: 7px; overflow: hidden; background: var(--desk-2); flex: none; }
.rail__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rail__text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; border: 1.5px solid var(--line-2); }
.rail__dot--fix { background: var(--red); border-color: var(--red); }
.rail__dot--ask { background: var(--hl); border-color: var(--ink); }
.rail__dot--wait { border-style: dashed; }
.rail__foot { margin-top: auto; padding: 14px 10px 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: var(--ink-3); }
.rail__foot a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.rail__foot a:hover { text-decoration: underline; }
.rail__foot p { flex-basis: 100%; font-size: .74rem; line-height: 1.4; margin-top: 6px; }

.iconbtn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; color: var(--ink-2);
  transition: background-color .18s, color .18s; flex: none;
}
.iconbtn:hover { background: var(--desk-2); color: var(--ink); }
.textbtn {
  display: inline-flex; align-items: center; gap: .4em; font: 600 .88rem/1.2 var(--ui); color: var(--ink-2);
  text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1.5px; text-underline-offset: .22em;
  padding: 6px 0; transition: color .18s, text-decoration-color .18s; cursor: pointer;
}
.textbtn:hover { color: var(--ink); text-decoration-color: var(--ink); }
.textbtn--danger:hover { color: var(--red-ink); text-decoration-color: var(--red); }
.btn--danger { --bg: var(--red); --bd: var(--red); }
.btn--danger:hover { box-shadow: 0 6px 0 -2px var(--ink), 0 14px 24px -12px rgb(20 22 26 / .5); }

/* ---------- menu, dialog, toast ---------- */
.menu { position: relative; }
.menu__list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 232px; padding: 6px;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-3);
  animation: pop .18s var(--ease-out);
}
.menu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 9px; font-weight: 600; font-size: .92rem; text-align: left; }
.menu__item:hover { background: var(--desk); }
.menu__item.is-danger { color: var(--red-ink); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

.dialog { border: 0; padding: 0; background: transparent; max-width: min(92vw, 440px); }
.dialog::backdrop { background: rgb(20 22 26 / .42); backdrop-filter: blur(3px); }
.dialog__box { background: var(--paper); border-radius: 20px; padding: 26px; box-shadow: var(--shadow-3); display: grid; gap: 10px; animation: pop .22s var(--ease-out); }
.dialog__title { font-size: 1.5rem; line-height: 1.1; }
.dialog__body { color: var(--ink-2); }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

.toasts { position: fixed; z-index: 60; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast {
  display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; font-weight: 600; font-size: .92rem;
  padding: 11px 16px 11px 13px; border-radius: 999px; box-shadow: 0 5px 0 -2px var(--hl), var(--shadow-3); animation: toast .35s var(--ease-spring);
}
.toast .icon { color: var(--hl); }
@keyframes toast { from { opacity: 0; transform: translateY(14px) scale(.96); } }

/* ---------- check: bar and panes ---------- */
.check { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100dvh; }
.check__bar { display: flex; align-items: center; gap: 12px; padding: 12px 20px 12px 24px; border-bottom: 1px solid var(--line); min-width: 0; }
.check__back { display: none; }
.check__title { flex: 1; min-width: 0; }
.check__title h1 { font: 600 1rem/1.3 var(--ui); letter-spacing: -.005em; font-stretch: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-wrap: nowrap; }
.check__tabs { display: none; }
.check__panes { display: grid; grid-template-columns: minmax(350px, 5fr) minmax(0, 7fr); min-height: 0; }
.pane { min-height: 0; min-width: 0; }
.pane--chat { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.pane--file { overflow-y: auto; background: var(--desk-2); padding: 30px clamp(18px, 3vw, 44px) 72px; scroll-behavior: smooth; isolation: isolate; container: sheet / inline-size; }
.pane__warn { margin: 12px 24px 0; padding: 10px 14px; border-radius: 10px; background: var(--hl-wash); border: 1px solid var(--hl); font-size: .86rem; }

/* ---------- thread ---------- */
.thread { flex: 1; overflow-y: auto; padding: 22px 24px 12px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.thread__day { align-self: center; font-size: .74rem; font-weight: 600; color: var(--ink-3); letter-spacing: .04em; }
.thread__end { height: 1px; flex: none; }
.msg { display: flex; align-items: flex-end; gap: 9px; max-width: 100%; animation: rise .38s var(--ease-out) both; }
.msg--me { justify-content: flex-end; }
.msg--quiet { justify-content: center; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.avatar {
  width: 28px; height: 28px; flex: none; display: grid; place-items: center; margin-bottom: 2px;
  font: 800 .92rem/1 var(--disp); background: var(--hl); color: var(--ink);
  border-radius: 9px 12px 8px 11px / 11px 8px 12px 9px; transform: rotate(-4deg);
}
.bubble {
  max-width: min(46ch, 100%); padding: 10px 14px; background: var(--paper); border: 1px solid var(--line);
  border-radius: 16px 16px 16px 5px; font-size: .96rem; line-height: 1.5; box-shadow: var(--shadow-1);
}
.bubble--me { background: var(--ink); color: #fff; border-color: var(--ink); border-radius: 16px 16px 5px 16px; font-weight: 500; }
.bubble--q { padding: 12px 15px; }
.bubble--q.is-open { border-color: var(--ink); box-shadow: 0 4px 0 -1px var(--hl), var(--shadow-1); }
.bubble__label { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.bubble__q { font-weight: 600; font-size: 1rem; line-height: 1.4; }
.bubble__why { margin-top: 5px; font-size: .82rem; color: var(--ink-3); }
.bubble__error { color: var(--red-ink); font-weight: 600; font-size: .88rem; margin-bottom: 4px; }
.bubble--typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.bubble--typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: typing 1.1s ease-in-out infinite; }
.bubble--typing i:nth-child(2) { animation-delay: .14s; }
.bubble--typing i:nth-child(3) { animation-delay: .28s; }
@keyframes typing { 0%, 60%, 100% { transform: none; opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

.postcard {
  display: flex; gap: 12px; max-width: min(420px, 100%); padding: 10px; background: var(--paper);
  border: 1px solid var(--line-2); border-radius: 18px 18px 5px 18px; box-shadow: var(--shadow-1);
}
.postcard__img { position: relative; width: 84px; height: 84px; flex: none; border-radius: 11px; overflow: hidden; background: var(--desk-2); }
.postcard__img img { width: 100%; height: 100%; object-fit: cover; }
.postcard__count { position: absolute; right: 5px; top: 5px; background: rgb(20 22 26 / .78); color: #fff; font-size: .68rem; font-weight: 700; padding: 3px 6px; border-radius: 999px; }
.postcard__body { min-width: 0; align-self: center; padding-right: 6px; }
.postcard__who { font-size: .76rem; font-weight: 700; color: var(--ink-3); margin-bottom: 2px; }
.postcard__text { font-size: .92rem; line-height: 1.42; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.progress { background: var(--paper); border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; padding: 14px 18px 14px 14px; box-shadow: var(--shadow-1); min-width: min(300px, 100%); }
.progress ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.progress li { display: flex; align-items: center; gap: 10px; font-size: .93rem; color: var(--ink-3); transition: color .3s; }
.progress__dot { width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; transition: background-color .3s, border-color .3s; position: relative; }
.progress li.is-done { color: var(--ink-2); }
.progress li.is-done .progress__dot { background: var(--ink); border-color: var(--ink); color: #fff; }
.progress li.is-done .progress__dot svg { animation: tick .3s var(--ease-spring); }
.progress li.is-now { color: var(--ink); font-weight: 600; }
.progress li.is-now .progress__dot { border-color: var(--ink); background: var(--hl); }
.progress li.is-now .progress__dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid var(--hl); animation: pulse 1.3s var(--ease-out) infinite; }
.progress__slow, .progress__done { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); font-size: .84rem; color: var(--ink-2); max-width: 34ch; }
.progress__done .donebar { padding: 0; }
@keyframes tick { from { transform: scale(0) rotate(-30deg); } }
.donebar { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--ink-3); padding: 2px 0; }

.resultcard {
  max-width: min(44ch, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: 16px 16px 16px 5px;
  padding: 14px 16px 12px; display: grid; gap: 9px; box-shadow: var(--shadow-1); border-left: 4px solid var(--line-2); font-size: .96rem;
}
.resultcard--fix { border-left-color: var(--red); }
.resultcard--ask { border-left-color: var(--hl); }
.resultcard__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.resultcard__counts { font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.resultcard__open { justify-self: start; display: none; }
.resultcard__ai { font-size: .76rem; color: var(--ink-3); border-top: 1px dashed var(--line-2); padding-top: 8px; }

.errorcard { max-width: min(42ch, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; padding: 16px; display: grid; gap: 8px; justify-items: start; box-shadow: var(--shadow-1); }
.errorcard__mark { width: 96px; height: 11px; color: var(--red); }
.errorcard h3 { font-size: 1.25rem; }
.errorcard p { color: var(--ink-2); font-size: .94rem; }
.errorcard .btn { margin-top: 4px; }

/* ---------- composer ---------- */
.composer { padding: 10px 24px calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 10px; border-top: 1px solid var(--line); background: var(--desk); }
.composer--idle { min-height: 0; padding-top: 12px; }
.composer--idle:empty { display: none; }
.composer__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.composer__dup { display: none; }   /* the same buttons sit on the sheet next door; a phone shows one pane at a time */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 8px 15px; border-radius: 999px; background: var(--paper); border: 1.5px solid var(--ink);
  font: 600 .93rem/1.1 var(--ui); transition: background-color .18s, transform .18s var(--ease-out), box-shadow .18s; animation: rise .35s var(--ease-out) both;
}
.chip:hover { background: var(--hl); transform: translateY(-1px); box-shadow: 0 3px 0 -1px var(--ink); }
.chip:active { transform: scale(.97); box-shadow: none; }
.chip.is-on { background: var(--hl); }
.chip--quiet { border-color: var(--line-2); color: var(--ink-2); }
.chip--quiet:hover { background: var(--desk-2); box-shadow: none; }
.composer__row { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1.5px solid var(--line-2); border-radius: 999px; padding: 5px 5px 5px 18px; transition: border-color .2s, box-shadow .2s; }
.composer__row:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px var(--hl); }
.composer__input { flex: 1; min-width: 0; border: 0; background: none; padding: 9px 0; font-size: 1rem; }
.composer__input:focus-visible { outline: none; box-shadow: none; }
.composer__input::placeholder { color: var(--ink-3); }
.composer__send { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; transition: transform .2s var(--ease-out), opacity .2s; }
.composer__send:disabled { opacity: .3; }
.composer__send:not(:disabled):hover { transform: translateY(-2px); }
.composer__note { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--ink-3); font-weight: 500; isolation: isolate; }

/* ---------- the file: a sheet on the desk ---------- */
.file {
  --margin: 0px;
  position: relative; max-width: 800px; margin: 0 auto; background: var(--paper); border-radius: 4px;
  padding: 30px clamp(20px, 4vw, 40px) 26px; box-shadow: var(--shadow-2);
  display: grid; gap: 30px;
}
/* Two more pages under the sheet. They sit in the stacking context of the container (.pane--file,
   .shared), so they paint under the sheet's own background. Each is only as tall as a page corner:
   a full-height box turned by half a degree would swing 15px sideways on a long result. */
.file::before, .file::after { content: ""; position: absolute; left: 0; right: 0; height: min(100%, 300px); border-radius: 4px; z-index: -1; box-shadow: var(--shadow-1); }
.file::before { top: 0; transform: rotate(-.7deg) translate(-3px, 4px); background: var(--paper-2); }
.file::after { bottom: 0; transform: rotate(.6deg) translate(3px, 4px); background: #f6f3ea; }
.file > * { min-width: 0; }
.file__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.file__date { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .82rem; color: var(--ink-3); margin-top: 9px; font-weight: 500; }
.file__verdict { flex: none; text-align: right; display: grid; justify-items: end; gap: 10px; }
.file__counts { font-size: .8rem; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.file__label { font: 700 .72rem/1.2 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-stretch: 100%; margin-bottom: 10px; }


.file__post { display: grid; grid-template-columns: clamp(120px, 30cqw, 220px) minmax(0, 1fr); gap: clamp(18px, 3vw, 30px); align-items: start; }
/* A narrow sheet (a phone, or the pane next to the chat on a small laptop): the photo is a small
   print above the caption, so the first thing on the sheet is the marked text. */
@container sheet (max-width: 520px) {
  .file__post { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .shot { max-width: 132px; }
  .shot figcaption { display: none; }
  .shot--none { max-width: none; aspect-ratio: auto; grid-template-columns: auto minmax(0, 1fr); justify-content: start; justify-items: start; align-items: center; gap: 10px; padding: 10px 12px; text-align: left; }
}
.shot { position: relative; border-radius: 10px; overflow: hidden; background: var(--desk-2); box-shadow: var(--shadow-1); }
.shot img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.shot figcaption { position: absolute; left: 8px; bottom: 8px; background: rgb(255 254 251 / .92); font-size: .74rem; font-weight: 700; padding: 4px 8px; border-radius: 999px; }
.shot__dots { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; padding: 0 4px; background: linear-gradient(transparent, rgb(20 22 26 / .34)); }
.shot__dots button { flex: 0 1 28px; min-width: 11px; height: 28px; display: grid; place-items: center; }
.shot__dots button i { width: 7px; height: 7px; border-radius: 50%; background: rgb(255 255 255 / .62); transition: transform .2s var(--ease-out), background-color .2s; }
.shot__dots button.is-on i { background: #fff; transform: scale(1.4); }
.shot__dots button:focus-visible { outline-color: #fff; box-shadow: none; outline-offset: -4px; }
.shot--none { aspect-ratio: 1; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; padding: 16px; color: var(--ink-3); font-size: .82rem; box-shadow: none; border: 1.5px dashed var(--line-2); background: var(--paper-2); }

.caption { font-size: 1.14rem; line-height: 1.82; white-space: pre-wrap; text-wrap: wrap; overflow-wrap: anywhere; }
.caption mark { background-color: transparent; color: inherit; }
.caption mark.m-fix { color: var(--red-ink); }
.caption--none { color: var(--ink-3); font-style: italic; }
.caption--fix { font-size: 1.08rem; line-height: 1.78; }
.caption ins { text-decoration: none; }
.file__waiting { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-size: .88rem; color: var(--ink-3); isolation: isolate; }
.file__clear { display: flex; align-items: center; gap: 12px; font-size: .95rem; color: var(--ink-2); padding: 14px 16px; border: 1.5px dashed var(--line-2); border-radius: 12px; }
.file__clearmark { width: 34px; height: 14px; border-radius: 4px; border: 1.5px dashed var(--line-2); flex: none; }
.file__open { font-size: .95rem; line-height: 1.5; padding: 14px 16px; border-radius: 12px; background: var(--hl-wash); border: 1px solid var(--hl); max-width: 62ch; }

.notes { list-style: none; margin: 0; padding: 0; display: grid; }
.note { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.note:last-child { border-bottom: 1px solid var(--line); }
.note > .ref { margin-top: 1px; font-size: .78rem; }
.note__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: .93rem; }
.note__head strong { font-weight: 800; }
.note--fix .note__head strong { color: var(--red-ink); }
.note--ask .note__head strong { background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 60% / 100% 78%; padding: 0 .2em; margin: 0 -.2em; border-radius: .2em; }
.note__head > span { font-weight: 600; }
.note__refs { margin-left: auto; font-size: .78rem; font-weight: 600 !important; color: var(--ink-3); }
.note__text { margin-top: 4px; color: var(--ink-2); font-size: .95rem; line-height: 1.5; max-width: 62ch; }
.note .textbtn { margin-top: 4px; }

.fixbox { background: linear-gradient(180deg, #f5f7ff, #fafbff); border: 1px solid #d4dcfb; border-left: 4px solid var(--blue); border-radius: 4px 12px 12px 4px; padding: 20px clamp(16px, 3vw, 24px); display: grid; gap: 12px; }
.fixbox__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; }
.fixbox__head .file__label { margin: 0; color: var(--blue); }
.fixbox__head .textbtn { padding: 0; font-size: .8rem; white-space: nowrap; }
.recheck { display: flex; align-items: flex-start; gap: 8px; font-size: .9rem; font-weight: 600; }
.recheck .icon { margin-top: 2px; }
.recheck.is-ok { color: var(--blue); }
.recheck.is-open { color: var(--red-ink); }
.fixbox__legend { font-size: .78rem; color: var(--ink-3); }
.fixbox__legend ins { text-decoration: none; }
.fixbox__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

.file__rules { display: grid; gap: 8px; }
.file__rules .file__label { margin-bottom: 2px; }
.rule { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); transition: border-color .2s, box-shadow .2s; }
.rule[open] { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.rule__head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; border-radius: 12px; }
.rule__head::-webkit-details-marker { display: none; }
.rule__head:hover { background: var(--paper-2); }
.rule__name { font-weight: 700; font-size: .98rem; min-width: 0; }
.rule__refs { margin-left: auto; font-size: .78rem; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.rule__chev { color: var(--ink-3); transition: transform .25s var(--ease-out); }
.rule[open] .rule__chev { transform: rotate(180deg); }
.rule__body { padding: 2px 16px 16px; display: grid; gap: 14px; }
.rule__official { font-size: .8rem; color: var(--ink-3); }
.rule__reason { font-size: .96rem; line-height: 1.55; max-width: 64ch; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.checks li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; font-size: .92rem; line-height: 1.45; }
.checks__mark { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.checks .is-good .checks__mark { background: var(--desk); color: var(--ink-2); }
.checks .is-bad .checks__mark { background: var(--red-wash); color: var(--red-ink); }
.checks .is-bad > span:nth-child(2) { font-weight: 600; }
.checks__ref { font-size: .76rem; color: var(--ink-3); font-weight: 600; white-space: nowrap; margin-top: 2px; }
.rule__q { background: var(--hl-wash); border: 1px solid var(--hl); border-radius: 10px; padding: 12px 14px; display: grid; gap: 4px; }
.rule__qlabel, .rule__a span, .similar__fix span { font: 700 .68rem/1.2 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.rule__q p { font-weight: 600; font-size: .96rem; }
.rule__a { font-weight: 500 !important; display: grid; gap: 2px; margin-top: 6px; padding-top: 8px; border-top: 1px dashed rgb(20 22 26 / .2); }
.rule__articles { display: grid; gap: 6px; }

.artchip { display: inline-block; font: 700 .74rem/1 var(--ui); font-variant-numeric: tabular-nums; padding: .45em .6em; border-radius: 6px; background: var(--desk); color: var(--ink-2); white-space: nowrap; }
.article { border-radius: 10px; }
.article summary { display: flex; align-items: center; gap: 10px; padding: 6px 4px; cursor: pointer; list-style: none; border-radius: 8px; }
.article summary::-webkit-details-marker { display: none; }
.article summary:hover .article__open { color: var(--ink); }
.article__title { font-size: .88rem; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article__open { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.article[open] .article__open svg { transform: rotate(180deg); }
.article__text { margin: 4px 0 8px; padding: 14px 16px; background: var(--paper-2); border-left: 2px solid var(--line-2); border-radius: 0 8px 8px 0; font-size: .98rem; line-height: 1.62; max-height: 340px; overflow-y: auto; display: grid; gap: .7em; color: var(--ink-2); }

.rule__similar h4 { font: 700 .72rem/1.2 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; }
.similars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.similar { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--paper-2); display: grid; gap: 6px; }
.similar__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .76rem; font-weight: 700; color: var(--ink-3); letter-spacing: .02em; }
.similar__sanction { color: var(--ink); }
.similar__fine { color: var(--red-ink); }
.similar__text { font-size: 1rem; line-height: 1.5; }
.similar__fix { font-size: .88rem; color: var(--ink-2); display: grid; gap: 2px; }

.file__scope ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; font-size: .88rem; color: var(--ink-2); }
.file__foot { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 10px; }
.file__footrow { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 20px; }
.feedback { border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px; margin: 0; display: grid; gap: 8px; min-width: 0; }
.feedback legend { font-weight: 700; font-size: .92rem; padding: 0 6px; }
.feedback__opt { display: flex; align-items: center; gap: 10px; font-size: .93rem; cursor: pointer; padding: 3px 0; }
.feedback__opt input { accent-color: var(--ink); width: 17px; height: 17px; margin: 0; }
.feedback__actions { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.feedback__thanks { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; }
.feedback__failed { color: var(--red-ink); font-weight: 600; font-size: .88rem; }

/* ---------- new check ---------- */
.new { max-width: 780px; margin: 0 auto; padding: clamp(30px, 9vh, 96px) var(--gutter) 64px; display: grid; gap: 26px; }
.new__head { display: grid; gap: 14px; }
.new__head h1 { font-size: clamp(2.3rem, 5.6vw, 3.9rem); }
.new__lead { font-size: 1.1rem; color: var(--ink-2); max-width: 46ch; }
.draft { padding: 16px; display: grid; gap: 14px; border-radius: 22px; transition: box-shadow .25s, border-color .25s; }
.draft.is-drag { border-color: var(--ink); box-shadow: 0 0 0 5px var(--hl), var(--shadow-2); }
.drop {
  display: grid; justify-items: center; gap: 6px; width: 100%; padding: 30px 18px; border-radius: 14px;
  border: 1.5px dashed var(--line-2); background: var(--paper-2); text-align: center; transition: border-color .2s, background-color .2s;
}
.drop:hover, .is-drag .drop { border-color: var(--ink); background: var(--hl-wash); }
.drop__icon { width: 52px; height: 52px; border-radius: 15px 18px 14px 17px / 17px 14px 18px 15px; background: var(--hl); display: grid; place-items: center; transform: rotate(-4deg); margin-bottom: 6px; transition: transform .35s var(--ease-spring); }
.drop:hover .drop__icon { transform: rotate(3deg) scale(1.06); }
.drop__text { font-weight: 600; }
.drop__text--phone { display: none; }
.drop__limits { font-size: .8rem; color: var(--ink-3); }
.shots { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.shots__item { position: relative; width: 112px; height: 112px; border-radius: 12px; overflow: hidden; background: var(--desk-2); box-shadow: var(--shadow-1); animation: rise .35s var(--ease-out) both; }
.shots__item img { width: 100%; height: 100%; object-fit: cover; }
.shots__x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgb(20 22 26 / .78); color: #fff; display: grid; place-items: center; }
.shots__x:hover { background: var(--ink); }
.shots__tag { position: absolute; left: 6px; bottom: 6px; background: var(--hl); color: var(--ink); }
.shots__add { width: 112px; height: 112px; border-radius: 12px; border: 1.5px dashed var(--line-2); display: grid; place-items: center; color: var(--ink-3); transition: border-color .2s, color .2s, background-color .2s; }
.shots__add:hover { border-color: var(--ink); color: var(--ink); background: var(--hl-wash); }
.inlineerr { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; padding: 12px 14px; border-radius: 12px; background: var(--red-wash); border: 1px solid rgb(217 45 32 / .25); font-size: .92rem; color: var(--ink); }
.inlineerr strong { color: var(--red-ink); }
.draft__text { padding: 8px 10px 4px; margin: 0 -4px; border-radius: 12px; transition: box-shadow .2s, background-color .2s; }
.draft__text:focus-within { background: var(--paper-2); box-shadow: inset 0 0 0 1.5px var(--ink), 0 0 0 4px var(--hl); }
.draft__text .file__label { display: block; margin-bottom: 4px; }
.draft__text textarea { width: 100%; border: 0; resize: none; background: none; font-size: 1.14rem; line-height: 1.6; padding: 4px 0; min-height: 5.2em; max-height: 46vh; overflow-y: auto; }
.draft__text textarea:focus-visible { outline: none; box-shadow: none; }
.draft__text textarea::placeholder { color: var(--ink-3); }
.draft__bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; border-top: 1px solid var(--line); padding: 14px 4px 2px; }
.draft__examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.draft__hint { font-size: .82rem; font-weight: 600; color: var(--ink-3); margin-right: 2px; }
.draft__examples .chip { min-height: 34px; padding: 6px 12px; font-size: .86rem; border-color: var(--line-2); animation: none; }
.draft__examples .chip:hover, .draft__examples .chip.is-on { border-color: var(--ink); }
.btn--nudge { animation: nudge 1.6s var(--ease-out) .2s 2; }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 rgb(255 225 74 / 0); } 40% { box-shadow: 0 0 0 9px rgb(255 225 74 / .9); } }
.new__notice { font-size: .8rem; color: var(--ink-3); margin-top: -8px; }
.legend { list-style: none; margin: 14px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; font-size: .86rem; color: var(--ink-2); }
.legend li { display: grid; gap: 8px; align-content: start; }
.legend mark, .legend__none { justify-self: start; font-weight: 600; font-size: .95rem; color: var(--ink); background-color: transparent; }
.legend mark.m-fix { color: var(--red-ink); }
.legend__none { color: var(--ink-3); }
.legend strong { display: block; color: var(--ink); }

/* ---------- pages: history, rules, compare ---------- */
.page { max-width: 1080px; margin: 0 auto; padding: clamp(30px, 7vh, 72px) var(--gutter) 80px; display: grid; gap: 28px; }
.page__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
.page__head > div { display: grid; gap: 12px; }
.page__head h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
.page__lead { color: var(--ink-2); max-width: 60ch; font-size: 1.04rem; }
.page__none { color: var(--ink-3); padding: 30px 0; }
.page__foot { border-top: 1px solid var(--line); padding-top: 14px; }
.page__source { font-size: .82rem; color: var(--ink-3); max-width: 76ch; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); font-weight: 600; font-size: .9rem; color: var(--ink-2); transition: all .18s; }
.filter .num { font-size: .76rem; color: var(--ink-3); }
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter.is-on .num { color: var(--hl); }
.hgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.hcard { position: relative; display: flex; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; transition: transform .25s var(--ease-out), box-shadow .25s, border-color .25s; animation: rise .4s var(--ease-out) both; }
.hcard:hover { transform: translateY(-3px); box-shadow: 0 6px 0 -3px var(--hl), var(--shadow-2); border-color: var(--ink); }
.hcard__link { flex: 1; min-width: 0; display: flex; gap: 14px; padding: 12px; text-decoration: none; border-radius: 16px; }
.hcard__thumb { width: 92px; height: 92px; border-radius: 11px; overflow: hidden; background: var(--desk-2); flex: none; display: grid; place-items: center; color: var(--ink-4); }
.hcard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hcard__body { min-width: 0; display: grid; gap: 6px; align-content: start; padding-top: 2px; }
.hcard__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hcard__wait { font-size: .74rem; font-weight: 700; background: var(--hl); padding: .34em .6em; border-radius: 999px; }
.hcard__text { font-size: .94rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hcard__meta { font-size: .78rem; color: var(--ink-3); font-weight: 500; }
.hcard .menu { margin: 8px 8px 0 0; }

.empty { padding: clamp(32px, 6vw, 56px); display: grid; gap: 12px; justify-items: start; border-radius: 22px; }
.empty h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.empty p { color: var(--ink-2); max-width: 40ch; margin-bottom: 6px; }
.empty__art { display: grid; gap: 9px; width: 190px; margin-bottom: 12px; }
.empty__art span { height: 10px; border-radius: 5px; background: var(--desk-2); }
.empty__art span:nth-child(2) { width: 82%; background: linear-gradient(90deg, var(--desk-2) 0 38%, var(--hl) 38% 74%, var(--desk-2) 74%); }
.empty__art span:nth-child(3) { width: 56%; }

.families { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.family { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; padding: clamp(20px, 3vw, 30px); border-radius: 20px; }
.family__n { font: 300 2.5rem/1 var(--disp); font-stretch: 80%; color: var(--ink-4); letter-spacing: -.04em; }
.family__main { display: grid; gap: 8px; }
.family h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.family__official { font-size: .82rem; color: var(--ink-3); }
.family__body { color: var(--ink-2); max-width: 64ch; }
.family__phrase { font: italic 400 1.34rem/1.5 var(--serif); margin: 8px 0 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; }
.family__quote { min-width: 0; }
.family__phrase mark { font-style: italic; color: var(--ink); background-color: transparent; }
.family__phrase mark.m-fix { color: var(--red-ink); }
.family__ask { font-size: 1.24rem; font-style: normal; color: var(--blue); transform: rotate(-1.2deg); }
.family__articles { display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 6px; }

.cmpblock { padding: clamp(20px, 3.4vw, 34px); border-radius: 22px; display: grid; gap: 26px; }
.cmp { display: grid; gap: 16px; }
.cmp + .cmp { border-top: 1px solid var(--line); padding-top: 26px; }
.cmp__title { font: 700 1.1rem/1.3 var(--ui); letter-spacing: -.01em; font-stretch: 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.cmp__title .num { font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.cmp__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 4vw, 48px); }
.cmp__col { display: grid; gap: 10px; align-content: start; }
.cmp__who { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 700 .72rem/1.2 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.cmp__who .num { letter-spacing: .02em; text-transform: none; font-weight: 600; }
.cmp__who .band { letter-spacing: 0; text-transform: none; }
.cmp__col--rk .cmp__who { color: var(--ink); }
.cmp__big { font: 800 clamp(2.6rem, 6vw, 4rem)/.9 var(--disp); font-stretch: 82%; letter-spacing: -.05em; }
.cmp__big span { font-weight: 300; font-size: .5em; color: var(--ink-3); letter-spacing: -.02em; margin-left: .08em; }
.cmp__big em { font: 700 .8rem/1 var(--ui); font-stretch: 100%; letter-spacing: 0; color: var(--red-ink); margin-left: .8em; vertical-align: .5em; }
.cmp__legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: -8px 0 0; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.cmp__legend li { display: inline-flex; align-items: center; gap: 7px; }
.cmp__legend i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; }
.cmp__text { font-size: .93rem; color: var(--ink-2); }
.cmp__caption { font-size: .84rem; color: var(--ink-3); max-width: 76ch; border-top: 1px dashed var(--line-2); padding-top: 14px; }
.dots { display: flex; flex-wrap: wrap; gap: 4px; max-width: calc(20 * 15px); }
.dots i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.dots i.is-ink, .cmp__legend i.is-ink { background: var(--ink); border-color: var(--ink); }
.dots i.is-red, .cmp__legend i.is-red { background: var(--red); border-color: var(--red); }
.dots i.is-yellow, .cmp__legend i.is-yellow { background: var(--hl); border-color: var(--ink); }

.versus { display: grid; gap: 14px; margin-top: 12px; }
.versus h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.versus__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; margin-top: 6px; }
.plain, .versus__rk { padding: clamp(18px, 2.6vw, 26px); border-radius: 18px; display: grid; gap: 12px; }
.plain__text { position: relative; max-height: 452px; overflow-y: auto; font-size: .88rem; line-height: 1.55; color: var(--ink-2); display: grid; gap: .7em; padding-right: 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 12px; }
.plain__label { font-size: .8rem; line-height: 1.45; color: var(--ink-2); background: var(--desk); border-radius: 8px; padding: 8px 11px; }
.plain__h { font-weight: 700; color: var(--ink); font-size: .94rem; }
.plain__quote { border-left: 2px solid var(--line-2); padding-left: 10px; font-style: italic; }
.plain__after { font-size: .84rem; color: var(--ink-3); }
.versus__rk { border: 1.5px solid var(--ink); box-shadow: 0 7px 0 -3px var(--hl), var(--shadow-2); }
.versus__rk .caption { font-size: 1.04rem; line-height: 1.75; }
.versus__note { font-size: .9rem; color: var(--ink-2); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.versus__rk .file__label { margin: 4px 0 -4px; color: var(--blue); }
.versus__rk .caption--fix { font-size: .98rem; }
.cmpfacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; border-top: 1px solid var(--line); padding-top: 24px; }
.cmpfacts__n { font: 800 2.1rem/1 var(--disp); font-stretch: 84%; letter-spacing: -.04em; margin-bottom: 8px; }
.cmpfacts p:last-child { font-size: .9rem; color: var(--ink-2); }

/* ---------- shared result ---------- */
.solo { min-height: 100dvh; background: var(--desk-2); }
.solo__bar { display: flex; justify-content: space-between; align-items: center; padding: 16px var(--gutter); }
.solo__main { padding: 8px var(--gutter) 72px; }
.shared { display: grid; gap: 22px; max-width: 800px; margin: 0 auto; isolation: isolate; container: sheet / inline-size; }
.shared__banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 16px; padding: 12px 14px 12px 18px; box-shadow: 0 5px 0 -2px var(--hl); }
.shared__banner p { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .94rem; }
.shared__ig { text-align: center; font-size: .86rem; color: var(--ink-3); }

/* ---------- full-page states ---------- */
.state { min-height: 78dvh; display: grid; place-items: center; padding: 32px var(--gutter); }
.state__sheet { position: relative; max-width: 460px; padding: clamp(28px, 5vw, 44px); display: grid; gap: 12px; justify-items: start; border-radius: 6px; transform: rotate(-.6deg); }
.state__sheet h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.state__sheet p { color: var(--ink-2); margin-bottom: 8px; }
.state__code { justify-self: end; font-size: 2.7rem; line-height: .8; color: var(--red) !important; transform: rotate(5deg); margin: -14px -8px -2px 0 !important; }

/* ---------- narrower screens ---------- */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); }
}
@media (max-width: 940px) {
  .shell { display: block; }
  .rail { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px var(--gutter); position: sticky; top: 0; z-index: 20; background: rgb(242 240 232 / .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: rgb(255 254 251 / .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar__item { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; text-decoration: none; font-size: .7rem; font-weight: 700; color: var(--ink-3); }
  .tabbar__item.is-on { color: var(--ink); }
  .tabbar__item.is-on svg { background: var(--hl); border-radius: 8px 10px 7px 9px; box-shadow: 0 0 0 5px var(--hl); }
  .shell--page .stage { padding-bottom: 84px; }
  .shell--check .topbar, .shell--check .tabbar { display: none; }

  .check__bar { padding: 8px 10px 8px 6px; gap: 6px; }
  .check__back { display: inline-grid; }
  .check__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px var(--gutter); border-bottom: 1px solid var(--line); }
  .check__tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 10px; font-weight: 700; font-size: .92rem; color: var(--ink-3); }
  .check__tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); }
  .tabdot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--line-2); }
  .tabdot--fix { background: var(--red); border-color: var(--red); }
  .tabdot--ask { background: var(--hl); border-color: var(--ink); }
  .check { grid-template-rows: auto auto minmax(0, 1fr); }
  .check__panes { grid-template-columns: minmax(0, 1fr); }
  .check[data-pane="chat"] .pane--file, .check[data-pane="file"] .pane--chat { display: none; }
  .pane--chat { border-right: 0; }
  .pane--file { padding: 18px 12px 60px; }
  .thread { padding: 16px var(--gutter) 10px; }
  .composer { padding-inline: var(--gutter); }
  .resultcard__open { display: inline-flex; }
  .composer__dup { display: inline-flex; }
  .file { padding: 22px 18px 20px; gap: 24px; }
  .stamp { font-size: 1.6rem; }
}
@media (max-width: 640px) {
  .file__head { align-items: center; }
  .caption { font-size: 1.08rem; }
  .note__refs { margin-left: 0; flex-basis: 100%; }
  .rule__refs { display: none; }
  .article__title { display: none; }
  .drop__text--desk { display: none; }
  .drop__text--phone { display: inline; }
  /* The start button has to be on the first screen of a phone, so the head and the drop area give up height. */
  .new { padding-top: 22px; gap: 18px; }
  .new__head { gap: 10px; }
  .new__lead { font-size: 1rem; }
  .draft { padding: 12px; gap: 10px; }
  .drop { grid-template-columns: auto minmax(0, 1fr); justify-items: start; align-items: center; gap: 2px 14px; padding: 13px 14px; text-align: left; }
  .drop__icon { grid-row: span 2; width: 46px; height: 46px; margin-bottom: 0; }
  .drop__text { align-self: end; }
  .drop__limits { align-self: start; }
  .draft__bar { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 12px; }
  .draft__bar .btn { width: 100%; }
  .draft__examples {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent);
  }
  .draft__examples::-webkit-scrollbar { display: none; }
  .draft__examples > * { flex: none; }
  .composer__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .composer__actions .btn { justify-content: center; padding-inline: 10px; white-space: nowrap; }
  .composer__actions > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .legend { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .legend li { grid-template-columns: 112px minmax(0, 1fr); align-items: baseline; }
  .cmp__cols, .versus__cols, .cmpfacts { grid-template-columns: minmax(0, 1fr); }
  .cmp__col + .cmp__col { border-top: 1px dashed var(--line-2); padding-top: 16px; }
  .family { grid-template-columns: minmax(0, 1fr); }
  .family__n { font-size: 1.8rem; }
  .shots__item, .shots__add { width: 92px; height: 92px; }
}
@media (pointer: coarse) {
  .iconbtn { width: 44px; height: 44px; }
  .chip, .draft__examples .chip, .filter, .btn--sm { min-height: 44px; }
  .textbtn { min-height: 44px; }
  .fixbox__head .textbtn { min-height: 44px; margin-block: -10px; }
  .composer__send { width: 44px; height: 44px; }
  .shots__x { width: 32px; height: 32px; }
  .menu__item { min-height: 46px; }
}
