/* Lois du Gotei 13 — Dashboard maquette */

:root {
  --ld-void: #07080c;
  --ld-panel: rgba(14, 16, 22, 0.82);
  --ld-panel-solid: #12141c;
  --ld-line: rgba(201, 168, 100, 0.18);
  --ld-line-soft: rgba(255, 255, 255, 0.06);
  --ld-gold: #c9a864;
  --ld-gold-bright: #e2c58a;
  --ld-gold-dim: rgba(201, 168, 100, 0.12);
  --ld-text: #ece7db;
  --ld-ink: #ece7db;
  --ld-muted: #9a958a;
  --ld-public: #3d9a6a;
  --ld-interne: #4a7ec8;
  --ld-confidentiel: #c9a864;
  --ld-secret: #c24b3f;
  --ld-tres: #8b5bb8;
  --ld-serif: "Cormorant Garamond", Georgia, serif;
  --ld-display: "Cinzel", "Cormorant Garamond", serif;
  --ld-sans: "Outfit", system-ui, sans-serif;
  --ld-jp: "Noto Sans JP", sans-serif;
  --ld-sidebar: 248px;
  --ld-index: 228px;
  --ld-detail: min(460px, 36vw);
  --ld-radius: 10px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

/* Scrollbars thème or / sombre */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 168, 100, 0.45) rgba(255, 255, 255, 0.04);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(8, 9, 13, 0.65);
  border-left: 1px solid rgba(201, 168, 100, 0.08);
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(201, 168, 100, 0.55), rgba(150, 120, 60, 0.45));
  border-radius: 999px;
  border: 2px solid rgba(8, 9, 13, 0.8);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(226, 197, 138, 0.75), rgba(201, 168, 100, 0.55));
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

.ld-body {
  margin: 0;
  color: var(--ld-text);
  font-family: var(--ld-sans);
  background: var(--ld-void);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.ld-world {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 8, 12, 0.55), rgba(7, 8, 12, 0.88)),
    radial-gradient(ellipse 60% 40% at 70% 20%, rgba(201, 168, 100, 0.1), transparent 55%),
    url("../img/soul-society-bg.jpg") center / cover no-repeat;
  filter: saturate(0.75) brightness(0.72);
}

.ld-petals {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
}

.ld-frame {
  position: fixed;
  inset: 10px;
  z-index: 8;
  pointer-events: none;
}

.ld-frame-line {
  position: absolute;
  background: rgba(201, 168, 100, 0.28);
}

.ld-frame-line.top,
.ld-frame-line.bottom { height: 1px; left: 18px; right: 18px; }
.ld-frame-line.left,
.ld-frame-line.right { width: 1px; top: 18px; bottom: 18px; }
.ld-frame-line.top { top: 0; }
.ld-frame-line.bottom { bottom: 0; }
.ld-frame-line.left { left: 0; }
.ld-frame-line.right { right: 0; }

.ld-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(201, 168, 100, 0.55);
}

.ld-corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.ld-corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.ld-corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.ld-corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.ld-petal {
  position: absolute;
  top: -48px;
  width: 14px;
  height: 18px;
  margin-left: -7px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 232, 239, 0.55) 0%, rgba(255, 183, 197, 0.35) 45%, rgba(232, 137, 156, 0.2) 100%);
  border-radius: 70% 10% 70% 10%;
  box-shadow: none;
  opacity: 0.18;
  animation: ld-petal-fall 16s linear infinite;
  will-change: transform, opacity;
  filter: blur(0.4px);
}

@keyframes ld-petal-fall {
  0% {
    transform: translate3d(0, -8vh, 0) rotate(0deg);
    opacity: 0;
  }
  12% { opacity: 0.22; }
  80% { opacity: 0.12; }
  100% {
    transform: translate3d(48px, 112vh, 0) rotate(420deg);
    opacity: 0;
  }
}

.ld-shell {
  position: relative;
  z-index: 2;
  display: block;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
}

/* —— Brand inline —— */
.ld-brand,
.ld-brand-inline {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.ld-brand img,
.ld-brand-inline img {
  width: 2.55rem;
  height: 2.55rem;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(201, 168, 100, 0.25));
}

.ld-brand small {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ld-gold);
}

.ld-brand h1 {
  margin: 0.12rem 0 0;
  font-family: var(--ld-display);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ld-text);
}

.ld-top-link {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ld-muted);
  padding: 0.45rem 0.7rem;
  border: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.ld-top-link:hover { color: var(--ld-text); }

.ld-top-link.is-cta {
  color: var(--ld-gold);
  border-color: rgba(201, 168, 100, 0.4);
  border-radius: 4px;
}

.ld-logout {
  margin: 0;
}

.ld-logout button {
  font-family: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ld-muted);
  background: none;
  border: none;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}

.ld-logout button:hover { color: var(--ld-text); }

/* —— Main —— */
.ld-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  background: transparent;
}

.ld-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--ld-line);
  background: rgba(8, 9, 14, 0.78);
  backdrop-filter: blur(18px);
}

.ld-top-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ld-menu-btn {
  display: none;
}

.ld-top-title h1 {
  margin: 0;
  font-family: var(--ld-serif);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.ld-top-title p {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ld-gold);
}

.ld-brand h1 {
  margin: 0.12rem 0 0;
  font-family: var(--ld-display);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ld-text);
}

.ld-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 460px;
  width: 100%;
  justify-self: center;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--ld-line);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
}

.ld-search-ico {
  display: flex;
  color: var(--ld-muted);
}

.ld-search-ico svg { width: 1rem; height: 1rem; }

.ld-search input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ld-text);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  min-width: 0;
}

.ld-search input::placeholder { color: rgba(154, 149, 138, 0.7); }

.ld-search kbd {
  font-family: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--ld-line-soft);
  border-radius: 5px;
  color: var(--ld-muted);
  background: rgba(255, 255, 255, 0.03);
}

.ld-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.ld-icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--ld-line-soft);
  border-radius: 8px;
  color: var(--ld-muted);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}

.ld-icon-btn:hover { color: var(--ld-gold); border-color: var(--ld-line); }
.ld-icon-btn svg { width: 1rem; height: 1rem; }
.ld-icon-btn i {
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--ld-secret);
  box-shadow: 0 0 0 2px rgba(10, 11, 16, 0.9);
}

.ld-user-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.25rem 0.35rem 0.25rem 0.25rem;
}

.ld-avatar {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(201, 168, 100, 0.35), rgba(201, 168, 100, 0.08));
  border: 1px solid rgba(201, 168, 100, 0.4);
  font-family: var(--ld-serif);
  font-size: 1rem;
  color: var(--ld-gold-bright);
}

