/* Origlots Publisher — site and dashboard styles */
:root {
  --navy: #12355B; --navy-2: #0c2742; --teal: #1F8A7E; --teal-2: #17695f; --gold: #F2B33D;
  --ink: #1b2430; --muted: #5b6573; --line: #dde4ec; --soft: #f4f7fa; --tint: #eef4f8; --white: #fff;
  --ok: #1e7d4f; --ok-bg: #e5f4ec; --warn: #9a6200; --warn-bg: #fdf3dd; --bad: #b3261e; --bad-bg: #fbe9e7;
  --info: #1d5fa8; --info-bg: #e7f0fb; --radius: 8px; --shadow: 0 1px 2px rgba(16,40,70,.06), 0 4px 16px rgba(16,40,70,.06);
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --jc: var(--navy); --ja: var(--teal);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--white); font-size: 15px; line-height: 1.55; }
a { color: var(--teal-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; color: var(--navy); }
h1 { font-size: 1.9rem; letter-spacing: -.01em; } h2 { font-size: 1.35rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .85rem; } .muted { color: var(--muted); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- header ---------- */
.topbar { background: var(--navy-2); color: #c9d6e2; font-size: .8rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: #e3ecf4; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); font-weight: 700; }
.brand img { height: 38px; width: auto; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { color: var(--ink); padding: 8px 12px; border-radius: 6px; font-weight: 500; }
.nav a:hover, .nav a.on { background: var(--soft); text-decoration: none; color: var(--navy); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.search-mini { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.search-mini input { border: 0; padding: 7px 12px; width: 200px; font: inherit; outline: none; }
.search-mini button { border: 0; background: var(--soft); padding: 0 12px; cursor: pointer; color: var(--muted); }

/* ---------- buttons, badges ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 6px; border: 1px solid transparent;
       background: var(--teal); color: #fff; font: 600 .92rem var(--sans); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--teal-2); text-decoration: none; }
.btn.navy { background: var(--navy); } .btn.navy:hover { background: var(--navy-2); }
.btn.gold { background: var(--gold); color: var(--navy-2); } .btn.gold:hover { background: #e3a227; }
.btn.ghost { background: var(--white); color: var(--navy); border-color: var(--line); }
.btn.ghost:hover { background: var(--soft); }
.btn.danger { background: var(--bad); } .btn.small { padding: 5px 10px; font-size: .82rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--info-bg); color: var(--info); }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); } .badge.muted { background: var(--soft); color: var(--muted); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; background: var(--tint); color: var(--navy); font-size: .78rem; margin: 0 4px 4px 0; }

/* ---------- flash ---------- */
.flashes { margin: 16px 0; }
.flash { padding: 11px 14px; border-radius: 6px; margin-bottom: 8px; background: var(--info-bg); color: var(--info); border-left: 4px solid currentColor; }
.flash.success { background: var(--ok-bg); color: var(--ok); } .flash.error { background: var(--bad-bg); color: var(--bad); }
.flash.warning { background: var(--warn-bg); color: var(--warn); }

/* ---------- hero (publisher home) ---------- */
.hero { background: linear-gradient(120deg, var(--navy-2) 0%, var(--navy) 55%, #1b5277 100%); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 480px; height: 480px; border-radius: 50%;
               background: radial-gradient(circle, rgba(31,138,126,.45), rgba(31,138,126,0) 70%); }
.hero .wrap { padding-top: 64px; padding-bottom: 64px; position: relative; z-index: 1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; font-size: 2.5rem; margin-bottom: 14px; }
.hero p.lead { font-size: 1.12rem; color: #d7e3ee; max-width: 620px; }
.hero .cta { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hero-search { display: flex; background: #fff; border-radius: 8px; overflow: hidden; margin-top: 24px; max-width: 560px; }
.hero-search input { flex: 1; border: 0; padding: 13px 16px; font: inherit; outline: none; }
.hero-search button { border: 0; background: var(--gold); color: var(--navy-2); font-weight: 700; padding: 0 20px; cursor: pointer; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero-stat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 10px; padding: 18px; }
.hero-stat b { display: block; font-size: 1.9rem; color: #fff; } .hero-stat span { color: #c9d6e2; font-size: .9rem; }
.promo { background: var(--gold); color: var(--navy-2); text-align: center; padding: 10px 16px; font-weight: 600; }

/* ---------- sections, cards ---------- */
.section { padding: 48px 0; } .section.soft { background: var(--soft); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 22px; }
.section-head h2 { margin: 0; font-size: 1.6rem; }
.grid { display: grid; gap: 20px; }
.grid.j { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.four { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .4em; }
.jcard { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
         transition: transform .12s ease, box-shadow .12s ease; color: var(--ink); }
.jcard:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(16,40,70,.12); text-decoration: none; }
.jcard img { width: 84px; height: 112px; object-fit: cover; border-radius: 4px; flex: none; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.jcard h3 { font-size: 1rem; margin: 0 0 4px; color: var(--navy); }
.jcard .subject { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--teal-2); font-weight: 700; }
.jcard p { font-size: .84rem; color: var(--muted); margin: 6px 0 0; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.filters button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; font: 500 .85rem var(--sans); color: var(--ink); }
.filters button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.features .card { border-top: 3px solid var(--teal); } .features .card h3 { font-size: 1.02rem; }

/* ---------- article lists ---------- */
.alist { list-style: none; margin: 0; padding: 0; }
.alist li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.alist .atype { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--teal-2); }
.alist .atitle { display: block; font-family: var(--serif); font-size: 1.12rem; color: var(--navy); font-weight: 600; margin: 3px 0; }
.alist .aauthors { color: var(--ink); font-size: .9rem; } .alist .ameta { color: var(--muted); font-size: .82rem; margin-top: 3px; }

/* ---------- journal header ---------- */
.jhead { background: var(--jc); color: #fff; }
.jhead .wrap { display: flex; gap: 24px; padding-top: 26px; padding-bottom: 22px; align-items: center; }
.jhead img.cover { width: 110px; height: 146px; object-fit: cover; border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.jhead h1 { color: #fff; margin: 0 0 6px; font-size: 1.85rem; }
.jhead .jmeta { color: rgba(255,255,255,.82); font-size: .88rem; display: flex; gap: 16px; flex-wrap: wrap; }
.jhead .jactions { margin-left: auto; display: flex; gap: 8px; }
.jnav { background: #fff; border-bottom: 1px solid var(--line); }
.jnav .wrap { display: flex; gap: 2px; overflow-x: auto; }
.jnav a { padding: 12px 14px; color: var(--ink); font-weight: 500; font-size: .92rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.jnav a.on, .jnav a:hover { border-bottom-color: var(--ja); color: var(--jc); text-decoration: none; }
.jlayout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; padding: 30px 0 50px; }
.side .card { margin-bottom: 18px; } .side h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fact { background: var(--soft); border-radius: 6px; padding: 10px; } .fact b { display: block; font-size: 1.25rem; color: var(--jc); } .fact span { font-size: .78rem; color: var(--muted); }
.prose { font-size: 1rem; } .prose h2 { margin-top: 1.4em; } .prose ul { padding-left: 1.2em; } .prose table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; } .prose th { background: var(--tint); }
.board-group { margin-bottom: 28px; } .board-group h2 { font-size: 1.1rem; border-bottom: 2px solid var(--ja); padding-bottom: 6px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.person { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.person .ph { width: 64px; height: 64px; border-radius: 50%; flex: none; background: var(--tint); color: var(--navy); display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; object-fit: cover; }
.person b { color: var(--navy); } .person .links a { font-size: .8rem; margin-right: 10px; } .person p { font-size: .85rem; margin: 4px 0; }

/* ---------- article page ---------- */
.article { display: grid; grid-template-columns: 220px 1fr 260px; gap: 34px; padding: 30px 0 60px; }
.toc { position: sticky; top: 90px; align-self: start; font-size: .86rem; }
.toc a { display: block; padding: 4px 0 4px 10px; color: var(--muted); border-left: 2px solid var(--line); }
.toc a:hover { color: var(--navy); border-left-color: var(--ja); text-decoration: none; }
.art-main { font-family: var(--serif); font-size: 1.04rem; line-height: 1.7; min-width: 0; }
.art-main h1 { font-family: var(--serif); font-size: 1.9rem; line-height: 1.25; }
.art-main h2 { font-family: var(--sans); font-size: 1.2rem; margin-top: 1.6em; }
.art-main h3 { font-family: var(--sans); font-size: 1.02rem; }
.art-type { font-family: var(--sans); font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ja); }
.art-authors { font-family: var(--sans); font-size: .95rem; margin: 6px 0; } .art-authors sup { color: var(--ja); }
.art-affs { font-family: var(--sans); font-size: .8rem; color: var(--muted); }
.art-info { font-family: var(--sans); display: grid; grid-template-columns: repeat(4, auto); gap: 4px 22px; font-size: .82rem; color: var(--muted);
            border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; margin: 16px 0; justify-content: start; }
.art-info b { display: block; color: var(--ink); font-weight: 600; }
.box { background: var(--tint); border-left: 4px solid var(--ja); padding: 14px 18px; border-radius: 0 6px 6px 0; margin: 18px 0; font-family: var(--sans); font-size: .95rem; }
.box h2 { margin: 0 0 6px; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--jc); }
.box.gold { border-left-color: var(--gold); }
.refs { font-size: .88rem; padding-left: 1.6em; } .refs li { margin-bottom: 6px; }
.art-side .card { font-family: var(--sans); font-size: .88rem; }
.share a { display: inline-block; margin: 0 8px 6px 0; }
ins { background: #d9f2e3; text-decoration: none; } del { background: #fbe0de; }

/* ---------- forms ---------- */
form .field { margin-bottom: 16px; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 5px; color: var(--ink); }
.hint { font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: 4px; display: block; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #c8d3df; border-radius: 6px; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(31,138,126,.25); border-color: var(--teal); }
textarea { min-height: 110px; resize: vertical; } textarea.tall { min-height: 260px; } textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
input[type=file] { font-size: .88rem; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; } .check input { margin-top: 4px; }
.row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; } .row.three { grid-template-columns: 1fr 1fr 1fr; } .row.four { grid-template-columns: repeat(4, 1fr); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.inline { display: inline; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 18px; } legend { font-weight: 700; color: var(--navy); padding: 0 6px; }

/* ---------- auth ---------- */
.auth { max-width: 460px; margin: 50px auto; } .auth .card { padding: 28px; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 69px); }
.sidebar { background: var(--navy-2); color: #b9c8d8; padding: 18px 12px; }
.sidebar h4 { color: #7f97b0; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; margin: 18px 10px 6px; }
.sidebar a { display: flex; gap: 8px; align-items: center; color: #dbe6f0; padding: 8px 10px; border-radius: 6px; font-size: .9rem; }
.sidebar a:hover, .sidebar a.on { background: rgba(255,255,255,.08); text-decoration: none; color: #fff; }
.sidebar a .count { margin-left: auto; background: var(--gold); color: var(--navy-2); border-radius: 999px; font-size: .7rem; padding: 0 7px; font-weight: 700; }
.main { padding: 26px 32px 60px; background: var(--soft); min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.55rem; margin: 0; } .page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head select, .page-head input, .actions select, .actions input:not([type=checkbox]):not([type=radio]) { width: auto; max-width: 100%; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi b { display: block; font-size: 1.7rem; color: var(--navy); line-height: 1.2; } .kpi span { font-size: .8rem; color: var(--muted); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; }
.panel > h2, .panel > .ph { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 1rem; margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.panel > .pb { padding: 16px 18px; }
table.t { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.t th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafcfd; }
table.t td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; } table.t tr:hover td { background: #fbfdfe; }
table.t .num { text-align: right; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 600; font-size: .88rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--navy); border-bottom-color: var(--teal); } .tabs a:hover { text-decoration: none; color: var(--navy); }
.split { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.timeline { list-style: none; margin: 0; padding: 0; } .timeline li { position: relative; padding: 0 0 14px 20px; font-size: .86rem; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.steps { display: flex; gap: 0; margin-bottom: 22px; counter-reset: s; flex-wrap: wrap; }
.steps a, .steps span { flex: 1; min-width: 110px; text-align: center; padding: 10px 6px; font-size: .82rem; font-weight: 600; color: var(--muted); border-bottom: 3px solid var(--line); }
.steps .on { color: var(--navy); border-bottom-color: var(--teal); } .steps .done { color: var(--teal-2); border-bottom-color: #9fd3cc; }
.checklist { list-style: none; padding: 0; margin: 0; } .checklist li { padding: 4px 0 4px 24px; position: relative; font-size: .88rem; }
.checklist li::before { position: absolute; left: 0; font-weight: 700; } .checklist li.ok::before { content: "✓"; color: var(--ok); } .checklist li.no::before { content: "✗"; color: var(--bad); }
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; } .progress > i { display: block; height: 100%; background: var(--teal); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .68rem; color: var(--muted); height: 100%; justify-content: flex-end; }
.bars .bar i { display: block; width: 100%; background: var(--teal); border-radius: 3px 3px 0 0; min-height: 2px; }
.bars .bar i.acc { background: var(--navy); }
.empty { text-align: center; padding: 30px; color: var(--muted); }
.proof-doc { background: #fff; padding: 40px 50px; border: 1px solid var(--line); font-family: var(--serif); line-height: 1.7; }
.proof-doc [id^=p]:hover { background: #fff8e6; cursor: pointer; } .proof-doc .has-comment { background: #fff1c6; }
.diff { background: #fff; border: 1px solid var(--line); padding: 20px; font-family: var(--serif); line-height: 1.8; max-height: 70vh; overflow: auto; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; font-size: .9rem; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }
details summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.note { background: var(--warn-bg); border-left: 4px solid var(--gold); padding: 10px 14px; border-radius: 0 6px 6px 0; font-size: .9rem; margin-bottom: 14px; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-2); color: #b9c8d8; padding: 44px 0 26px; font-size: .88rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #fff; font-size: .9rem; margin-bottom: 10px; } .site-footer a { color: #dbe6f0; display: block; padding: 2px 0; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 30px; padding-top: 16px; font-size: .8rem; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

@media (max-width: 1000px) {
  .hero .wrap, .jlayout, .article, .split, .grid.two, .grid.three, .grid.four, .site-footer .cols { grid-template-columns: 1fr; }
  .toc { display: none; } .app { grid-template-columns: 1fr; } .sidebar { display: flex; flex-wrap: wrap; gap: 4px; }
  .sidebar h4 { width: 100%; margin: 6px 6px 0; } .row, .row.three, .row.four { grid-template-columns: 1fr; }
  .nav { display: none; } .search-mini input { width: 120px; } .main { padding: 18px; } .art-info { grid-template-columns: 1fr 1fr; }
  .jhead .wrap { flex-wrap: wrap; } .jhead .jactions { margin-left: 0; }
}
