/* =========================================================================
   emarketing.co.rs - single stylesheet
   Design read: B2B digital-marketing services + blog for Serbian SMB owners.
   Dials: variance 7 / motion 4 / density 4.
   Accent is LOCKED to --accent across every section. One radius scale.
   One theme, follows prefers-color-scheme.

   Fonts: system stack by default (fast, no external request). To upgrade the
   display face, drop woff2 files into /public/fonts and uncomment the
   @font-face block below, then set --font-display.
   ========================================================================= */

/*
@font-face {
  font-family: "Display";
  src: url("/fonts/display.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
*/

:root {
  --font-text: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter Tight",
    Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Display", "Segoe UI", var(--font-text);
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono",
    Menlo, Consolas, monospace;

  --bg: #fbfaf8;
  --surface: #f1ece2;
  --surface-2: #e8e1d3;
  --ink: #1a1915;
  --ink-soft: #43403a;
  --muted: #6c675d;
  --line: #d8d0c0;
  --line-strong: #bcb2a0;
  --accent: #0c6b56;          /* solid fills; pair with --on-accent */
  --accent-hover: #094f40;
  --accent-text: #0a5142;     /* accent as text / link on --bg */
  --accent-tint: #e2efe9;     /* tinted surface */
  --on-accent: #ffffff;       /* text on an --accent fill */
  --danger: #a3341f;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-pill: 999px;

  --wrap: 1180px;
  --gap: clamp(1rem, 2.4vw, 1.6rem);
  --section-y: clamp(3.25rem, 6vw, 5.25rem);

  --shadow: 0 1px 2px rgba(27, 26, 23, 0.04),
    0 12px 32px -12px rgba(27, 26, 23, 0.14);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131210;
    --surface: #1c1b17;
    --surface-2: #232118;
    --ink: #f5f2ea;
    --ink-soft: #d6d1c5;
    --muted: #a49c8c;
    --line: #332f28;
    --line-strong: #4b463b;
    --accent: #2fa98e;
    --accent-hover: #3cbda0;
    --accent-text: #64d2b9;
    --accent-tint: #16332b;
    --on-accent: #04211a;
    --danger: #e0836b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3),
      0 16px 40px -16px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

/* --------------------------------------------------------------- base ---- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.02rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 640;
  line-height: 1.08;
  letter-spacing: -0.018em;
  margin: 0 0 0.5em;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 5.4vw, 3.9rem);
}
h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
}
h3 {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  letter-spacing: -0.012em;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent-text);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.2rem);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

.section {
  padding-block: var(--section-y);
}
.section--surface {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.section__head {
  max-width: 52ch;
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}
.section__head p {
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0;
}

.lede {
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
  color: var(--ink-soft);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* ------------------------------------------------------------- buttons --- */

.btn {
  --_bg: var(--accent);
  --_fg: var(--on-accent);
  --_bg-hover: var(--accent-hover);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.4rem;
  border-radius: var(--radius-pill);
  background: var(--_bg);
  color: var(--_fg);
  font: inherit;
  font-weight: 600;
  line-height: 1;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover {
  background: var(--_bg-hover);
  color: var(--_fg);
}
.btn:active {
  transform: translateY(1px);
}
.btn.btn--ghost {
  --_bg: transparent;
  --_fg: var(--ink);
  --_bg-hover: var(--surface-2);
  border-color: var(--line-strong);
}
.btn.btn--ghost:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.btn--block {
  width: 100%;
}

/* -------------------------------------------------------------- header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 68px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 680;
  font-size: 1.16rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand span {
  color: var(--accent);
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.7rem);
}
.nav a:not(.btn) {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.97rem;
  font-weight: 500;
}
.nav a:not(.btn):hover,
.nav a:not(.btn)[aria-current="page"] {
  color: var(--accent-text);
}
.nav .btn {
  padding: 0.52rem 1.05rem;
  font-size: 0.9rem;
}
.nav__toggle {
  display: none;
}

@media (max-width: 720px) {
  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1rem 1.2rem;
    transform: translateY(-130%);
    transition: transform 0.22s ease;
  }
  .nav[data-open="true"] {
    transform: translateY(0);
  }
  .nav a:not(.btn) {
    padding: 0.85rem 0.2rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
  .nav .btn {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }
  .nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
  }
}

/* ---------------------------------------------------------------- hero --- */

.hero {
  padding-block: clamp(2rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4rem);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 {
  margin-bottom: 0.55em;
}
.hero__lede {
  max-width: 34ch;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.7vw, 1.24rem);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}
.hero__media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 4.4;
  max-height: 30rem;
  background: var(--surface-2);
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 860px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .hero__media {
    aspect-ratio: 16 / 11;
    order: -1;
  }
  .hero__lede {
    max-width: 52ch;
  }
}

/* ------------------------------------------------------------ services --- */

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.bento__cell {
  display: flex;
  flex-direction: column;
  padding: clamp(1.3rem, 2.6vw, 1.9rem);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.section--surface .bento__cell {
  background: var(--bg);
}
.bento__cell:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--ink);
}
.bento__cell--feature {
  grid-column: span 2;
  grid-row: span 2;
  background: var(--accent-tint);
  border-color: transparent;
}
.bento__cell h3 {
  margin-bottom: 0.35rem;
}
.bento__cell p {
  color: var(--muted);
  margin: 0;
  font-size: 0.98rem;
}
.bento__cell .more {
  margin-top: auto;
  padding-top: 1.1rem;
  font-weight: 600;
  color: var(--accent-text);
  font-size: 0.92rem;
}
.bento__cell--feature .media {
  margin-top: 1.2rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
}
.bento__cell--feature .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 860px) {
  .bento {
    grid-template-columns: 1fr 1fr;
  }
  .bento__cell--feature {
    grid-column: span 2;
    grid-row: auto;
  }
}
@media (max-width: 560px) {
  .bento {
    grid-template-columns: 1fr;
  }
  .bento__cell--feature {
    grid-column: auto;
  }
}