.ld-user-card strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
}

.ld-user-card small {
  display: block;
  font-size: 0.68rem;
  color: var(--ld-muted);
}

/* —— Workspace —— */
.ld-workspace {
  flex: 1;
  display: grid;
  grid-template-columns: var(--ld-index) minmax(0, 1fr) var(--ld-detail);
  gap: 0;
  min-height: 0;
  border-bottom: 1px solid var(--ld-line-soft);
}

.ld-index {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--ld-line);
  background:
    linear-gradient(180deg, rgba(201, 168, 100, 0.06), transparent 28%),
    rgba(8, 9, 14, 0.72);
  backdrop-filter: blur(12px);
}

.ld-index-kicker {
  margin: 0;
  padding: 1rem 1rem 0.55rem;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ld-gold);
}

.ld-list-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--ld-line);
  background: rgba(10, 11, 16, 0.55);
  backdrop-filter: blur(12px);
}

.ld-tabs { display: none; }

.ld-chapters {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0.2rem;
  padding: 0 0.7rem 1rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.ld-chip {
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-align: left;
  padding: 0.48rem 0.55rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ld-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.ld-chip-roman {
  font-family: var(--ld-display);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ld-gold);
  opacity: 0.8;
}

.ld-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ld-chip:hover {
  color: var(--ld-text);
  background: rgba(201, 168, 100, 0.08);
}

.ld-chip.is-on {
  color: #1a150c;
  background: var(--ld-gold);
  border-color: var(--ld-gold);
  font-weight: 600;
}

.ld-chip.is-on .ld-chip-roman { color: #1a150c; opacity: 1; }

.ld-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.15rem 0.9rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--ld-line-soft);
}

.ld-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ld-gold);
}

.ld-sev-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ld-sev-btn {
  font-family: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--ld-line-soft);
  background: rgba(0, 0, 0, 0.25);
  color: var(--ld-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.ld-sev-btn:hover { color: var(--ld-text); border-color: var(--ld-line); }

.ld-sev-btn.is-on {
  color: #1a150c;
  background: var(--ld-gold);
  border-color: var(--ld-gold);
  font-weight: 600;
}

.ld-sev-btn.sev-mineure.is-on { background: #3d9a6a; border-color: #3d9a6a; color: #fff; }
.ld-sev-btn.sev-moyenne.is-on { background: #4a7ec8; border-color: #4a7ec8; color: #fff; }
.ld-sev-btn.sev-grave.is-on { background: #c9a864; border-color: #c9a864; color: #1a150c; }
.ld-sev-btn.sev-capitale.is-on { background: #c24b3f; border-color: #c24b3f; color: #fff; }

.ld-count {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ld-muted);
}

.ld-table-wrap {
  flex: 1;
  overflow: auto;
  min-height: 0;
  padding: 0 0.65rem 1rem;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.ld-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ld-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ld-muted);
  font-weight: 500;
  padding: 0.7rem 0.9rem;
  background: rgba(10, 12, 18, 0.96);
  border-bottom: 1px solid var(--ld-line);
}

.ld-table td {
  padding: 0.78rem 0.9rem;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.ld-table tr.law-row td:first-child {
  border-left: 2px solid transparent;
}

.ld-table tr.law-row td:last-child {
  border-right: none;
  border-radius: 0;
}

.ld-table tr.law-row {
  cursor: pointer;
}

.ld-table tr.law-row:hover td {
  background: rgba(201, 168, 100, 0.05);
}

.ld-table tr.law-row.is-selected td {
  background: rgba(201, 168, 100, 0.1);
}

.ld-table tr.law-row.is-selected td:first-child {
  border-left-color: var(--ld-gold);
  box-shadow: none;
}

.ld-table tr.law-row.is-selected td:last-child {
  border-right-color: transparent;
}

.ld-table tr.is-hidden { display: none; }

.ld-chapter-row td {
  padding: 1.15rem 0.85rem 0.55rem !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

.ld-chapter-row .ld-chapter-sep {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.35rem 0;
  border: none;
  border-radius: 0;
  background: none;
  border-bottom: 1px solid rgba(201, 168, 100, 0.22);
}

.ld-chapter-sep .roman {
  font-family: var(--ld-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ld-gold);
  line-height: 1;
  min-width: 1.8rem;
  letter-spacing: 0.08em;
}

.ld-chapter-sep strong {
  display: block;
  font-family: var(--ld-serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ld-text);
}

.ld-chapter-sep small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ld-muted);
}

.ld-table .num {
  font-family: var(--ld-serif);
  font-weight: 600;
  color: var(--ld-gold);
  white-space: nowrap;
  width: 5.5rem;
}

.ld-table .ttl { font-weight: 500; }
.ld-table .ch { color: var(--ld-muted); font-size: 0.84rem; }

.ld-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid transparent;
}

.ld-sev-mineure,
.ld-public { color: #8fe0b0; background: rgba(61, 154, 106, 0.18); border-color: rgba(61, 154, 106, 0.4); }
.ld-sev-moyenne,
.ld-interne { color: #9ec0f0; background: rgba(74, 126, 200, 0.18); border-color: rgba(74, 126, 200, 0.4); }
.ld-sev-grave,
.ld-confidentiel { color: #f0d79a; background: rgba(201, 168, 100, 0.16); border-color: rgba(201, 168, 100, 0.45); }
.ld-sev-capitale,
.ld-secret,
.ld-tres-secret { color: #ffb3aa; background: rgba(194, 75, 63, 0.18); border-color: rgba(194, 75, 63, 0.45); }

.ld-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.ld-mark {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--ld-line-soft);
  color: var(--ld-muted);
  white-space: nowrap;
}

.ld-mark.is-yen { color: var(--ld-gold-bright); border-color: rgba(201, 168, 100, 0.4); }
.ld-mark.is-warn { color: #f0d79a; border-color: rgba(240, 215, 154, 0.35); }
.ld-mark.is-dead { color: #ffb3aa; border-color: rgba(194, 75, 63, 0.45); background: rgba(194, 75, 63, 0.12); }
.ld-mark.is-muted { opacity: 0.45; }

.ld-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #8fe0b0;
}

.ld-status i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #3d9a6a;
  box-shadow: 0 0 8px rgba(61, 154, 106, 0.6);
}

.ld-scope {
  display: inline-block;
  max-width: 9.5rem;
  padding: 0.22rem 0.55rem;
  border: 1px solid rgba(201, 168, 100, 0.28);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ld-gold-bright);
  background: rgba(201, 168, 100, 0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.ld-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--ld-muted);
}

.ld-meta-pane { padding: 1.25rem; overflow: auto; }
.ld-meta-card {
  border: 1px solid var(--ld-line);
  border-radius: var(--ld-radius);
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.25);
}
.ld-meta-card h3 {
  margin: 0 0 0.75rem;
  font-family: var(--ld-serif);
  font-size: 1.35rem;
  color: var(--ld-gold-bright);
}
.ld-meta-card p { margin: 0 0 1rem; color: var(--ld-muted); line-height: 1.55; }
.ld-meta-stats {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
}
.ld-meta-stats li {
  padding: 0.75rem;
  border: 1px solid var(--ld-line-soft);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}
.ld-meta-stats span {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ld-muted);
  margin-bottom: 0.3rem;
}
.ld-meta-stats strong {
  font-family: var(--ld-serif);
  font-size: 1.5rem;
}
.ld-meta-stats .is-hot { color: var(--ld-secret); }
.ld-meta-note { font-size: 0.82rem !important; }

/* —— Detail panel V2 —— */
.ld-detail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  min-width: 0;
  background:
    radial-gradient(ellipse 80% 40% at 0% 0%, rgba(201, 168, 100, 0.1), transparent 50%),
    linear-gradient(180deg, rgba(16, 14, 12, 0.97), rgba(8, 8, 12, 0.99));
  border-left: 1px solid var(--ld-line);
}

.ld-card-edict p {
  font-family: var(--ld-serif);
  font-size: 1.12rem;
  line-height: 1.72;
  text-align: justify;
  hyphens: auto;
}

.ld-detail-head {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.5rem 1.5rem 1.2rem;
  background:
    radial-gradient(ellipse 90% 80% at 100% 0%, rgba(201, 168, 100, 0.15), transparent 55%),
    rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid var(--ld-line);
}

.ld-detail-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ld-detail-num {
  font-family: var(--ld-serif);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ld-gold-bright);
  padding: 0.28rem 0.65rem;
  border: 1px solid rgba(201, 168, 100, 0.4);
  border-radius: 999px;
  background: rgba(201, 168, 100, 0.1);
}

