/* The admin portal at portal.mockingbyrd.io: the two tiles and the blog console.
 *
 * Its own stylesheet rather than the landing page's. site.css is 2,000 lines of brochure —
 * heroes, engine grids, pricing rails — and none of it describes a form. What is copied is the
 * token block at the top, so the portal is recognisably the same product: the same black, the
 * same bone-white ink, the same butter accent, Archivo for prose and JetBrains Mono for the
 * things that are identifiers.
 *
 * The tokens are a copy and are allowed to drift a little. A console that followed every
 * change to the marketing palette would be a console that changed colour on a Friday for
 * reasons nobody working in it could see.
 */

:root{
  color-scheme:dark;
  --ground:#000; --surface:#0E0D0B; --surface-2:#15140F; --panel:#1C1B16;
  --rule:#2B2A23; --rule-soft:#1F1E19; --edge:#35322A;
  --ink:#EFEDE6; --dim:#9C998C; --faint:#6A6759;
  --accent:#FFF2B6; --accent-deep:#C9B96F; --accent-ink:#14130A;
  --live:#4FB88B; --draft:#E8B04A; --refuse:#EF6F5E;
  --mono:"JetBrains Mono",ui-monospace,monospace;
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--ground); color:var(--ink);
  font-family:"Archivo","Helvetica Neue",Arial,sans-serif;
  font-size:16px; line-height:1.55; -webkit-font-smoothing:antialiased;
}
img{max-width:100%; display:block}
a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3{margin:0; line-height:1.15; letter-spacing:-.01em}

.eyebrow{
  margin:0 0 6px; font-family:var(--mono); font-size:11.5px; letter-spacing:.14em;
  color:var(--accent-deep); text-transform:uppercase;
}
.small{font-size:13.5px; color:var(--dim); margin:0}
.mono{font-family:var(--mono); font-size:12.5px}

/* ── the bar across the top of both pages ──────────────────────────────────────────────── */

.bar{
  display:flex; flex-wrap:wrap; gap:16px 24px; align-items:flex-end;
  justify-content:space-between;
  padding:22px clamp(18px,4vw,40px); border-bottom:1px solid var(--rule);
  background:var(--surface);
}
.bar h1{font-size:clamp(21px,3vw,27px)}
.bar-side{display:flex; flex-wrap:wrap; gap:10px 14px; align-items:center}
.bar-side .small{max-width:38ch}

.wrap{padding:clamp(22px,4vw,40px); max-width:1180px; margin:0 auto}

/* ── the two tiles ─────────────────────────────────────────────────────────────────────── */

.tiles{
  display:grid; gap:18px; padding:0; margin:0; list-style:none;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
}
.tile{
  display:flex; flex-direction:column; gap:10px;
  padding:22px 22px 20px; border:1px solid var(--edge); border-radius:14px;
  background:linear-gradient(180deg,var(--panel),var(--surface-2));
  color:inherit; text-decoration:none; min-height:168px;
  transition:border-color .16s ease, transform .16s ease;
}
.tile:hover{border-color:var(--accent-deep); transform:translateY(-2px); text-decoration:none}
.tile h2{font-size:19px}
.tile p{margin:0; color:var(--dim); font-size:14.5px}
.tile .where{margin-top:auto; font-family:var(--mono); font-size:12px; color:var(--faint)}
.tile .where span{color:var(--accent-deep)}

/* ── buttons ───────────────────────────────────────────────────────────────────────────── */

button,.btn{
  font:inherit; font-size:14px; font-weight:600; cursor:pointer;
  padding:9px 15px; border-radius:9px; border:1px solid var(--edge);
  background:var(--surface-2); color:var(--ink); transition:border-color .14s, background .14s;
}
button:hover:not(:disabled),.btn:hover{border-color:var(--accent-deep); text-decoration:none}
button:disabled{opacity:.5; cursor:default}
.primary{background:var(--accent); border-color:var(--accent); color:var(--accent-ink)}
.danger:hover:not(:disabled){border-color:var(--refuse); color:var(--refuse)}
.ghost{background:transparent}
.row{display:flex; flex-wrap:wrap; gap:10px; align-items:center}

/* ── the console ───────────────────────────────────────────────────────────────────────── */

