:root {
  --ink: #18231f;
  --muted: #6f7771;
  --paper: #f4f1e9;
  --surface: #fffefa;
  --line: #deddd5;
  --forest: #193d32;
  --forest-soft: #e8efeb;
  --orange: #e66a35;
  --orange-soft: #fff0e8;
  --gold: #d9a82e;
  --blue: #3d6f8a;
  --violet: #755e86;
  --shadow: 0 18px 45px rgba(24, 35, 31, .09);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 28px 20px 18px;
  color: #f6f4ed;
  background: var(--forest);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 30px; }
.brand-mark { width: 38px; height: 45px; display: grid; place-items: center; position: relative; border: 1px solid rgba(255,255,255,.45); }
.brand-mark::after { content: ""; position: absolute; inset: 5px -5px -5px 5px; border: 1px solid rgba(255,255,255,.18); }
.brand-mark span { font: 700 23px/1 Georgia, serif; }
.brand strong { display: block; font: 700 19px/1 Georgia, serif; letter-spacing: .08em; }
.brand small { display: block; margin-top: 5px; color: rgba(255,255,255,.55); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.nav-label { margin: 0 12px 9px; color: rgba(255,255,255,.36); font-size: 9px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.nav-label-spaced { margin-top: 28px; }
.nav-item {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 3px 0;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  color: rgba(255,255,255,.68);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  transition: .2s ease;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: rgba(255,255,255,.11); font-weight: 650; }
.nav-item svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:first-of-type svg { fill: currentColor; stroke: none; }
.nav-count { margin-left: auto; min-width: 22px; padding: 3px 6px; border-radius: 20px; color: rgba(255,255,255,.72); background: rgba(255,255,255,.1); font-size: 9px; text-align: center; }
.published-count { margin-left: auto; min-width: 22px; padding: 3px 6px; border-radius: 20px; color: #fff; background: rgba(230,106,53,.65); font-size: 9px; text-align: center; }
.sidebar-foot { margin-top: auto; }
.principle-card { padding: 15px 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.04); }
.principle-card span { color: #d3a84a; font-size: 8px; font-weight: 750; letter-spacing: .16em; }
.principle-card p { margin: 8px 0 0; color: rgba(255,255,255,.77); font: italic 13px/1.45 Georgia, serif; }
.profile { display: flex; align-items: center; gap: 10px; padding: 18px 4px 2px; margin-top: 17px; border-top: 1px solid rgba(255,255,255,.1); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--forest); background: #d9c8a4; font-size: 10px; font-weight: 800; }
.profile strong, .profile small { display: block; }
.profile strong { font-size: 11px; }
.profile small { margin-top: 3px; color: rgba(255,255,255,.42); font-size: 9px; }
.profile button { margin-left: auto; border: 0; color: rgba(255,255,255,.4); background: transparent; cursor: pointer; }

.main-content { min-width: 0; }
.topbar { height: 82px; display: flex; align-items: center; gap: 20px; padding: 0 46px; border-bottom: 1px solid var(--line); background: rgba(244,241,233,.93); }
.search-wrap { width: min(480px, 47vw); min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 13px; }
.search-wrap svg { width: 17px; fill: none; stroke: #858c87; stroke-width: 1.7; }
.search-wrap input { width: 100%; min-width: 0; padding: 10px 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.search-wrap input::placeholder { color: #949994; }
kbd { padding: 4px 7px; border: 1px solid #d7d5ce; border-radius: 5px; color: #959991; background: rgba(255,255,255,.48); font: 9px/1 sans-serif; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.icon-button { position: relative; width: 39px; height: 39px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.icon-button:hover { background: rgba(25,61,50,.07); }
.icon-button svg { width: 19px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.notification-dot { position: absolute; top: 9px; right: 9px; width: 5px; height: 5px; border: 1px solid var(--paper); border-radius: 50%; background: var(--orange); }
.primary-button { height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 16px; border: 0; border-radius: 9px; color: #fff; background: var(--orange); box-shadow: 0 7px 16px rgba(230,106,53,.18); cursor: pointer; font-size: 11px; font-weight: 750; }
.primary-button:hover { background: #d95d2c; transform: translateY(-1px); }
.primary-button svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mobile-menu { display: none; }

.content { max-width: 1440px; margin: 0 auto; padding: 42px 46px 64px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 30px; }
.eyebrow { display: block; margin-bottom: 12px; color: var(--orange); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font: 500 clamp(30px, 3.1vw, 46px)/1.08 Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
.heading-copy { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.date-chip { padding: 10px 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: rgba(255,255,255,.35); font-size: 10px; white-space: nowrap; }
.heading-actions { display: flex; align-items: center; gap: 9px; }
.secondary-button { height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--forest); background: rgba(255,255,255,.5); cursor: pointer; font-size: 10px; font-weight: 750; text-decoration: none; }
.secondary-button:hover { border-color: #bfc6c1; background: var(--surface); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 24px; }
.metric-card { min-width: 0; min-height: 128px; padding: 21px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,254,250,.72); }
.metric-card > span { display: block; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.metric-card strong { display: block; margin: 12px 0 6px; font: 500 31px/1 Georgia, serif; }
.metric-card small { color: #989d98; font-size: 9px; }
.metric-card .progress-track { margin-top: 15px; color: var(--orange); }
.metric-card.accent { color: #fff; border-color: var(--forest); background: var(--forest); }
.metric-card.accent > span, .metric-card.accent small { color: rgba(255,255,255,.57); }

.mission-strip { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 18px; margin-bottom: 25px; padding: 19px 24px; border: 1px solid #e2ded3; border-radius: 14px; background: #eeeadf; }
.mission-step { display: flex; align-items: center; gap: 12px; }
.mission-step b { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #d8d2c4; border-radius: 50%; color: var(--forest); background: rgba(255,255,255,.45); font: 600 11px Georgia, serif; }
.mission-step span { font: 500 14px Georgia, serif; }
.mission-arrow { color: #aaa497; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .72fr); gap: 24px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 10px 35px rgba(24,35,31,.035); }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 25px 26px 18px; }
.panel-header h2 { margin: 0; font: 500 19px Georgia, serif; }
.text-button { border: 0; color: var(--orange); background: transparent; cursor: pointer; font-size: 10px; font-weight: 750; }
.domains-panel { overflow: hidden; }
.domain-list { padding: 0 12px 13px; }
.domain-row { display: grid; grid-template-columns: 42px minmax(0,1fr) 150px 55px 24px; align-items: center; gap: 14px; min-height: 73px; padding: 10px 13px; border-top: 1px solid #eceae4; cursor: pointer; transition: .2s; }
.domain-row:hover { border-radius: 12px; background: #f7f5ef; transform: translateX(2px); }
.domain-number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; font: 600 11px Georgia, serif; }
.domain-info strong, .document-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.domain-info small, .document-info small { display: block; margin-top: 5px; color: #959a95; font-size: 9px; }
.progress-track { height: 4px; overflow: hidden; border-radius: 10px; background: #ebeae5; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: currentColor; }
.progress-label { color: #858b86; font-size: 9px; text-align: right; }
.row-chevron { color: #a8aca8; font-size: 17px; }

.insight-panel, .focus-panel { min-height: 100%; padding: 27px; color: #fff; background: var(--forest); box-shadow: var(--shadow); }
.insight-label { color: #d1a84e; font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.insight-panel blockquote { margin: 45px 0 35px; font: 400 25px/1.35 Georgia, serif; letter-spacing: -.02em; }
.insight-panel blockquote::before { content: "“"; display: block; height: 29px; color: rgba(255,255,255,.24); font-size: 58px; line-height: .8; }
.insight-panel p { color: rgba(255,255,255,.5); font-size: 10px; line-height: 1.65; }
.insight-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 38px; padding-top: 19px; border-top: 1px solid rgba(255,255,255,.13); color: rgba(255,255,255,.5); font-size: 9px; }
.insight-meta b { color: #fff; font-weight: 600; }
.focus-panel h2 { margin: 35px 0 8px; font: 500 24px/1.2 Georgia, serif; }
.focus-panel > p { color: rgba(255,255,255,.54); font-size: 10px; line-height: 1.6; }
.focus-document { width: 100%; margin-top: 28px; padding: 18px; border: 1px solid rgba(255,255,255,.13); border-radius: 13px; color: #fff; background: rgba(255,255,255,.06); cursor: pointer; text-align: left; }
.focus-document:hover { background: rgba(255,255,255,.1); }
.focus-document span { display: block; color: #d1a84e; font-size: 8px; font-weight: 750; text-transform: uppercase; }
.focus-document strong { display: block; margin: 8px 0 15px; font: 500 15px/1.35 Georgia, serif; }
.focus-document div { height: 4px; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.13); }
.focus-document i { display: block; height: 100%; background: var(--orange); }
.focus-document small { display: block; margin-top: 10px; color: rgba(255,255,255,.55); font-size: 9px; }

.lower-grid { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(270px,.72fr); gap: 24px; margin-top: 24px; }
.documents-panel { overflow: hidden; }
.document-table-head, .document-row { display: grid; grid-template-columns: minmax(0,1fr) 95px 80px 44px; align-items: center; gap: 14px; }
.document-table-head { padding: 0 26px 10px; color: #aaa; font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.document-row { min-height: 67px; padding: 10px 26px; border-top: 1px solid #eceae4; }
.doc-leading { display: flex; align-items: center; min-width: 0; gap: 12px; }
.doc-icon { width: 33px; height: 39px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 7px; color: var(--forest); background: var(--forest-soft); font: 700 8px Georgia, serif; }
.doc-domain { color: var(--muted); font-size: 9px; }
.doc-status { color: var(--muted); font-size: 9px; }
.level-pill { justify-self: start; padding: 5px 8px; border-radius: 20px; color: var(--forest); background: #ecf1ee; font-size: 8px; font-weight: 700; }
.more-button { border: 0; color: #aaa; background: transparent; cursor: pointer; }
.favorite-button { width: 31px; height: 31px; padding: 0; border: 0; border-radius: 50%; color: #a7aaa7; background: transparent; cursor: pointer; font-size: 16px; }
.favorite-button:hover { background: #f4f1e9; }
.favorite-button.active { color: var(--gold); }
.stats-panel { padding-bottom: 22px; }
.level-list { padding: 0 27px; }
.level-item { margin: 0 0 18px; }
.level-top { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 9px; }
.level-top strong { font-weight: 650; }
.level-top span { color: #999; }
.level-item .progress-track { height: 5px; color: var(--forest); }

.domain-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.domain-card { min-height: 220px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); cursor: pointer; transition: .2s ease; }
.domain-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.domain-card-top { display: flex; align-items: center; justify-content: space-between; }
.domain-card .domain-number { width: 42px; height: 42px; }
.domain-card .progress-label { font-size: 10px; }
.domain-card h3 { margin: 28px 0 9px; font: 500 20px/1.2 Georgia, serif; }
.domain-card p { min-height: 47px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.domain-card .progress-track { margin-top: 20px; }
.domain-meta { display: flex; justify-content: space-between; color: #969b96; font-size: 9px; }

.pathway { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 0; padding: 35px 24px; }
.path-step { position: relative; padding: 0 15px; text-align: center; }
.path-step:not(:last-child)::after { content: ""; position: absolute; top: 23px; left: calc(50% + 24px); width: calc(100% - 48px); height: 1px; background: #d7d8d2; }
.path-number { position: relative; z-index: 1; width: 46px; height: 46px; display: grid; place-items: center; margin: 0 auto 18px; border: 1px solid #d7d8d2; border-radius: 50%; color: var(--forest); background: var(--surface); font: 600 15px Georgia, serif; }
.path-step.active .path-number { color: #fff; border-color: var(--forest); background: var(--forest); }
.path-step h3 { font: 500 15px Georgia, serif; }
.path-step p { color: var(--muted); font-size: 9px; line-height: 1.5; }
.architecture { margin-top: 24px; padding: 30px; }
.architecture h2 { font: 500 20px Georgia, serif; }
.architecture-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 25px; }
.architecture-flow span { padding: 13px 16px; border: 1px solid var(--line); border-radius: 9px; background: #f7f5ef; font-size: 11px; font-weight: 650; }
.architecture-flow b { color: var(--orange); font-weight: 400; }

.document-catalog { overflow: hidden; }
.catalog-header { display: flex; justify-content: space-between; gap: 24px; padding: 23px 26px 20px; border-bottom: 1px solid #eceae4; }
.catalog-header > div { min-width: 0; }
.filter-label { display: block; margin-bottom: 8px; color: #a0a49f; font-size: 8px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.catalog-tools { display: flex; gap: 8px; }
.filter-chip { padding: 7px 11px; border: 1px solid var(--line); border-radius: 20px; background: transparent; cursor: pointer; font-size: 9px; }
.filter-chip.active { color: #fff; border-color: var(--forest); background: var(--forest); }
.catalog-list .document-row { grid-template-columns: minmax(0,1.4fr) minmax(120px,.6fr) 90px 80px 30px; }
.empty-state { padding: 60px 30px; color: var(--muted); text-align: center; }
.empty-state span { display: block; margin-bottom: 10px; font: 400 34px Georgia, serif; }
.empty-state strong { display: block; color: var(--ink); font: 500 18px Georgia, serif; }
.empty-state p { margin: 7px 0 0; font-size: 10px; }
.doc-status { justify-self: start; padding: 5px 8px; border-radius: 20px; background: #f1efe8; }
.status-validé { color: #2f6b55; background: #e7f1ec; }
.status-en-cours { color: #805d16; background: #fbf1d9; }
.status-brouillon { color: #6e716e; background: #efeee9; }
.status-en-redaction { color: #805d16; background: #fbf1d9; }
.status-en-relecture { color: #6e4d7d; background: #f2eaf5; }
.status-valide { color: #2f6b55; background: #e7f1ec; }
.status-publie { color: #fff; background: var(--forest); }

.charter-layout { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 24px; align-items: start; }
.charter-main { padding: 35px; }
.charter-section + .charter-section { margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--line); }
.charter-index { color: var(--orange); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.charter-section h2 { margin: 8px 0 15px; font: 500 23px Georgia, serif; }
.charter-section p { color: var(--muted); font-size: 11px; line-height: 1.75; }
.principles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.principle { padding: 15px; border-radius: 9px; background: #f6f4ee; font-size: 10px; line-height: 1.45; }
.principle b { display: block; margin-bottom: 6px; color: var(--orange); font-size: 8px; }
.charter-aside { position: sticky; top: 105px; padding: 25px; }
.charter-aside h3 { font: 500 18px Georgia, serif; }
.charter-aside ol { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: doc-plan; }
.charter-aside li { counter-increment: doc-plan; padding: 8px 0; border-bottom: 1px solid #eeece6; color: var(--muted); font-size: 9px; }
.charter-aside li::before { content: counter(doc-plan, decimal-leading-zero); display: inline-block; width: 28px; color: var(--orange); font-size: 8px; }

.back-link { padding: 0; border: 0; color: var(--orange); background: transparent; cursor: pointer; font: inherit; font-weight: inherit; letter-spacing: inherit; }
.detail-favorite { border: 1px solid var(--line); background: rgba(255,255,255,.5); }
.document-detail-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 24px; align-items: start; }
.document-workspace { overflow: hidden; }
.workspace-header { padding: 29px 30px 24px; border-bottom: 1px solid var(--line); }
.workspace-header > div:first-child { display: flex; align-items: center; justify-content: space-between; }
.workspace-header .eyebrow { margin: 0; }
.workspace-header strong { font: 500 26px Georgia, serif; }
.workspace-header .progress-track { height: 7px; margin-top: 18px; color: var(--orange); }
.workspace-header p { margin: 9px 0 0; color: var(--muted); font-size: 9px; }
.section-checklist { padding: 7px 15px 15px; }
.section-item { display: grid; grid-template-columns: 20px 35px 1fr; align-items: center; gap: 12px; min-height: 66px; padding: 9px 14px; border-bottom: 1px solid #efede7; cursor: pointer; transition: .18s ease; }
.section-item:hover { border-radius: 10px; background: #f8f6f0; }
.section-item input { width: 16px; height: 16px; accent-color: var(--forest); }
.section-number { color: var(--orange); font: 600 10px Georgia, serif; }
.section-item strong, .section-item small { display: block; }
.section-item strong { font-size: 11px; }
.section-item small { margin-top: 4px; color: #a0a49f; font-size: 8px; }
.section-item.complete strong { color: #6e7872; }
.section-item.complete .section-number { color: #6c927f; }
.detail-aside { display: grid; gap: 18px; }
.metadata-card, .next-action { padding: 25px; }
.metadata-card dl { margin: 0; }
.metadata-card dl div { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid #eeece6; font-size: 9px; }
.metadata-card dt { color: var(--muted); }
.metadata-card dd { margin: 0; font-weight: 700; text-align: right; }
.status-control { display: block; margin-top: 18px; color: var(--muted); font-size: 9px; font-weight: 750; }
.status-control select { width: 100%; margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #faf9f5; font-size: 10px; }
.next-action { color: #fff; border-color: var(--forest); background: var(--forest); }
.next-action h3 { margin: 20px 0 9px; font: 500 18px/1.3 Georgia, serif; }
.next-action p { margin: 0; color: rgba(255,255,255,.55); font-size: 9px; line-height: 1.6; }
.publication-rule { margin: 12px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }

.manuscript-sections { padding: 20px; background: #f4f1e9; }
.manuscript-section { margin-bottom: 16px; padding: 24px; border: 1px solid #dedbd2; border-radius: 13px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.manuscript-section:focus-within { border-color: #98a99f; box-shadow: 0 8px 28px rgba(25,61,50,.08); }
.manuscript-section.complete { border-left: 3px solid #5c8a73; }
.manuscript-heading { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 13px; align-items: start; }
.manuscript-heading h2 { margin: 0 0 5px; font: 500 17px/1.2 Georgia, serif; }
.manuscript-heading p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.section-validation { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 20px; color: var(--muted); background: #f4f2ec; cursor: pointer; font-size: 8px; font-weight: 750; white-space: nowrap; }
.section-validation input { width: 14px; height: 14px; accent-color: var(--forest); }
.manuscript-section textarea { width: 100%; margin-top: 18px; padding: 16px; border: 1px solid #e1dfd8; border-radius: 9px; outline: 0; color: var(--ink); background: #fbfaf7; font: 400 12px/1.75 Arial, sans-serif; resize: vertical; }
.manuscript-section textarea:focus { border-color: var(--forest); background: #fff; box-shadow: 0 0 0 3px rgba(25,61,50,.06); }
.section-footer { display: flex; justify-content: space-between; margin-top: 9px; color: #9da09b; font-size: 8px; }

.publishing-hero { display: flex; justify-content: space-between; align-items: center; gap: 30px; margin-bottom: 24px; padding: 32px; color: #fff; border-color: var(--forest); background: var(--forest); }
.publishing-hero h2 { margin: 8px 0; font: 500 25px Georgia, serif; }
.publishing-hero p { max-width: 650px; margin: 0; color: rgba(255,255,255,.63); font-size: 10px; line-height: 1.65; }
.publishing-hero > strong { min-width: 110px; color: var(--gold); font: 500 42px Georgia, serif; text-align: center; }
.publishing-hero > strong small { display: block; margin-top: 4px; color: rgba(255,255,255,.6); font: 600 8px Arial, sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.publication-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.publication-card { min-height: 270px; padding: 28px; cursor: pointer; transition: .2s ease; }
.publication-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.publication-level { color: var(--orange); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.publication-card h2 { margin: 24px 0 12px; font: 500 21px/1.25 Georgia, serif; }
.publication-card p { min-height: 65px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.publication-card > div:not(.publication-actions) { display: flex; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line); color: #929792; font-size: 8px; }
.publication-card .text-button { padding: 0; }
.publication-actions { display: flex; align-items: center; gap: 12px; }
.publication-actions a { color: var(--forest); font-size: 9px; font-weight: 750; text-decoration: none; }
.empty-action { margin: 20px auto 0; }

.reader-shell { max-width: 920px; margin: -15px auto 0; }
.reader-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.reader-cover { min-height: 410px; display: flex; flex-direction: column; justify-content: flex-end; padding: 55px; border-radius: 18px 18px 0 0; color: #fff; background: linear-gradient(135deg,#173c31,#285747); }
.reader-cover > span { color: #d6a54d; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.reader-cover h1 { max-width: 700px; margin: 24px 0 16px; font: 500 45px/1.08 Georgia, serif; }
.reader-cover p { max-width: 650px; color: rgba(255,255,255,.65); font-size: 13px; line-height: 1.65; }
.reader-cover > div { display: flex; gap: 20px; margin-top: 35px; color: rgba(255,255,255,.72); font-size: 9px; }
.reader-cover b { color: #fff; }
.reader-body { padding: 30px 65px 60px; border: 1px solid var(--line); border-top: 0; background: #fff; }
.reader-body section { display: grid; grid-template-columns: 35px 1fr; gap: 18px; padding: 38px 0; border-bottom: 1px solid var(--line); }
.reader-body section > span { color: var(--orange); font: 600 11px Georgia, serif; }
.reader-body h2 { margin: 0 0 15px; font: 500 24px Georgia, serif; }
.reader-body p { margin: 0; color: #4e554f; font: 400 12px/1.9 Arial, sans-serif; }
.reader-body .reader-empty { color: #a2a6a2; font-style: italic; }
.reader-footer { padding: 22px; color: rgba(255,255,255,.65); background: var(--forest); text-align: center; font-size: 8px; letter-spacing: .08em; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(15,28,24,.64); backdrop-filter: blur(4px); }
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; width: min(560px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; padding: 38px; border-radius: 20px; background: var(--surface); box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal-close { position: absolute; top: 18px; right: 19px; width: 32px; height: 32px; border: 0; border-radius: 50%; color: #777; background: #f2f0ea; cursor: pointer; font-size: 21px; }
.modal h2 { margin-bottom: 9px; font: 500 27px Georgia, serif; }
.modal-intro { color: var(--muted); font-size: 10px; line-height: 1.6; }
.modal form { margin-top: 25px; }
.modal label { display: block; margin-bottom: 17px; font-size: 9px; font-weight: 750; }
.modal input, .modal select, .modal textarea { width: 100%; margin-top: 8px; padding: 12px 13px; border: 1px solid #dcdad2; border-radius: 8px; outline: 0; color: var(--ink); background: #fbfaf6; font-size: 11px; resize: vertical; }
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(25,61,50,.08); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.template-note { display: flex; flex-direction: column; gap: 5px; margin: 4px 0 22px; padding: 14px; border-radius: 9px; color: var(--forest); background: var(--forest-soft); font-size: 9px; }
.template-note span { color: #718079; }
.submit-button { width: 100%; }
.submit-button span { margin-left: auto; }
.toast { position: fixed; right: 26px; bottom: 26px; z-index: 120; max-width: 360px; padding: 14px 18px; border-radius: 10px; color: #fff; background: var(--forest); box-shadow: var(--shadow); opacity: 0; transform: translateY(15px); pointer-events: none; transition: .25s; font-size: 11px; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .domain-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .domain-row { grid-template-columns: 42px minmax(0,1fr) 95px 45px 15px; }
  .dashboard-grid, .lower-grid { grid-template-columns: minmax(0,1fr) 270px; }
  .publication-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 880px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); box-shadow: 20px 0 50px rgba(0,0,0,.2); transition: .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: grid; }
  .topbar { padding: 0 22px; }
  .content { padding: 32px 22px 50px; }
  .dashboard-grid, .lower-grid, .charter-layout, .document-detail-grid { grid-template-columns: 1fr; }
  .insight-panel blockquote { margin: 35px 0 25px; }
  .charter-aside { position: static; }
}
@media (max-width: 620px) {
  .topbar { height: 70px; gap: 6px; }
  .search-wrap { width: auto; flex: 1; padding: 0 7px; }
  .search-wrap kbd, .topbar-actions .icon-button { display: none; }
  .primary-button { padding: 0 11px; }
  #newDocumentBtn { width: 40px; font-size: 0; }
  #newDocumentBtn svg { width: 17px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .heading-actions { width: 100%; }
  .heading-actions .secondary-button, .heading-actions .primary-button { flex: 1; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { min-height: 112px; padding: 17px; }
  .mission-strip { grid-template-columns: 1fr; gap: 10px; }
  .mission-arrow { display: none; }
  .domain-grid { grid-template-columns: 1fr; }
  .domains-panel .panel-header .text-button { display: none; }
  .catalog-header { flex-direction: column; padding: 18px; }
  .catalog-tools { width: 100%; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
  .catalog-tools::-webkit-scrollbar { display: none; }
  .filter-chip { flex: 0 0 auto; }
  .domain-row { grid-template-columns: 38px minmax(0,1fr) 35px 15px; }
  .domain-row .progress-track { display: none; }
  .document-table-head { display: none; }
  .document-row, .catalog-list .document-row { grid-template-columns: minmax(0,1fr) auto 24px; }
  .document-row .doc-domain, .catalog-list .document-row .doc-domain, .catalog-list .document-row .doc-status { display: none; }
  .document-row .level-pill { display: block; }
  .catalog-list .document-row { grid-template-columns: minmax(0,1fr) auto 24px; }
  .workspace-header { padding: 23px 20px 20px; }
  .section-checklist { padding: 4px 7px 10px; }
  .section-item { grid-template-columns: 19px 28px 1fr; padding: 9px 8px; }
  .manuscript-sections { padding: 9px; }
  .manuscript-section { padding: 17px; }
  .manuscript-heading { grid-template-columns: 28px 1fr; }
  .section-validation { grid-column: 2; justify-self: start; }
  .publishing-hero { align-items: flex-start; flex-direction: column; }
  .publication-grid { grid-template-columns: 1fr; }
  .reader-cover { min-height: 350px; padding: 30px; }
  .reader-cover h1 { font-size: 34px; }
  .reader-body { padding: 20px 25px 40px; }
  .reader-body section { grid-template-columns: 25px 1fr; }
  .pathway { grid-template-columns: 1fr; gap: 20px; }
  .path-step { display: grid; grid-template-columns: 46px 1fr; gap: 16px; text-align: left; }
  .path-step:not(:last-child)::after { top: 46px; bottom: -21px; left: 37px; width: 1px; height: auto; }
  .path-number { margin: 0; grid-row: span 2; }
  .path-step h3 { margin: 3px 0 0; }
  .principles-grid, .form-grid { grid-template-columns: 1fr; }
  .modal { padding: 32px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media print {
  .sidebar, .topbar, .reader-toolbar, .toast { display: none !important; }
  .app-shell { display: block; }
  .content { max-width: none; padding: 0; }
  .reader-shell { max-width: none; margin: 0; }
  .reader-cover, .reader-footer { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .reader-cover { min-height: 90vh; border-radius: 0; break-after: page; }
  .reader-body { padding: 0 40px; border: 0; }
  .reader-body section { break-inside: avoid; }
}