.ld-detail-class {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.ld-detail-class.ld-sev-mineure { color: #8fe0b0; background: rgba(61, 154, 106, 0.18); border-color: rgba(61, 154, 106, 0.4); }
.ld-detail-class.ld-sev-moyenne { color: #9ec0f0; background: rgba(74, 126, 200, 0.18); border-color: rgba(74, 126, 200, 0.4); }
.ld-detail-class.ld-sev-grave { color: #f0d79a; background: rgba(201, 168, 100, 0.16); border-color: rgba(201, 168, 100, 0.45); }
.ld-detail-class.ld-sev-capitale { color: #ffb3aa; background: rgba(194, 75, 63, 0.18); border-color: rgba(194, 75, 63, 0.45); }

.ld-detail-head h2 {
  margin: 0;
  font-family: var(--ld-display);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--ld-text);
}

.ld-detail-chapter {
  margin: 0;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  color: var(--ld-muted);
}

.ld-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.ld-detail-chips span {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--ld-line-soft);
  color: var(--ld-muted);
  background: rgba(0, 0, 0, 0.25);
}

.ld-detail-chips .is-yen { color: var(--ld-gold-bright); border-color: rgba(201, 168, 100, 0.4); }
.ld-detail-chips .is-warn { color: #f0d79a; border-color: rgba(240, 215, 154, 0.35); }
.ld-detail-chips .is-dead { color: #ffb3aa; border-color: rgba(194, 75, 63, 0.45); background: rgba(194, 75, 63, 0.12); }
.ld-detail-chips .is-sev { color: var(--ld-text); border-color: var(--ld-line); }

.ld-detail-tabs { display: none; }

.ld-detail-tabs button {
  font-family: inherit;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ld-muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ld-line-soft);
  border-radius: 9px;
  padding: 0.7rem 0.4rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.ld-detail-tabs button:hover {
  color: var(--ld-text);
  border-color: var(--ld-line);
}

.ld-detail-tabs button.is-on {
  color: #1a150c;
  background: var(--ld-gold);
  border-color: var(--ld-gold);
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(201, 168, 100, 0.22);
}

.ld-detail-body {
  flex: 1;
  overflow: auto;
  padding: 1.25rem 1.35rem;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.ld-detail-body > [data-panel] {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ld-detail-body > [data-panel][hidden] {
  display: none !important;
}

.ld-card {
  margin: 0;
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--ld-line-soft);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    rgba(0, 0, 0, 0.3);
}

.ld-card-soft {
  background: rgba(0, 0, 0, 0.18);
}

.ld-card h3 {
  margin: 0 0 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ld-gold);
  font-weight: 500;
}

.ld-card p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.78;
  color: rgba(236, 231, 219, 0.94);
  font-weight: 300;
}

.ld-facts {
  display: grid;
  gap: 0.5rem;
}

.ld-fact {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--ld-line-soft);
  background: rgba(255, 255, 255, 0.025);
}

.ld-fact dt {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ld-muted);
  padding-top: 0.15rem;
}

.ld-fact dd {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ld-text);
  line-height: 1.35;
}

.ld-refs {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.ld-refs div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ld-line-soft);
  font-size: 0.84rem;
}

.ld-refs div:last-child { border-bottom: none; padding-bottom: 0; }

.ld-refs dt {
  margin: 0;
  color: var(--ld-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.ld-refs dd {
  margin: 0;
  text-align: right;
  color: var(--ld-text);
  max-width: 60%;
}

.ld-sanction-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.ld-sanction-grid > div {
  padding: 0.8rem 0.75rem;
  border: 1px solid var(--ld-line-soft);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  min-height: 4.4rem;
}

.ld-sanction-grid small {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ld-muted);
  margin-bottom: 0.35rem;
}

.ld-sanction-grid strong {
  font-family: var(--ld-serif);
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--ld-muted);
}

