/* Ellanour CMS: the black, white and cherry of the magazine. The --accent... names are also what the Compass stylesheet uses. */
:root { --gold:#a8101c; --ink:#141013; --cream:#fff; --accent:#a8101c; --accent-hover:#870b15; --text:#141013; --text-muted:#625a60; --card-bg:#fff; --stat-bg:#eef0f2; --card-border:#d9d6d8; --bg:#f4f5f6; --danger:#a62b20; --ok:#1d7a4f; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; overflow-x: hidden; }
a { color: var(--accent); }
[hidden] { display: none !important; }
h1 { font: 400 30px/1.2 "Bodoni MT", Didot, Georgia, serif; margin: 0; }
h2 { font: 400 20px/1.3 Georgia, serif; margin: 0 0 12px; }
h3 { font-size: 15px; }
.muted, small { color: var(--text-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; padding: 0; }
.top { background: #141013; color: #f6f2f4; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 20px; flex-wrap: wrap; border-bottom: 3px solid var(--gold); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #f6f2f4; }
.brand b { display: block; letter-spacing: 6px; font: 600 21px "Bodoni MT", Didot, Georgia, serif; color: #fff; }
.brand small { color: #cfc7cc; letter-spacing: 1px; }
.sb-wrap { display: inline-flex; width: 40px; height: 40px; background: #fff; border-radius: 50%; }
.top-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.who { color: #f6f2f4; text-decoration: none; line-height: 1.2; }
.who small { display: block; color: #b7adb3; font-size: 11px; }
.top .btn.ghost { color: #f6f2f4; border-color: #6d646a; }
.lang-toggle { display: inline-flex; position: relative; width: 105px; border-radius: 20px; overflow: visible; }
.lang-toggle a { box-sizing: border-box; flex: 1; min-width: 48px; text-align: center; padding: 4px 0; font-weight: 700; font-size: 12px; color: #fff; text-decoration: none; opacity: .75; }
.lang-toggle a.pt { background: #046a38; border-radius: 20px 0 0 20px; padding-right: 5px; }
.lang-toggle a.en { background: #b3151f; border-radius: 0 20px 20px 0; padding-left: 5px; }
.lang-toggle a.on { opacity: 1; box-shadow: 0 0 0 2px #ffd35c; position: relative; z-index: 1; }
.lang-toggle::after { content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; transform: translate(-50%,-50%); border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3c4, #d9a520 65%, #8a6210); z-index: 2; pointer-events: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; background: #241d22; padding: 8px 20px; }
.nav a { color: #ece6ea; text-decoration: none; padding: 7px 13px; border-radius: 18px; }
.nav a:hover { background: #3a3036; }
.nav a.on { background: var(--gold); color: #ffffff; font-weight: 700; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 22px 20px 120px; }
.foot { text-align: center; color: var(--text-muted); padding: 0 16px 28px; font-size: 12px; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; padding: 18px; margin: 0 0 16px; min-width: 0; }
.narrow { max-width: 460px; margin-inline: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--accent); background: #fff; color: var(--accent); border-radius: 22px; padding: 8px 16px; font: 600 13px/1.2 inherit; font-family: inherit; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--stat-bg); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #ffffff; }
.btn.primary:hover { background: #870b15; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.ghost { background: transparent; border-color: var(--card-border); color: var(--text-muted); }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.wide { width: 100%; padding: 11px; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; }
label { display: block; font-weight: 600; margin: 0 0 14px; }
input, select, textarea { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid #bfbabd; border-radius: 8px; font: 400 14px inherit; font-family: inherit; background: #fff; color: var(--text); }
input:focus-visible, select:focus-visible, textarea:focus-visible, .wys-area:focus-visible, .btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
input[type=checkbox] { display: inline-block; width: auto; margin: 0; }
.check { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; margin: 0 16px 10px 0; }
.check.small { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
fieldset { border: 1px solid var(--card-border); border-radius: 8px; margin: 0 0 14px; padding: 10px 14px 0; }
.count { display: block; text-align: right; font-weight: 400; margin-top: 2px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 14px; }
.inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.inline label { margin: 0; flex: 1 1 190px; }
.inline label.check { flex: 0 1 auto; max-width: 100%; margin-bottom: 9px; }
.check input[type=checkbox] { flex: 0 0 auto; }
.inline select { width: auto; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 12px; }
.actions label.btn { margin: 0; }
.flash { padding: 11px 16px; border-radius: 10px; margin: 0 0 16px; border: 1px solid; overflow-wrap: anywhere; }
.flash.ok { background: #e9f6ef; border-color: #a9d8bf; color: #14573a; }
.flash.err { background: #fbeceb; border-color: #e8b2ad; color: #7d1f17; }
.flash.warn { background: #fff5df; border-color: #ecd08a; color: #6d4c07; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 12px; background: #ece7dc; color: #4c4638; }
.badge.live { background: #dcf1e6; color: #14573a; }
.badge.review, .badge.changed { background: #ffedc2; color: #6d4c07; }
.badge.scheduled { background: #dfe9fb; color: #1e468c; }
.badge.returned { background: #f9dedb; color: #7d1f17; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.filters input[type=search] { width: auto; flex: 1 1 150px; max-width: 260px; margin: 0; }
.chip { padding: 7px 14px; border-radius: 20px; background: #fff; border: 1px solid var(--card-border); color: var(--text); text-decoration: none; }
.chip.on { background: #141013; color: #fff; border-color: #141013; }
.row-item { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--card-border); border-radius: 12px; padding: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.thumb { width: 60px; height: 75px; border-radius: 8px; overflow: hidden; background: var(--stat-bg); flex: 0 0 auto; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.ri-main { flex: 1 1 240px; min-width: 0; }
.ri-title { display: block; font: 400 18px/1.3 Georgia, serif; color: var(--text); text-decoration: none; margin: 2px 0 6px; }
.cat { text-transform: uppercase; letter-spacing: 1px; color: var(--accent); }
.ri-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pager { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.pager > div { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pager a { min-width: 30px; text-align: center; padding: 4px 9px; border: 1px solid var(--card-border); border-radius: 16px; text-decoration: none; background: #fff; }
.pager a.on { background: var(--gold); border-color: var(--gold); color: #ffffff; font-weight: 700; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.side { position: sticky; top: 12px; min-width: 0; max-height: calc(100vh - 24px); overflow: auto; }
summary { cursor: pointer; font-weight: 700; }
details[open] > summary { margin-bottom: 14px; }
.hist ul { padding-left: 18px; font-size: 12px; }
.review { border-top: 1px solid var(--card-border); padding-top: 12px; margin-bottom: 12px; }
.field { border-top: 1px solid var(--card-border); padding: 12px 0; }
.field-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.field-h code { font-size: 11px; color: var(--text-muted); }
.lbl { display: block; font-weight: 600; margin-bottom: 4px; }
.wys { border: 1px solid #bfbabd; border-radius: 8px; overflow: hidden; margin: 4px 0 12px; }
.wys-bar { display: flex; flex-wrap: wrap; gap: 2px; background: var(--stat-bg); padding: 5px; }
.wys-bar button { min-width: 32px; height: 30px; border: 1px solid transparent; background: transparent; border-radius: 6px; cursor: pointer; }
.wys-bar button:hover { background: #fff; border-color: var(--card-border); }
.wys-area { min-height: 180px; max-height: 480px; overflow: auto; padding: 12px; background: #fff; overflow-wrap: anywhere; }
.focal-box { position: relative; display: inline-block; max-width: 100%; margin-bottom: 4px; }
.focal-box img { display: block; max-width: 100%; max-height: 320px; cursor: crosshair; border-radius: 8px; }
.focal-dot { position: absolute; width: 22px; height: 22px; border: 3px solid #fff; border-radius: 50%; background: rgba(168,16,28,.85); box-shadow: 0 0 0 2px #000a; transform: translate(-50%,-50%); pointer-events: none; }
.focal small { display: block; margin-bottom: 10px; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; max-height: 300px; overflow: auto; margin-top: 10px; }
.picker button { padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; }
.picker button:hover { border-color: var(--gold); }
.picker img { width: 100%; display: block; border-radius: 6px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.gallery figure { margin: 0; padding: 12px; }
.gallery img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 8px; }
.gallery figcaption { display: flex; flex-direction: column; margin: 8px 0; overflow-wrap: anywhere; }
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border-bottom: 1px solid var(--card-border); text-align: left; padding: 8px; vertical-align: top; }
th { background: var(--stat-bg); }
td code { overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stats .card b { display: block; font: 400 24px Georgia, serif; }
.reveal code, #pvt { font-size: 16px; background: var(--stat-bg); padding: 6px 10px; border-radius: 6px; overflow-wrap: anywhere; }
.size-row { display: grid; grid-template-columns: minmax(140px, 1fr) 130px 130px; gap: 12px; align-items: center; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { text-decoration: none; border: 1px solid var(--card-border); border-radius: 18px; padding: 5px 12px; background: var(--stat-bg); }
.doc { scroll-margin-top: 12px; overflow-wrap: anywhere; }
pre { background: #241d22; color: #f3eef1; border-radius: 8px; padding: 14px; overflow-x: auto; font-size: 12px; max-height: 460px; overflow-wrap: normal; }
.workbar { position: fixed; top: 0; left: 0; right: 0; z-index: 2000; display: flex; align-items: center; gap: 14px; background: #141013; color: #f6f2f4; padding: 9px 16px; border-bottom: 2px solid var(--gold); box-shadow: 0 6px 18px #0005; }
.workbar > span:first-child { display: inline-flex; width: 40px; height: 40px; background: #fff; border-radius: 50%; flex: 0 0 auto; }
.wb-mid { flex: 1; min-width: 0; }
.wb-dots i { display: inline-block; width: 5px; height: 5px; margin-left: 4px; border-radius: 50%; background: var(--gold); animation: wbdot .9s infinite alternate; }
.wb-dots i:nth-child(2) { animation-delay: .15s; } .wb-dots i:nth-child(3) { animation-delay: .3s; }
.wb-track { height: 9px; background: #ffffff22; border-radius: 6px; overflow: hidden; margin-top: 5px; }
.wb-fill { height: 100%; width: 35%; border-radius: 6px; background: repeating-linear-gradient(45deg, #a8101c 0 10px, #e0606a 10px 20px); background-size: 28px 28px; box-shadow: 0 0 12px #e0606a; animation: wbstripe .9s linear infinite, wbbeam 1.4s ease-in-out infinite alternate; }
.wb-fill.known { animation: wbstripe .9s linear infinite; }
.workbar .btn.ghost { color: #f6f2f4; border-color: #6d646a; }
@keyframes wbstripe { to { background-position: 28px 0; } }
@keyframes wbbeam { from { transform: translateX(0); } to { transform: translateX(185%); } }
@keyframes wbdot { to { opacity: .2; transform: translateY(-2px); } }
#back-to-top { position: fixed; right: 24px; bottom: 78px; z-index: 55; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold); background: #241d22; color: var(--gold); font-size: 20px; cursor: pointer; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
#back-to-top.visible { opacity: 1; visibility: visible; }
@media (max-width: 900px) { .editor { grid-template-columns: minmax(0, 1fr); } .side { position: static; max-height: none; } }
@media (max-width: 600px) {
  .wrap { padding: 16px 16px 130px; } .top, .nav { padding-inline: 16px; } .nav a { padding: 6px 10px; font-size: 13px; }
  .size-row { grid-template-columns: 1fr 1fr; } .size-row span { grid-column: 1 / -1; font-weight: 700; }
  #back-to-top { right: 16px; }
}

/* ---------- Ellanour additions ---------- */
.av-wrap, .wb-av { display: inline-flex; width: 42px; height: 42px; background: #fff; border-radius: 50%; flex: 0 0 auto; }
.workbar > span.wb-av { background: #fff; }
.head-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.inline-form label { margin: 0; }
.badge.missing { background: #e8e3f7; color: #43327f; }
.cat { text-transform: none; letter-spacing: 0; font-weight: 700; }
.login { max-width: 420px; margin: 30px auto; text-align: center; }
.login label { text-align: left; }
.login-alma { position: relative; display: flex; justify-content: center; margin-bottom: 10px; }
.login-av { display: inline-flex; width: 110px; height: 110px; border-radius: 50%; }
.alma-bub { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%); width: min(320px, 86vw); line-height: 1.45; text-align: center; background: #241d22; color: #fff; border: 1px solid #e0606a; border-radius: 12px; padding: 10px 13px; font-size: 12.5px; opacity: 0; visibility: hidden; transition: opacity .2s; z-index: 5; }
.alma-bub > * { display: block; } .alma-bub > * + * { margin-top: 6px; } .alma-bub b { color: #ffb9bf; font-size: 14px; }
.alma-bub::before { content: ''; position: absolute; top: -7px; left: 50%; width: 12px; height: 12px; background: #241d22; border-left: 1px solid #e0606a; border-top: 1px solid #e0606a; transform: translateX(-50%) rotate(45deg); }
.login-av:hover + .alma-bub, .login-av:focus + .alma-bub { opacity: 1; visibility: visible; }
fieldset.bi { padding: 8px 14px 0; min-width: 0; }
fieldset.bi legend { font-weight: 600; padding: 0 6px; }
.bi-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.bi-col { min-width: 0; margin-bottom: 12px; }
.bi-col input, .bi-col textarea { margin-top: 3px; }
.lang-tag { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 10px; color: #fff; background: #046a38; }
.lang-tag.en { background: #b3151f; }
.fgroup { margin-bottom: 16px; }
.refs ol { list-style: none; margin: 0 0 8px; padding: 0; }
.refs li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--card-border); border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; }
.li-tools { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.block { border: 1px solid var(--card-border); border-left: 4px solid var(--accent); border-radius: 10px; padding: 12px; margin-bottom: 12px; min-width: 0; }
.block-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.block-add .lbl { width: 100%; }
.focal-box img { max-height: 420px; }
.mark { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 2px solid #fff; background: #a8101c; color: #fff; font: 700 12px/22px sans-serif; text-align: center; pointer-events: none; box-shadow: 0 0 0 1px #0008; }
.points { list-style: none; margin: 8px 0 0; padding: 0; }
.point { border: 1px dashed var(--card-border); border-radius: 10px; padding: 10px; margin-bottom: 10px; }
.point-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.point-no { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #a8101c; color: #fff; font-size: 12px; }
@media (max-width: 760px) { .bi-cols { grid-template-columns: minmax(0, 1fr); } }
