/* Journal website stylesheet – modern flat design (no box shadows).
   Colour schemes: html[data-scheme="indigo|teal|maroon"], chosen in Admin > Journal settings.
   Each scheme = primary colour + accent colour + soft tint. */

/* ---------- Neutrals (light) ---------- */
:root {
  --bg: #ffffff;
  --surface: #f7f8fa;
  --card: #ffffff;
  --line: #e4e7ec;
  --line-strong: #cfd4dc;
  --ink: #111827;
  --muted: #5b6474;
  --ok-bg: #ecfdf3; --ok-ink: #106b3c; --ok-line: #a6e3c0;
  --err-bg: #fef1f1; --err-ink: #9b1c1c; --err-line: #f5b5b5;
  --warn-bg: #fff8e6; --warn-ink: #774c00; --warn-line: #f0d48a;
  --focus: #f59e0b;
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-head: "Plus Jakarta Sans", "Inter", "Segoe UI", system-ui, sans-serif;
  /* default scheme = indigo */
  --p: #4338ca; --p-strong: #312e81; --p-soft: #eef2ff; --p-ink: #ffffff;
  --a: #f59e0b; --a-ink: #1c1407; --a-soft: #fef3c7;
  --hero-1: #312e81; --hero-2: #4338ca;
  color-scheme: light;
}

/* ---------- Scheme 1: Indigo & Amber ---------- */
html[data-scheme="indigo"] {
  --p: #4338ca; --p-strong: #312e81; --p-soft: #eef2ff; --p-ink: #ffffff;
  --a: #f59e0b; --a-ink: #1c1407; --a-soft: #fef3c7;
  --hero-1: #2b2873; --hero-2: #4338ca; --focus: #f59e0b;
}
/* ---------- Scheme 2: Teal & Coral ---------- */
html[data-scheme="teal"] {
  --p: #0f766e; --p-strong: #134e4a; --p-soft: #e6f6f4; --p-ink: #ffffff;
  --a: #f97352; --a-ink: #1f0d08; --a-soft: #feebe5;
  --hero-1: #0f3f3c; --hero-2: #0f766e; --focus: #f97352;
}
/* ---------- Scheme 3: Maroon & Gold ---------- */
html[data-scheme="maroon"] {
  --p: #8c1d40; --p-strong: #5c1029; --p-soft: #fbeef2; --p-ink: #ffffff;
  --a: #d4a017; --a-ink: #1d1503; --a-soft: #faf1d6;
  --hero-1: #4a0d22; --hero-2: #8c1d40; --focus: #d4a017;
}
/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16.5px/1.65 var(--font); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--p); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.22; margin: 0 0 .5em; letter-spacing: -.015em; overflow-wrap: anywhere; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; }
h2 { font-size: 1.45rem; }
h3, .h3 { font-size: 1.12rem; }
.h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
code { background: var(--surface); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: .88em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--a); color: var(--a-ink); padding: 10px 16px; z-index: 100; border-radius: 0 0 10px 0; }
.skip:focus { left: 0; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 28px; } }

/* ---------- Top bar ---------- */
.topbar { background: var(--p-strong); color: rgba(255,255,255,.86); font-size: .86rem; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar-left { overflow-wrap: anywhere; }
.topbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.topbar-right a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.1); border: 0; color: #fff; border-radius: 999px; width: 44px; height: 44px; cursor: pointer; }
.theme-toggle:hover { background: rgba(255,255,255,.2); }

/* ---------- Header ---------- */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand img, .brand-logo { width: 58px; height: 58px; flex-shrink: 0; border-radius: 14px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: clamp(1rem, 2.1vw, 1.3rem); line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.brand-tag { font-size: .88rem; color: var(--muted); }
.header-cta { flex-shrink: 0; }
.menu-btn { display: none; align-items: center; gap: 8px; background: var(--p-soft); color: var(--p); border: 0; border-radius: 999px; min-height: 44px; min-width: 44px; padding: 0 18px; font: 600 .95rem var(--font); cursor: pointer; flex-shrink: 0; }
.menu-btn::before { content: ""; width: 16px; height: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; border-radius: 2px; }
.site-header .site-nav { border-top: 1px solid var(--line); }
.site-nav ul { list-style: none; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 4px; padding-top: 8px; padding-bottom: 8px; }
.site-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 16px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .96rem; border-radius: 999px; }
.site-nav a:hover { background: var(--surface); color: var(--p); }
.site-nav a[aria-current="page"] { background: var(--p-soft); color: var(--p); }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .site-header .header-cta { display: none; }
  .js .site-header .site-nav { display: none; }
  .js .site-header .site-nav.open { display: block; }
  .site-header .site-nav ul { flex-direction: column; gap: 2px; padding-top: 10px; padding-bottom: 14px; }
  .site-header .site-nav a { border-radius: var(--radius-sm); padding: 0 14px; }
}