.ld-sanction-grid .on strong { color: var(--ld-gold-bright); }
.ld-sanction-grid .dead strong { color: #ffb3aa; }
.ld-sanction-grid .warn strong { color: #f0d79a; }
.ld-sanction-grid .off { opacity: 0.38; }

.ld-peines {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.ld-peines li {
  position: relative;
  padding: 0.55rem 0.7rem 0.55rem 1.35rem;
  border-radius: 8px;
  border: 1px solid var(--ld-line-soft);
  background: rgba(0, 0, 0, 0.2);
  color: rgba(236, 231, 219, 0.88);
  font-size: 0.88rem;
  line-height: 1.4;
}

.ld-peines li::before {
  content: "";
  position: absolute;
  left: 0.65rem;
  top: 0.85rem;
  width: 0.35rem;
  height: 0.35rem;
  background: var(--ld-gold);
  transform: rotate(45deg);
}

.ld-timeline {
  margin: 0;
  padding: 0 0 0 0.85rem;
  list-style: none;
  border-left: 2px solid rgba(201, 168, 100, 0.28);
  display: grid;
  gap: 0.85rem;
}

.ld-timeline li {
  position: relative;
  padding-left: 0.85rem;
}

.ld-timeline li::before {
  content: "";
  position: absolute;
  left: -1.05rem;
  top: 0.35rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--ld-gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 100, 0.15);
}

.ld-timeline strong {
  display: block;
  color: var(--ld-gold);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.ld-timeline span {
  font-size: 0.88rem;
  color: rgba(236, 231, 219, 0.88);
  line-height: 1.45;
}

.ld-detail-foot {
  padding: 1.05rem 1.3rem 1.25rem;
  border-top: 1px solid var(--ld-line);
  background: rgba(0, 0, 0, 0.32);
}

.ld-sign {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0;
  border: none;
}

.ld-sign small {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ld-muted);
  margin-bottom: 0.15rem;
}

.ld-sign-script {
  font-family: var(--ld-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: rgba(236, 231, 219, 0.72);
  letter-spacing: 0.04em;
}

.ld-sign-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  min-width: 0;
}

.ld-sign-rank {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ld-gold);
  font-style: normal;
}

.ld-hanko {
  width: 2.85rem;
  height: 2.85rem;
  display: grid;
  place-items: center;
  border: 2px solid #c24b3f;
  border-radius: 4px;
  color: #c24b3f;
  font-family: var(--ld-jp);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  background: rgba(194, 75, 63, 0.08);
  transform: rotate(-6deg);
  box-shadow: inset 0 0 0 1px rgba(194, 75, 63, 0.25);
  flex-shrink: 0;
}

/* —— Aide gravité —— */
.ld-sev-help {
  width: 1.55rem;
  height: 1.55rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 100, 0.45);
  color: var(--ld-gold);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  background: rgba(201, 168, 100, 0.08);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ld-sev-help:hover {
  background: rgba(201, 168, 100, 0.2);
  border-color: var(--ld-gold);
}

/* —— Page barème gravités —— */
.ld-guide {
  overflow: hidden;
  background: transparent;
  min-height: 0;
}

.ld-guide > .ld-top {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 20;
}

.ld-guide > .ld-footer {
  flex-shrink: 0;
}

.ld-guide-wrap {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 1.25rem 1.35rem 2.5rem;
  display: grid;
  gap: 1.35rem;
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.ld-guide-card.is-hidden,
.ld-pm-block.is-hidden,
.ld-guide-table-wrap.is-hidden,
.ld-guide-note.is-hidden,
.ld-guide-table tbody tr.is-hidden {
  display: none;
}

.ld-guide-intro {
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--ld-line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(201, 168, 100, 0.08), transparent 45%),
    rgba(12, 13, 18, 0.72);
}

.ld-guide-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ld-gold);
}

.ld-guide-intro h2 {
  margin: 0 0 0.55rem;
  font-family: var(--ld-serif);
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  font-weight: 600;
  color: var(--ld-ink);
}

.ld-guide-intro > p {
  margin: 0;
  max-width: 62ch;
  color: var(--ld-muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.ld-guide-intro strong { color: var(--ld-ink); }
.ld-guide-intro em { color: var(--ld-gold); font-style: normal; }

.ld-guide-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1.15rem 0 0;
}

.ld-guide-stats > div {
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--ld-line-soft);
  background: rgba(0, 0, 0, 0.22);
}

.ld-guide-stats dt {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ld-muted);
}

.ld-guide-stats dd {
  margin: 0.2rem 0 0;
  font-family: var(--ld-serif);
  font-size: 1.45rem;
  color: var(--ld-ink);
}

.ld-guide-stats .is-hot {
  border-color: rgba(194, 75, 63, 0.45);
  background: rgba(194, 75, 63, 0.1);
}

.ld-guide-stats .is-hot dd { color: #e07a70; }

.ld-guide-table-wrap h3,
.ld-guide-note h3 {
  margin: 0 0 0.75rem;
  font-family: var(--ld-serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.ld-guide-scroll {
  overflow-x: auto;
  border: 1px solid var(--ld-line);
  border-radius: 14px;
  background: rgba(8, 9, 13, 0.55);
  -webkit-overflow-scrolling: touch;
}

.ld-guide-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
  font-size: 0.88rem;
}

.ld-guide-table th,
.ld-guide-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--ld-line-soft);
  vertical-align: middle;
}

.ld-guide-table th {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ld-muted);
  background: rgba(201, 168, 100, 0.06);
  white-space: nowrap;
}

.ld-guide-table tbody tr:last-child td { border-bottom: 0; }
.ld-guide-table tbody tr:hover td { background: rgba(201, 168, 100, 0.04); }

.ld-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ld-guide-card {
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--ld-line);
  background: rgba(12, 13, 18, 0.72);
  display: grid;
  gap: 0.75rem;
}

.ld-guide-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ld-guide-card header strong {
  font-size: 0.78rem;
  color: var(--ld-muted);
  font-weight: 500;
}

.ld-guide-resume {
  margin: 0;
  color: var(--ld-ink);
  line-height: 1.5;
  font-size: 0.92rem;
}

.ld-guide-card h4 {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ld-gold);
}

.ld-guide-card ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.28rem;
  color: var(--ld-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.ld-guide-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.ld-guide-meta > div {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--ld-line-soft);
  background: rgba(0, 0, 0, 0.2);
}

.ld-guide-meta span {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ld-muted);
}

.ld-guide-meta b {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ld-ink);
}

.ld-guide-ex,
.ld-guide-auth {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ld-muted);
  line-height: 1.45;
}

.ld-guide-ex strong,
.ld-guide-auth strong { color: var(--ld-ink); font-weight: 600; }

.ld-guide-card.sev-mineure { border-color: rgba(120, 168, 120, 0.35); }
.ld-guide-card.sev-moyenne { border-color: rgba(201, 168, 100, 0.4); }
.ld-guide-card.sev-grave { border-color: rgba(210, 130, 70, 0.45); }
.ld-guide-card.sev-capitale { border-color: rgba(194, 75, 63, 0.5); }

