*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --red: #8B0000; --red-mid: #A50000;
  --ink: #1A0505; --warm: #FFFCFC; --blush: #F5EDEE; --blush2: #EFE0E1;
  --slate: #6B5555; --muted: #9C8080;
  --emp: #0A2463; --theo: #5D3A9B; --prax: #D35400; --poi: #C41E3A; --hist: #8B7355;
}

html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--warm); color: var(--ink); line-height: 1.6; }

/* Branch identity: each branch gets a --branch accent color plus a
   pre-tuned translucent chip (bg/fg) for use on dark surfaces (footer). */
.branch-empirica { --branch: var(--emp); --branch-chip-bg: rgba(10,36,99,0.35); --branch-chip-fg: #90A8D4; }
.branch-theoria  { --branch: var(--theo); --branch-chip-bg: rgba(93,58,155,0.35); --branch-chip-fg: #B09FD8; }
.branch-praxis   { --branch: var(--prax); --branch-chip-bg: rgba(211,84,0,0.35); --branch-chip-fg: #E0976A; }
.branch-poiesis  { --branch: var(--poi); --branch-chip-bg: rgba(196,30,58,0.35); --branch-chip-fg: #E08895; }
.branch-historia { --branch: var(--hist); --branch-chip-bg: rgba(139,115,85,0.35); --branch-chip-fg: #C4AE8E; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff;
  padding: 0.75rem 1.25rem; z-index: 200;
}
.skip-link:focus { left: 0; }

.site-header {
  background: var(--ink); padding: 0 3rem; height: 56px;
  display: flex; align-items: center;
}
.site-header nav { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.site-header .brand {
  font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 1.3rem;
  letter-spacing: 0.18em; color: #fff; text-decoration: none;
}
.site-header ul { list-style: none; display: flex; align-items: center; gap: 1.75rem; }
.site-header a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.82rem; letter-spacing: 0.04em; transition: color 0.2s; }
.site-header a:hover { color: #fff; }
.site-header a.nav-cta { color: #fff; border: 1px solid rgba(255,255,255,0.25); padding: 6px 18px; border-radius: 3px; transition: border-color 0.2s, background 0.2s; }
.site-header a.nav-cta:hover { border-color: var(--red); background: rgba(139,0,0,0.15); color: #fff; }

main { max-width: 860px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }

h1 { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 2.4rem; margin-bottom: 1rem; color: var(--ink); }
h2 { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 1.5rem; margin: 2rem 0 0.75rem; color: var(--ink); }
p { margin-bottom: 1rem; color: var(--slate); }
a { color: var(--red); }

.hero { text-align: center; padding: 3rem 0; }
.hero .lede { font-size: 1.1rem; max-width: 620px; margin: 0 auto 2rem; }

/* Homepage hero — dark, matching the marketing brand treatment */
.home-hero {
  background: var(--ink); color: #fff; text-align: center;
  width: 100vw; position: relative; left: 50%; right: 50%; margin: -3rem -50vw 0;
  padding: 5rem 2rem 4.5rem; overflow: hidden;
}
.home-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-radial-gradient(circle at 50% 60%, transparent 0px, transparent 80px, rgba(139,0,0,0.04) 81px, rgba(139,0,0,0.04) 82px);
  pointer-events: none;
}
.home-hero > * { position: relative; z-index: 1; }
.hero-eyebrow { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red-mid); margin-bottom: 1.5rem; }
.hero-title { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: clamp(2.75rem, 7vw, 5rem); line-height: 1.05; color: #fff; margin: 0; }
.hero-title em { font-style: italic; color: var(--red-mid); font-weight: 300; }
.hero-divider { width: 60px; height: 1px; background: var(--red-mid); margin: 1.75rem auto; }
.hero-sub { font-size: 1rem; font-weight: 300; line-height: 1.75; color: rgba(255,255,255,0.6); max-width: 520px; margin: 0 auto; }
.hero-actions { margin-top: 2.25rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn-primary, .hero-actions .btn-secondary { margin: 0; }
.btn-secondary-inverse { background: transparent; border-color: rgba(255,255,255,0.3); color: #fff; }
.btn-secondary-inverse:hover { border-color: var(--red-mid); }

/* Branches strip */
.branches-strip {
  display: grid; grid-template-columns: repeat(5, 1fr); background: var(--blush);
  border-bottom: 1px solid var(--blush2);
  width: 100vw; position: relative; left: 50%; right: 50%; margin: 0 -50vw 3rem;
}
.branch-cell {
  display: block; padding: 1.6rem 1.4rem; border-right: 1px solid var(--blush2);
  border-top: 3px solid var(--branch, var(--red)); text-decoration: none; transition: background 0.2s;
}
.branch-cell:last-child { border-right: none; }
.branch-cell:hover { background: var(--warm); }
.branch-cell .branch-name { display: block; font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; font-weight: 600; color: var(--branch, var(--ink)); margin-bottom: 0.3rem; }
.branch-cell .branch-method { display: block; font-size: 0.66rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.branch-cell .branch-desc { display: block; font-size: 0.78rem; color: var(--slate); line-height: 1.55; }

/* Commitments grid */
.commitments { padding: 1rem 0 3rem; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-label { display: block; font-size: 0.68rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); margin-bottom: 0.75rem; }
.section-header h2 { margin: 0; }
.commitments-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5px; background: var(--blush2); border: 1.5px solid var(--blush2); border-radius: 8px; overflow: hidden; }
.commitment { background: var(--warm); padding: 1.75rem 1.6rem; }
.commitment-num { font-family: 'Cormorant Garamond', serif; font-size: 1.9rem; font-weight: 300; color: var(--blush2); line-height: 1; margin-bottom: 0.6rem; }
.commitment-title { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; font-weight: 600; color: var(--ink); margin-bottom: 0.4rem; }
.commitment-body { font-size: 0.85rem; color: var(--slate); line-height: 1.6; }

@media (max-width: 700px) {
  .branches-strip { grid-template-columns: repeat(2, 1fr); }
  .commitments-grid { grid-template-columns: 1fr; }
}

.branch-page { border-top: 3px solid var(--branch, var(--red)); padding-top: 2rem; }
.branch-page .branch-method { display: block; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--branch, var(--red)); margin-bottom: 0.5rem; }

.article-page .article-branch a { color: var(--branch, var(--red)); font-size: 0.85rem; font-weight: 600; text-decoration: none; letter-spacing: 0.06em; text-transform: uppercase; }
.author-list { list-style: none; margin: 0.5rem 0 1.5rem; }
.author-list li { display: inline; margin-right: 1rem; font-size: 0.95rem; color: var(--ink); }
.orcid-link { font-size: 0.75rem; margin-left: 0.25rem; }
.affiliation { color: var(--muted); font-size: 0.85rem; }

.article-meta { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin: 1.5rem 0; font-size: 0.9rem; }
.article-meta dt { color: var(--muted); }

.article-actions { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--blush2); }
.btn-primary {
  display: inline-block; background: var(--red); color: #fff; padding: 0.6rem 1.5rem;
  border-radius: 4px; text-decoration: none; margin-bottom: 1rem;
}
.citation-export a { margin-right: 1rem; font-size: 0.85rem; }

.issue-summary, .article-summary { padding: 1.25rem 0; border-bottom: 1px solid var(--blush2); }
.toc-list { list-style: none; }
.toc-list li { padding: 1.25rem 0; border-bottom: 1px solid var(--blush2); }
.toc-branch { color: var(--branch, var(--red)); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }

.board-roster { list-style: none; }
.board-roster li { padding: 0.5rem 0; border-bottom: 1px solid var(--blush2); }
.board-stat { font-size: 1.05rem; color: var(--ink); background: var(--blush); padding: 1rem; border-radius: 4px; }

.policy-page em { color: var(--muted); font-size: 0.85rem; }

/* Auth & forms */
.flash-status { background: var(--blush); color: var(--ink); padding: 0.75rem 3rem; font-size: 0.9rem; }
.form-errors { background: #FDECEC; border: 1px solid var(--red); padding: 1rem; margin-bottom: 1rem; border-radius: 4px; }
.form-errors ul { list-style: none; color: var(--red); font-size: 0.85rem; }
form label { display: block; margin-top: 1rem; font-size: 0.85rem; font-weight: 600; }
form label.checkbox { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; }
form input[type=text], form input[type=email], form input[type=password], form input[type=number],
form input[type=date], form input[type=file], form select, form textarea {
  width: 100%; padding: 0.5rem; border: 1px solid var(--blush2); border-radius: 4px; margin-top: 0.25rem; font-family: inherit;
}
.hint { font-size: 0.8rem; color: var(--muted); margin: 0.15rem 0 0.5rem; }
.required { color: var(--red); }
fieldset { border: 1px solid var(--blush2); border-radius: 4px; padding: 1rem; margin-top: 1.5rem; }
.author-row { display: grid; grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr; gap: 0.5rem; margin-bottom: 0.5rem; }
.author-row input { margin-top: 0; }
.btn-secondary { display: inline-block; background: #fff; border: 1px solid var(--red); color: var(--red); padding: 0.5rem 1.2rem; border-radius: 4px; margin-top: 1rem; cursor: pointer; text-decoration: none; }
.link-button { background: none; border: none; color: rgba(255,255,255,0.6); font-size: 0.82rem; cursor: pointer; padding: 0; }
.inline-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.inline-form input, .inline-form select { width: auto; margin-top: 0; }

/* Dashboards */
.dashboard-index .submission-summary, .dashboard-index .review-summary { padding: 1rem 0; border-bottom: 1px solid var(--blush2); }
.overdue, .submission-summary.overdue { border-left: 3px solid var(--red); padding-left: 0.75rem; }
.status-badge { display: inline-block; padding: 0.3rem 0.9rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.status-in-review { background: var(--blush); color: var(--ink); }
.status-accept { background: #E3F3E5; color: #256029; }
.status-reject { background: #FDECEC; color: var(--red); }
.status-minor_revision, .status-major_revision { background: #FFF4E0; color: #8A5A00; }
.decision-rationale { margin-top: 1rem; padding: 1rem; background: var(--blush); border-radius: 4px; }
.review-row { padding: 1rem 0; border-bottom: 1px solid var(--blush2); }
.review-comments { color: var(--ink); }
.confidential { color: var(--muted); font-size: 0.85rem; }
.compliance-stats ul, .overdue-list, .all-submissions { list-style: none; }
.compliance-stats li { padding: 0.3rem 0; }
.compliance-stats li.warning { color: var(--red); font-weight: 600; }
.anonymized-note { background: var(--blush); padding: 0.75rem 1rem; border-radius: 4px; font-size: 0.85rem; }
.pending-note { color: var(--muted); font-style: italic; }

.site-footer { background: var(--ink); padding: 3rem 3rem 2.5rem; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; flex-wrap: wrap; gap: 1.5rem; }
.footer-brand { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 1.4rem; letter-spacing: 0.18em; color: #fff; }
.footer-tagline { font-size: 0.75rem; color: rgba(255,255,255,0.35); margin-top: 0.3rem; letter-spacing: 0.08em; }
.footer-branches { list-style: none; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.footer-branch-chip { font-size: 0.72rem; letter-spacing: 0.06em; padding: 4px 12px; border-radius: 2px; text-decoration: none; background: var(--branch-chip-bg, rgba(255,255,255,0.08)); color: var(--branch-chip-fg, rgba(255,255,255,0.6)); }
.footer-links { list-style: none; display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.08); }
.footer-links a { color: rgba(255,255,255,0.5); font-size: 0.8rem; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; }
.footer-bottom p { color: rgba(255,255,255,0.3); font-size: 0.75rem; margin: 0; }
.footer-main-site-link { color: rgba(255,255,255,0.4); font-size: 0.75rem; text-decoration: none; transition: color 0.2s; }
.footer-main-site-link:hover { color: #fff; }
