/* =====================================================================
   Islamic Investment Research — site styles
   1 Tokens  2 Base  3 Layout & type  4 Masthead  5 Footer  6 Lists
   7 Records  8 Repository  9 Home  10 Authors  11 Forms  12 Editor panel
   13 Responsive
   ===================================================================== */

/* 1 Tokens */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f6f6;
  --ink: #161616;
  --ink-2: #3c3c3c;
  --muted: #666b70;
  --rule: #dedede;
  --rule-2: #bdbdbd;
  --green: #1d4a37;
  --green-dark: #12321f;
  --link: #1d5a43;
  --error: #9b2c2c;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1200px;
}

/* 2 Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 14px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--green); color: #fff; padding: 8px 14px; z-index: 10; }
.skip-link:focus { left: 8px; top: 8px; }
.link-button { font: inherit; font-size: 14px; background: none; border: none; padding: 0; color: var(--link); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* 3 Layout & type */
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 32px; padding-right: 32px; }
main { display: block; padding: 28px 0 64px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.layout-filters { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.prose h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 36px 0 10px; }
.page-title { font-family: var(--serif); font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -.3px; margin: 0 0 8px; }
.page-lede { font-size: 16px; color: var(--ink-2); max-width: 780px; margin: 0 0 24px; }
.section-title { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0 0 12px; }
.section-title .count { font-family: var(--sans); font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--rule-2); }
.hint { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.form-error { color: var(--error); font-size: 13.5px; }
.state { padding: 20px 0; color: var(--ink-2); }
.state ul { margin: 6px 0 0; padding-left: 1.2em; }
.state li { margin-bottom: 4px; }
.state-error { border-left: 3px solid var(--error); padding: 12px 16px; background: #fbf3f3; margin-bottom: 16px; }
.state-error p:last-child { margin: 0; }
.notice { border-left: 3px solid #a8892f; background: #f9f6ec; padding: 12px 16px; font-size: 14px; }

/* Buttons */
.btn { display: inline-block; font: inherit; font-size: 14px; font-weight: 600; text-align: center; padding: 9px 18px; border: 1px solid var(--green); background: var(--green); color: #fff; border-radius: 2px; cursor: pointer; }
.btn:hover { background: var(--green-dark); color: #fff; text-decoration: none; }
.btn-secondary { background: #fff; color: var(--green); }
.btn-secondary:hover { background: var(--bg-alt); color: var(--green-dark); }
.btn-block { display: block; width: 100%; }

/* Tables */
.facts { width: 100%; border-collapse: collapse; font-size: 14px; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.facts th { width: 40%; font-weight: 600; color: var(--ink-2); padding-right: 12px; }
.facts td { overflow-wrap: anywhere; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; font-weight: 600; padding: 7px 14px 7px 0; border-bottom: 1px solid var(--ink); }
.data-table td { padding: 8px 14px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }

/* Right rail */
.rail { margin-bottom: 28px; font-size: 14px; color: var(--ink-2); }
.rail h2 { font-size: 14px; font-weight: 700; color: var(--ink); padding-bottom: 6px; border-bottom: 2px solid var(--ink); margin: 0 0 8px; }
.rail p { margin: 0 0 8px; }
.rail-list { list-style: none; margin: 0; padding: 0; }
.rail-list li { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.rail-list li a { display: block; font-family: var(--serif); font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.rail-list li span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.rail-list.plain li { font-size: 14px; }

/* 4 Masthead */
.masthead { background: #fff; border-bottom: 1px solid var(--rule); }
.masthead-main { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding-top: 18px; padding-bottom: 16px; }
.logo { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark { font-family: var(--serif); font-size: 40px; font-weight: 700; line-height: .9; letter-spacing: -1px; color: var(--green); padding-right: 12px; border-right: 2px solid var(--green); }
.logo-name { font-family: var(--serif); font-size: 17px; font-weight: 600; line-height: 1.15; color: var(--ink); }
.site-search { display: flex; flex: 0 1 380px; }
.site-search input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 8px 11px; border: 1px solid var(--rule-2); border-right: none; border-radius: 2px 0 0 2px; color: var(--ink); background: #fff; }
.site-search button { font: inherit; font-size: 13.5px; font-weight: 600; padding: 8px 14px; border: 1px solid var(--green); background: var(--green); color: #fff; border-radius: 0 2px 2px 0; cursor: pointer; }
.primary-nav { background: var(--green); }
.primary-nav-inner { display: flex; gap: 4px; }
.primary-nav a { display: block; padding: 11px 16px; font-size: 14.5px; font-weight: 600; color: #fff; }
.primary-nav a:first-child { margin-left: -16px; }
.primary-nav a:hover { background: var(--green-dark); text-decoration: none; }
.primary-nav a.current { background: var(--green-dark); box-shadow: inset 0 -3px 0 #c9b26d; }
.primary-nav a.nav-right { margin-left: auto; margin-right: -16px; }

/* 5 Footer */
.site-footer { background: #1a1d1c; color: rgba(255,255,255,.78); font-size: 14px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.6fr; gap: 48px; padding-top: 40px; padding-bottom: 28px; }
.logo-footer .logo-mark { color: #fff; border-right-color: rgba(255,255,255,.55); font-size: 32px; }
.logo-footer .logo-name { color: #fff; font-size: 15px; }
.footer-address { margin-top: 14px; line-height: 1.7; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.footer-note { color: rgba(255,255,255,.65); font-size: 13px; line-height: 1.6; margin: 0; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.15); padding-top: 14px; padding-bottom: 22px; font-size: 12.5px; color: rgba(255,255,255,.55); }

/* 6 Working paper lists (SSRN-style: dense, scannable) */
.wp-list { border-top: 1px solid var(--rule); }
.wp { padding: 16px 0 15px; border-bottom: 1px solid var(--rule); }
.wp-title { font-family: var(--serif); font-size: 18.5px; font-weight: 700; line-height: 1.3; margin: 0 0 3px; }
.wp-title a { color: var(--ink); }
.wp-title a:hover { color: var(--link); }
.wp-authors { font-size: 14.5px; margin: 0 0 3px; }
.wp-authors a { color: var(--link); }
.wp-meta { font-size: 13px; color: var(--muted); margin: 0 0 7px; }
.wp-meta .wp-id { color: var(--ink-2); font-weight: 600; }
.wp-meta .sep { color: var(--rule-2); }
.wp-meta a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--rule-2); }
.wp-abstract { margin: 0 0 6px; }
.wp-abstract .clamp { font-size: 14px; line-height: 1.55; color: var(--ink-2); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wp-abstract.open .clamp { display: block; -webkit-line-clamp: unset; }
.abs-toggle { font: inherit; font-size: 13px; background: none; border: none; padding: 2px 0 0; color: var(--link); cursor: pointer; }
.abs-toggle:hover { text-decoration: underline; }
.wp-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; margin: 0; }
mark { background: #fbeeb3; color: inherit; padding: 0 1px; }

/* 7 Paper record */
.record-head { margin-bottom: 16px; }
.record-series { font-size: 13.5px; font-weight: 600; color: var(--green); margin: 0 0 6px; }
.record-title { font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: 1.22; letter-spacing: -.3px; margin: 0 0 14px; }
.record-authors { list-style: none; margin: 0 0 10px; padding: 0; }
.record-authors li { margin-bottom: 4px; }
.author-name { font-size: 16px; font-weight: 600; color: var(--ink); margin-right: 8px; }
.record-authors .author-affil { font-size: 14px; color: var(--muted); }
.record-authors .orcid { color: var(--muted); text-decoration: underline; text-decoration-color: var(--rule-2); }
.record-dates { font-size: 13.5px; color: var(--muted); margin: 0; }
.record-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0; margin: 0 0 22px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.record-section { margin: 0 0 28px; }
.record-section > h2 { font-family: var(--serif); font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.abstract { font-size: 15.5px; line-height: 1.7; color: var(--ink); margin: 0 0 12px; }
.terms { font-size: 14px; color: var(--ink-2); margin: 0 0 4px; }
.pre-line { white-space: pre-line; font-size: 14.5px; color: var(--ink-2); }
.note { font-size: 13px; color: var(--muted); margin-top: 8px; }
.cite-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--rule); margin-bottom: 10px; }
.cite-tabs button { font: inherit; font-size: 14px; font-weight: 600; background: none; border: none; border-bottom: 2px solid transparent; padding: 6px 0; margin-bottom: -1px; color: var(--muted); cursor: pointer; }
.cite-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--green); }
.citation { font-size: 14.5px; line-height: 1.6; margin: 0 0 8px; }
.code-block { font-family: var(--mono); font-size: 12.5px; white-space: pre; overflow-x: auto; background: var(--bg-alt); border: 1px solid var(--rule); padding: 12px 14px; margin: 0 0 8px; }
.cite-tools { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; align-items: baseline; }
.copied { font-size: 13px; color: var(--muted); }
/* Drafts reuse the record styles */
.paper-authors { margin-bottom: 18px; }
.paper-author-name { font-weight: 600; }
.paper-author-affil { font-size: 14px; color: var(--muted); }
.draft-banner { border-left: 3px solid #a8892f; background: #f9f6ec; padding: 12px 16px; font-size: 14px; margin-bottom: 20px; }

/* 8 Repository */
.repo-head { margin-bottom: 22px; }
.repo-search { display: flex; max-width: 760px; }
.repo-search input { flex: 1; min-width: 0; font: inherit; font-size: 15.5px; padding: 10px 13px; border: 1px solid var(--rule-2); border-right: none; border-radius: 2px 0 0 2px; }
.repo-search button { font: inherit; font-weight: 600; font-size: 14.5px; padding: 0 22px; border: 1px solid var(--green); background: var(--green); color: #fff; border-radius: 0 2px 2px 0; cursor: pointer; }
.repo-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.repo-toolbar p { margin: 0; }
.toolbar-controls { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.toolbar-controls select { font: inherit; font-size: 14px; padding: 5px 8px; border: 1px solid var(--rule-2); border-radius: 2px; background: #fff; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.active-filters:empty { display: none; }
.chip { font: inherit; font-size: 13px; padding: 3px 9px; border: 1px solid var(--rule-2); background: var(--bg-alt); color: var(--ink-2); border-radius: 2px; cursor: pointer; }
.chip:hover { border-color: var(--green); }
.chip::after { content: " \00d7"; color: var(--muted); }
.filters { font-size: 14px; position: sticky; top: 16px; }
.filters-toggle > summary { display: none; }
.facet { border: none; padding: 0; margin: 0 0 20px; }
.facet legend { font-size: 14px; font-weight: 700; padding: 0 0 6px; margin-bottom: 4px; border-bottom: 2px solid var(--ink); width: 100%; }
.facet-option { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; color: var(--ink-2); }
.facet-option input { accent-color: var(--green); margin: 0; }
.facet-option .n { margin-left: auto; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.facet-option.is-empty { color: #9a9a9a; cursor: default; }
.pager { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 20px; font-size: 14px; }
.pager:empty { display: none; }
.pager a, .pager .gap { display: inline-block; min-width: 34px; padding: 6px 10px; text-align: center; border: 1px solid var(--rule); color: var(--ink-2); }
.pager a:hover { border-color: var(--green); text-decoration: none; }
.pager a[aria-current="page"] { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.pager .gap { border-color: transparent; }

/* 9 Home */
.home { padding-top: 0; }
.hero { background: var(--bg-alt); border-bottom: 1px solid var(--rule); padding: 40px 0 36px; margin-bottom: 40px; }
.hero h1 { font-family: var(--serif); font-size: 38px; font-weight: 700; letter-spacing: -.5px; line-height: 1.12; color: var(--green-dark); margin: 0 0 12px; }
.hero p { font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 780px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 28px; margin: 18px 0 0; font-size: 15px; font-weight: 600; }
.hero-links a::after { content: " \203A"; }
.home-top { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 56px; margin-bottom: 40px; }
.featured-title { font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1.25; margin: 0 0 6px; }
.featured-title a { color: var(--ink); }
.byline { font-size: 15px; margin: 0 0 2px; }
.dateline { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; }
.dateline a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--rule-2); }
.featured-abstract { font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.featured-links, .more { display: flex; gap: 22px; font-size: 14.5px; font-weight: 600; margin: 0; }
.recent-list { list-style: none; margin: 0 0 14px; padding: 0; border-top: 2px solid var(--ink); }
.recent-list li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.recent-title { display: block; font-family: var(--serif); font-size: 16.5px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.recent-meta { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.featured .section-title, .recent .section-title { font-family: var(--sans); font-size: 14px; font-weight: 700; color: var(--ink); }
.featured .section-title { padding-bottom: 8px; border-bottom: 2px solid var(--ink); margin-bottom: 14px; }
.recent .section-title { margin-bottom: 8px; }
.home-areas { border-top: 1px solid var(--rule); padding-top: 24px; margin-bottom: 36px; }
.home-areas .section-title, .home-columns h2 { font-family: var(--sans); font-size: 14px; font-weight: 700; }
.area-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; }
.area-links a { font-weight: 600; }
.area-links span { color: var(--muted); font-size: 13.5px; }
.area-links .none { color: #9a9a9a; }
.home-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; border-top: 1px solid var(--rule); padding-top: 24px; }
.home-columns h2 { margin: 0 0 6px; }
.home-columns p { font-size: 14.5px; color: var(--ink-2); margin-bottom: 8px; }

/* 10 Authors */
.directory { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.directory li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.directory-name { font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--ink); }
.directory-meta { grid-column: 1; font-size: 13.5px; color: var(--muted); }
.directory-count { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 13.5px; color: var(--ink-2); }
.author-head { margin-bottom: 16px; }
.author-role { font-size: 15px; color: var(--ink-2); margin: 0; }
.author-affil { font-size: 14.5px; color: var(--muted); margin: 0; }
.author-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 10px 0 0; font-size: 14px; }
.author-bio { font-size: 15.5px; line-height: 1.7; color: var(--ink-2); max-width: 780px; margin-bottom: 28px; }

/* Steps on the submission page */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 24px; }
.steps li { counter-increment: step; position: relative; padding: 0 0 10px 34px; color: var(--ink-2); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border: 1px solid var(--green); color: var(--green); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; border-radius: 50%; }

/* 11 Forms ------------------------------------------------------------ */
.submit-form fieldset { border: none; border-top: 2px solid var(--ink); padding: 12px 0 24px; margin: 0 0 16px; }
.submit-form legend { font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--ink); padding: 0 12px 0 0; }
.submit-form label { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink); margin: 16px 0 6px; }
.submit-form input[type="text"], .submit-form input[type="email"], .submit-form input[type="url"],
.submit-form input[type="password"], .submit-form input[type="date"], .submit-form select, .submit-form textarea {
  width: 100%; font: inherit; font-size: 15px; padding: 9px 11px; color: var(--ink);
  border: 1px solid var(--rule-2); border-radius: 2px; background: #fff;
}
.submit-form textarea { line-height: 1.55; }
.submit-form input:focus, .submit-form select:focus, .submit-form textarea:focus { outline: 2px solid var(--green); outline-offset: -1px; border-color: var(--green); }
.submit-form input[type="file"] { font: inherit; font-size: 14px; }
.submit-form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--ink-2); }
.submit-form label.check input { margin-top: 4px; accent-color: var(--green); }
.req { color: var(--error); }
.hidden-field { display: none; }
.submit-btn { font: inherit; font-size: 14.5px; font-weight: 600; padding: 11px 26px; border-radius: 2px; border: 1px solid var(--green); background: var(--green); color: #fff; cursor: pointer; }
.submit-btn:hover { background: var(--green-dark); }
.submit-btn:disabled { background: #8a908c; border-color: #8a908c; cursor: default; }
.submit-btn-alt { background: #fff; color: var(--green); margin-left: 8px; }
.submit-btn-alt:hover { background: var(--bg-alt); }
.submit-btn-alt:disabled { background: #fff; color: #8a908c; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 24px; }
.steps li { counter-increment: step; position: relative; padding: 0 0 12px 36px; color: var(--ink-2); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border: 1px solid var(--green); color: var(--green); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; border-radius: 50%; }

/* 12 Editor panel ----------------------------------------------------- */
.admin-bar { background: var(--green-dark); color: #fff; }
.admin-bar .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 52px; gap: 16px; }
.admin-bar .admin-name { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.admin-bar .admin-name span { font-family: var(--sans); font-size: 12.5px; font-weight: 500; opacity: .75; margin-left: 12px; }
.admin-bar a, .admin-bar .link-btn { color: #fff; }
.nav-right { font-size: 13.5px; }
.link-btn { background: none; border: none; color: var(--green); text-decoration: underline; cursor: pointer; font: inherit; padding: 0 0 0 10px; }
.login-box { max-width: 400px; margin: 32px auto; }
.login-box h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin-bottom: 12px; }
.tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--ink); margin-bottom: 16px; }
.tab { font: inherit; font-size: 14px; font-weight: 500; background: none; border: none; border-bottom: 2px solid transparent; padding: 10px 14px; color: var(--ink-2); cursor: pointer; margin-bottom: -1px; }
.tab:first-child { padding-left: 0; }
.tab.current { color: var(--green-dark); font-weight: 600; border-bottom-color: var(--green); }
.tab-new { margin-left: auto; color: var(--green); font-weight: 600; }
.msg { padding: 10px 14px; margin-bottom: 16px; background: var(--bg-alt); border-left: 3px solid var(--green); font-size: 14px; }
.msg-error { background: #fbeeee; border-left-color: var(--error); color: var(--error); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.admin-table th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--ink); padding: 8px; }
.admin-table td { border-bottom: 1px solid var(--rule); padding: 10px 8px; vertical-align: top; }
.admin-table td.actions { white-space: nowrap; }
.admin-title { font-size: 15px; font-weight: 500; }
.details-row td { background: var(--bg-alt); }
.btn-small { display: inline-block; font: inherit; font-size: 12.5px; font-weight: 500; padding: 4px 10px; border: 1px solid var(--rule-2); background: #fff; color: var(--green); border-radius: 2px; cursor: pointer; text-decoration: none; }
.btn-small:hover { border-color: var(--green); background: var(--bg-alt); }
.btn-approve { background: var(--green); border-color: var(--green); color: #fff; }
.btn-approve:hover { background: var(--green-dark); color: #fff; }
.btn-danger { color: var(--error); }
.btn-danger:hover { border-color: var(--error); background: #fbeeee; }
.btn-small:disabled { opacity: .5; cursor: default; }
.editor { max-width: 760px; }
.editor h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin-bottom: 12px; }
.paper-facts { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.paper-facts th, .paper-facts td { text-align: left; vertical-align: top; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--rule); }
.paper-facts th { width: 150px; color: var(--muted); font-weight: 500; }
.draft-status { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.pill { display: inline-block; padding: 0 7px; margin-right: 4px; border: 1px solid var(--rule-2); background: var(--bg-alt); color: var(--ink-2); font-size: 11.5px; border-radius: 2px; }
.pill-shared { border-color: #d9c27a; background: #faf6ea; color: #7a5d12; }
#draft-note { margin: 0 0 16px; font-size: 13.5px; }

.login-box .submit-btn, .submit-form > .submit-btn { margin-top: 16px; }
.submit-form legend { text-transform: none; letter-spacing: 0; font-family: var(--serif); font-size: 19px; font-weight: 700; }
.submit-form fieldset { border-top: 2px solid var(--ink); }
.admin-table th { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink-2); }

/* 13 Responsive */
@media (max-width: 960px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .layout, .layout-filters, .home-top { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .home-columns { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-note { grid-column: 1 / -1; }
  .filters { position: static; }
  .filters-toggle > summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; font-size: 14.5px; font-weight: 600; padding: 9px 12px; border: 1px solid var(--rule-2); border-radius: 2px; }
  .filters-toggle > summary::-webkit-details-marker { display: none; }
  .filters-toggle > summary::after { content: "+"; font-size: 18px; color: var(--muted); }
  .filters-toggle[open] > summary { margin-bottom: 14px; }
  .filters-toggle[open] > summary::after { content: "\2212"; }
}
@media (max-width: 680px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .masthead-main { flex-direction: column; align-items: stretch; gap: 12px; padding-top: 14px; padding-bottom: 12px; }
  .site-search { flex-basis: auto; }
  .logo-mark { font-size: 34px; }
  .logo-name { font-size: 15.5px; }
  .primary-nav-inner { overflow-x: auto; scrollbar-width: none; }
  .primary-nav-inner::-webkit-scrollbar { display: none; }
  .primary-nav a { white-space: nowrap; padding: 10px 12px; font-size: 14px; }
  .primary-nav a:first-child { margin-left: -12px; }
  .primary-nav a.nav-right { margin-left: 0; margin-right: 0; }
  .hero { padding: 28px 0; margin-bottom: 28px; }
  .hero h1 { font-size: 29px; }
  .page-title { font-size: 26px; }
  .record-title { font-size: 25px; }
  .featured-title { font-size: 22px; }
  .wp-title { font-size: 17px; }
  .wp-meta .sep { display: none; }
  .wp-meta > span, .wp-meta > a { margin-right: 10px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .directory li { grid-template-columns: 1fr; }
  .directory-count { grid-column: 1; grid-row: auto; }
}
@media print {
  .masthead, .site-footer, .record-actions, .filters, .cite-tools, .cite-tabs, aside { display: none !important; }
}
/* Facts in the right rail: label above value */
aside .facts, aside .facts tbody, aside .facts tr, aside .facts th, aside .facts td { display: block; width: auto; }
aside .facts tr { padding: 7px 0; border-bottom: 1px solid var(--rule); }
aside .facts th, aside .facts td { border: none; padding: 0; }
aside .facts th { font-size: 12.5px; font-weight: 600; color: var(--muted); }
@media (max-width: 680px) {
  .featured-abstract { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
  .record-authors .author-affil { display: block; }
}
/* Logo image */
.logo img { display: block; height: 42px; width: auto; }
.logo-footer img { height: 36px; }
@media (max-width: 680px) { .logo img { height: 34px; } }