.ld-guide-note {
  padding: 1.2rem 1.35rem;
  border-radius: 16px;
  border: 1px solid var(--ld-line);
  background: rgba(12, 13, 18, 0.65);
}

.ld-guide-note p {
  margin: 0 0 1rem;
  max-width: 70ch;
  color: var(--ld-muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.ld-guide-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 100, 0.5);
  background: linear-gradient(135deg, rgba(201, 168, 100, 0.22), rgba(201, 168, 100, 0.08));
  color: var(--ld-gold);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.ld-guide-cta:hover {
  background: linear-gradient(135deg, rgba(201, 168, 100, 0.32), rgba(201, 168, 100, 0.12));
}

/* —— Manuel Police militaire —— */
.ld-pm-page .ld-guide-wrap.ld-pm {
  width: min(1240px, 100%);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  padding-top: 1.1rem;
}

.ld-pm-rail {
  position: sticky;
  top: 0.85rem;
  max-height: calc(100dvh - 5.5rem);
  overflow: auto;
  padding: 1rem 0.85rem 1.1rem;
  border: 1px solid var(--ld-line);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(201, 168, 100, 0.07), transparent 30%),
    rgba(8, 9, 14, 0.88);
  backdrop-filter: blur(12px);
}

.ld-pm-rail-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--ld-line-soft);
}

.ld-pm-rail-brand img {
  width: 2.6rem;
  height: 2.6rem;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(201, 168, 100, 0.25));
}

.ld-pm-rail-brand small {
  display: block;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ld-gold);
}

.ld-pm-rail-brand strong {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--ld-display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ld-text);
  font-weight: 600;
}

.ld-pm-rail-devise {
  margin: 0 0 0.9rem;
  padding: 0.65rem 0.7rem;
  border-left: 2px solid var(--ld-gold);
  background: rgba(201, 168, 100, 0.06);
  font-family: var(--ld-serif);
  font-size: 0.88rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--ld-gold-bright);
}

.ld-pm-rail .ld-pm-toc {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.15rem;
  padding: 0;
  overflow: visible;
}

.ld-pm-rail .ld-pm-toc a {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  border-radius: 4px;
  border-color: transparent;
  background: transparent;
  padding: 0.42rem 0.45rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.ld-pm-rail .ld-pm-toc a span {
  font-family: var(--ld-display);
  color: var(--ld-gold);
  opacity: 0.75;
}

.ld-pm-rail .ld-pm-toc a:hover {
  background: rgba(201, 168, 100, 0.1);
  border-color: transparent;
}

.ld-pm-rail-links {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--ld-line-soft);
}

.ld-pm-rail-links a {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ld-muted);
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--ld-line-soft);
  border-radius: 4px;
  text-align: center;
  transition: color 0.15s, border-color 0.15s;
}

.ld-pm-rail-links a:hover {
  color: var(--ld-gold);
  border-color: rgba(201, 168, 100, 0.45);
}

.ld-pm-content {
  display: grid;
  gap: 1.15rem;
  min-width: 0;
}

.ld-pm-toc-mobile { display: none; }

.ld-pm-hero {
  position: relative;
  overflow: hidden;
  border-radius: 4px !important;
  padding: 1.6rem 1.6rem 1.45rem !important;
  background:
    radial-gradient(ellipse 55% 80% at 100% 0%, rgba(201, 168, 100, 0.14), transparent 55%),
    linear-gradient(135deg, rgba(18, 14, 12, 0.92), rgba(10, 11, 16, 0.88)) !important;
}

.ld-pm-hero-mark {
  position: absolute;
  top: 1.1rem;
  right: 1.2rem;
  display: grid;
  place-items: center;
  opacity: 0.55;
  pointer-events: none;
}

.ld-pm-hero-mark img {
  width: 5.2rem;
  height: 5.2rem;
  object-fit: contain;
  filter: grayscale(0.2) brightness(0.9);
}

.ld-pm-hero-mark span {
  position: absolute;
  font-family: var(--ld-jp);
  font-size: 2.4rem;
  color: rgba(201, 168, 100, 0.35);
  mix-blend-mode: screen;
}

.ld-pm-hero h2 {
  font-family: var(--ld-display) !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: clamp(1.55rem, 3vw, 2.15rem) !important;
  max-width: 16ch;
}

.ld-pm-hero-tag {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ld-gold);
}

.ld-pm-hero > p:not(.ld-guide-kicker):not(.ld-pm-hero-tag) {
  max-width: 52ch;
}

.ld-pm-page .ld-pm-block {
  border-radius: 4px;
  border-color: rgba(201, 168, 100, 0.22);
  background:
    linear-gradient(90deg, rgba(201, 168, 100, 0.04), transparent 28%),
    rgba(10, 11, 16, 0.78);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ld-pm-page .ld-pm-block:hover {
  border-color: rgba(201, 168, 100, 0.4);
}

.ld-pm-page .ld-pm-num {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 168, 100, 0.4);
  border-radius: 4px;
  background: rgba(201, 168, 100, 0.08);
  font-size: 0.95rem;
}

.ld-pm-page .ld-pm-grid article {
  border-radius: 4px;
  border-color: rgba(201, 168, 100, 0.16);
}

.ld-pm-page .ld-pm-oath {
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(201, 168, 100, 0.08);
}

.ld-pm-page .ld-guide-note {
  border-radius: 4px;
}

.ld-pm-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.15rem 0 0.25rem;
}

.ld-pm-toc a {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ld-muted);
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--ld-line-soft);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.ld-pm-toc a:hover {
  color: var(--ld-gold);
  border-color: rgba(201, 168, 100, 0.45);
  background: rgba(201, 168, 100, 0.08);
}

.ld-pm-block {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem 1.25rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--ld-line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(201, 168, 100, 0.05), transparent 40%),
    rgba(12, 13, 18, 0.72);
}

.ld-pm-num {
  margin: 0;
  font-family: var(--ld-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ld-gold);
  line-height: 1.2;
}

.ld-pm-block h3 {
  margin: 0 0 0.45rem;
  font-family: var(--ld-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ld-ink);
}

.ld-pm-lead {
  margin: 0 0 1rem;
  color: var(--ld-muted);
  line-height: 1.55;
  font-size: 0.95rem;
  max-width: 68ch;
}

.ld-pm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.ld-pm-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.ld-pm-grid article {
  padding: 0.9rem 1rem;
  border: 1px solid var(--ld-line-soft);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.ld-pm-grid h4 {
  margin: 0 0 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ld-gold);
  font-weight: 600;
}