/* ------------------------------------------------------------- process --- */

.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  counter-reset: step;
}
.process__step {
  position: relative;
  padding-top: 1.6rem;
  border-top: 2px solid var(--accent);
}
.process__step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  position: absolute;
  top: -1.6rem;
  left: 0;
}
.process__step h3 {
  font-size: 1.12rem;
  margin-bottom: 0.3rem;
}
.process__step p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

@media (max-width: 780px) {
  .process {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 460px) {
  .process {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------- quote --- */

.quote {
  max-width: 40ch;
}
.quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.28;
  letter-spacing: -0.015em;
}
.quote figcaption {
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 0.96rem;
}
.quote figcaption strong {
  color: var(--ink);
  font-weight: 600;
}

/* --------------------------------------------------------- article grid -- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--ink);
}
.card__media {
  aspect-ratio: 3 / 2;
  background: var(--surface-2);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card__body {
  padding: 1.2rem 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.card__meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.card h3 {
  font-size: 1.16rem;
  margin: 0;
}
.card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

@media (max-width: 860px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------- cta band --- */

.cta-band {
  /* Fixed dark panel in both themes: white text, framed with an accent rule
     so it reads as a distinct block even on a dark page. */
  --band-bg: #14140f;
  --band-fg: #f6f3ec;
  --band-muted: #c7c2b4;
  background: var(--band-bg);
  color: var(--band-fg);
  border-block: 3px solid var(--accent);
}
.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem 2.5rem;
  padding-block: clamp(3rem, 7vw, 4.75rem);
  flex-wrap: wrap;
}
.cta-band h2 {
  color: #ffffff;
  max-width: 20ch;
  margin: 0;
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
}
.cta-band p {
  color: var(--band-muted);
  margin: 0.6rem 0 0;
  max-width: 44ch;
}
.cta-band .btn {
  --_bg: #ffffff;
  --_fg: #0b3f33;
  --_bg-hover: #e8e2d3;
  padding: 0.9rem 1.7rem;
  font-size: 1.02rem;
}

@media (prefers-color-scheme: dark) {
  .cta-band {
    /* teal-tinted near-black, distinct in hue from the warm page bg */
    --band-bg: #0c1c17;
  }
}

/* ---------------------------------------------------------- prose/body --- */

.prose {
  max-width: 68ch;
  font-size: 1.08rem;
}
.prose > * + * {
  margin-top: 1.15rem;
}
.prose h2 {
  margin-top: 2.4rem;
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
}
.prose h3 {
  margin-top: 1.8rem;
}
.prose img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-block: 1.6rem;
}
.prose ul,
.prose ol {
  padding-left: 1.3rem;
}
.prose li + li {
  margin-top: 0.4rem;
}
.prose blockquote {
  margin: 1.6rem 0;
  padding-left: 1.1rem;
  border-left: 3px solid var(--accent);
  color: var(--ink-soft);
  font-style: normal;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface);
  padding: 0.12em 0.4em;
  border-radius: 5px;
}
.prose pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  overflow-x: auto;
}
.prose pre code {
  background: none;
  padding: 0;
}

