:root { color-scheme: light; font: 16px/1.5 system-ui, sans-serif; color: #273041; background: #f7f8fa; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 900px; margin: 0 auto; padding: 24px 16px 48px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; }
header, nav, .list-heading, article, .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
header, .list-heading, article { justify-content: space-between; }
header { margin-bottom: 22px; }
header h1, .list-heading h2, article h3 { margin: 0; }
.panel { background: white; border: 1px solid #d7dde6; border-radius: 12px; padding: clamp(16px, 4vw, 28px); }
.panel > h2 { margin-top: 14px; }
.login { max-width: 480px; }
a { color: #164282; }
button, .button { display: inline-block; font: inherit; font-weight: 600; padding: 8px 14px; border: 1px solid transparent; border-radius: 6px; background: #164282; color: white; cursor: pointer; text-decoration: none; }
.secondary { background: white; color: #164282; border-color: #a1b4d1; }
.danger { background: #a2232a; }
label { display: block; margin: 12px 0; font-weight: 600; }
input, select, textarea { display: block; width: 100%; font: inherit; padding: 8px; margin-top: 4px; border: 1px solid #aeb7c4; border-radius: 6px; background: white; color: inherit; }
textarea { resize: vertical; }
label.inline, .inline input { display: inline-block; width: auto; }
small { color: #4c586a; font-weight: normal; }
fieldset { padding: 8px 14px; border: 1px solid #d7dde6; margin: 18px 0; border-radius: 6px; }
.grid { display: grid; column-gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
article { border-top: 1px solid #d7dde6; padding: 16px 0; }
.list-heading { margin-bottom: 16px; }
.error, .success { padding: 12px; border-radius: 6px; }
.error { color: #842126; background: #ffeded; }
.success { color: #155c35; background: #e9f8ee; }
.delete p { margin: 8px 0; }
:focus-visible { outline: 3px solid #1669c6; outline-offset: 3px; }

:root {
  --ink: #292128;
  --muted: #66595e;
  --accent: #722b43;
  --border: #e9dce0;
  color: var(--ink);
  background: #faf7f2;
}
a { color: var(--accent); }
button, .button { background: var(--accent); border-radius: 8px; }
button:hover, .button:hover { filter: brightness(.92); }
.secondary { color: var(--accent); background: #fff; border-color: var(--border); }
.danger { background: #a2232a; }
.panel { border-color: var(--border); }
small { color: var(--muted); }
h1 { font-size: clamp(1.65rem, 4vw, 2.2rem); letter-spacing: -.035em; }
h2 { font-size: 1.22rem; }
h3 { font-size: 1rem; overflow-wrap: anywhere; }
input, select, textarea, fieldset { border-color: #d8cbd0; }
:focus-visible { outline-color: #93506a; }

.signin { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(ellipse at top, #f5e2cf, #faf7f2 65%); }
.signin main { width: min(100%, 495px); padding: 24px; margin: 0; }
.signin .login { padding: clamp(24px, 6vw, 38px); box-shadow: 0 15px 40px #47263612; }
.brand { display: flex; gap: 12px; align-items: center; font-weight: 750; text-decoration: none; margin-bottom: 26px; }
.brand small { display: block; font-size: .78rem; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #f0dac7; color: #56253a; font-size: 1.35rem; font-weight: 800; }
.signin .login button { width: 100%; min-height: 44px; margin-top: 6px; }
.return-link { display: block; text-align: center; margin-top: 16px; }

.dashboard { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.dashboard main { width: 100%; max-width: 1160px; padding: clamp(18px, 4vw, 40px); }
.sidebar { display: flex; flex-direction: column; padding: 26px 16px; background: #472336; color: #fff; }
.sidebar .brand { color: white; padding: 0 8px; }
.sidebar .brand small { color: #ecdbe3; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a { color: #fff; text-decoration: none; padding: 9px 11px; border-radius: 8px; font-weight: 600; }
.sidebar nav a:hover, .sidebar nav a[aria-current] { background: #6d3a50; }
.sidebar-footer { margin-top: auto; padding-top: 32px; }
.sidebar-footer button { margin-left: 11px; }
.list-heading h1 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
.stats > div { background: white; border: 1px solid var(--border); border-radius: 12px; padding: clamp(10px, 2.2vw, 20px); }
.stats dt { color: var(--muted); font-size: .85rem; }
.stats dd { margin: 5px 0 0; font-size: 1.6rem; font-weight: 750; line-height: 1; }
.status { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 99px; font-size: .75rem; font-weight: 700; }
.status.published { color: #205c43; background: #e4f3e8; }
.status.draft { color: #6b4820; background: #f8ebd5; }
.post-list article > div:first-child { min-width: 0; }
.dashboard .panel > a + h1 { margin-top: 12px; }

@media (max-width: 740px) {
  .dashboard { grid-template-columns: minmax(0, 1fr); }
  .sidebar { padding: 14px; }
  .sidebar .brand { margin-bottom: 10px; }
  .sidebar nav { display: flex; gap: 4px; }
  .sidebar-footer { margin-top: 4px; padding-top: 0; }
}