.ld-pm-grid p,
.ld-pm-grid li {
  margin: 0;
  color: var(--ld-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.ld-pm-grid ul {
  margin: 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.3rem;
}

.ld-pm-checklist,
.ld-pm-forbid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.ld-pm-checklist li,
.ld-pm-forbid li {
  position: relative;
  padding: 0.7rem 0.85rem 0.7rem 2rem;
  border: 1px solid var(--ld-line-soft);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--ld-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.ld-pm-checklist li::before {
  content: "";
  position: absolute;
  left: 0.8rem;
  top: 1rem;
  width: 0.45rem;
  height: 0.45rem;
  border: 1.5px solid var(--ld-gold);
  border-radius: 2px;
}

.ld-pm-forbid li {
  border-color: rgba(194, 75, 63, 0.28);
  padding-left: 2.1rem;
}

.ld-pm-forbid li::before {
  content: "×";
  position: absolute;
  left: 0.75rem;
  top: 0.55rem;
  color: #e07a70;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}

.ld-pm-checklist strong,
.ld-pm-forbid strong { color: var(--ld-ink); font-weight: 600; }

.ld-pm-checklist a { color: var(--ld-gold); }

.ld-pm-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: pm-step;
  display: grid;
  gap: 0.55rem;
}

.ld-pm-steps li {
  counter-increment: pm-step;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.35rem 0.85rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--ld-line-soft);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.ld-pm-steps li::before {
  content: counter(pm-step, decimal-leading-zero);
  grid-row: 1 / span 2;
  font-family: var(--ld-display);
  font-size: 0.95rem;
  color: var(--ld-gold);
  letter-spacing: 0.04em;
  padding-top: 0.1rem;
}

.ld-pm-steps strong {
  grid-column: 2;
  color: var(--ld-ink);
  font-size: 0.92rem;
}

.ld-pm-steps span {
  grid-column: 2;
  color: var(--ld-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.ld-pm-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.ld-pm-flow > div {
  padding: 0.9rem 0.85rem;
  border: 1px solid var(--ld-line-soft);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.ld-pm-flow span {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 0.45rem;
  border: 1px solid rgba(201, 168, 100, 0.45);
  border-radius: 4px;
  font-family: var(--ld-display);
  font-size: 0.75rem;
  color: var(--ld-gold);
}

.ld-pm-flow strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  color: var(--ld-ink);
}

.ld-pm-flow p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ld-muted);
  line-height: 1.4;
}

.ld-pm-callout {
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--ld-gold);
  border-radius: 0 10px 10px 0;
  background: rgba(201, 168, 100, 0.08);
  color: var(--ld-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.ld-pm-callout strong { color: var(--ld-gold); }

.ld-pm-note {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: rgba(224, 122, 112, 0.95);
  line-height: 1.45;
}

.ld-pm-checkgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.ld-pm-checkgrid label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--ld-line-soft);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--ld-muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.ld-pm-checkgrid input {
  margin-top: 0.15rem;
  accent-color: var(--ld-gold);
}

.ld-pm-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ld-guide-cta-ghost {
  background: transparent;
  border-color: var(--ld-line);
  color: var(--ld-muted);
}

.ld-guide-cta-ghost:hover {
  color: var(--ld-gold);
  border-color: rgba(201, 168, 100, 0.5);
  background: rgba(201, 168, 100, 0.06);
}

.ld-guide-intro a { color: var(--ld-gold); }

.ld-pm-quote {
  margin: 1.1rem 0 0;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--ld-gold);
  background: rgba(201, 168, 100, 0.08);
  font-family: var(--ld-serif);
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ld-ink);
  font-style: italic;
}

.ld-pm-sub {
  margin: 1.25rem 0 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ld-gold);
  font-weight: 600;
}

.ld-pm-text {
  margin: 0 0 0.75rem;
  color: var(--ld-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 70ch;
}

.ld-pm-chain {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid var(--ld-line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
}

.ld-pm-chain > div {
  width: min(100%, 28rem);
  text-align: center;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(201, 168, 100, 0.35);
  border-radius: 8px;
  font-family: var(--ld-display);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ld-gold-bright);
  background: rgba(201, 168, 100, 0.08);
}

.ld-pm-chain > span {
  color: var(--ld-gold);
  font-size: 1rem;
  line-height: 1;
}

.ld-pm-devise {
  margin: 0 0 1rem;
  font-family: var(--ld-serif);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-style: italic;
  color: var(--ld-gold-bright);
  line-height: 1.4;
}

.ld-pm-oath {
  padding: 1.35rem 1.4rem 1.45rem;
  border: 1px solid rgba(201, 168, 100, 0.35);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(201, 168, 100, 0.07), transparent 40%),
    rgba(0, 0, 0, 0.35);
}

.ld-pm-oath-kicker {
  margin: 0 0 0.85rem;
  font-family: var(--ld-display);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ld-gold);
}

.ld-pm-oath p {
  margin: 0 0 0.85rem;
  font-family: var(--ld-serif);
  font-size: 1.08rem;
  line-height: 1.7;
  color: rgba(236, 231, 219, 0.92);
  text-align: justify;
  hyphens: auto;
}

.ld-pm-oath p:last-child { margin-bottom: 0; }

.ld-pm-oath-end {
  margin-top: 1.15rem !important;
  padding-top: 1rem;
  border-top: 1px solid rgba(201, 168, 100, 0.25);
  text-align: center !important;
  font-style: italic;
}

.ld-pm-oath-end strong {
  display: block;
  margin-top: 0.55rem;
  font-family: var(--ld-display);
  font-style: normal;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ld-gold);
}

.ld-guide-table a {
  color: var(--ld-gold);
  text-decoration: none;
}

.ld-guide-table a:hover { text-decoration: underline; }

.ld-detail-handle {
  display: none;
}

.ld-detail-close {
  display: none;
}

.ld-detail-backdrop {
  display: none;
}

body.ld-detail-locked {
  overflow: hidden;
}

/* —— Footer —— */
.ld-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 0.55rem 1rem;
  padding-bottom: max(0.55rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--ld-line-soft);
  background: rgba(8, 9, 13, 0.7);
}

.ld-footer p {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ld-muted);
}

.ld-footer span {
  font-family: var(--ld-jp);
  color: rgba(201, 168, 100, 0.35);
  font-size: 0.9rem;
}

