/* Bliink Inbox: a sorting office. Warm grey paper, near-black ink, one stamp-green accent. Plex Sans + Plex Mono. */
:root {
  --paper: #F4F3EF; --sheet: #FFFFFF; --sheet2: #FBFAF7; --ink: #1C1D1B; --ink2: #55574F; --ink3: #3E403A;
  --line: #E2E0D9; --line2: #ECEAE4; --field: #D9D6CD; --chip: #EAE8E1;
  --accent: #1F5C4B; --accent-d: #163F34; --accent-soft: #E3EEE9; --on-accent: #FFFFFF;
  --bad: #8A2E1F; --bad-soft: #FBEDE6; --bad-line: #E3B9A6; --stage: #E7E5DF;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161715; --sheet: #1E1F1C; --sheet2: #23241F; --ink: #ECEAE3; --ink2: #A9A69C; --ink3: #C8C5BC;
    --line: #34352F; --line2: #2B2C27; --field: #45463F; --chip: #2E2F2A;
    --accent: #6FB79E; --accent-d: #8FCDB6; --accent-soft: #23362F; --on-accent: #0F1A16;
    --bad: #F0A08C; --bad-soft: #3A221C; --bad-line: #6B3A2E; --stage: #121311;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.5 'IBM Plex Sans', system-ui, sans-serif; display: flex; flex-direction: column; }
a { color: var(--accent); } a:hover { color: var(--accent-d); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 20px; } h2 { font-size: 16px; }
code, .mono { font-family: var(--mono); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink2); } .small { font-size: 12.5px; } .b { font-weight: 600; } .bad { color: var(--bad); }
.grow { flex: 1; min-width: 0; } .num { text-align: right; } .nowrap { white-space: nowrap; } .pad { padding: 12px 16px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 10px 8px; }

