/* Journal admin panel */
:root {
  --a-bg: #f4f5fb; --a-surface: #fff; --a-ink: #1c1f2e; --a-muted: #636a7e; --a-line: #e4e6f0;
  --a-side: #1e1b4b; --a-side-ink: #c9cbea; --a-primary: #4f46e5; --a-primary-d: #4338ca; --a-primary-l: #eef0ff;
  --a-danger: #d92d20; --a-danger-l: #fef0ef; --a-ok: #12805c; --a-ok-l: #e3f7ee; --a-warn: #985f00; --a-warn-l: #fff4d9;
  --a-radius: 10px;
  --c-sky: #0ea5e9; --c-violet: #8b5cf6; --c-pink: #ec4899; --c-amber: #f59e0b; --c-teal: #14b8a6; --c-green: #22c55e; --c-orange: #f97316; --c-indigo: #6366f1;
  --a-shadow: 0 1px 2px rgba(20,22,60,.04), 0 6px 20px rgba(20,22,60,.05);
  --a-shadow-h: 0 2px 4px rgba(20,22,60,.05), 0 14px 32px rgba(20,22,60,.10);
  --a-ease: cubic-bezier(.2,.7,.2,1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--a-bg); color: var(--a-ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a:where(:not(.gs *)) { color: var(--a-primary); }
:focus-visible { outline: 3px solid #f0b429; outline-offset: 1px; }
code:where(:not(.gs *)) { font-size: .88em; background: #eef0f3; padding: .1em .35em; border-radius: 3px; }
h2:where(:not(.gs *)) { font-size: 1.05rem; margin: 0 0 .9rem; }
hr:where(:not(.gs *)) { border: 0; border-top: 1px solid var(--a-line); margin: .4rem 0; }
.muted { color: var(--a-muted); }
.hint:where(:not(.gs *)) { color: var(--a-muted); font-size: .85rem; margin: .35rem 0 0; }
.nowrap { white-space: nowrap; }
.empty { color: var(--a-muted); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.js-only { display: none !important; }
.has-js .js-only { display: inline-flex !important; }

/* Shell */
.adm { display: flex; min-height: 100vh; }
.adm-side { position: fixed; inset: 0 auto 0 0; width: 266px; background: var(--a-side); color: var(--a-side-ink); display: flex; flex-direction: column; overflow-y: auto; z-index: 50; }
.adm-side-head { display: flex; align-items: flex-start; justify-content: space-between; }
.adm-brand { display: block; padding: 1.3rem 1.2rem 1rem; text-decoration: none; min-width: 0; }
.adm-close { display: none; margin: .9rem .8rem 0 0; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; background: transparent; color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.adm-journal { display: block; color: #fff; font-weight: 700; font-size: 1rem; line-height: 1.25; }
.adm-sub { display: block; color: #8b96a5; font-size: .8rem; margin-top: .15rem; }
.adm-actions { display: flex; flex-direction: column; gap: .45rem; margin: .3rem 1rem .9rem; }
.adm-publish { display: block; padding: .65rem .8rem; background: var(--a-primary); color: #fff; text-align: center; font-weight: 600; border-radius: var(--a-radius); text-decoration: none; }
.adm-publish:hover { background: #2660ad; color: #fff; }
.adm-nav { display: flex; flex-direction: column; padding: 0 .6rem; flex: 1; }
.adm-nav a:where(:not(.gs *)) { display: flex; justify-content: space-between; align-items: center; padding: .48rem .7rem; border-radius: 5px; color: var(--a-side-ink); text-decoration: none; font-size: .92rem; }
.adm-nav a:hover:where(:not(.gs *)) { background: rgba(255,255,255,.06); color: #fff; }
.adm-nav a.is-active:where(:not(.gs *)) { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 3px 0 0 #6ea8fe; }
.nav-badge { font-size: .72rem; background: rgba(255,255,255,.12); padding: .05rem .45rem; border-radius: 999px; }
.adm-group { margin: .5rem 0 0; }
.adm-group > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .7rem .35rem; border-radius: 5px; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: #8b96a5; font-weight: 700; cursor: pointer; user-select: none; }
.adm-group > summary::-webkit-details-marker { display: none; }
.adm-group > summary::after { content: ""; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; margin-right: .2rem; }
.adm-group[open] > summary::after { transform: rotate(45deg); }
.adm-group > summary:hover { color: #fff; background: rgba(255,255,255,.04); }
.adm-group-links { display: flex; flex-direction: column; padding-bottom: .3rem; }
.adm-side-foot { padding: 1rem 1.3rem 1.3rem; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; }
.adm-side-foot a:where(:not(.gs *)), .linklike { color: var(--a-side-ink); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.adm-main { margin-left: 266px; flex: 1; min-width: 0; padding: 0 2rem 3rem; }
.adm-top { display: flex; align-items: center; gap: 1rem; padding: 1.4rem 0 1.1rem; }
.adm-top h1 { margin: 0; font-size: 1.45rem; }
.adm-menu-btn { display: none; }
.adm-overlay { display: none; }
.adm-content { max-width: 1240px; }

/* Flash */
.flash { padding: .75rem 1rem; border-radius: var(--a-radius); margin-bottom: 1rem; border: 1px solid; max-width: 1240px; overflow-wrap: anywhere; }
.flash-success { background: var(--a-ok-l); border-color: #b6dfc6; color: #134e2e; }
.flash-error { background: var(--a-danger-l); border-color: #f4c7c2; color: #7a1a12; }
.flash-info { background: var(--a-primary-l); border-color: #c5d6ef; color: #173b67; }

/* Cards and grids */
.card { background: var(--a-surface); border: 1px solid var(--a-line); border-radius: var(--a-radius); padding: 1.2rem 1.3rem; }
.card.flush { padding: 0; }
.card.has-error { border-color: #e9a59d; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.card-head h2:where(:not(.gs *)) { margin: 0; }
.empty-card { text-align: center; padding: 2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-2.tight { gap: .8rem; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.grid-2 + .card, .card + .card, .grid-2-1 + .card { margin-top: 1.2rem; }
.grid-2 + .vol-card { margin-top: 1.2rem; }
.vol-card + .vol-card { margin-top: 1rem; }
.stack > .card + .card, .stack > section + section { margin-top: 0; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; margin-bottom: 1rem; }
.narrow-card { max-width: 520px; }

/* Forms */
.field:where(:not(.gs *)) { display: flex; flex-direction: column; gap: .3rem; margin: 0 0 .9rem; min-width: 0; }
.field > span:where(:not(.gs *)), .field > label:where(:not(.gs *)), .field > legend:where(:not(.gs *)) { font-weight: 600; font-size: .88rem; }
.field small:where(:not(.gs *)) { font-weight: 400; color: var(--a-muted); margin-left: .25rem; }
.field.narrow:where(:not(.gs *)) { max-width: 360px; }
fieldset.field:where(:not(.gs *)) { border: 0; padding: 0; }
input[type=text]:where(:not(.gs *)), input[type=email]:where(:not(.gs *)), input[type=password]:where(:not(.gs *)), input[type=number]:where(:not(.gs *)), input[type=date]:where(:not(.gs *)), input[type=search]:where(:not(.gs *)), select:where(:not(.gs *)), textarea:where(:not(.gs *)) {
  width: 100%; padding: .55rem .65rem; font: inherit; color: var(--a-ink); background: #fff; border: 1px solid #c9ced6; border-radius: 5px;
}
input:focus:where(:not(.gs *)), select:focus:where(:not(.gs *)), textarea:focus:where(:not(.gs *)) { border-color: var(--a-primary); outline: 2px solid var(--a-primary-l); }
input[type=file]:where(:not(.gs *)) { font: inherit; font-size: .88rem; }
textarea:where(:not(.gs *)) { resize: vertical; }
.has-error input:where(:not(.gs *)), .has-error select:where(:not(.gs *)), .has-error .rte-area { border-color: var(--a-danger); }
.field-error { color: var(--a-danger); font-size: .85rem; margin: .1rem 0 0; font-weight: 500; }
.check:where(:not(.gs *)) { display: flex; align-items: flex-start; gap: .5rem; font-size: .92rem; margin: .2rem 0; cursor: pointer; }
.check > input:where(:not(.gs *)) { width: auto; margin: .22rem 0 0; flex-shrink: 0; }
.check.check-wrap:where(:not(.gs *)) { flex-wrap: wrap; align-items: center; }
.check.check-wrap > input:where(:not(.gs *)) { margin-top: 0; }
.check-inline { align-self: end; margin-bottom: 1.3rem; }
.tiny-input { width: 4.5rem !important; padding: .25rem .4rem !important; }

/* Buttons */
.btn:where(:not(.gs *)) { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1rem; font-family: inherit; font-size: .9rem; font-weight: 600; line-height: 1.2; border: 1px solid transparent; border-radius: 5px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--a-primary); color: #fff; }
.btn-primary:hover { background: var(--a-primary-d); color: #fff; }
.btn-ghost { background: #fff; border-color: #c9ced6; color: var(--a-ink); }
.btn-ghost:hover { border-color: var(--a-primary); color: var(--a-primary); }
.btn-danger { background: #fff; border-color: #eab1aa; color: var(--a-danger); }
.btn-danger:hover { background: var(--a-danger); border-color: var(--a-danger); color: #fff; }
.btn-sm { padding: .3rem .65rem; font-size: .82rem; }
.btn-block { width: 100%; }
.icon-btn { background: #fff; border: 1px solid #c9ced6; border-radius: 4px; width: 28px; height: 28px; font-size: .7rem; cursor: pointer; color: var(--a-muted); }
.icon-btn:hover { border-color: var(--a-primary); color: var(--a-primary); }
.icon-btn.danger:hover:where(:not(.gs *)) { border-color: var(--a-danger); color: var(--a-danger); }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.row-actions form { margin: 0; }

/* Badges */
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #eceef1; color: var(--a-muted); }
.badge-published { background: var(--a-ok-l); color: var(--a-ok); }
.badge-unpublished { background: var(--a-warn-l); color: var(--a-warn); }

/* Dashboard */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .9rem; margin-bottom: 1.2rem; }
.stat:where(:not(.gs *)) { display: flex; flex-direction: column; padding: 1rem 1.2rem; background: #fff; border: 1px solid var(--a-line); border-radius: var(--a-radius); text-decoration: none; color: var(--a-ink); }
a.stat:hover:where(:not(.gs *)) { border-color: var(--a-primary); }
.stat strong:where(:not(.gs *)) { font-size: 1.6rem; line-height: 1.2; }
.stat span:where(:not(.gs *)) { color: var(--a-muted); font-size: .85rem; }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li { padding: .65rem 0; border-top: 1px solid var(--a-line); display: flex; flex-direction: column; gap: .2rem; }
.recent-list li:first-child { border-top: 0; }
.recent-title { font-weight: 600; text-decoration: none; color: var(--a-ink); }
.recent-title:hover { color: var(--a-primary); text-decoration: underline; }
.recent-meta { font-size: .83rem; color: var(--a-muted); display: flex; gap: .6rem; align-items: center; }
.big-line { font-size: 1.15rem; font-weight: 700; margin: 0; }

/* Article form */
.article-status-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 1rem; padding: .7rem 1rem; background: #fff; border: 1px solid var(--a-line); border-radius: var(--a-radius); }
.mono-link { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84rem; overflow-wrap: anywhere; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem; align-items: start; }
.form-side { position: sticky; top: 1rem; }
.form-actions { display: flex; flex-direction: column; gap: .5rem; }
.authors { counter-reset: author; display: flex; flex-direction: column; gap: .8rem; margin-bottom: .9rem; }
.author-row { counter-increment: author; border: 1px solid var(--a-line); border-radius: var(--a-radius); padding: .8rem 1rem .2rem; background: #fafbfc; }
.author-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.author-num::before { content: "Author " counter(author); font-weight: 700; font-size: .88rem; }
.row-tools { display: flex; gap: .3rem; }
.current-file { display: flex; justify-content: space-between; gap: .6rem; padding: .6rem .7rem; background: var(--a-primary-l); border-radius: 5px; margin-bottom: .8rem; font-size: .88rem; overflow-wrap: anywhere; }
.danger-zone { margin-top: 1.6rem; padding: 1rem 1.2rem; border: 1px solid #f0c4be; background: #fff; border-radius: var(--a-radius); display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.danger-zone p { margin: 0; }

/* Rich text editor */
.rte textarea:where(:not(.gs *)) { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border: 1px solid #c9ced6; border-bottom: 0; border-radius: 5px 5px 0 0; background: #f6f7f9; }
.rte-bar button { min-width: 30px; height: 28px; padding: 0 .45rem; border: 1px solid transparent; border-radius: 4px; background: none; font-family: inherit; font-size: .82rem; font-weight: 500; line-height: 1; color: var(--a-ink); cursor: pointer; }
.rte-bar button:hover { background: #fff; border-color: #c9ced6; }
.rte-bar button.is-on { background: var(--a-primary-l); border-color: #b9cbe6; color: var(--a-primary); }
.rte-bar .sep { width: 1px; margin: 3px 4px; background: #d5d9df; }
.rte-area { min-height: 160px; max-height: 520px; overflow-y: auto; padding: .7rem .8rem; border: 1px solid #c9ced6; border-radius: 0 0 5px 5px; background: #fff; line-height: 1.6; }
.rte-area:focus { outline: 2px solid var(--a-primary-l); border-color: var(--a-primary); }
.rte[data-mode=title] .rte-area { min-height: 0; font-size: 1.05rem; font-weight: 600; }
.rte[data-mode=inline] .rte-area { min-height: 200px; }
.rte-area p { margin: 0 0 .7em; }
.rte-area h2:where(:not(.gs *)) { font-size: 1.2rem; margin: .8em 0 .4em; }
.rte-area h3 { font-size: 1.05rem; margin: .8em 0 .4em; }
.rte-area img { max-width: 100%; height: auto; }
.rte-area blockquote { margin: .5em 0; padding-left: .8em; border-left: 3px solid #c9ced6; color: var(--a-muted); }
.rte.source-mode textarea:where(:not(.gs *)) { border-radius: 0 0 5px 5px; }

/* Tabs, filters, tables */
.tabs:where(:not(.gs *)) { display: flex; gap: .3rem; border-bottom: 1px solid var(--a-line); margin-bottom: 1rem; }
.tab:where(:not(.gs *)) { white-space: nowrap; padding: .6rem 1rem; text-decoration: none; color: var(--a-muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab:hover:where(:not(.gs *)) { color: var(--a-ink); }
.tab.is-active:where(:not(.gs *)) { color: var(--a-primary); border-bottom-color: var(--a-primary); }
.tab-count { font-size: .78rem; background: #eceef1; padding: .05rem .45rem; border-radius: 999px; margin-left: .25rem; color: var(--a-muted); }
.filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; margin-bottom: .8rem; }
.filter-bar .field:where(:not(.gs *)) { margin: 0; min-width: 200px; }
.filter-bar .grow { flex: 1; }
.result-line { margin: 0 0 .8rem; font-size: .9rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .8rem; color: var(--a-muted); font-weight: 600; padding: .65rem .9rem; border-bottom: 1px solid var(--a-line); background: #fafbfc; }
.table td { padding: .75rem .9rem; border-bottom: 1px solid var(--a-line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.paper-cell { min-width: 280px; }
.paper-title { display: block; font-weight: 600; color: var(--a-ink); text-decoration: none; }
.paper-title:hover { color: var(--a-primary); text-decoration: underline; }
.paper-authors { display: block; color: var(--a-muted); font-size: .83rem; margin-top: .15rem; }
.paper-flags { display: flex; gap: .3rem; margin-top: .3rem; }
.flag { font-size: .7rem; padding: 0 .4rem; border-radius: 3px; background: var(--a-warn-l); color: var(--a-warn); }
.actions-col { width: 1%; }
.pagination ul { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.pagination a:where(:not(.gs *)), .pagination span { display: block; padding: .3rem .7rem; border: 1px solid var(--a-line); border-radius: 4px; background: #fff; text-decoration: none; }
.pagination [aria-current] { background: var(--a-primary); color: #fff; border-color: var(--a-primary); }
.pagination .gap { border: 0; background: none; }

/* Volumes and issues */
.issue-rows { display: flex; flex-direction: column; }
.issue-row { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: .6rem 1rem; padding: .75rem 0; border-top: 1px solid var(--a-line); }
.issue-row-main { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; }
.issue-count { font-size: .83rem; color: var(--a-muted); }
details.inline-edit { position: relative; }
details.inline-edit > summary { list-style: none; }
details.inline-edit > summary::-webkit-details-marker { display: none; }
.inline-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 300px; padding: 1rem; background: #fff; border: 1px solid var(--a-line); border-radius: var(--a-radius); box-shadow: 0 14px 30px rgba(16,24,40,.14); }
.inline-form.wide { width: 380px; }
.inline-form .field:where(:not(.gs *)) { margin-bottom: .7rem; }

/* Menu builder */
.menu-rows { display: flex; flex-direction: column; }
.menu-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; padding: .65rem .2rem; border-top: 1px solid var(--a-line); }
.menu-row:first-child { border-top: 0; }
.menu-row-main { display: flex; flex-direction: column; min-width: 0; }
.menu-row-main .muted { font-size: .83rem; overflow-wrap: anywhere; }
.menu-row.is-child { padding-left: 1.8rem; border-left: 3px solid var(--a-primary-l); margin-left: .6rem; }
.menu-row.is-dropdown .menu-row-main strong::after { content: " (dropdown)"; font-weight: 400; color: var(--a-muted); font-size: .85rem; }
.menu-empty-dropdown { margin: 0 0 .4rem 2.4rem; font-size: .82rem; }

/* Theme picker */
.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .9rem; margin-top: .9rem; }
.layout-card, .scheme-card { position: relative; display: flex; flex-direction: column; gap: .35rem; padding: .8rem; border: 2px solid var(--a-line); border-radius: 8px; cursor: pointer; background: #fff; }
.layout-card:hover, .scheme-card:hover { border-color: #9fb6d8; }
.layout-card input:where(:not(.gs *)), .scheme-card input:where(:not(.gs *)) { position: absolute; opacity: 0; }
.layout-card:has(input:checked), .scheme-card:has(input:checked) { border-color: var(--a-primary); box-shadow: 0 0 0 3px var(--a-primary-l); }
.layout-card:has(input:focus-visible), .scheme-card:has(input:focus-visible) { outline: 3px solid #f0b429; }
.layout-name { font-weight: 700; }
.layout-desc { font-size: .82rem; color: var(--a-muted); }
.lp { position: relative; display: grid; height: 110px; gap: 4px; padding: 6px; background: #eef0f3; border-radius: 5px; }
.lp i { display: block; background: #fff; border-radius: 2px; }
.lp-classic { grid-template: 26px 9px 1fr 10px / 1fr 30%; }
.lp-classic .lp-a { grid-column: 1 / -1; background: #1f3a5f; }
.lp-classic .lp-b { grid-column: 1 / -1; background: #c8d0db; }
.lp-classic .lp-e { grid-column: 1 / -1; background: #14263f; }
.lp-rail { grid-template: 1fr 1fr 10px / 28% 1fr 26%; }
.lp-rail .lp-a { grid-row: 1 / -1; background: #14263f; }
.lp-rail .lp-b { grid-row: 1 / 3; }
.lp-rail .lp-c { grid-row: 1 / 3; border-top: 3px solid #b8862b; }
.lp-rail .lp-d { display: none; }
.lp-rail .lp-e { grid-column: 2 / -1; background: #dde1e6; }
.lp-modern { grid-template: 10px 34px 1fr 10px / 1fr 30%; background: #fff; border: 1px solid #e3e6ea; }
.lp-modern .lp-a { grid-column: 1 / -1; background: #e3e6ea; }
.lp-modern .lp-b { grid-column: 1 / -1; background: #3b3b8f; border-radius: 4px; }
.lp-modern .lp-c { background: #f1f2f4; border-radius: 4px; }
.lp-modern .lp-d { background: #f1f2f4; border-radius: 4px; }
.lp-modern .lp-e { grid-column: 1 / -1; background: #28286a; }
.lp-editorial { grid-template: 24px 7px 1fr 8px / 28% 1fr; background: #fff; border: 1px solid #e3e6ea; }
.lp-editorial .lp-a { grid-column: 1 / -1; background: none; border-bottom: 3px double #7a1e2c; position: relative; }
.lp-editorial .lp-a::after { content: ""; position: absolute; left: 30%; right: 30%; top: 7px; height: 7px; background: #55131e; }
.lp-editorial .lp-b { grid-column: 1 / -1; background: none; border-bottom: 1px solid #7a1e2c; }
.lp-editorial .lp-c { background: #f4f4f4; border-right: 1px solid #ddd; }
.lp-editorial .lp-d { background: #f9f9f9; }
.lp-editorial .lp-e { grid-column: 1 / -1; background: none; border-top: 3px double #7a1e2c; }
.lp-portal { grid-template: 6px 20px 9px 1fr 10px / 30% 1fr; padding: 6px 14px; background-color: #e9f0e8; background-image: radial-gradient(rgba(0,0,0,.12) 1px, transparent 1px); background-size: 6px 6px; }
.lp-portal .lp-a { grid-column: 1 / -1; background: #1f3822; }
.lp-portal .lp-b { grid-column: 1 / -1; }
.lp-portal .lp-c { grid-column: 1 / -1; background: #2f5233; }
.lp-portal .lp-d { background: #f3f4f3; border-top: 4px solid #2f5233; }
.lp-portal .lp-e { background: #fff; }
.scheme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .7rem; }
.scheme-card { flex-direction: row; align-items: center; gap: .7rem; padding: .6rem .8rem; font-size: .9rem; }
.swatch { display: flex; flex-shrink: 0; }
.swatch i { width: 22px; height: 30px; display: block; }
.swatch i:first-child { border-radius: 4px 0 0 4px; width: 30px; }
.swatch i:last-child { border-radius: 0 4px 4px 0; }

/* Sidebar, media, misc */
.switch-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.widget-card.is-hidden { opacity: .7; }
.widget-preview { max-height: 220px; overflow: auto; padding: .7rem .9rem; background: #fafbfc; border: 1px dashed var(--a-line); border-radius: 5px; font-size: .9rem; margin-bottom: .8rem; }
.widget-preview img { max-width: 100%; height: auto; }
.widget-preview p { margin: 0 0 .5em; }
details.block-edit > summary { list-style: none; display: inline-flex; }
details.block-edit > summary::-webkit-details-marker { display: none; }
details.block-edit[open] > summary { margin-bottom: 1rem; }
.img-preview { padding: .6rem; background: #f2f3f5 repeating-conic-gradient(#e7e9ec 0% 25%, transparent 0% 50%) 50% / 16px 16px; border-radius: 5px; margin-bottom: .4rem; }
.img-preview img { display: block; max-height: 90px; max-width: 100%; }
.img-preview.small img:where(:not(.gs *)) { max-height: 48px; }
.upload-card { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; }
.upload-card .field:where(:not(.gs *)) { margin: 0; flex: 1; }
.media-grid { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .9rem; }
.media-item { padding: .7rem; display: flex; flex-direction: column; gap: .3rem; }
.media-thumb { display: grid; place-items: center; height: 130px; background: #f2f3f5 repeating-conic-gradient(#e7e9ec 0% 25%, transparent 0% 50%) 50% / 16px 16px; border-radius: 4px; overflow: hidden; }
.media-thumb img { max-width: 100%; max-height: 130px; }
.media-name { margin: 0; font-size: .85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-meta { margin: 0; font-size: .78rem; }
.index-state { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem; border-radius: 5px; margin-bottom: 1rem; }
.index-state.is-off { background: var(--a-ok-l); color: #134e2e; }
.index-state.is-on { background: var(--a-warn-l); color: #5c3c00; }
.plain-list { margin: 0; padding-left: 1.2rem; }
.plain-list li { margin-bottom: .4rem; }

/* Dashboard checklist, edit-page numbers, upload warnings */
.setup-card { margin-bottom: 1.2rem; border-left: 4px solid var(--a-primary); }
.setup-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .4rem 1.5rem; counter-reset: step; }
.setup-list li { counter-increment: step; display: flex; align-items: center; gap: .6rem; padding: .3rem 0; }
.setup-list li::before { content: counter(step); flex-shrink: 0; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid var(--a-primary); color: var(--a-primary); font-size: .78rem; font-weight: 700; }
.setup-list li.is-done::before { content: "✓"; background: var(--a-ok); border-color: var(--a-ok); color: #fff; }
.setup-list li.is-done span { color: var(--a-muted); text-decoration: line-through; }
.setup-list a:where(:not(.gs *)) { font-weight: 600; }
.status-stats { margin-left: auto; font-size: .85rem; color: var(--a-muted); display: flex; gap: .3rem 1rem; flex-wrap: wrap; }
.status-stats strong { color: var(--a-ink); margin-right: .2rem; }
.file-warning { color: var(--a-danger); font-size: .85rem; font-weight: 500; margin: .3rem 0 0; }
.note-box { padding: .8rem 1rem; background: var(--a-primary-l); border-radius: 5px; font-size: .88rem; color: #173b67; }
.note-box p { margin: 0 0 .4rem; }
.note-box p:last-child { margin: 0; }

/* Import from OJS */
.has-js .no-js-only { display: none; }
.mt { margin-top: 1.4rem; }
.stepper { list-style: none; margin: 0 0 1.2rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; counter-reset: st; }
.stepper li { counter-increment: st; display: flex; align-items: center; gap: .45rem; padding: .35rem .8rem .35rem .4rem; border-radius: 999px; background: #fff; border: 1px solid var(--a-line); font-size: .85rem; color: var(--a-muted); }
.stepper li::before { content: counter(st); display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: #eceef1; font-weight: 700; font-size: .75rem; }
.stepper li.is-current { border-color: var(--a-primary); color: var(--a-primary); font-weight: 600; }
.stepper li.is-current::before { background: var(--a-primary); color: #fff; }
.stepper li.is-done::before { content: "✓"; background: var(--a-ok); color: #fff; }
.manual-fields { margin-top: .8rem; }
.encoding-card { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; margin-top: 1.2rem; }
.encoding-card > div { flex: 1 1 260px; }
.encoding-card .field:where(:not(.gs *)) { margin: 0; min-width: 220px; }
.sample-list { display: flex; flex-direction: column; gap: .9rem; }
.sample { padding: .9rem 1rem; border: 1px solid var(--a-line); border-radius: var(--a-radius); background: #fafbfc; }
.sample h3 { margin: .2rem 0 .4rem; font-size: 1rem; }
.sample p { margin: .25rem 0; font-size: .88rem; }
.sample-meta { display: flex; flex-wrap: wrap; gap: .2rem 1rem; color: var(--a-muted); font-size: .8rem !important; }
.sample-abstract { color: #3d434b; }
.sample-pdf { display: inline-block; padding: .15rem .5rem; border-radius: 4px; font-weight: 600; }
.sample-pdf.is-ok { background: var(--a-ok-l); color: var(--a-ok); }
.sample-pdf.is-missing { background: var(--a-warn-l); color: var(--a-warn); }
.progress:where(:not(.gs *)) { height: 14px; background: #eceef1; border-radius: 7px; overflow: hidden; margin: .4rem 0 .6rem; }
.progress i:where(:not(.gs *)) { display: block; height: 100%; background: var(--a-primary); border-radius: 7px; transition: width .4s ease; }
.import-status { margin: 0 0 .8rem; color: var(--a-muted); font-size: .9rem; }
.log-list { list-style: none; margin: .4rem 0 0; padding: 0; max-height: 260px; overflow-y: auto; font-size: .85rem; border: 1px solid var(--a-line); border-radius: 5px; }
.log-list.tall { max-height: 520px; }
.log-list li { padding: .45rem .7rem; border-bottom: 1px solid var(--a-line); overflow-wrap: anywhere; }
.log-list li:last-child { border-bottom: 0; }
.log-list .log-error { background: var(--a-danger-l); }
.log-list .log-warning { background: #fffbf0; }
.log-list .log-none { color: var(--a-muted); }

/* Sign-in and setup */
.bare-card:has(.setup-checks) { max-width: 560px; }
.setup-checks { margin: 0 0 1.2rem; border: 1px solid var(--a-line); border-radius: 6px; padding: .6rem .8rem; font-size: .9rem; }
.setup-checks summary { cursor: pointer; font-weight: 600; }
.check-list.compact { margin: .7rem 0 .2rem; gap: .35rem; }
.check-list.compact .check-item { padding: .5rem .7rem; gap: .7rem; }
.check-list.compact .check-item p { font-size: .82rem; overflow-wrap: anywhere; }
.check-list.compact .check-state { width: 3.4rem; }
.bare-card .hint code:where(:not(.gs *)) { overflow-wrap: anywhere; }
.bare-logo { display: block; max-height: 64px; max-width: 220px; margin-bottom: 1rem; }
body.bare { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; background: #e9ecf0; }
.bare-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--a-line); border-radius: 10px; padding: 2rem; box-shadow: 0 20px 50px rgba(16,24,40,.08); }
.bare-journal { margin: 0; color: var(--a-muted); font-size: .9rem; }
.bare-card h1 { margin: .2rem 0 1.2rem; font-size: 1.4rem; }
.bare-card .field:where(:not(.gs *)) { margin: 0; }

/* Backups, country access, security */
.field-label { font-weight: 600; font-size: .88rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem 1.4rem; margin: 0 0 1rem; }
.facts dt { font-size: .8rem; color: var(--a-muted); }
.facts dd { margin: .1rem 0 0; font-weight: 600; }
.input-suffix { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
.input-suffix input:where(:not(.gs *)) { width: 6rem; }
.geo-filter { margin-bottom: .5rem; }
.country-box { max-height: 330px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px; padding: .4rem; border: 1px solid #c9ced6; border-radius: 5px; background: #fff; }
.country-box.is-disabled { opacity: .45; }
.country-item { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border-radius: 4px; font-size: .88rem; cursor: pointer; }
.country-item:hover { background: #f3f5f8; }
.country-item.is-on { background: var(--a-primary-l); font-weight: 600; }
.country-item input:where(:not(.gs *)) { width: auto; margin: 0; }
.country-item .cc { margin-left: auto; color: var(--a-muted); font-size: .72rem; font-weight: 400; }
.bar-col { width: 32%; }
.bar { display: block; height: 8px; background: #eceef1; border-radius: 4px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: var(--a-primary); }
.check-list { list-style: none; margin: 1.2rem 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.check-item { display: flex; gap: 1rem; align-items: flex-start; padding: .8rem 1rem; background: #fff; border: 1px solid var(--a-line); border-left-width: 4px; border-radius: var(--a-radius); }
.check-item p { margin: .2rem 0 0; color: var(--a-muted); font-size: .9rem; }
.check-state { flex-shrink: 0; width: 4.6rem; font-size: .75rem; font-weight: 700; padding: .15rem .4rem; border-radius: 4px; text-align: center; }
.check-item.is-ok { border-left-color: var(--a-ok); } .is-ok .check-state { background: var(--a-ok-l); color: var(--a-ok); }
.check-item.is-warn { border-left-color: #c08a00; } .is-warn .check-state { background: var(--a-warn-l); color: var(--a-warn); }
.check-item.is-fail { border-left-color: var(--a-danger); } .is-fail .check-state { background: var(--a-danger-l); color: var(--a-danger); }
.check-item.is-tip { border-left-color: #6ea8fe; } .is-tip .check-state { background: var(--a-primary-l); color: var(--a-primary); }

@media (pointer: coarse) {
  .btn-sm { padding: .5rem .8rem; }
  .icon-btn { width: 38px; height: 38px; }
  .adm-nav a:where(:not(.gs *)) { padding: .65rem .7rem; }
}

/* Small screens */
@media (max-width: 1100px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-side { position: static; }
  .grid-2-1 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .adm-side { transform: translateX(-100%); transition: transform .2s ease; }
  .side-open .adm-side { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .side-open .adm-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; }
  .adm-main { margin-left: 0; padding: 0 1rem 2rem; }
  .adm-menu-btn { display: inline-flex; padding: .4rem .7rem; border: 1px solid #c9ced6; background: #fff; border-radius: 5px; font: inherit; font-weight: 600; cursor: pointer; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .inline-form, .inline-form.wide { position: static; width: 100%; margin-top: .5rem; box-shadow: none; }
  .adm-top { position: sticky; top: 0; z-index: 30; background: var(--a-bg); padding: .8rem 0; }
  .adm-top h1 { font-size: 1.2rem; }
  .card { padding: 1rem; }
  .filter-bar .field:where(:not(.gs *)) { min-width: 0; width: 100%; }
  .switch-card, .danger-zone { flex-direction: column; align-items: stretch; }
  .tabs:where(:not(.gs *)) { overflow-x: auto; }
}
@media (max-width: 680px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: .8rem 1rem; border-bottom: 1px solid var(--a-line); }
  .table-stack tr:last-child { border-bottom: 0; }
  .table-stack td { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; border: 0; text-align: right; }
  .table-stack td[data-label]::before { content: attr(data-label); color: var(--a-muted); font-size: .8rem; text-align: left; }
  .table-stack td.paper-cell, .table-stack td.actions-col { display: block; text-align: left; }
  .table-stack td.actions-col { padding-top: .6rem; }
  .table-stack .bar-col { display: none; }
  .paper-cell { min-width: 0; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat strong:where(:not(.gs *)) { font-size: 1.3rem; }
}

/* Modules */
.adm-publish.alt { background: transparent; border: 1px solid rgba(255,255,255,.28); font-weight: 500; }
.adm-publish.alt:hover, .adm-publish.alt.is-active { background: rgba(255,255,255,.1); }
.adm-publish.is-active:not(.alt) { box-shadow: inset 0 0 0 2px #6ea8fe; }
.tool-card { display: grid; gap: .5rem; }
.tool-card .btn:where(:not(.gs *)) { justify-self: start; }
.cert-preview { border: 1px solid var(--a-line, #dfe2e7); border-radius: 6px; max-width: 100%; }

/* Pro */
.pro-tag { display: inline-block; margin-left: .4rem; padding: .02rem .4rem; border-radius: 4px; font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle;
  background: linear-gradient(135deg, #f6d48a, #d9a43b); color: #3d2a00; }
.adm-nav .pro-tag, .adm-publish .pro-tag { margin-left: .5rem; }
.pro-notice { display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: baseline; margin: 0 0 1rem; padding: .75rem 1rem; border: 1px solid #ecd28f; border-left: 4px solid #d9a43b; border-radius: var(--a-radius); background: #fff9ea; color: #4d3800; max-width: 1240px; }
.pro-notice a { font-weight: 600; }
.pro-mark { display: inline-grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; font-weight: 800; font-size: 1.15rem; background: linear-gradient(135deg, #f6d48a, #d9a43b); color: #3d2a00; }
.pro-status.is-on .pro-mark { background: var(--a-ok-l); color: var(--a-ok); }
.pro-status-head { display: flex; gap: 1rem; align-items: flex-start; }
.pro-status-head h2 { margin: .2rem 0 .3rem; font-size: 1.2rem; }
.pro-status-head p { margin: 0; }
.pro-status.is-on { border-left: 4px solid var(--a-ok); }
.pro-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem 1.2rem; margin: 1.1rem 0; }
.pro-facts dt { font-size: .78rem; color: var(--a-muted); }
.pro-facts dd { margin: .1rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
.pro-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pro-features li { display: flex; gap: .8rem; align-items: flex-start; padding: .75rem 0; border-top: 1px solid var(--a-line); }
.pro-features li:first-child { border-top: 0; padding-top: 0; }
.pro-features p { margin: .15rem 0 0; font-size: .86rem; color: var(--a-muted); }
.pro-features a { color: var(--a-ink); text-decoration: none; }
.pro-features a:hover { color: var(--a-primary); text-decoration: underline; }
.pro-state { flex-shrink: 0; width: 5.2rem; text-align: center; font-size: .72rem; font-weight: 700; padding: .15rem .3rem; border-radius: 4px; }
.pro-state.is-on { background: var(--a-ok-l); color: var(--a-ok); }
.pro-state.is-off { background: #f1ebdd; color: #6b5413; }
.pro-locked-card { max-width: 720px; display: grid; gap: .7rem; justify-items: start; padding: 2rem; }
.pro-locked-card h2 { font-size: 1.35rem; margin: .2rem 0 0; }
.pro-locked-card .lead { margin: 0; font-size: 1.02rem; }
.mono-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; font-size: .84rem !important; word-break: break-all; }
.remove-key { margin-top: .8rem; }
.remove-key ul { margin: 0; padding-left: 1.2rem; }

/* Disabled settings (Pro locked) */
.plain-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset[disabled] { opacity: .62; }
fieldset[disabled] .layout-card, fieldset[disabled] .scheme-card, fieldset[disabled] .cert-theme { cursor: not-allowed; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Certificate designs */
.cert-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.cert-theme { position: relative; display: flex; flex-direction: column; gap: .3rem; padding: .7rem; border: 2px solid var(--a-line); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cert-theme:hover { border-color: #9fb6d8; }
.cert-theme input { position: absolute; opacity: 0; }
.cert-theme.is-chosen, .cert-theme:has(input:checked) { border-color: var(--a-primary); box-shadow: 0 0 0 3px var(--a-primary-l); }
.cert-theme:has(input:focus-visible) { outline: 3px solid #f0b429; }
.cert-thumb { display: block; aspect-ratio: 842 / 595; border-radius: 4px; overflow: hidden; background: #f3f4f6; box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.cert-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cert-theme-name { font-weight: 700; margin-top: .3rem; }
.cert-theme-desc { font-size: .82rem; color: var(--a-muted); }
.cert-theme-sample { font-size: .82rem; align-self: flex-start; }
.color-row { display: flex; gap: .5rem; align-items: center; }
.color-row input[type=color] { width: 44px; height: 38px; padding: 2px; border: 1px solid #c9ced6; border-radius: 5px; background: #fff; flex-shrink: 0; cursor: pointer; }
.sticky-actions { margin-top: .4rem; }

/* Wide pages (Galley Studio) */
.adm-wide .adm-content { max-width: none; }
.adm-wide .flash, .adm-wide .pro-notice { max-width: none; }

/* Header, skip link */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; padding: .6rem 1rem; background: #fff; color: var(--a-primary); font-weight: 600; }
.skip-link:focus { left: .5rem; top: .5rem; }
.adm-top h1 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.adm-top-site { font-size: .88rem; white-space: nowrap; }
.burger { display: inline-block; width: 16px; height: 2px; background: currentColor; position: relative; margin-right: .5rem; vertical-align: middle; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; }
.burger::before { top: -5px; } .burger::after { top: 5px; }
@media (max-width: 860px) {
  .adm-close { display: block; }
  .adm-side { width: min(300px, 86vw); }
  .adm-top { gap: .7rem; padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .adm-top-site { display: none; }
  .adm-menu-btn { align-items: center; }
  .pro-locked-card { padding: 1.3rem; }
}
@media (max-width: 520px) {
  .adm-main { padding: 0 .75rem 2rem; }
  .card { padding: .9rem; }
  .row-actions .btn, .pro-locked-card .btn { flex: 1 1 auto; }
  .cert-themes { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .cert-theme { padding: .45rem; }
  .cert-theme-desc { display: none; }
}
.adm-content .linklike { color: var(--a-primary); }
.grid-2-1 > .card + .card, .grid-2 > .card + .card, .grid-2-1 > .stack + .card { margin-top: 0; }
code:where(:not(.gs *)) { overflow-wrap: anywhere; }
.copy-line { display: inline-block; margin-top: .3rem; line-height: 1.6; }
.steps-list { margin: .4rem 0 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: .6rem; }
.legacy-test { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.legacy-test .field { flex: 1 1 320px; margin: 0; }
.legacy-card h3 { margin: 1.2rem 0 .2rem; font-size: 1rem; }

/* Dashboard quick actions */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem; margin-bottom: 1.2rem; }
.qa { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.2rem; background: #fff; border: 1px solid var(--a-line); border-radius: var(--a-radius); text-decoration: none; color: var(--a-ink); transition: border-color .15s, box-shadow .15s; }
.qa:hover { border-color: var(--a-primary); box-shadow: 0 4px 14px rgba(16,24,40,.07); color: var(--a-ink); }
.qa strong { font-size: 1rem; }
.qa > span { font-size: .85rem; color: var(--a-muted); }
.qa .pro-tag { color: #3d2a00; font-size: .62rem; }
.qa-main { background: var(--a-primary); border-color: var(--a-primary); color: #fff; }
.qa-main:hover { background: var(--a-primary-d); color: #fff; }
.qa-main > span { color: #d6e2f3; }
@media (max-width: 520px) { .quick-actions { grid-template-columns: 1fr 1fr; gap: .6rem; } .qa { padding: .8rem; } .qa > span { display: none; } }
.setup-pro { border: 1px dashed #d9c27c; border-radius: var(--a-radius); padding: .6rem .9rem; background: #fffcf2; }
.setup-pro > summary { cursor: pointer; font-weight: 600; }
.setup-pro[open] > summary { margin-bottom: .6rem; }
@media (max-width: 520px) { .btn:where(:not(.gs *)) { white-space: normal; text-align: center; } summary.btn { text-align: left; } }
/* one-line rich fields (author names and affiliations) */
.rte[data-mode=line] .rte-area { min-height: 0; padding: .45rem .65rem; line-height: 1.45; }
.rte[data-mode=line] .rte-bar { padding: 2px 3px; }
.rte[data-mode=line] .rte-bar button { height: 24px; min-width: 26px; font-size: .78rem; }
.rte[data-mode=line] textarea:where(:not(.gs *)) { font-family: inherit; font-size: inherit; }

/* =====================================================================
   Version 7 look: colour, icons, depth and motion
   ===================================================================== */
body { background: radial-gradient(1200px 500px at 80% -200px, #e6e8ff 0%, rgba(230,232,255,0) 70%), var(--a-bg); background-attachment: fixed; }
.ico { width: 18px; height: 18px; flex-shrink: 0; }
.js-only-block { display: none; }
.has-js .js-only-block { display: flex; }

/* sidebar */
.adm-side { background: linear-gradient(180deg, #1e1b4b 0%, #25205c 48%, #2d1b5a 100%); box-shadow: inset -1px 0 0 rgba(255,255,255,.06); scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.adm-brand { display: flex; align-items: center; gap: .75rem; padding: 1.15rem 1.1rem .95rem; }
.adm-mono { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; font-weight: 800; font-size: 1.15rem; color: #fff;
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #f472b6 100%); box-shadow: 0 6px 16px rgba(129,140,248,.35); }
.adm-brand-text { min-width: 0; }
.adm-journal { overflow-wrap: anywhere; }
.adm-sub { color: #a5a8d4; }
.adm-edition { display: inline-block; padding: 0 .4rem; border-radius: 999px; background: rgba(255,255,255,.1); color: #dfe0f7; font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.adm-edition.is-pro { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #3d2a00; }
.adm-close { display: none; place-items: center; }
.adm-close .ico { width: 18px; height: 18px; }
.adm-actions { gap: .5rem; margin: .2rem .9rem .8rem; }
.adm-publish { display: flex; align-items: center; justify-content: flex-start; gap: .55rem; padding: .68rem .8rem; border-radius: 10px; font-size: .89rem; white-space: nowrap;
  transition: transform .18s var(--a-ease), box-shadow .18s var(--a-ease), background-color .18s, border-color .18s; }
.adm-publish .ico { width: 18px; height: 18px; }
.adm-studio { background: linear-gradient(135deg, #ec4899 0%, #f43f5e 45%, #f97316 100%); box-shadow: 0 8px 20px rgba(236,72,153,.32); }
.adm-studio:hover { background: linear-gradient(135deg, #f15aa6 0%, #f75270 45%, #fb8a3c 100%); transform: translateY(-1px); box-shadow: 0 12px 26px rgba(236,72,153,.42); }
.adm-studio.is-active { box-shadow: 0 0 0 2px #fff inset, 0 8px 20px rgba(236,72,153,.32); }
.adm-studio .pro-tag { background: rgba(255,255,255,.92); color: #9d174d; }
.adm-publish.alt { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); font-weight: 600; color: #e7e8fb; }
.adm-publish.alt:hover, .adm-publish.alt.is-active { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.28); color: #fff; transform: translateY(-1px); }
.adm-publish.is-active:not(.alt):not(.adm-studio) { box-shadow: inset 0 0 0 2px #a5b4fc; }
.adm-find { position: relative; align-items: center; margin: 0 .9rem .6rem; }
.adm-find .ico { position: absolute; left: .65rem; width: 16px; height: 16px; color: #9ea2d6; pointer-events: none; }
.adm-find input:where(:not(.gs *)) { width: 100%; padding: .5rem .7rem .5rem 2.1rem; font: inherit; font-size: .88rem; color: #fff; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 9px; transition: background-color .15s, border-color .15s; }
.adm-find input::placeholder { color: #9ea2d6; }
.adm-find input:focus:where(:not(.gs *)) { outline: none; background: rgba(255,255,255,.12); border-color: rgba(165,180,252,.7); }
.adm-find-none { margin: .6rem .8rem; font-size: .85rem; color: #a5a8d4; }
.adm-nav { padding: 0 .6rem .6rem; --g: #a5b4fc; }
.adm-group[data-group=publishing] { --g: #38bdf8; }
.adm-group[data-group=website] { --g: #c4b5fd; }
.adm-group[data-group=account] { --g: #fcd34d; }
.adm-nav a:where(:not(.gs *)) { justify-content: flex-start; gap: .65rem; padding: .5rem .7rem; border-radius: 9px; transition: background-color .15s, color .15s, transform .15s var(--a-ease); }
.adm-nav a .ico { color: var(--g); opacity: .9; width: 18px; height: 18px; transition: transform .2s var(--a-ease); }
.adm-nav a .nav-label { flex: 1; min-width: 0; }
.adm-nav a:hover:where(:not(.gs *)) { background: rgba(255,255,255,.07); transform: translateX(2px); }
.adm-nav a:hover .ico { transform: scale(1.08); }
.adm-nav a.is-active:where(:not(.gs *)) { background: linear-gradient(90deg, rgba(255,255,255,.16), rgba(255,255,255,.05)); box-shadow: inset 3px 0 0 var(--g); color: #fff; font-weight: 600; }
.adm-nav a.is-active .ico { opacity: 1; }
.nav-badge { background: rgba(255,255,255,.12); color: #e9eaff; }
.adm-group { margin: .35rem 0 0; }
.adm-group > summary { justify-content: flex-start; gap: .6rem; padding: .55rem .7rem; font-size: .76rem; color: #b8bbe2; border-radius: 9px; transition: background-color .15s, color .15s; }
.adm-group > summary > span { flex: 1; }
.adm-group > summary .ico-group { width: 26px; height: 26px; padding: 5px; border-radius: 8px; color: var(--g); background: rgba(255,255,255,.07); }
.adm-group[open] > summary { color: #fff; }
.adm-group[open] > summary .ico-group { background: rgba(255,255,255,.14); background: color-mix(in srgb, var(--g) 22%, transparent); }
.adm-group-links { overflow: hidden; padding: .15rem 0 .35rem .35rem; margin-left: .55rem; border-left: 1px solid rgba(255,255,255,.08); }
.adm-side-foot { align-items: center; }
.adm-side-foot a:where(:not(.gs *)), .adm-side-foot .linklike { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; color: #c9cbea; }
.adm-side-foot a:hover:where(:not(.gs *)), .adm-side-foot .linklike:hover { color: #fff; }
.adm-side-foot .ico { width: 16px; height: 16px; }

/* top bar */
.adm-top { gap: .8rem; }
.adm-top-ico { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, var(--c-indigo), var(--c-violet)); box-shadow: 0 6px 16px rgba(99,102,241,.3); }
.adm-top-ico .ico { width: 20px; height: 20px; }
.adm-top h1 { font-size: 1.5rem; letter-spacing: -.01em; }
.adm-top-site { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: 9px; background: #fff; border: 1px solid var(--a-line); text-decoration: none; font-weight: 600; box-shadow: var(--a-shadow); transition: box-shadow .15s, transform .15s var(--a-ease); }
.adm-top-site:hover { box-shadow: var(--a-shadow-h); transform: translateY(-1px); }
.adm-top-site .ico { width: 16px; height: 16px; }
.adm-menu-btn .ico { width: 18px; height: 18px; margin-right: .35rem; }

/* page entrance */
@keyframes adm-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.adm-content { animation: adm-in .32s var(--a-ease) both; }

/* flashes */
.flash { position: relative; border-radius: 12px; border-width: 1px 1px 1px 4px; box-shadow: var(--a-shadow); animation: adm-in .3s var(--a-ease) both; }
.flash-success { border-color: #a7e3c8 #a7e3c8 #a7e3c8 #12a36e; }
.flash-error { border-color: #f6c5c0 #f6c5c0 #f6c5c0 var(--a-danger); }
.flash-info { border-color: #cfd3ff #cfd3ff #cfd3ff var(--a-primary); color: #2e2a8a; }
.flash.has-close { padding-right: 2.8rem; }
.flash-close { position: absolute; right: .55rem; top: .55rem; width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: inherit; opacity: .6; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.flash-close:hover { opacity: 1; background: rgba(0,0,0,.06); }
.flash.is-leaving { opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .25s; }

/* cards */
.card { border-color: #eaecf4; border-radius: 14px; box-shadow: var(--a-shadow); }
.card-head h2:where(:not(.gs *)), .card > h2:where(:not(.gs *)) { font-size: 1.08rem; letter-spacing: -.005em; }
.vol-card { border-radius: 14px; }

/* buttons */
.btn:where(:not(.gs *)) { border-radius: 9px; transition: background-color .15s, border-color .15s, color .15s, box-shadow .18s var(--a-ease), transform .18s var(--a-ease); }
.btn-primary { background: linear-gradient(135deg, #6366f1, #7c3aed); box-shadow: 0 4px 12px rgba(99,102,241,.28); }
.btn-primary:hover { background: linear-gradient(135deg, #5458ea, #6d28d9); box-shadow: 0 8px 18px rgba(99,102,241,.36); transform: translateY(-1px); }
.btn-primary:active, .btn-ghost:active, .btn-danger:active { transform: translateY(0); }
.btn-ghost { border-color: #d6d9e6; box-shadow: 0 1px 2px rgba(20,22,60,.04); }
.btn-ghost:hover { background: var(--a-primary-l); border-color: #b9bdfb; color: var(--a-primary-d); }
.btn-danger { border-color: #f3b8b2; }
.icon-btn { border-radius: 7px; transition: border-color .15s, color .15s, background-color .15s; }

/* inputs */
input[type=text]:where(:not(.gs *)), input[type=email]:where(:not(.gs *)), input[type=password]:where(:not(.gs *)), input[type=number]:where(:not(.gs *)), input[type=date]:where(:not(.gs *)), input[type=search]:where(:not(.adm-find *, .gs *)), select:where(:not(.gs *)), textarea:where(:not(.gs *)), .rte-area {
  border-color: #d3d7e4; border-radius: 9px; transition: border-color .15s, box-shadow .15s; }
input:focus:where(:not(.adm-find *, .gs *)), select:focus:where(:not(.gs *)), textarea:focus:where(:not(.gs *)), .rte-area:focus { outline: none; border-color: #818cf8; box-shadow: 0 0 0 4px rgba(99,102,241,.14); }
.rte-bar { border-color: #d3d7e4; border-radius: 9px 9px 0 0; background: #f7f7fd; }
.rte-area { border-radius: 0 0 9px 9px; }
.rte-bar button.is-on { background: var(--a-primary-l); border-color: #c7caff; }

/* badges, tabs, tables */
.badge { padding: .12rem .55rem; }
.badge-published { background: #dcfce7; color: #166534; }
.badge-unpublished { background: #fef3c7; color: #92400e; }
.tab.is-active:where(:not(.gs *)) { color: var(--a-primary); border-bottom-color: var(--a-primary); }
.tab-count { background: var(--a-primary-l); color: var(--a-primary-d); }
.table th { background: #f8f8fd; color: #5b6178; text-transform: uppercase; letter-spacing: .04em; font-size: .72rem; }
.table tbody tr { transition: background-color .12s; }
.table tbody tr:hover { background: #fafaff; }
.card.flush { overflow: hidden; }
.pagination [aria-current] { background: linear-gradient(135deg, #6366f1, #7c3aed); border-color: transparent; }

/* dashboard */
.quick-actions { gap: 1rem; }
.qa { position: relative; gap: .3rem; padding: 1.1rem 1.2rem 1.15rem; border: 0; border-radius: 16px; color: #fff; box-shadow: var(--a-shadow); overflow: hidden;
  transition: transform .2s var(--a-ease), box-shadow .2s var(--a-ease); }
.qa::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.12); pointer-events: none; }
.qa:hover { transform: translateY(-3px); box-shadow: var(--a-shadow-h); color: #fff; }
.qa strong { font-size: 1.02rem; }
.qa > span:not(.qa-ico) { color: rgba(255,255,255,.86); }
.qa-ico { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: .45rem; border-radius: 12px; background: rgba(255,255,255,.2); }
.qa-ico .ico { width: 21px; height: 21px; }
.qa-main { background: linear-gradient(135deg, #ec4899 0%, #f43f5e 45%, #f97316 100%); }
.qa-main:hover { background: linear-gradient(135deg, #ec4899 0%, #f43f5e 45%, #f97316 100%); }
.qa-indigo { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.qa-teal { background: linear-gradient(135deg, #0d9488, #22c1a8); }
.qa-amber { background: linear-gradient(135deg, #f59e0b, #f97316); }
.qa .pro-tag { background: rgba(255,255,255,.92); color: #7c2d12; }
.stat:where(:not(.gs *)) { position: relative; padding: 1.05rem 1.2rem 1.05rem 4.4rem; min-height: 78px; justify-content: center; border-color: #eaecf4; border-radius: 14px; box-shadow: var(--a-shadow); transition: transform .2s var(--a-ease), box-shadow .2s var(--a-ease); }
a.stat:hover:where(:not(.gs *)) { transform: translateY(-2px); box-shadow: var(--a-shadow-h); border-color: #eaecf4; }
.stat-ico { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--st); background: #f1f1fb; background: color-mix(in srgb, var(--st) 14%, #fff); }
.stat-ico .ico { width: 21px; height: 21px; }
.st-green { --st: #16a34a; } .st-amber { --st: #d97706; } .st-violet { --st: #7c3aed; } .st-sky { --st: #0284c7; } .st-pink { --st: #db2777; }
.setup-card { border-left: 0; background: linear-gradient(135deg, #eef0ff, #fdf2f8); border-color: #e4e2fb; }
.setup-list li::before { border-color: var(--a-primary); color: var(--a-primary); background: #fff; }
.setup-list li.is-done::before { background: linear-gradient(135deg, #22c55e, #14b8a6); border-color: transparent; }
.recent-list li { padding: .7rem .2rem; border-radius: 8px; transition: background-color .12s; }
.recent-list li:hover { background: #fafaff; }

/* theme and certificate pickers, stepper */
.layout-card, .scheme-card, .cert-theme { border-radius: 12px; transition: border-color .15s, box-shadow .2s var(--a-ease), transform .2s var(--a-ease); }
.layout-card:hover, .scheme-card:hover, .cert-theme:hover { border-color: #b9bdfb; transform: translateY(-2px); box-shadow: var(--a-shadow-h); }
.layout-card:has(input:checked), .scheme-card:has(input:checked), .cert-theme:has(input:checked), .cert-theme.is-chosen { border-color: var(--a-primary); box-shadow: 0 0 0 4px rgba(99,102,241,.16); }
.stepper li.is-current::before, .progress i:where(:not(.gs *)) { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.check-item { border-radius: 12px; box-shadow: var(--a-shadow); }
.pro-notice { border-radius: 12px; background: linear-gradient(135deg, #fffbeb, #fff7ed); }
.pro-locked-card { background: linear-gradient(160deg, #ffffff 0%, #fbf7ff 100%); }
.note-box { border-radius: 10px; background: #f0f1ff; color: #2e2a8a; }
.author-row { border-radius: 12px; background: #fbfbfe; }
.inline-form { border-radius: 12px; }
.danger-zone { border-radius: 12px; }
.current-file { border-radius: 9px; }

/* sign-in and setup pages */
body.bare { background: radial-gradient(900px 500px at 15% 0%, #c7d2fe 0%, transparent 60%), radial-gradient(800px 500px at 100% 100%, #fbcfe8 0%, transparent 55%), linear-gradient(160deg, #eef0ff, #fdf2f8); }
.bare-card { position: relative; border: 0; border-radius: 18px; box-shadow: 0 24px 60px rgba(30,27,75,.16); overflow: hidden; animation: adm-in .35s var(--a-ease) both; }
.bare-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899, #f97316); }

/* desktop: the top bar stays in view (not on the wide Galley Studio page, which has its own bar) */
@media (min-width: 861px) {
  .adm-top { position: sticky; top: 0; z-index: 30; margin: 0 -2rem .4rem; padding: 1rem 2rem .9rem; background: rgba(244,245,251,.82); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); transition: box-shadow .2s; }
  .adm-top.is-stuck { box-shadow: 0 1px 0 var(--a-line), 0 8px 20px rgba(20,22,60,.05); }
  .adm-wide .adm-top { position: static; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
}
@media (max-width: 860px) {
  .adm-close { display: grid; }
  .adm-top-site { display: none; }
  .adm-top { background: rgba(244,245,251,.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .adm-top-ico { width: 34px; height: 34px; border-radius: 10px; }
  .adm-menu-btn { border-radius: 9px; border-color: #d3d7e4; }
  .stat:where(:not(.gs *)) { padding-left: 3.9rem; }
  .stat-ico { left: .9rem; width: 36px; height: 36px; }
}
@media (max-width: 520px) {
  .adm-top-ico { display: none; }
  .qa { padding: .9rem; border-radius: 14px; }
  .quick-actions .qa > .qa-ico { display: grid; width: 34px; height: 34px; margin-bottom: .3rem; }
  .stat:where(:not(.gs *)) { padding: .8rem .9rem .8rem 3.4rem; min-height: 64px; }
  .stat-ico { left: .7rem; width: 32px; height: 32px; border-radius: 10px; }
  .stat-ico .ico { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.adm-publish .pro-tag { margin-left: auto; }
/* installation registration */
.inst-card.is-on { border-left: 4px solid #12a36e; }
.inst-card.is-off { border-left: 4px solid var(--a-danger); }
.inst-card .card-head { margin-bottom: .2rem; }
.reg-steps { margin: 0 0 1rem; }
.reg-out { margin: .9rem 0 0; text-align: center; }
.reg-out .linklike { color: var(--a-muted); }
.inst-field textarea { min-height: 3.2rem; }

/* article addresses */
.link-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .8rem; margin: .4rem 0 .8rem; }
.link-mode { position: relative; display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; border: 2px solid var(--a-line); border-radius: 12px; cursor: pointer; transition: border-color .15s, box-shadow .2s; }
.link-mode:hover { border-color: #b9bdfb; }
.link-mode:has(input:checked) { border-color: var(--a-primary); box-shadow: 0 0 0 4px rgba(99,102,241,.14); background: #fafaff; }
.link-mode input:where(:not(.gs *)) { margin-top: .25rem; }
.link-mode span { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.link-mode code:where(:not(.gs *)) { align-self: flex-start; }
.link-mode small { color: var(--a-muted); font-size: .82rem; }

/* Upgrade to Pro (standard edition) */
.btn-upgrade { background: linear-gradient(135deg, #f6c453, #d99a1e); border-color: transparent; color: #3d2a00; font-weight: 700; box-shadow: 0 4px 12px rgba(217,154,30,.28); }
.btn-upgrade:hover { background: linear-gradient(135deg, #f2b935, #c88a12); color: #2b1d00; }
.upgrade-card { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; background: linear-gradient(120deg, #fffaf0, #fff 60%); border-color: #f3dfb0; }
.upgrade-card > div:first-of-type { flex: 1 1 320px; min-width: 0; }
.upgrade-card h2 { margin: 0 0 .2rem; }
.upgrade-card p { margin: 0; }
.upgrade-row { align-items: center; margin-top: .6rem; }
.adm-side-foot { flex-wrap: wrap; }
.adm-side-foot a.adm-upgrade { flex: 1 0 100%; justify-content: center; padding: .45rem .8rem; border-radius: 999px; font-weight: 700; color: #3d2a00; background: linear-gradient(135deg, #f6c453, #d99a1e); text-decoration: none; }
.adm-side-foot a.adm-upgrade:hover { color: #2b1d00; filter: brightness(1.05); }