/* --------------------------------------------------------- page header -- */

.page-hero {
  padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.page-hero p {
  color: var(--muted);
  max-width: 54ch;
  font-size: 1.08rem;
  margin: 0;
}
.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--accent-text);
}

.article-header {
  padding-block: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 3vw, 2rem);
}
.article-header__meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: clamp(2rem, 5vw, 3rem);
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
}
.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------- lists -- */

.stack-list {
  display: grid;
  gap: 1rem;
}
.stack-list__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1rem 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.stack-list__item:first-child {
  border-top: 1px solid var(--line);
}
.stack-list__item:hover h3 {
  color: var(--accent-text);
}
.stack-list__item p {
  grid-column: 1 / -1;
  color: var(--muted);
  margin: 0.3rem 0 0;
  max-width: 62ch;
}
.stack-list__item .when {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

/* --------------------------------------------------------- pagination -- */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
}
.pager a {
  text-decoration: none;
  font-weight: 600;
  color: var(--accent-text);
}
.pager span {
  color: var(--muted);
}

/* --------------------------------------------------------------- forms -- */

.form {
  display: grid;
  gap: 1.2rem;
  max-width: 34rem;
}
.field {
  display: grid;
  gap: 0.4rem;
}
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field input,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  width: 100%;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.field textarea {
  min-height: 8rem;
  resize: vertical;
}
.field__hint {
  font-size: 0.82rem;
  color: var(--muted);
}
.field__error {
  font-size: 0.85rem;
  color: var(--danger);
  font-weight: 600;
}
.form__note {
  font-size: 0.9rem;
  color: var(--muted);
}
.alert {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: 0.95rem;
}
.alert--ok {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent-text);
}
.alert--err {
  background: color-mix(in srgb, var(--danger) 12%, var(--bg));
  border-color: var(--danger);
  color: var(--danger);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: start;
}
.contact-facts dt {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1.4rem;
}
.contact-facts dd {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
}
.contact-facts a {
  text-decoration: none;
}
@media (max-width: 780px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------- footer -- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding-block: 3rem 2rem;
  font-size: 0.92rem;
}
.site-footer__grid {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--accent-text);
}
.site-footer__links {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.site-footer__legal {
  margin-top: 2rem;
  color: var(--muted);
}

/* --------------------------------------------------------------- admin -- */

.admin {
  --wrap: 1080px;
  min-height: 100dvh;
  background: var(--bg);
}
.admin-bar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.admin-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 60px;
}
.admin-bar nav {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.admin-bar a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.admin-bar a[aria-current="page"] {
  color: var(--accent-text);
}
.admin-main {
  padding-block: 2.4rem 4rem;
}
.admin-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
}
.admin-h h1 {
  font-size: 1.7rem;
  margin: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}
.table th,
.table td {
  text-align: left;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.table tr:hover td {
  background: var(--surface);
}
.table a {
  font-weight: 600;
  text-decoration: none;
}
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  color: var(--muted);
}
.tag--live {
  color: var(--accent-text);
  border-color: var(--accent);
  background: var(--accent-tint);
}

.admin-form {
  display: grid;
  gap: 1.3rem;
  max-width: 52rem;
}
.admin-form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
}
.admin-form select {
  font: inherit;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
}
.admin-form textarea.code {
  min-height: 20rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.55;
}
.admin-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
}
.btn--sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}
.btn--danger {
  --_bg: transparent;
  --_fg: var(--danger);
  --_bg-hover: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 55%, transparent);
}
.btn--danger:hover {
  color: var(--bg);
  border-color: var(--danger);
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}
.media-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.media-item img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
}
.media-item .m {
  padding: 0.5rem 0.6rem;
  font-size: 0.75rem;
  color: var(--muted);
  word-break: break-all;
}
.login-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem;
}
.login-card {
  width: 100%;
  max-width: 22rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  background: var(--bg);
  box-shadow: var(--shadow);
}

/* ---------------------------------------------------------- reveal fx --- */

/* Reveal is opt-in: content is visible by default. JS adds `.reveal-armed`
   to <html> only when it will actually drive the animation, so a slow or
   absent script never hides content. */
@media (prefers-reduced-motion: no-preference) {
  .reveal-armed .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
  }
  .reveal-armed .reveal.in {
    opacity: 1;
    transform: none;
  }
}