input:not([type=checkbox]):not([type=color]):not([type=file]), select, textarea {
  height: 40px; padding: 0 12px; border: 1px solid var(--field); border-radius: 8px; background: var(--sheet); min-width: 0;
}
textarea { height: auto; padding: 10px 12px; line-height: 1.55; }
input[type=color] { width: 56px; height: 40px; padding: 2px; border: 1px solid var(--field); border-radius: 8px; background: var(--sheet); }
label { font-size: 12.5px; font-weight: 500; color: var(--ink3); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--field); border-radius: 8px; background: var(--sheet); color: var(--ink); text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink2); color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 500; }
.btn.primary:hover { background: var(--accent-d); border-color: var(--accent-d); color: var(--on-accent); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.icon { width: 36px; padding: 0; }
.btn.big { height: 46px; font-size: 15px; }
.btn.wide { width: calc(100% - 8px); margin: 0 4px 12px; height: 40px; }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.linkbtn { border: 0; background: none; padding: 4px 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
.linkbtn.bad { color: var(--bad); }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
.err { color: var(--bad); background: var(--bad-soft); border: 1px solid var(--bad-line); padding: 8px 12px; border-radius: 8px; margin: 0; }
.warn { color: var(--bad); }
.flash { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 50; max-width: min(640px, calc(100% - 32px)); padding: 10px 16px; border-radius: 8px; background: var(--ink); color: var(--paper); animation: flash 6s forwards; }
.flash.bad { background: var(--bad); color: #fff; }
@keyframes flash { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }

/* ---------- top bar ---------- */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 10px 20px; border-bottom: 1px solid var(--line); flex: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 190px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.search { flex: 1 1 300px; max-width: 560px; display: flex; align-items: center; gap: 8px; background: var(--sheet); border: 1px solid var(--field); border-radius: 8px; padding: 0 12px; height: 40px; }
.search input { border: 0 !important; outline: none; background: transparent !important; flex: 1; height: 38px !important; padding: 0 !important; }
.topright { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--paper); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: none; }
.avatar.soft { width: 36px; height: 36px; background: #EFE6DD; color: #5C3A20; font-size: 13px; }
details.me { position: relative; } details.me summary { list-style: none; cursor: pointer; } details.me summary::-webkit-details-marker { display: none; }
details.me .menu { position: absolute; right: 0; top: 40px; z-index: 20; width: 240px; background: var(--sheet); border: 1px solid var(--ink); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.alert { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 10px 20px 0; padding: 10px 16px; background: var(--bad-soft); border: 1px solid var(--bad-line); border-radius: 10px; color: var(--bad); flex: none; }
.alert > div { flex: 1; min-width: 240px; }

/* ---------- columns ---------- */
.cols { flex: 1; min-height: 0; display: flex; }
.cols > * { min-height: 0; overflow-y: auto; }
.railitems { display: flex; flex-direction: column; gap: 2px; }
.rail { flex: 0 0 236px; padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); }
.rail a:not(.btn) { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; min-height: 36px; }
.rail a:not(.btn):hover { background: var(--chip); }
.rail a[aria-current="page"] { background: var(--accent-soft); font-weight: 600; }
.rail .mono { font-size: 12px; }
.railhead { margin: 14px 12px 4px; font-size: 12px; font-weight: 500; color: var(--ink2); }
.sw { display: inline-block; border-radius: 2px; flex: none; }
.apptag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink3); flex: none; }

/* ---------- list ---------- */
.list { flex: 0 0 400px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.listhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 16px 8px; }
.listhead h1 { font-size: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 16px 12px; }
.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--field); color: var(--ink); text-decoration: none; font-size: 13px; }
.chip[aria-current="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.mails { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.mails li { border-bottom: 1px solid var(--line); }
.mails li.open { background: var(--sheet); }
.mails a { display: block; padding: 12px 16px 12px 14px; border-left: 2px solid transparent; color: var(--ink); text-decoration: none; }
.mails li.open a { border-left-color: var(--accent); }
.mails a:hover { background: var(--sheet2); }
.r1, .r3 { display: flex; align-items: center; gap: 8px; }
.r3 { margin-top: 4px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.from, .subj, .snip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.from { flex: 1; min-width: 0; } .subj { margin-top: 2px; }
.snip { font-size: 13px; color: var(--ink2); min-width: 0; }
.replied { color: var(--accent); }
.mails .empty { padding: 48px 24px; text-align: center; color: var(--ink2); }
.mails .empty svg { color: var(--ink); }
.mails .empty p { margin: 6px 0; }

/* ---------- reading pane ---------- */
.read { flex: 1; min-width: 0; background: var(--sheet); }
.nothing { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 200px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 24px; border-bottom: 1px solid var(--line2); position: sticky; top: 0; background: var(--sheet); z-index: 2; }
.toolbar form { display: flex; gap: 8px; } .inline { display: inline-flex; gap: 6px; align-items: center; }
.back-s { display: none; }
.mail { padding: 24px 40px 40px; max-width: 840px; }
.mail > .apptag { border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; }
.mail h2 { margin: 12px 0 16px; font-size: 24px; line-height: 1.3; }
.who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line2); }
.imgbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 16px; padding: 10px 14px; background: var(--paper); border-radius: 8px; font-size: 13px; }
.imgbar form { display: flex; gap: 8px; align-items: center; }
iframe.body { display: block; width: 100%; min-height: 62vh; border: 0; margin-top: 12px; background: #fff; border-radius: 4px; }
.textbody { padding: 18px 0; font-size: 15px; line-height: 1.65; max-width: 66ch; overflow-wrap: anywhere; }
.files { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.files li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; }
.ourreply { margin-top: 18px; padding: 12px 16px; border-left: 2px solid var(--accent); background: var(--sheet2); border-radius: 0 8px 8px 0; }
.ourreply .textbody { padding: 6px 0 0; font-size: 14px; }
.replybox { margin-top: 20px; border: 1px solid var(--field); border-radius: 10px; background: var(--sheet2); }
.rbhead { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink2); }
.rbhead .mono { color: var(--ink); }
.replybox textarea { display: block; width: 100%; border: 0; background: transparent; padding: 14px; font-size: 15px; line-height: 1.6; resize: vertical; outline: none; }
.rbfoot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; flex-wrap: wrap; }
.st { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.st span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-ok { background: var(--accent-soft); color: var(--accent); } .st-bad { background: var(--bad-soft); color: var(--bad); } .st-q { background: var(--chip); color: var(--ink3); }

/* ---------- sent ---------- */
.sentwrap { flex: 1 1 560px; min-width: 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.filters select { height: 36px; font-size: 13px; }
.tablebox { overflow-x: auto; background: var(--sheet); border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--ink2); padding: 10px 8px; }
td { padding: 9px 8px; border-top: 1px solid var(--line2); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 16px; } th:last-child, td:last-child { padding-right: 16px; }
table.sent td a { color: var(--ink); text-decoration: none; }
table.sent tr.open { background: var(--accent-soft); }
table.sent .clip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.empty { padding: 32px 16px; color: var(--ink2); text-align: center; }
.sentdetail { flex: 0 0 440px; background: var(--sheet); padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.sentdetail h2 { font-size: 18px; line-height: 1.3; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.timeline li { display: flex; gap: 10px; } .timeline li .mono { color: var(--ink2); width: 56px; flex: none; }
.timeline li.bad, .timeline li.bad .mono { color: var(--bad); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gotbox { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.gothead { padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--paper); }
.gotbox iframe.body { margin: 0; min-height: 520px; border-radius: 0; }

/* ---------- pages ---------- */
.page { flex: 1; padding: 28px 24px 64px; }
.page > h1 { font-size: 26px; letter-spacing: -0.02em; margin-bottom: 20px; }
.narrow { max-width: 640px; margin: 0 auto; width: 100%; padding: 32px 20px; }
.narrow2 { max-width: 960px; margin: 0 auto; width: 100%; }
.page.narrow { padding-top: 28px; }
.wide { max-width: 1280px; margin: 0 auto; width: 100%; }
.box { background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 20px; }
.box > h2 { margin-bottom: 8px; } .box > p { margin: 0 0 12px; }
.stack { display: flex; flex-direction: column; gap: 6px; max-width: 360px; }
.stack > div { margin-top: 8px; }
.steps { padding-left: 20px; } .steps li { margin: 6px 0; }
.kv { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; }
.kv > div { display: flex; flex-direction: column; } .kv form { margin-left: auto; }
.addrule, .invite { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 14px; }
.addrule > div, .invite > div { display: flex; flex-direction: column; gap: 4px; }
.f2 { flex: 2 1 260px; } .f1 { flex: 1 1 150px; }
.rules .btn.icon { width: 34px; height: 34px; border-color: transparent; }
.appbox { border: 1px solid var(--line); border-radius: 8px; margin-top: 10px; }
.appbox summary { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; flex-wrap: wrap; }
.keyrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line2); }
.appform { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 12px 16px 16px; border-top: 1px solid var(--line2); align-items: end; }
.appform > div { display: flex; flex-direction: column; gap: 4px; } .appform .wide2 { grid-column: span 2; }
.teamcols { display: flex; flex-wrap: wrap; gap: 32px; }
.grow2 { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 16px; } .grow1 { flex: 1 1 300px; display: flex; flex-direction: column; gap: 10px; }
.grow2 > h1 { font-size: 26px; } .grow2 > p { margin: -8px 0 0; }
.team th[scope=row] { display: flex; flex-direction: column; font-weight: 400; color: var(--ink); font-size: 13px; padding-top: 10px; padding-bottom: 10px; }
.team select { height: 34px; font-size: 12.5px; padding: 0 4px; width: 84px; }
.team td, .team th { padding-left: 4px; padding-right: 4px; }
.team select.off { background: var(--paper); color: var(--ink2); }
.team .tablebox, .grow2 .tablebox { border: 1px solid var(--line); border-radius: 10px; }
.roles { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; font-size: 13px; }
.roles dt { font-weight: 600; } .roles dd { margin: 0; color: var(--ink2); }
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: flex; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line2); font-size: 13px; }
.log li > .mono { width: 64px; flex: none; }