/* —— Responsive : desktop large —— */
@media (max-width: 1280px) {
  :root {
    --ld-detail: min(400px, 34vw);
    --ld-index: 196px;
  }
  .ld-top { gap: 1rem; padding: 0.75rem 1.1rem; }
  .ld-brand h1 { font-size: 1.02rem; letter-spacing: 0.14em; }
}

/* —— Responsive : desktop / tablette paysage —— */
@media (max-width: 1100px) {
  :root { --ld-detail: min(380px, 40vw); }
  .ld-workspace {
    grid-template-columns: minmax(0, 1fr) var(--ld-detail);
    grid-template-rows: auto 1fr;
  }
  .ld-index {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--ld-line);
  }
  .ld-index-kicker {
    padding: 0.7rem 0.9rem;
    white-space: nowrap;
  }
  .ld-chapters {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.55rem 0.85rem 0.55rem 0;
    gap: 0.35rem;
  }
  .ld-chip {
    display: inline-flex;
    grid-template-columns: none;
    width: auto;
    flex: 0 0 auto;
    border-radius: 999px;
    border-color: var(--ld-line-soft);
    background: rgba(0, 0, 0, 0.25);
    padding: 0.4rem 0.75rem;
  }
  .ld-chip-roman { font-size: 0.68rem; }
  .ld-top-title h1 { font-size: 1.35rem; }
  .ld-user-card strong,
  .ld-user-card small { display: none; }
  .ld-table { font-size: 0.84rem; }
  .ld-table th,
  .ld-table td { padding-left: 0.65rem; padding-right: 0.65rem; }
  .ld-sanction-grid { grid-template-columns: 1fr; }
}

/* —— Responsive : tablette —— */
@media (max-width: 980px) {
  .ld-shell,
  .ld-main {
    height: 100dvh;
    max-height: 100dvh;
  }

  .ld-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .ld-list-panel {
    border-right: none;
  }

  .ld-top {
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    padding-top: max(0.75rem, env(safe-area-inset-top));
  }

  .ld-search {
    grid-column: 1 / -1;
    order: 3;
    justify-self: stretch;
    max-width: none;
  }

  .ld-search kbd { display: none; }

  .ld-brand h1 { font-size: 0.92rem; letter-spacing: 0.1em; }
  .ld-brand small { letter-spacing: 0.16em; font-size: 0.55rem; }
  .ld-frame { inset: 6px; }

  .ld-top-link {
    padding: 0.4rem 0.55rem;
    font-size: 0.68rem;
  }

  .ld-chapters {
    padding: 0.7rem 0.85rem 0.3rem;
    gap: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .ld-chip {
    scroll-snap-align: start;
    font-size: 0.68rem;
    padding: 0.42rem 0.7rem;
  }

  .ld-toolbar {
    padding: 0.5rem 0.85rem 0.75rem;
    gap: 0.65rem;
  }

  .ld-table-wrap {
    padding: 0 0.35rem 1rem;
  }

  .ld-table th:nth-child(4),
  .ld-table td:nth-child(4) {
    display: none;
  }

  .ld-detail-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 34;
    background: rgba(4, 5, 8, 0.62);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
  }

  .ld-shell.is-detail-open .ld-detail-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .ld-detail {
    position: fixed;
    inset: auto 0 0 0;
    height: min(86dvh, 720px);
    max-height: calc(100dvh - env(safe-area-inset-top) - 2.5rem);
    z-index: 35;
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--ld-line);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(110%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .ld-shell.is-detail-open .ld-detail {
    transform: none;
  }

  .ld-detail-handle {
    display: block;
    width: 2.6rem;
    height: 0.28rem;
    margin: 0.55rem auto 0.15rem;
    border-radius: 999px;
    background: rgba(201, 168, 100, 0.35);
    flex-shrink: 0;
  }

  .ld-detail-close {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    margin-right: auto;
    font-family: inherit;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ld-gold);
    background: rgba(201, 168, 100, 0.08);
    border: 1px solid rgba(201, 168, 100, 0.35);
    border-radius: 999px;
    padding: 0.35rem 0.7rem 0.35rem 0.45rem;
    cursor: pointer;
  }

  .ld-detail-close:hover,
  .ld-detail-close:focus-visible {
    background: rgba(201, 168, 100, 0.18);
    outline: none;
  }

  .ld-detail-head-top {
    flex-wrap: wrap;
    gap: 0.5rem 0.65rem;
  }

  .ld-detail-head {
    padding: 0.85rem 1.1rem 1rem;
  }

  .ld-detail-head h2 {
    font-size: clamp(1.35rem, 4.5vw, 1.75rem);
  }

  .ld-detail-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .ld-detail-tabs::-webkit-scrollbar { display: none; }

  .ld-detail-tabs button {
    white-space: nowrap;
    min-width: 5.5rem;
  }

  .ld-detail-body {
    padding: 0.9rem 1rem 1.25rem;
  }

  .ld-refs {
    grid-template-columns: 1fr;
  }

  .ld-facts {
    grid-template-columns: 1fr 1fr;
  }

  .ld-footer {
    gap: 0.75rem;
    padding: 0.45rem 0.75rem;
    padding-bottom: max(0.45rem, env(safe-area-inset-bottom));
  }

  .ld-footer p {
    letter-spacing: 0.18em;
    font-size: 0.62rem;
  }
}