.console{display:grid; gap:22px; grid-template-columns:minmax(260px,330px) minmax(0,1fr)}
@media (max-width:900px){ .console{grid-template-columns:1fr} }

.posts{list-style:none; margin:14px 0 0; padding:0; display:grid; gap:8px}
.posts li{margin:0}
.posts button{
  width:100%; text-align:left; display:grid; gap:10px; grid-template-columns:62px 1fr;
  align-items:center; padding:9px; background:var(--surface); font-weight:400;
}
.posts button[aria-current="true"]{border-color:var(--accent-deep); background:var(--panel)}
.posts img{width:62px; height:34px; object-fit:cover; border-radius:5px}
.posts .noimg{
  width:62px; height:34px; border-radius:5px; border:1px dashed var(--rule);
  display:grid; place-items:center; font-family:var(--mono); font-size:9px; color:var(--faint);
}
.posts strong{display:block; font-size:14px; font-weight:600; line-height:1.3}
.posts .meta{font-family:var(--mono); font-size:10.5px; color:var(--faint); letter-spacing:.04em}

.badge{
  display:inline-block; font-family:var(--mono); font-size:10px; letter-spacing:.1em;
  padding:1px 6px; border-radius:4px; border:1px solid currentColor; text-transform:uppercase;
}
.badge.live{color:var(--live)}
.badge.draft{color:var(--draft)}

.editor{
  border:1px solid var(--rule); border-radius:14px; background:var(--surface);
  padding:clamp(16px,2.4vw,24px); display:grid; gap:16px; align-content:start;
}
.field{display:grid; gap:5px}
.field>span{font-size:12.5px; color:var(--dim)}
.field>span em{font-style:normal; color:var(--faint)}
input,select,textarea{
  font:inherit; font-size:14.5px; color:var(--ink); background:var(--ground);
  border:1px solid var(--rule); border-radius:8px; padding:9px 11px; width:100%;
}
input:focus,select,textarea:focus{outline:2px solid var(--accent-deep); outline-offset:1px}
input[readonly]{color:var(--dim); background:var(--surface-2)}
textarea{resize:vertical; min-height:120px; line-height:1.6}
textarea.body{min-height:340px; font-family:var(--mono); font-size:13.5px}
.two{display:grid; gap:16px; grid-template-columns:1fr 1fr}
@media (max-width:620px){ .two{grid-template-columns:1fr} }

.help{
  margin:0; padding:10px 12px; border-left:2px solid var(--rule);
  font-size:12.5px; color:var(--faint); font-family:var(--mono); line-height:1.7;
}
.illo{display:grid; gap:12px; grid-template-columns:200px 1fr; align-items:start}
@media (max-width:620px){ .illo{grid-template-columns:1fr} }
.illo img{border:1px solid var(--rule); border-radius:8px}
.illo .noimg{
  border:1px dashed var(--rule); border-radius:8px; aspect-ratio:1733/907;
  display:grid; place-items:center; color:var(--faint); font-family:var(--mono); font-size:11px;
}

.needs{
  margin:0; padding:11px 13px; border-radius:9px; font-size:13.5px;
  border:1px solid var(--draft); color:var(--draft); background:rgba(232,176,74,.06);
}
.trouble{
  margin:0 0 18px; padding:11px 13px; border-radius:9px; font-size:14px;
  border:1px solid var(--refuse); color:var(--refuse); background:rgba(239,111,94,.07);
}
.foot{
  border-top:1px solid var(--rule-soft); padding-top:14px; display:flex; flex-wrap:wrap;
  gap:10px; align-items:center; justify-content:space-between;
}

/* The one line that reports what just happened. Polite, so a screen reader is told after the
 * click it is about rather than interrupted during it. */
.toast{
  position:fixed; left:50%; bottom:24px; transform:translateX(-50%);
  padding:10px 18px; border-radius:999px; border:1px solid var(--edge);
  background:var(--panel); font-size:14px; box-shadow:0 10px 30px rgba(0,0,0,.5);
  opacity:0; pointer-events:none; transition:opacity .18s ease; max-width:min(92vw,560px);
}
.toast.on{opacity:1}
.toast.bad{border-color:var(--refuse); color:var(--refuse)}

[hidden]{display:none !important}