/* ---------- Hero banner ---------- */
.banner { position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--hero-1), var(--hero-2));
  background:
    radial-gradient(520px 320px at 92% 8%, color-mix(in srgb, var(--a) 34%, transparent), transparent 70%),
    radial-gradient(420px 300px at 0% 100%, rgba(255,255,255,.08), transparent 70%),
    linear-gradient(135deg, var(--hero-1), var(--hero-2)); }
.banner::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 22px 22px; }
.banner-in { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 60px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--a); }
.banner .eyebrow { color: rgba(255,255,255,.85); }
.banner h1 { color: #fff; margin-bottom: .45em; }
.banner-desc { font-size: 1.12rem; color: rgba(255,255,255,.84); max-width: 60ch; }
.banner-facts { list-style: none; padding: 0; margin: 0 0 1.6em; display: flex; flex-wrap: wrap; gap: 8px; }
.banner-facts li { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 6px 14px; font-size: .9rem; overflow-wrap: anywhere; }
.banner-facts span { color: rgba(255,255,255,.7); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; font-weight: 600; }
.banner-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.banner-cover { position: relative; }
.banner-cover::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; border-radius: 18px; background: var(--a); opacity: .9; }
.banner-cover img, .cover-ph { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 18px; object-fit: cover; display: block; }
.cover-ph { background: #fff; color: #111827; display: flex; flex-direction: column; justify-content: space-between; padding: 26px 22px; border-top: 12px solid var(--hero-2); }
.cover-ph-name { font-family: var(--font-head); font-weight: 800; font-size: 1.12rem; line-height: 1.3; letter-spacing: -.01em; }
.cover-ph-issue { font-size: .92rem; color: #4b5563; font-weight: 600; }
.cover-ph-note { font-size: .72rem; color: #6b7280; }
@media (max-width: 760px) {
  .banner-in { grid-template-columns: 1fr; gap: 36px; padding-top: 36px; padding-bottom: 48px; }
  .banner-cover { max-width: 190px; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--p); background: var(--p); color: var(--p-ink); font: 600 .98rem var(--font); text-decoration: none; cursor: pointer; text-align: center; transition: background-color .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--p-strong); border-color: var(--p-strong); color: #fff; }.btn-light { background: var(--a); border-color: var(--a); color: var(--a-ink); }
.btn-light:hover { background: #fff; border-color: #fff; color: #111827; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-outline:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.btn-ghost { background: transparent; color: var(--p); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--p-soft); border-color: var(--p); color: var(--p); }
.btn-danger { background: transparent; border-color: var(--err-line); color: var(--err-ink); }
.btn-danger:hover { background: var(--err-bg); border-color: var(--err-ink); color: var(--err-ink); }
.btn-small { min-height: 44px; padding: 0 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0 16px; min-height: 44px; width: 100%; text-align: left; font-weight: 600; }
/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 44px; padding-top: 44px; padding-bottom: 56px; align-items: start; }
@media (max-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 32px; } }
.content { min-width: 0; }
.section { margin-bottom: 44px; }
.band { background: var(--surface); border-top: 1px solid var(--line); padding: 52px 0 36px; margin: 0; }
.sec-title { font-size: 1.4rem; margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.sec-title::before { content: ""; width: 6px; height: 1.1em; border-radius: 6px; background: linear-gradient(var(--p), var(--a)); flex-shrink: 0; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.sec-head .sec-title { margin: 0; }
.sec-head a { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.page-title { margin-bottom: .55em; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.empty { color: var(--muted); padding: 22px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.prose { overflow-wrap: anywhere; }
.prose h2 { font-size: 1.25rem; margin-top: 1.5em; }
.prose h3 { font-size: 1.06rem; margin-top: 1.3em; }
.prose ul { padding-left: 1.3em; }
.prose li::marker { color: var(--p); }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; min-width: 0; overflow-wrap: anywhere; transition: border-color .15s, transform .15s; }
.card h3 { margin-bottom: .35em; }
.art-card { display: flex; flex-direction: column; }
.art-card:hover, .issue-card:hover, .dash-card:hover { border-color: var(--p); }
.art-card h3 { font-size: 1.06rem; }
.art-card h3 a { color: var(--ink); text-decoration: none; }
.art-card h3 a:hover { color: var(--p); }
.art-card .links { margin-top: auto; }
.authors { color: var(--muted); margin-bottom: .45em; font-size: .95rem; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .85rem; color: var(--muted); margin-bottom: .8em; }
.links { display: flex; gap: 8px; margin: 0; flex-wrap: wrap; }
.links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; background: var(--p-soft); color: var(--p); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .88rem; }
.links a:hover { background: var(--p); color: var(--p-ink); }
.tag { display: inline-block; align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink); background: var(--a-soft); border-radius: 999px; padding: 3px 10px; margin: 0 0 10px; }
.tag-ok { color: var(--ok-ink); background: var(--ok-bg); }
.tag-new { color: var(--warn-ink); background: var(--warn-bg); }
.art-list { display: grid; gap: 16px; }
.subj { position: relative; padding-top: 58px; }
.subj::before { content: ""; position: absolute; left: 22px; top: 20px; width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--p), var(--a)); }
.subj p { color: var(--muted); margin: 0; }
.member { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 0 14px; }
.member > * { grid-column: 2; }
.member::before { content: ""; grid-column: 1; grid-row: 1 / span 4; width: 48px; height: 48px; border-radius: 50%; background: var(--p-soft); border: 2px solid var(--p); opacity: .9; }
.member .role { color: var(--p); font-weight: 600; font-size: .92rem; margin-bottom: .3em; }
.member p { margin-bottom: .3em; }
.issue-card { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); min-height: 44px; }
.issue-vol { font-family: var(--font-head); font-weight: 700; font-size: 1.06rem; color: var(--p); }
.issue-when, .issue-count { color: var(--muted); font-size: .93rem; }
.issue-title { font-size: .93rem; }
.issue-card .tag { margin-top: 8px; }
.issue-sub { color: var(--muted); }

/* ---------- Sidebar ---------- */
.sidebar { display: grid; gap: 18px; min-width: 0; }
.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; background: var(--card); overflow-wrap: anywhere; }
.box h2 { font-size: 1.02rem; margin-bottom: 12px; }
.box-cta { position: relative; overflow: hidden; color: #fff; border: 0; background: linear-gradient(140deg, var(--hero-1), var(--hero-2)); }
.box-cta::after { content: ""; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%; background: var(--a); opacity: .25; }
.box-cta > * { position: relative; z-index: 1; }
.box-cta h2 { color: #fff; }
.box-cta p { color: rgba(255,255,255,.82); }
.box-cta .btn { background: var(--a); border-color: var(--a); color: var(--a-ink); }
.box-cta .btn:hover { background: #fff; border-color: #fff; color: #111827; filter: none; }
.info { margin: 0; }
.info > div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.info > div:last-child { border-bottom: 0; padding-bottom: 0; }
.info dt { color: var(--muted); font-size: .88rem; }
.info dd { margin: 0; font-weight: 600; font-size: .95rem; }
.pub { font-style: normal; display: flex; flex-direction: column; gap: 4px; font-size: .95rem; }

/* ---------- Article page ---------- */
.art-title { font-size: clamp(1.5rem, 3.2vw, 2.15rem); font-weight: 800; }
.art-authors { font-size: 1.06rem; font-weight: 600; margin-bottom: .4em; }
.art-authors sup, .affs sup { color: var(--p); font-weight: 700; }
.affs { list-style: none; padding: 0; margin: 0 0 1.4em; color: var(--muted); font-size: .93rem; }
.affs li { margin-bottom: 2px; }
.art-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 1.4em; overflow: hidden; }
.art-meta > div { padding: 12px 16px; }
.art-meta dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.art-meta dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.kw { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kw li { background: var(--p-soft); color: var(--p); border-radius: 999px; padding: 5px 14px; font-size: .9rem; font-weight: 500; }

/* ---------- Forms ---------- */
.form label { display: block; font-weight: 600; margin-bottom: 16px; font-size: .95rem; }
.form input[type="text"], .form input[type="email"], .form input[type="password"], .form input[type="number"], .form input[type="date"], .form input:not([type]), .form select, .form textarea {
  display: block; width: 100%; margin-top: 6px; min-height: 46px; padding: 10px 14px; font: 400 1rem var(--font); color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); transition: border-color .15s;
}
.form textarea { resize: vertical; line-height: 1.55; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--p); outline: 3px solid var(--p-soft); outline-offset: 0; }
.form [aria-invalid="true"] { border-color: var(--err-ink) !important; }
.form input[type="file"] { display: block; width: 100%; margin: 6px 0 10px; min-height: 46px; font: inherit; padding: 8px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.form input[type="file"]::file-selector-button { min-height: 36px; margin-right: 12px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--p); color: var(--p-ink); font: 600 .9rem var(--font); cursor: pointer; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 6px; margin: 0 0 20px; min-width: 0; background: var(--card); }
.form legend { font-weight: 700; padding: 0 8px; font-family: var(--font-head); }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; min-height: 44px; }
.form .check input { width: 22px; height: 22px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--p); }
.form-grid { gap: 0 18px; }
.span-2 { grid-column: 1 / -1; }
.hint { color: var(--muted); font-weight: 400; font-size: .88rem; }
.req { color: var(--err-ink); }
.field-error { color: var(--err-ink); font-weight: 600; font-size: .9rem; margin: 6px 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.file-field { margin-bottom: 16px; }
.file-field > label { margin-bottom: 4px; }
.file-kept { background: var(--ok-bg); color: var(--ok-ink); border: 1px solid var(--ok-line); border-radius: var(--radius-sm); padding: 10px 14px; margin: 6px 0; font-weight: 400; overflow-wrap: anywhere; }
.form-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px 10px; }
@media (max-width: 600px) { .form-section { padding: 20px 14px 6px; margin-left: -4px; margin-right: -4px; } }
.author-rows { display: grid; gap: 12px; margin-bottom: 12px; }
.author-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 12px; align-items: end; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.author-row label { margin: 0; }
.author-no { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 46px; font-weight: 700; color: var(--p); background: var(--p-soft); border-radius: var(--radius-sm); }
@media (max-width: 700px) {
  .author-row { grid-template-columns: 36px minmax(0, 1fr); }
  .author-row label { grid-column: 2; }
  .author-row .btn { grid-column: 2; justify-self: start; }
}
.alert { border: 1px solid; border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; overflow-wrap: anywhere; }
.alert-ok { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-line); }
.alert-error { background: var(--err-bg); color: var(--err-ink); border-color: var(--err-line); }
.alert-warn { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }
.alert a { color: inherit; font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: var(--p-strong); color: rgba(255,255,255,.78); padding-top: 44px; font-size: .94rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 24px; }
.f-title { color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; }
.f-links { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 16px; }
.f-links a { display: inline-flex; align-items: center; min-height: 44px; }
.f-bottom { border-top: 1px solid rgba(255,255,255,.14); padding-top: 16px; padding-bottom: 20px; font-size: .85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- Installer / login ---------- */
body.install { background: linear-gradient(160deg, var(--p-soft), var(--surface) 60%); min-height: 100vh; }
.install-box { max-width: 560px; margin: 6vh auto; padding: 32px 28px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
@media (max-width: 600px) { .install-box { margin: 0; border-radius: 0; border: 0; min-height: 100vh; padding: 28px 18px; } }
.login-box img { border-radius: 14px; }

/* ---------- Admin ---------- */
body.admin { background: var(--surface); }
.admin-top { background: var(--p-strong); color: #fff; }
.admin-top-in { display: flex; align-items: center; gap: 12px; padding: 6px 16px; min-height: 60px; flex-wrap: wrap; }
.admin-brand { color: #fff; font-family: var(--font-head); font-weight: 800; text-decoration: none; font-size: 1.08rem; margin-right: auto; }
.admin-top .menu-btn { background: rgba(255,255,255,.12); color: #fff; }
.admin-user { color: rgba(255,255,255,.75); font-size: .88rem; }
.admin-site { color: #fff; display: inline-flex; align-items: center; min-height: 44px; }
.admin-wrap { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 60px); }
.admin-nav { background: var(--card); border-right: 1px solid var(--line); }
.admin-nav ul { list-style: none; margin: 0; padding: 14px 10px; display: block; }
.admin-nav a, .admin-nav .linkbtn { display: flex; align-items: center; min-height: 44px; padding: 0 14px; color: var(--ink); border-radius: var(--radius-sm); font-weight: 600; font-size: .95rem; text-decoration: none; }
.admin-nav a:hover, .admin-nav .linkbtn:hover { background: var(--surface); color: var(--p); }
.admin-nav a[aria-current="page"] { background: var(--p-soft); color: var(--p); }
.admin-nav form { margin: 0; }
.admin-main { padding: 28px; min-width: 0; }
.admin-main > .card, .admin-main form.card, .admin-main .grid { margin-bottom: 18px; }
@media (max-width: 900px) {
  .admin-wrap { grid-template-columns: minmax(0, 1fr); }
  .admin-user { display: none; }
  .js .admin-nav { display: none; }
  .js .admin-nav.open { display: block; }
  .admin-nav { border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-top .menu-btn { display: inline-flex; }
  .admin-main { padding: 20px 16px; }
}
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 16px; }
.inline-form label { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0; }
.inline-form select { min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font: inherit; max-width: 100%; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 20px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl th, .tbl td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl th { background: var(--surface); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.tbl tr.muted td { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.actions form { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.row-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 10px; }
.row-form label { margin: 0; font-weight: 600; font-size: .88rem; }
.row-form input, .row-form select { display: block; margin-top: 4px; min-height: 44px; padding: 6px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font: 400 1rem var(--font); max-width: 100%; }
.row-form .grow { flex: 1 1 260px; }
.row-form .grow input { width: 100%; }
.row-form .short input { width: 90px; }
.row-form .check { display: flex; align-items: center; gap: 6px; min-height: 44px; }
.rf-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.rf-name { align-self: center; }
.narrow { max-width: 560px; }
.dash-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.dash-n { font-size: 2.1rem; font-weight: 800; font-family: var(--font-head); color: var(--p); line-height: 1.1; }
.dash-l { font-weight: 600; }
.temp-pass { font-size: 1.1rem; user-select: all; }
.msg-new { border-left: 4px solid var(--a); }
.msg-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.sub-authors { padding-left: 1.3em; }
.thumb { display: block; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 6px 0; object-fit: contain; background: #fff; }
.thumb-cover { object-fit: cover; }
.is-ph { border-style: dashed !important; background: var(--warn-bg) !important; }

/* Colour scheme picker (admin settings) */
.scheme-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 700px) { .scheme-picker { grid-template-columns: 1fr; } }
.scheme-opt { position: relative; display: flex !important; flex-direction: column; gap: 10px; margin: 0 !important; padding: 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; background: var(--bg); }
.scheme-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.scheme-opt:has(input:checked) { border-color: var(--p); outline: 3px solid var(--p-soft); }
.scheme-opt:has(input:focus-visible) { outline: 3px solid var(--focus); }
.swatches { display: flex; gap: 6px; }
.swatches i { display: block; width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(0,0,0,.08); }
.scheme-name { font-weight: 700; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .art-card:hover, .issue-card:hover, .dash-card:hover { transform: translateY(-2px); }
}
@media print { .topbar, .site-nav, .menu-btn, .sidebar, .site-footer, .theme-toggle, .header-cta { display: none !important; } .layout { display: block; } .banner { color: #000; background: none; } .banner h1 { color: #000; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Layout picker thumbnails (admin) */
.layout-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .layout-picker { grid-template-columns: 1fr; } }
.layout-thumb { display: grid; gap: 4px; height: 74px; padding: 6px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.layout-thumb i { display: block; border-radius: 3px; background: var(--line-strong); }
.layout-thumb-publisher { grid-template-columns: 2fr 1fr; grid-template-rows: 10px 8px 1fr; }
.layout-thumb-publisher i:nth-child(1) { grid-column: 1 / -1; background: var(--p-strong); }
.layout-thumb-publisher i:nth-child(2) { grid-column: 1 / -1; background: var(--p-soft); }
.layout-thumb-publisher i:nth-child(3) { background: repeating-linear-gradient(var(--line-strong) 0 5px, transparent 5px 10px); }
.layout-thumb-modern { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 26px 1fr; }
.layout-thumb-modern i:nth-child(1) { grid-column: 1 / -1; background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); }
.issue-thumb { width: 60px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); margin-bottom: 8px; }
.issue-head { display: flex; gap: 22px; align-items: center; margin-bottom: 20px; }
.issue-head-cover { width: 120px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); flex-shrink: 0; }
@media (max-width: 520px) { .issue-head-cover { width: 84px; } }