/* —— Responsive : mobile —— */
@media (max-width: 640px) {
  .ld-body {
    overflow: hidden;
  }

  .ld-frame { display: none; }

  .ld-top-title h1 {
    font-size: 1.15rem;
  }

  .ld-top-title p {
    font-size: 0.58rem;
    letter-spacing: 0.14em;
  }

  .ld-brand-inline img {
    width: 2rem;
    height: 2rem;
  }

  .ld-user {
    gap: 0.35rem;
  }

  .ld-top-link.is-cta {
    padding: 0.38rem 0.55rem;
  }

  .ld-tabs {
    padding: 0.65rem 0.75rem 0;
  }

  .ld-tabs button {
    padding: 0.55rem 0.65rem;
    font-size: 0.7rem;
  }

  .ld-count {
    width: 100%;
  }

  .ld-sev-filters {
    width: 100%;
  }

  .ld-sev-btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.45rem 0.5rem;
    font-size: 0.65rem;
  }

  /* Table compacte : Art. · Titre · Gravité */
  .ld-table th:nth-child(4),
  .ld-table td:nth-child(4) {
    display: none;
  }

  .ld-table {
    font-size: 0.82rem;
    border-spacing: 0 0.28rem;
  }

  .ld-table th {
    font-size: 0.62rem;
    padding: 0.55rem 0.5rem;
  }

  .ld-table td {
    padding: 0.7rem 0.5rem;
  }

  .ld-table .num {
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .ld-table .ttl {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .ld-badge {
    font-size: 0.62rem;
    padding: 0.22rem 0.45rem;
  }

  .ld-chapter-sep {
    padding: 0.65rem 0.5rem;
  }

  .ld-chapter-sep strong {
    font-size: 0.9rem;
  }

  .ld-detail {
    inset: 0;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    transform: translateX(100%);
  }

  .ld-shell.is-detail-open .ld-detail {
    transform: none;
  }

  .ld-detail-handle {
    display: none;
  }

  .ld-detail-tabs {
    grid-template-columns: repeat(4, minmax(4.5rem, 1fr));
  }

  .ld-detail-tabs button {
    min-width: 0;
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    padding: 0.75rem 0.25rem;
  }

  .ld-facts {
    grid-template-columns: 1fr;
  }

  .ld-sign {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .ld-footer span:first-child,
  .ld-footer span:last-child {
    display: none;
  }
}

/* —— Responsive : très petit mobile —— */
@media (max-width: 380px) {
  .ld-top-link:not(.is-cta) {
    display: none;
  }

  .ld-search {
    padding: 0.5rem 0.65rem;
  }

  .ld-chip {
    font-size: 0.64rem;
    padding: 0.38rem 0.6rem;
  }
}

/* —— Guide / barème responsive —— */
@media (max-width: 1100px) {
  .ld-guide-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ld-guide-stats > div:nth-child(4),
  .ld-guide-stats > div:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 980px) {
  .ld-pm-page .ld-guide-wrap.ld-pm {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .ld-pm-rail { display: none; }

  .ld-pm-toc-mobile {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
    position: sticky;
    top: 0;
    z-index: 5;
    background: linear-gradient(180deg, rgba(8, 9, 14, 0.95), rgba(8, 9, 14, 0.82));
    backdrop-filter: blur(8px);
    margin: 0 -0.15rem;
    padding: 0.45rem 0.15rem;
  }

  .ld-pm-toc-mobile a { flex: 0 0 auto; }

  .ld-pm-hero-mark {
    opacity: 0.28;
    top: 0.7rem;
    right: 0.7rem;
  }

  .ld-pm-hero-mark img {
    width: 3.6rem;
    height: 3.6rem;
  }

  .ld-pm-block {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 1.1rem 1.1rem;
  }

  .ld-pm-grid,
  .ld-pm-grid-2,
  .ld-pm-flow,
  .ld-pm-checkgrid {
    grid-template-columns: 1fr;
  }

  .ld-pm-toc {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
  }

  .ld-pm-toc a {
    flex: 0 0 auto;
  }

  .ld-guide-wrap {
    width: 100%;
    padding: 1rem 0.95rem 2rem;
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
    gap: 1.1rem;
  }

  .ld-guide-intro {
    padding: 1.1rem 1.1rem;
    border-radius: 14px;
  }

  .ld-guide-intro h2 {
    font-size: clamp(1.35rem, 4vw, 1.85rem);
  }

  .ld-guide-intro > p {
    font-size: 0.9rem;
    max-width: none;
  }

  .ld-guide-grid {
    grid-template-columns: 1fr;
  }

  .ld-guide-card {
    padding: 1.05rem 1.05rem 1.15rem;
    border-radius: 14px;
  }

  .ld-guide-note {
    padding: 1.05rem 1.1rem;
  }

  .ld-guide-cta {
    width: 100%;
  }

  /* Tableau récap → cartes empilées */
  .ld-guide-scroll {
    overflow: visible;
    border: none;
    background: transparent;
    border-radius: 0;
  }

  .ld-guide-table {
    min-width: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.75rem;
  }

  .ld-guide-table thead {
    display: none;
  }

  .ld-guide-table tbody tr {
    display: grid;
    gap: 0.55rem;
    padding: 1rem 1.05rem;
    border: 1px solid var(--ld-line);
    border-radius: 14px;
    background: rgba(12, 13, 18, 0.78);
  }

  .ld-guide-table tbody tr:hover td {
    background: transparent;
  }

  .ld-guide-table tbody tr:last-child td {
    border-bottom: 0;
  }

  .ld-guide-table td {
    display: grid;
    grid-template-columns: minmax(7.5rem, 38%) 1fr;
    gap: 0.55rem 0.75rem;
    align-items: start;
    padding: 0;
    border: none;
    font-size: 0.88rem;
    line-height: 1.4;
  }

  .ld-guide-table td::before {
    content: attr(data-label);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ld-muted);
    padding-top: 0.15rem;
  }

  .ld-guide-table td:first-child {
    padding-bottom: 0.35rem;
    margin-bottom: 0.15rem;
    border-bottom: 1px solid var(--ld-line-soft);
  }
}

@media (max-width: 640px) {
  .ld-guide-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .ld-guide-stats > div {
    padding: 0.65rem 0.7rem;
  }

  .ld-guide-stats dd {
    font-size: 1.3rem;
  }

  .ld-guide-stats > div:first-child {
    grid-column: 1 / -1;
  }

  .ld-guide-meta {
    grid-template-columns: 1fr;
  }

  .ld-guide-table td {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .ld-guide-table td::before {
    padding-top: 0;
  }

  .ld-guide-ex,
  .ld-guide-auth {
    font-size: 0.8rem;
  }

  .ld-guide-card ul {
    font-size: 0.84rem;
  }

  .ld-guide .ld-top-link:not(.is-cta) {
    font-size: 0;
    padding: 0.4rem 0.55rem;
  }

  .ld-guide .ld-top-link:not(.is-cta)::before {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .ld-guide .ld-top-link[href="lois.html"]:not(.is-cta)::before {
    content: "Code";
  }

  .ld-guide .ld-top-link[href="police.html"]:not(.is-cta)::before {
    content: "Police";
  }

  .ld-guide .ld-top-link[href*="lois"]:not(.is-cta)::before {
    content: "Code";
  }
}

@media (max-width: 420px) {
  .ld-guide-wrap {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .ld-guide-kicker {
    letter-spacing: 0.14em;
    font-size: 0.64rem;
  }
}

@media print {
  .ld-top, .ld-list-panel, .ld-footer, .ld-world, .ld-petals,
  .ld-detail-backdrop, .ld-detail-close, .ld-detail-handle { display: none !important; }
  .ld-shell, .ld-main, .ld-workspace, .ld-detail { display: block !important; height: auto !important; overflow: visible !important; }
  .ld-detail { position: static !important; transform: none !important; background: white !important; color: black !important; }
}