/* ---------- compose ---------- */
.compose { flex: 1; display: flex; min-width: 0; background: var(--sheet); }
.cform { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chead { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line2); }
.chead h1 { font-size: 16px; flex: 1; }
.cform .err { margin: 12px 20px 0; }
.field { display: flex; align-items: center; gap: 12px; padding: 4px 20px; border-bottom: 1px solid var(--line2); }
.field label { width: 64px; flex: none; color: var(--ink2); font-weight: 400; font-size: 13px; }
.field input, .field select { flex: 1; border: 0 !important; background: transparent !important; padding: 0 !important; }
.fmt { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 14px; border-bottom: 1px solid var(--line2); }
.fmt .btn.icon { border-color: transparent; } .fmt .check { margin-left: auto; }
.editor { flex: 1; min-height: 280px; padding: 20px; font-size: 15px; line-height: 1.65; outline: none; overflow-y: auto; }
.editor:empty::before { content: 'Write your mail'; color: var(--ink2); }
.cfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line2); }
.tplside { flex: 0 0 280px; background: var(--paper); border-left: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.tplside h2 { font-size: 14px; } .tplside ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tplpick { width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet); display: flex; flex-direction: column; }
.tplpick:hover { border-color: var(--accent); }

/* ---------- templates ---------- */
.tplmain { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden !important; }
.tplhead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.tplhead select { height: 36px; }
.tplcols { flex: 1; min-height: 0; display: flex; }
.tpllist { flex: 0 0 250px; border-right: 1px solid var(--line); padding: 10px; overflow-y: auto; }
.tpllist ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.tpllist a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.tpllist a[aria-current="page"] { background: var(--accent-soft); }
.tpllist .r1 { gap: 8px; }
.tpleditor { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tplbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.tplbar .tname { font-weight: 600; width: 220px; } .tplbar .tslug { width: 180px; font-size: 13px; }
.tplwork { flex: 1; min-height: 0; display: flex; }
.code { flex: 0 0 min(520px, 40%); display: flex; flex-direction: column; border-right: 1px solid var(--line); min-width: 0; overflow-y: auto; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px 12px 0; border-bottom: 1px solid var(--line); }
.tabs [role=tab], .ptop .tabs a { height: 38px; padding: 0 12px; border: 0; background: transparent; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 4px; color: var(--ink); text-decoration: none; }
.tabs [aria-selected="true"], .ptop .tabs a[aria-current="page"] { border-bottom-color: var(--ink); font-weight: 600; }
.subjrow { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line2); }
.subjrow input { flex: 1; } .subjrow label { flex: none; }
.pane { flex: 1; display: flex; min-height: 300px; }
.pane[hidden] { display: none; }
.pane textarea { flex: 1; border: 0; border-radius: 0; background: var(--sheet2); font-size: 12.5px; line-height: 1.7; padding: 12px 14px; resize: none; outline: none; tab-size: 2; white-space: pre; }
.pane textarea[readonly] { white-space: pre-wrap; font-family: 'IBM Plex Sans', sans-serif; font-size: 13px; }
.fieldbar { padding: 10px 12px; border-top: 1px solid var(--line); background: var(--sheet); display: flex; flex-direction: column; gap: 6px; }
.fieldbar .chips { padding: 0; }
.field-chip { height: 28px; padding: 0 8px; border: 1px solid #C8DCD3; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-size: 12px; }
.history { padding: 8px 12px; border-top: 1px solid var(--line2); font-size: 13px; }
.history ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 2px; }
.code > p.small { padding: 0 12px; }
.preview { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pvbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.seg { display: inline-flex; border: 1px solid var(--field); border-radius: 8px; overflow: hidden; }
.seg button { height: 34px; padding: 0 12px; border: 0; background: var(--sheet); }
.seg button + button { border-left: 1px solid var(--field); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.pvstage { flex: 1; min-height: 0; display: flex; background: var(--stage); }
.pvframe { flex: 1; min-width: 0; overflow: auto; padding: 20px; display: flex; justify-content: center; }
.pvframe iframe { width: 640px; max-width: 100%; height: 100%; min-height: 560px; border: 1px solid #D3D0C7; border-radius: 6px; background: #fff; flex: none; transition: width .2s; }
.pvframe iframe.dark { filter: invert(1) hue-rotate(180deg); }
.checks { flex: 0 0 230px; background: var(--sheet); border-left: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; overflow-y: auto; }
.checks h2 { font-size: 14px; }
.checks ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.checks li { display: flex; gap: 8px; } .checks li > span:first-child { flex: none; width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; margin-top: 1px; }
.checks li.ok > span:first-child { background: var(--accent-soft); color: var(--accent); }
.checks li.no > span:first-child { background: var(--bad-soft); color: var(--bad); }
.checks p { margin: 0; }
.starters { flex: 1; overflow-y: auto; padding: 24px; }
.starters > p { margin: 4px 0 16px; }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.scard { margin: 0; background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.sthumb { height: 280px; overflow: hidden; background: var(--stage); position: relative; }
.sthumb iframe { position: absolute; left: 0; top: 0; width: calc(100% / .55); height: calc(280px / .55); border: 0; transform: scale(.55); transform-origin: 0 0; pointer-events: none; }
.scard figcaption { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }

/* ---------- sign in ---------- */
body.auth { display: block; }
.authwrap { min-height: 100vh; display: flex; flex-wrap: wrap; }
.authside { flex: 1 1 420px; min-height: 340px; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; border-right: 1px solid var(--line); }
.authside p { margin: 0; max-width: 360px; color: var(--ink3); font-size: 17px; }
.holes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 420px; }
.holes > div { height: 64px; border: 1px solid var(--field); border-radius: 4px; background: var(--sheet2); display: flex; flex-direction: column; justify-content: space-between; padding: 8px; }
.holes > div > span:first-child { width: 18px; height: 4px; border-radius: 2px; background: var(--line); }
.holes .mono { font-size: 11px; color: var(--ink2); }
.authmain { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 48px 20px; }
.authform { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 10px; }
.authform h1 { font-size: 26px; letter-spacing: -0.02em; margin-bottom: 6px; }
.authform input { height: 46px !important; }
.authform .btn.big { margin-top: 8px; }
.labelrow { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.divider { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; }

/* ---------- inside an app (panel) ---------- */
.ptop { flex: none; border-bottom: 1px solid var(--line); }
.prow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 20px 4px; }
.ptop .tabs { padding: 6px 16px 0; border: 0; }

.railbox > summary { display: none; }
.railbox { display: block; }
/* ---------- phones and small windows ---------- */
@media (max-width: 1100px) { .sentdetail { flex-basis: 360px; } .checks { display: none; } .list { flex-basis: 340px; } }
@media (max-width: 900px) {
  .cols { flex-direction: column; overflow-y: auto; }
  .cols > * { overflow: visible; }
  .rail { flex: none; flex-direction: row; flex-wrap: wrap; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 12px; }
  .rail .btn.wide { width: auto; margin: 0; }
  .rail .railhead, .rail hr { display: none; }
  .railbox { display: block; width: 100%; }
  .railbox > summary { display: flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; font-weight: 500; }
  .railbox[open] > summary { margin-bottom: 6px; }
  .railbox > .railitems { display: flex; flex-wrap: wrap; gap: 4px; }
  .rail a:not(.btn) { padding: 6px 10px; min-height: 36px; border: 1px solid var(--line); border-radius: 18px; }
  .list, .sentwrap, .read, .sentdetail { flex: none; width: 100%; border-right: 0; }
  .has-open .rail, .has-open .list, .has-open .sentwrap, .has-open .ptop .tabs { display: none; }
  body:not(.has-open) .read, body:not(.has-open) .sentdetail { display: none; }
  .back-s { display: inline-flex; }
  .mail { padding: 18px 16px 32px; } .toolbar { padding: 10px 16px; }
  .top { padding: 10px 16px; } .brand { min-width: 0; } .hide-s { display: none; }
  .compose { flex-direction: column; } .tplside { flex: none; border-left: 0; border-top: 1px solid var(--line); }
  .tplcols, .tplwork { flex-direction: column; } .tplmain { overflow: visible !important; }
  .tpllist { flex: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .code { flex: none; border-right: 0; } .pvframe iframe { min-height: 480px; }
  .authside { padding: 28px 20px; border-right: 0; border-bottom: 1px solid var(--line); min-height: 0; }
  .page { padding: 20px 16px 48px; }
  .appform .wide2 { grid-column: auto; }
}
