/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Document Tabs — inlined plain CSS.
 * NOTE: do NOT @import a separate components/*.css here. Under Propshaft
 * (no build step) a bare @import resolves to an undigested path and 404s,
 * and this app's Tailwind is the CDN Play build which never processes
 * @apply in external files. So only build-independent plain CSS belongs
 * here; tab utility styling lives as inline Tailwind classes in the view. */
.tab-button {
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease-in-out;
}
.tab-button:hover .material-icons-round {
  animation: bounce-icon 0.4s ease-in-out;
}
@keyframes bounce-icon {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}
[role="tabpanel"] {
  transition: opacity 300ms ease-in-out;
}
.tab-button:focus-visible {
  outline: none;
  border-radius: 0.25rem;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #C41230;
}

/* ── Cited References — inline marks in Full Text ────────────────────── */
mark.cited-ref-mark {
  background: #FECDD3;
  color: #C41230;
  border-radius: 2px;
  padding: 0 2px;
  font-style: inherit;
  cursor: pointer;
}
mark.cited-ref-mark.active {
  background: #C41230;
  color: #fff;
  border-radius: 3px;
  outline: 2px solid #C41230;
  outline-offset: 1px;
}

/* ── Floating cited-reference navigator (Classic "Search Matches" style) ── */
#cited-ref-nav {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 0.625rem;
  background: #1e293b;
  color: #f1f5f9;
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  z-index: 9999;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
  user-select: none;
  animation: nav-in 0.2s ease;
}
@keyframes nav-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.cited-nav-label {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #94a3b8;
}
.cited-nav-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  background: rgba(255,255,255,0.1);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  min-width: 3.5rem;
  text-align: center;
}
.cited-nav-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #f1f5f9;
  cursor: pointer;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  padding: 0;
}
.cited-nav-btn .material-icons-round { font-size: 1.125rem; }
.cited-nav-btn:hover { background: #C41230; }
.cited-nav-close:hover { background: rgba(255,255,255,0.2) !important; }

/* Sidebar citation items — show count badge and cursor pointer */
.cited-ref-item { cursor: pointer; transition: opacity 0.15s; }
.cited-ref-item:hover { opacity: 1 !important; }
.cited-ref-count {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  font-size: 0.5625rem;
  font-weight: 800;
  background: #C41230;
  color: #fff;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Footnote references in legal opinion text ───────────────────────
 * Inline refs: dark red superscript, hover shows "Footnote N" tooltip,
 * click smooth-scrolls within the reading pane to the footnote def.
 * Footnote definitions: stamped with id="fn-N" by the JS controller. */
sup.lp-fn-ref {
  line-height: 0;
  vertical-align: super;
  font-size: 0.65em;
}
sup.lp-fn-ref a {
  color: #9B1C1C;           /* dark red — CD Asia brand accent */
  font-weight: 700;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  text-decoration: none;
  padding: 0 0.15em;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
}
sup.lp-fn-ref a:hover {
  background: #FEE2E2;
  color: #7F1D1D;
  text-decoration: none;
}
/* Flash highlight when the reading pane scrolls to the footnote def */
@keyframes fn-highlight {
  0%   { background: #FEE2E2; border-left-color: #9B1C1C; }
  70%  { background: #FEE2E2; border-left-color: #9B1C1C; }
  100% { background: transparent; border-left-color: transparent; }
}
.lp-footnote-def {
  scroll-margin-top: 1rem;
  padding-left: 0.5rem;
  border-left: 3px solid transparent;
  transition: border-left-color 0.2s;
}
.lp-footnote-highlight {
  animation: fn-highlight 1.8s ease forwards;
}

/* ── Document tab panels — elegant reading surfaces ──────────────────
 * Navy primary per DESIGN.md (#C41230). Plain CSS only (no @apply). */

/* Section header: soft navy icon tile + serif title */
.doc-section { margin-bottom: 1.25rem; }
.doc-section__head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.25rem; }
.doc-section__icon {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 0.625rem;
  background: #FFF0F2; color: #C41230;
}
.doc-section__icon .material-icons-round { font-size: 1.25rem; }
.doc-section__title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 700; font-size: 1.375rem; line-height: 1.2; color: #0f172a;
}
.doc-section__sub {
  font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: #64748b; font-weight: 600; margin-top: 0.125rem;
}

/* Reading card: white surface, navy top accent, soft elevation */
.doc-card {
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.doc-card:hover { box-shadow: 0 6px 20px rgba(26, 58, 107, 0.08); border-color: #F9A8B4; }
.doc-card__accent { height: 3px; background: linear-gradient(90deg, #C41230 0%, #E84060 100%); }
.doc-card__body { padding: 1.5rem; }
.doc-card__label {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 700; font-size: 1.0625rem; color: #0f172a; margin-bottom: 0.625rem;
}
.doc-card__label .material-icons-round { font-size: 1.125rem; color: #C41230; }

/* Full-text reading container with refined scrollbar + bottom fade */
.doc-reading {
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.75rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: #c7d2e3 transparent;
}
.doc-reading::-webkit-scrollbar { width: 8px; }
.doc-reading::-webkit-scrollbar-thumb { background: #c7d2e3; border-radius: 9999px; border: 2px solid #fff; }
.doc-reading::-webkit-scrollbar-thumb:hover { background: #9fb3d1; }
/* No max-width cap — the full text fills the entire reading column.
 * Legal researchers need every pixel of horizontal space for long opinions. */
.doc-reading .lp-prose { max-width: none; }

/* Elegant empty state */
.doc-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.875rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
.doc-empty .material-icons-round { font-size: 2.5rem; color: #94a3b8; display: block; margin-bottom: 0.75rem; }
.doc-empty p { font-size: 0.875rem; color: #64748b; }

/*
 * LEGACY REQUIRES (Commented out for Propshaft/Missing Assets)
 * = require plugin/jquery/ui.resizable
 * = require plugin/jquery/ui.draggable
 * = require plugin/supersized
 * = require plugin/supersized.shutter
 * = require frameworks/main.v1
 * = require frameworks/main.i
 * = require frameworks/main.form.smart
 * = require frameworks/main.chosen
 * = require frameworks/main.note
 * = require frameworks/main.card
 * = require frameworks/main.contextMenu
 * = require frameworks/main.g
 * = require frameworks/main.annotations
 * = require frameworks/custom_landing_page
 * = require frameworks/leb_custom_page
 * = require frameworks/responsive_page
 * = require frameworks/new_landing_page
 * = require frameworks/lexicons
 * = require frameworks/msd-users
 * = require frameworks/msd-groups
 * = require frameworks/main.sections
 * = require frameworks/main.subscriptions-legend
 */

/* ── Material Design 3 + Tailwind coexistence ──────────────────────────────
 * Body font: Source Sans 3 (loaded via Google Fonts in layouts)
 * Heading font: Source Serif 4 (loaded via Google Fonts in layouts)
 * Keep Tailwind status badges, tables, pagination, flash messages as-is.
 * ──────────────────────────────────────────────────────────────────────── */
body {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--md-sys-color-surface, #F8F9FD);
  color: var(--md-sys-color-on-surface, #1A1C20);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Source Serif 4', Georgia, serif;
  line-height: 1.3;
}

/* Legal citations, G.R. numbers, inline code */
code, .citation, .gr-number, .citation-ref {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 13px;
}

/* Tailwind Typography - Prose Styles for Markdown */
.prose {
    color: #374151;
    max-width: 65ch;
}

.prose h1 {
    color: #111827;
    font-weight: 800;
    font-size: 2.25em;
    margin-top: 0;
    margin-bottom: 0.8888889em;
    line-height: 1.1111111;
}

.prose h2 {
    color: #111827;
    font-weight: 700;
    font-size: 1.5em;
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.3333333;
}

.prose h3 {
    color: #111827;
    font-weight: 600;
    font-size: 1.25em;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    line-height: 1.6;
}

.prose h4 {
    color: #111827;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.5;
}

/* CD Asia Opinion Reader
 *
 * This is the canonical reading style for court opinions, especially Supreme
 * Court decisions imported from varied source HTML. Source markup is preserved
 * for citations and anchors, but CD Asia owns the presentation.
 */
.cda-opinion {
    /* ── Design System Integration (DESIGN.md) ──────────────────────────── */
    --cda-opinion-ink: var(--md-sys-color-on-surface, #1A1C20);
    --cda-opinion-muted: var(--md-sys-color-on-surface-variant, #44464F);
    --cda-opinion-rule: var(--md-sys-color-outline-variant, #C5C6D0);
    --cda-opinion-crimson: var(--md-sys-color-primary, #C41230);
    /* Max-width optimized for legal document readability (per DESIGN.md 6) */
    max-width: 820px;
    margin-inline: auto;
    color: var(--cda-opinion-ink);
    /* DESIGN.md typography stack (Section 5) */
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 17px;
    line-height: 1.85;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
}

.cda-opinion,
.cda-opinion :where(p, div, span:not([class]), font, center, intro, section, article, li, td, th, blockquote) {
    color: var(--cda-opinion-ink) !important;
    font-family: 'Source Serif 4', Georgia, serif !important;
    font-size: inherit;
    line-height: inherit;
    letter-spacing: 0 !important;
    background: transparent !important;
}

.cda-opinion :where(h1, h2, h3, h4, h5, h6) {
    color: var(--md-sys-color-on-surface, #1A1C20) !important;
    font-family: 'Source Serif 4', Georgia, serif !important;
    letter-spacing: 0 !important;
    font-weight: 600;
}

.cda-opinion :where(p, div) {
    margin-block: 0 1.05rem;
}

.cda-opinion > :first-child {
    margin-top: 0;
}

.cda-opinion :where(center, [align="center"]) {
    display: block;
    text-align: center !important;
}

.cda-opinion :where([align="right"]) {
    text-align: right !important;
}

.cda-opinion :where([align="left"]) {
    text-align: left !important;
}

.cda-opinion :where(p, li) {
    text-align: justify;
    text-wrap: pretty;
}

.cda-opinion :where(center, center *, [align="center"], [align="center"] *) {
    text-align: center !important;
}

.cda-opinion :where(b, strong) {
    color: var(--md-sys-color-on-surface, #1A1C20) !important;
    font-weight: 700;
}

.cda-opinion :where(i, em) {
    font-style: italic;
}

.cda-opinion :where(h1) {
    margin: 0 0 1.25rem;
    font-size: 1.55rem;
    line-height: 1.35;
    font-weight: 700;
    text-align: center;
}

.cda-opinion :where(h2) {
    margin: 2rem 0 1rem;
    font-size: 1.25rem;
    line-height: 1.45;
    font-weight: 700;
    text-align: center;
}

.cda-opinion :where(h3, h4, h5, h6) {
    margin: 1.5rem 0 0.75rem;
    font-size: 1.05rem;
    line-height: 1.55;
    font-weight: 700;
}

/* OCR-ingested documents use bare <h3> for section headings (DECISION,
   The Case, The Ruling of the RTC …).  Give them the same visual treatment
   as .cda-opinion-heading so they render as centred crimson upper-case
   headings rather than plain left-aligned bold text. */
.cda-opinion h3 {
    margin: 18pt 9pt 12pt !important;
    color: var(--cda-opinion-crimson) !important;
    font-size: 1rem !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase;
    text-align: center !important;
    text-indent: 0 !important;
    line-height: 1.55;
}

.cda-opinion :where(table) {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: 0.94em;
}

.cda-opinion :where(th, td) {
    border: 1px solid #e4ded2;
    padding: 0.65rem 0.8rem;
    vertical-align: top;
    text-align: left;
}

.cda-opinion :where(th) {
    background: #f8f4ec !important;
    font-weight: 700;
}

.cda-opinion :where(blockquote) {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--cda-opinion-crimson);
    background: #fbf8f2 !important;
    color: #3f3f46 !important;
    font-size: 0.96em;
}

.cda-opinion :where(sup) {
    font-size: 0.72em;
    line-height: 0;
    vertical-align: super;
}

.cda-opinion .cda-opinion-footnote-ref,
.cda-opinion .cda-opinion-footnote-back {
    color: var(--cda-opinion-crimson) !important;
    font-family: 'Source Serif 4', Georgia, serif !important;
    font-weight: 700;
    text-decoration: none;
}

.cda-opinion .cda-opinion-footnote-ref {
    padding-inline: 0.06rem;
    position: relative;
    outline: none;
}

.cda-opinion .cda-opinion-footnote-ref:hover,
.cda-opinion .cda-opinion-footnote-ref:focus-visible,
.cda-opinion .cda-opinion-footnote-back:hover {
    color: #6f1322 !important;
    text-decoration: underline;
}

.cda-opinion .cda-opinion-footnote-ref[data-footnote-preview]::before,
.cda-opinion .cda-opinion-footnote-ref[data-footnote-preview]::after {
    position: absolute;
    left: 50%;
    z-index: 40;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 0.35rem);
    transition: opacity 120ms ease, transform 120ms ease;
}

.cda-opinion .cda-opinion-footnote-ref[data-footnote-preview]::before {
    content: attr(data-footnote-preview);
    bottom: calc(100% + 0.75rem);
    width: min(34rem, 78vw);
    max-height: 16rem;
    overflow: hidden;
    padding: 0.85rem 1rem 0.9rem;
    border: 1px solid var(--md-sys-color-outline-variant, #C5C6D0);
    border-top: 3px solid var(--cda-opinion-crimson);
    border-radius: 6px;
    background: var(--md-sys-color-surface-container-lowest, #F8F9FD) !important;
    box-shadow: 0 18px 45px rgba(26, 58, 107, 0.15), 0 4px 12px rgba(26, 58, 107, 0.08);
    color: var(--md-sys-color-on-surface, #1A1C20) !important;
    font-family: 'Source Serif 4', Georgia, serif !important;
    font-size: 0.86rem;
    font-weight: 400;
    line-height: 1.55;
    text-align: left;
    text-decoration: none;
    white-space: normal;
}

.cda-opinion .cda-opinion-footnote-ref[data-footnote-preview]::after {
    content: "";
    bottom: calc(100% + 0.36rem);
    width: 0.75rem;
    height: 0.75rem;
    border-right: 1px solid #d8cfc0;
    border-bottom: 1px solid #d8cfc0;
    background: #fffdf8 !important;
    transform: translate(-50%, 0.35rem) rotate(45deg);
}

.cda-opinion .cda-opinion-footnote-ref[data-footnote-preview]:hover::before,
.cda-opinion .cda-opinion-footnote-ref[data-footnote-preview]:hover::after,
.cda-opinion .cda-opinion-footnote-ref[data-footnote-preview]:focus-visible::before,
.cda-opinion .cda-opinion-footnote-ref[data-footnote-preview]:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0) rotate(0deg);
}

.cda-opinion .cda-opinion-footnote-ref[data-footnote-preview]:hover::after,
.cda-opinion .cda-opinion-footnote-ref[data-footnote-preview]:focus-visible::after {
    transform: translate(-50%, 0) rotate(45deg);
}

.cda-opinion .cda-opinion-footnote {
    scroll-margin-top: 7rem;
    margin: 3pt 9pt;
    padding-left: 36pt;
    text-indent: -24pt;
    color: #3f3f46 !important;
    font-size: 0.9em;
    line-height: 1.6;
    text-align: left;
}

.cda-opinion .cda-opinion-footnote:target,
.cda-opinion .cda-opinion-footnote-ref:target {
    border-radius: 4px;
    background: #fff3f3 !important;
    box-shadow: 0 0 0 3px #fff3f3;
}

.cda-opinion :where(a) {
    color: var(--cda-opinion-crimson) !important;
    text-decoration: none;
    text-underline-offset: 0.16em;
}

.cda-opinion :where(a:hover) {
    text-decoration: underline;
}

.cda-opinion a.citation-link {
    color: #4f46e5 !important;
    font-family: inherit !important;
    font-weight: 700;
}

/* ── Tables ──────────────────────────────────────────────────────────── */
.cda-opinion .cda-opinion-table-wrapper {
    overflow-x: auto;
    margin: 1.25rem 0;
    border-radius: 4px;
}

.cda-opinion .cda-opinion-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 0.92em;
    line-height: 1.55;
    color: var(--md-sys-color-on-surface, #1A1C20) !important;
}

.cda-opinion .cda-opinion-table td,
.cda-opinion .cda-opinion-table th {
    border: 1px solid #c8bfb0;
    padding: 0.45rem 0.7rem;
    vertical-align: top;
    background: transparent !important;
    color: inherit !important;
}

.cda-opinion .cda-opinion-table th,
.cda-opinion .cda-opinion-table thead td {
    background: #f5f0e8 !important;
    font-weight: 700;
    text-align: center;
}

.cda-opinion .cda-opinion-table tr:nth-child(even) td {
    background: #faf8f4 !important;
}

/* ── Images ──────────────────────────────────────────────────────────── */
.cda-opinion img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border: 1px solid #e2d9cc;
    border-radius: 4px;
}

.cda-opinion :where(.citation-link, .citation-link *) {
    background: transparent;
}

.cda-opinion :where(.ai-citation-badge, [data-method]) {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.cda-opinion :where(img) {
    max-width: 100%;
    height: auto;
}

.cda-opinion :where(hr) {
    height: 1px;
    margin: 2rem auto;
    border: 0;
    background: linear-gradient(to right, transparent, var(--cda-opinion-rule), transparent);
}

.cda-opinion :where(ul, ol) {
    margin: 1rem 0 1.25rem;
    padding-left: 1.4rem;
}

.cda-opinion :where(li) {
    margin-bottom: 0.55rem;
}

.cda-opinion .cda-opinion-caption,
.cda-opinion .cda-opinion-title,
.cda-opinion .cda-opinion-heading {
    text-align: center !important;
    text-indent: 0;
}

.cda-opinion .cda-opinion-caption {
    margin: 6pt 9pt;
    font-weight: 700;
}

.cda-opinion .cda-opinion-title {
    margin: 18pt 36pt 23pt 45pt;
    max-width: 680px;
    font-weight: 700;
    line-height: 1.65;
    text-align: justify !important;
}

.cda-opinion .cda-opinion-heading {
    margin: 18pt 9pt 12pt;
    color: var(--cda-opinion-crimson) !important;
    font-size: 1rem;
    letter-spacing: 0.18em !important;
    text-transform: uppercase;
}

.cda-opinion .cda-opinion-section {
    margin: 14pt 9pt 8pt;
    font-size: 0.95rem;
    font-weight: 700;
    font-style: italic;
    text-align: center !important;
    text-indent: 0;
}

.cda-opinion .cda-opinion-ponente {
    margin: 6pt 9pt;
    font-weight: 700;
    text-align: left !important;
    text-indent: 0;
}

.cda-opinion .cda-opinion-paragraph {
    margin: 6pt 9pt;
    text-align: justify;
    text-indent: 36pt;
}

/* Numbered footnotes at the bottom of pages / sections.
   Hanging indent: number flush-left, wrapped text indented below. */
.cda-opinion .cda-opinion-footnote-item {
    margin: 2pt 9pt;
    padding-left: 28pt;
    text-indent: -20pt;
    font-size: 0.85em;
    line-height: 1.55;
    color: var(--cda-opinion-muted) !important;
    text-align: left;
}

/* Draw a thin rule above the first footnote item to separate it from body */
.cda-opinion .cda-opinion-footnote-item:first-child,
.cda-opinion *:not(.cda-opinion-footnote-item) + .cda-opinion-footnote-item {
    margin-top: 16pt;
    padding-top: 8pt;
    border-top: 1px solid var(--cda-opinion-rule);
}

.cda-opinion .cda-opinion-page-marker {
    display: block;
    position: relative;
    scroll-margin-top: 7rem;
    margin: 1.45rem 9pt 0.85rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--cda-opinion-rule);
    color: var(--cda-opinion-muted) !important;
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em !important;
    line-height: 1;
    text-align: right;
    text-decoration: none;
    text-transform: uppercase;
}

.cda-opinion .cda-opinion-page-marker:hover,
.cda-opinion .cda-opinion-page-marker:target {
    color: var(--cda-opinion-crimson) !important;
    text-decoration: none;
}

@media (max-width: 640px) {
    .cda-opinion {
        font-size: 16px;
        line-height: 1.75;
    }
}

.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.prose a {
    color: #4f46e5;
    text-decoration: underline;
    font-weight: 500;
}

.prose a:hover {
    color: #4338ca;
}

.prose strong {
    color: #111827;
    font-weight: 600;
}

.prose ol {
    list-style-type: decimal;
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose ul {
    list-style-type: disc;
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose ol > li {
    padding-left: 0.375em;
}

.prose ul > li {
    padding-left: 0.375em;
}

.prose > ul > li p {
    margin-top: 0.75em;
    margin-bottom: 0.75em;
}

.prose > ol > li > *:first-child {
    margin-top: 1.25em;
}

.prose > ol > li > *:last-child {
    margin-bottom: 1.25em;
}

.prose blockquote {
    font-weight: 500;
    font-style: italic;
    color: #111827;
    border-left-width: 0.25rem;
    border-left-color: #e5e7eb;
    quotes: "\201C""\201D""\2018""\2019";
    margin-top: 1.6em;
    margin-bottom: 1.6em;
    padding-left: 1em;
}

.prose code {
    color: #111827;
    font-weight: 600;
    font-size: 0.875em;
}

.prose code::before {
    content: "`";
}

.prose code::after {
    content: "`";
}

.prose pre {
    color: #e5e7eb;
    background-color: #1f2937;
    overflow-x: auto;
    font-size: 0.875em;
    line-height: 1.7142857;
    margin-top: 1.7142857em;
    margin-bottom: 1.7142857em;
    border-radius: 0.375rem;
    padding: 0.8571429em 1.1428571em;
}

.prose pre code {
    background-color: transparent;
    border-width: 0;
    border-radius: 0;
    padding: 0;
    font-weight: 400;
    color: inherit;
    font-size: inherit;
    font-family: inherit;
    line-height: inherit;
}

.prose pre code::before {
    content: none;
}

.prose pre code::after {
    content: none;
}

.prose table {
    width: 100%;
    table-layout: auto;
    text-align: left;
    margin-top: 2em;
    margin-bottom: 2em;
    font-size: 0.875em;
    line-height: 1.7142857;
}

.prose thead {
    border-bottom-width: 1px;
    border-bottom-color: #d1d5db;
}

.prose thead th {
    color: #111827;
    font-weight: 600;
    vertical-align: bottom;
    padding-right: 0.5714286em;
    padding-bottom: 0.5714286em;
    padding-left: 0.5714286em;
}

.prose tbody tr {
    border-bottom-width: 1px;
    border-bottom-color: #e5e7eb;
}

.prose tbody tr:last-child {
    border-bottom-width: 0;
}

.prose tbody td {
    vertical-align: baseline;
    padding: 0.5714286em;
}

/* Prose Invert (for dark backgrounds) */
.prose-invert {
    color: #d1d5db;
}

.prose-invert h1,
.prose-invert h2,
.prose-invert h3,
.prose-invert h4,
.prose-invert strong {
    color: #f9fafb;
}

.prose-invert a {
    color: #818cf8;
}

.prose-invert a:hover {
    color: #a5b4fc;
}

.prose-invert code {
    color: #f9fafb;
}

.prose-invert blockquote {
    color: #f9fafb;
    border-left-color: #4b5563;
}

/* Not-prose utility to disable prose styles */
.not-prose {
    all: revert;
}

.not-prose * {
    all: revert;
}


[data-href] {
    cursor: pointer
}

.cdasia-tab,
#cdasiatab {
    margin-left: 30px;
}

.no-padding {
    padding: 0 !important;
}

hr.simple {
    margin-top: 10px;
    margin-bottom: 10px;
    border-style: dashed
}

.bg-jurisprudence.active {
    background-color: #324b2c !important;
}

.bg-jurisprudence:hover {
    background-color: #1f341b !important;
}

.bg-taxation.active {
    background-color: #1c74c1 !important;
}

.bg-taxation:hover {
    background-color: #034c84 !important;
}

.bg-doj.active {
    background-color: #f3b933 !important;
}

.bg-doj:hover {
    background-color: #d89703 !important;
}

.match {
    background-color: yellow;
}

.highlight {
    background-color: orange !important;
}

[data-lp] {
    color: inherit !important;
}

[data-lp].active {
    font-style: italic;
    font-size: inherit;
    font-weight: bold;
    line-height: inherit;
}

[data-lp].active.match {
    background-color: lightblue !important;
}

[data-lp].active.highlight {
    background-color: #3df8ff !important;
}

.footnote-link a,
.footnote-x a {
    font-size: 12px;
    vertical-align: 20%;
    color: red;
    font-weight: bold;
    text-decoration: none;
}

.footnote-link a.tip span,
.footnote-x a.tip span {
    display: none
}

.footnote-link a.tip:hover span,
.footnote-x a.tip:hover span {
    border: #c0c0c0 1px dotted;
    padding: 5px 20px 5px 5px;
    display: block;
    z-index: 100;
    background-color: #87cefa;
    left: 0px;
    margin: 10px;
    width: 250px;
    position: absolute;
    top: 10px;
    text-decoration: none
}

.footnote-title {
    border-bottom: 1px dotted;
    padding: 5px;
    text-align: left;
    font-weight: bold;
}

.footnote-title a {
    font-weight: bold;
    padding: 5px;
    text-align: left;
    color: black;
}

.hidden {
    display: none;
}

.font-danger {
    color: #d9534f !important;
}

.font-danger:hover {
    color: #cb1c2e;
}

.font-danger[href]:hover,
.font-danger[href]:focus {
    color: #c9302c !important;
}

.textclass {
    margin: 0 auto;
    padding: 4em 5em;
    font-family: Arial;
    left: 50%;
    top: 10px;
    bottom: 10px;
    background-color: white;
    color: #000000;
    line-height: 20px;
    box-shadow: 3px 3px 13px rgba(0, 0, 0, 0.8);
    overflow-y: hidden;
}

.text-copied {
    background-color: white !important;
    color: #000000 !important;
    box-shadow: none !important;
}

.text-copied span {
    background-color: white !important;
    color: #000000 !important;
    box-shadow: none !important;
}

.text-copied .footnote-x a {
    font-size: 12px;
    vertical-align: 20%;
    text-decoration: none;
    color: red;
    font-weight: bold;
}

.scroll-to-top {
    position: fixed;
    bottom: 0px;
    right: 0px;
    z-index: 104400;
    box-shadow: -1px -1px 3px rgba(0, 0, 0, 0.1);
}

.scroll-to-top a,
.scroll-to-top a:visited {
    display: block;
    width: 50px;
    height: 30px;
    color: #fff;
    text-align: center;
    line-height: 30px;
}

.js-document-view .tooltip {
    text-indent: 0 !important;
}

.js-document-view .tooltip .tooltip-inner {
    color: #fff;
    text-align: left;
    background-color: #000000;
    max-width: 300px;
}

.panel-tool {
    position: fixed;
    z-index: 1000000;
    top: 80px;
    left: 0;
    list-style-type: none;
    margin: 0;
    padding: 0;
    color: #788288;
    background-color: #fff;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    border: 1px solid #e6e6e6;
    border-left: 0;
    -o-transition: all .3s;
    -moz-transition: all .3s;
    -webkit-transition: all .3s;
    transition: all .3s;
}

.panel-tool .tooltip {
    z-index: 5000000;
}

.panel-tool>.tooltip {
    min-width: 150px;
}

.panel-tool>.tooltip .tooltip-inner {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    background-color: #c50001;
}

.panel-tool>.tooltip.top .tooltip-arrow {
    border-top-color: #c50001;
}

.panel-tool>.tooltip.top-left .tooltip-arrow {
    border-top-color: #c50001;
}

.panel-tool>.tooltip.top-right .tooltip-arrow {
    border-top-color: #c50001;
}

.panel-tool>.tooltip.right .tooltip-arrow {
    border-right-color: #c50001;
}

.panel-tool>.tooltip.left .tooltip-arrow {
    border-left-color: #c50001;
}

.panel-tool>.tooltip.bottom .tooltip-arrow {
    border-bottom-color: #c50001;
}

.panel-tool>.tooltip.bottom-left .tooltip-arrow {
    border-bottom-color: #c50001;
}

.panel-tool>.tooltip.bottom-right .tooltip-arrow {
    border-bottom-color: #c50001;
}

.panel-tool .open {
    z-index: 1005000;
}

.panel-tool li.open>a {
    background: #fff;
    color: #c50001;
}

.panel-tool li>.dropdown-menu:not(.dropdown-default) {
    margin-top: 0;
    border: 10px
}

.panel-tool .dropdown-menu:not(.dropdown-default) {
    right: 0;
    left: 4px;
    width: 200px;
    z-index: 6000000;
}

.panel-tool .dropdown-menu.pull-right:not(.dropdown-default) {
    top: 0;
    left: 100%;
}

.panel-tool .arrow.top {
    top: -8px !important;
    left: 16px;
    border-top-width: 0;
    border-bottom-color: #eee;
    border-bottom-color: rgba(0, 0, 0, .1);
}

.panel-tool>li>a {
    display: block;
    color: #788288;
    background-color: #fff;
    height: 4em;
    width: 4em;
    line-height: 4em;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    -o-transition: background 0.1s ease-in-out;
    -moz-transition: background 0.1s ease-in-out;
    -webkit-transition: background 0.1s ease-in-out;
    transition: background 0.1s ease-in-out;
}

.panel-tool>li>a:hover,
.panel-tool>li:first-child>a {
    background: #c50001;
    color: #fff;
}

.panel-tool>li.active>a {
    background: #fff;
    color: #c50001;
}

.panel-tool>li>a:before {
    speak: none;
    font-style: normal;
    font-weight: normal;
    text-indent: 0em;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 1.4em;
    -webkit-font-smoothing: antialiased;
}

.panel-tool>li>a.icon-logo:before {
    content: "Tools";
    font-weight: 700;
    font-size: 100%;
    font-family: 'Lato', Calibri, Arial, sans-serif;
}

.panel-tool>li>a>i {
    vertical-align: middle;
}

.panel-x {
    position: fixed;
    z-index: 1000000;
    top: 80%;
    left: 0;
    list-style-type: none;
    margin: 0;
    padding: 0;
    color: #788288;
    background-color: #fff;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    border: 1px solid #e6e6e6;
    border-left: 0;
}

.panel-x .open {
    z-index: 1005000;
}

.panel-x li i,
.panel-x li {
    vertical-align: middle;
    text-align: center;
}

.panel-x li.open a {
    background: #fff;
    color: #c50001;
}

.panel-x li>.dropdown-menu:not(.dropdown-default) {
    margin-top: 0;
    border: 10px
}

.panel-x .dropdown-menu:not(.dropdown-default) {
    right: 4px;
    left: 8px;
    width: 300px;
}

.panel-x .input-group {
    max-width: 280px;
}

.panel-x .input-group>.input-group-addon {
    width: 40px;
}

.panel-x .input-group>.select {
    margin: 0;
    padding: 0;
    position: relative;
    display: block;
    font-weight: 400;
}

.panel-x .input-group>.select {
    width: 200px;
}

.panel-x .input-group>.select select {
    padding: 5px;
    border-color: #BDBDBD;
    display: block;
    width: 100%;
    height: 32px;
    outline: 0;
    border-width: 1px;
    border-style: solid;
    border-radius: 0;
    background: #fff;
    font: 13px/16px 'Open Sans', Helvetica, Arial, sans-serif;
    color: #404040;
    -o-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -moz-appearance: none;
    -webkit-appearance: none;
    -o-transition: border-color .3s;
    -moz-transition: border-color .3s;
    -webkit-transition: border-color .3s;
    transition: border-color .3s;
}

.panel-x .input-group>.select i {
    position: absolute;
    top: 10px;
    right: 11px;
    width: 5px;
    height: 11px;
    margin: 0;
    padding: 0;
    background: #fff;
    -webkit-box-shadow: 0 0 0 9px #fff;
    box-shadow: 0 0 0 9px #fff;
}

.panel-x .input-group>.select i:before {
    top: 0;
    border-bottom: 4px solid #404040;
}

.panel-x .input-group>.select i:after {
    bottom: 0;
    border-top: 4px solid #404040;
}

.panel-x .input-group>.select i:after,
.panel-x .input-group>.select i:before {
    content: '';
    position: absolute;
    right: 0;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

.panel-x .arrow.top {
    top: -8px !important;
    left: 16px;
    border-top-width: 0;
    border-bottom-color: #eee;
    border-bottom-color: rgba(0, 0, 0, .1);
}

.panel-x li a {
    display: block;
    color: #788288;
    background-color: #fff;
    height: 4em;
    width: 4em;
    line-height: 4em;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    -o-transition: background 0.1s ease-in-out;
    -moz-transition: background 0.1s ease-in-out;
    -webkit-transition: background 0.1s ease-in-out;
    transition: background 0.1s ease-in-out;
}

.panel-x span:not(.disabled) i {
    color: #e33244;
}

.panel-x .js-prev:not(.disabled),
.panel-x .js-next:not(.disabled) {
    cursor: pointer;
}

.label-x {
    color: black !important;
    text-indent: 0px;
}

.label-x:hover {
    color: black !important;
}

.label-x.match {
    background-color: #fbfb00;
}

.label-x.match:hover {
    color: white !important;
}

.bg-grid {
    background: #fefefe;
    /* url('<%= asset_path 'grid-back.png' %>') repeat; */
}

.portfolio .portfolio-item {
    margin-top: 20px;
    text-align: center;
}

.portfolio .portfolio-item .p-img-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    z-index: 11;
    -o-box-shadow: 0px 15px 10px -6px rgba(0, 0, 0, 0.75);
    -webkit-box-shadow: 0px 15px 10px -6px rgba(0, 0, 0, 0.75);
    -moz-box-shadow: 0px 15px 10px -6px rgba(0, 0, 0, 0.75);
    box-shadow: 0px 15px 10px -6px rgba(0, 0, 0, 0.75);
}

.portfolio .portfolio-item .p-img-container:hover,
.portfolio .portfolio-item .p-img-container:focus {
    width: 330px !important;
}

.portfolio .portfolio-item .p-img-container {
    -o-transition: width .1s;
    -moz-transition: width .1s;
    -webkit-transition: width .1s;
    transition: width .1s;
}

.portfolio .portfolio-item .p-img-container .img-responsive {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.portfolio .portfolio-item .p-img-container:hover canvas {
    width: 330px !important;
}

.portfolio .portfolio-item .p-img-container canvas {
    -o-transition: width .5s;
    -moz-transition: width .5s;
    -webkit-transition: width .5s;
    transition: width .5s;
}

.portfolio .portfolio-item .p-img-container span.pf-caption {
    position: absolute;
    bottom: 0;
    right: 0;
    color: #fff;
    display: none;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10;
}

.portfolio-item .p-img-container .pf-caption span.title {
    background: #f75353;
}

.portfolio-item .p-img-container .pf-caption span.title {
    display: block;
    padding: 10px 15px;
    font-family: 'Open Sans Condensed', sans-serif;
    font-size: 22px;
    font-weight: bold;
}

.portfolio-item .p-img-container .pf-caption span.paragraph {
    display: block;
    font-size: 13px;
    line-height: 23px;
    padding: 1px 15px;
}

.bg-none {
    background: none !important;
}

.user-info {
    background: rgba(255, 255, 255, 1);
    padding: 30px 20px 20px 20px;
    border-bottom: 3px solid rgba(0, 0, 0, 0.18);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.user-info h3 {
    margin: 0;
    font-size: 25px;
    line-height: 40px;
    color: #787878;
}

.user-info small {
    font-size: 18px;
}

/* Navbar overrides skipped to avoid trailing spaces/conflict */
.color-white {
    color: #fff;
}

.search-form {
    width: 360px;
    margin-left: 30px;
    background-color: #525962;
    color: white;
    padding: 10px;
    text-align: center;
    margin-bottom: 50px;
    border: 0px 2px 2px 2px solid #e6e6e6;
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.2) inset, 0 2px 3px rgba(0, 0, 0, 0.1);
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

.search-form fieldset {
    background-color: transparent;
}

.search-form .form-smart label {
    color: white;
}

.search-form .form-smart footer {
    padding-right: 14px;
}

.search-form a {
    color: white;
}

.paginator .pagination {
    margin-top: 10px;
}

.section-list {
    text-align: left;
}

.section-list a {
    color: #000000;
}

.section-list>div {
    margin-left: 20px;
    margin-right: 15px;
}

.section-list [id^="list_"] {
    font-weight: bold;
}

.section-list>div:first-child {
    margin-top: 20px;
}

.section-list>div:last-child {
    margin-bottom: 20px;
}

.section-list>div>div:last-child>div {
    margin-left: 20px
}

.section-list>div>div {
    font-size: 13pt;
}

.section-list span {
    font-size: 12pt;
    font-weight: normal;
    color: #3c4144;
    margin-bottom: 15px;
    margin-top: 15px;
}

.section-list span:focus,
.section-list span:hover {
    cursor: pointer;
}

.section-list span>i {
    color: #7c8285;
    margin-left: 15px;
}

.section-list span:focus,
.section-list span:hover {
    color: #f75353;
}

.section-list span:focus>i,
.section-list span:hover>i {
    color: #f75353;
}

.hang {
    padding-left: 20px;
    text-indent: -16px;
}

.sessions {
    position: fixed;
    top: 165px;
    right: 50px;
    width: 376px;
    -webkit-transform: translateZ(0);
}

@media (max-width:480px) {
    .sessions {
        right: 50%;
        margin-right: -188px;
    }
}

.sessions.well {
    background: #fbfbfb;
    border: 1px solid #ddd;
    box-shadow: 0 1px 1px #ececec;
    -webkit-box-shadow: 0 1px 1px #ececec;
}

.sessions .client-form header {
    font-size: 25px;
    color: #ff0000;
    padding: 15px 13px;
    margin: 0;
    border-bottom-style: solid;
    border-bottom-color: rgba(0, 0, 0, .1);
    background: rgba(248, 248, 248, .9);
}

.sessions .form-smart footer {
    display: block;
    padding: 7px 14px 15px;
    border-top: 1px solid rgba(0, 0, 0, .1);
    background: rgba(248, 248, 248, .9);
}

.sessions .form-smart footer .btn {
    float: right;
    height: 31px;
    margin: 5px 0 5px 5px;
    padding: 0 22px;
    font: 300 15px/29px 'Open Sans', Helvetica, Arial, sans-serif;
    cursor: pointer;
    border-radius: 2px;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .05);
    box-sizing: border-box;
}

.popover-option {
    margin: 0;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
}

.popover-option a {
    color: #000000
}

.popover.bottom {
    margin-left: 50px;
}

@media (min-width: 768px) {
    .modal-dialog {
        width: 760px;
    }

    .popover.popover-lg {
        min-width: 500px;
    }
}

@media (min-width: 992px) {
    .modal-lg {
        width: 900px !important;
    }

    .popover.popover-lg {
        min-width: 600px;
    }
}

.column-2 {
    -moz-column-count: 2;
    -moz-column-gap: 20px;
    -webkit-column-count: 2;
    -webkit-column-gap: 20px;
}

.column-3 {
    -moz-column-count: 3;
    -moz-column-gap: 20px;
    -webkit-column-count: 3;
    -webkit-column-gap: 20px;
}

.column-4 {
    -moz-column-count: 4;
    -moz-column-gap: 20px;
    -webkit-column-count: 4;
    -webkit-column-gap: 20px;
}

.icheckbox_polaris,
.iradio_polaris {
    display: inline-block;
    *display: inline;
    vertical-align: middle;
    margin: 0;
    padding: 0;
    width: 29px;
    height: 29px;
    /* background: url(<%= asset_path 'plugin/i-check.polaris.png' %>) no-repeat; */
    border: none;
    cursor: pointer;
}

.icheckbox_polaris {
    background-position: 0 0;
}

.icheckbox_polaris.hover {
    background-position: -31px 0;
}

.icheckbox_polaris.checked {
    background-position: -62px 0;
}

.icheckbox_polaris.disabled {
    background-position: -93px 0;
    cursor: default;
}

.icheckbox_polaris.checked.disabled {
    background-position: -124px 0;
}

.iradio_polaris {
    background-position: -155px 0;
}

.iradio_polaris.hover {
    background-position: -186px 0;
}

.iradio_polaris.checked {
    background-position: -217px 0;
}

.iradio_polaris.disabled {
    background-position: -248px 0;
    cursor: default;
}

.iradio_polaris.checked.disabled {
    background-position: -279px 0;
}

@media (-o-min-device-pixel-ratio: 5/4),
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi) {

    .icheckbox_polaris,
    .iradio_polaris {
        /* background-image: url(<%= asset_path 'plugin/i-check.polaris@2x.png' %>); */
        -webkit-background-size: 310px 31px;
        background-size: 310px 31px;
    }
}

.form-smart .chosen-container {
    width: 100%;
}

.form-smart .chosen-container .chosen-choices span {
    color: #000000;
}

.no-margin {
    margin: 0px !important;
}

.library-banner {
    margin-right: 45px;
    float: right;
}

/* Highlight target citation */
a.citation-link:target {
    background-color: #fbfb00;
    color: #000;
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 4px;
    display: inline-block;
    /* Ensure scroll-margin works */
    border: 2px solid #eab308;
    /* Yellow-500 */
    transition: all 0.5s ease;
    scroll-margin-top: 450px;
    /* Offset for sticky header */
}

a.citation-link.target-highlight {
    background-color: #fbfb00 !important;
    border-color: #eab308 !important;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.5);
}

/* Provision Anchor Styles for Deep Linking */
.provision-anchor {
    scroll-margin-top: 150px;
    /* Offset for sticky header */
    position: relative;
}

/* Highlight provision when targeted via URL hash */
.provision-anchor:target {
    background-color: #fef3c7;
    /* Amber-100 */
    padding: 2px 4px;
    border-radius: 4px;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
    /* Amber-400 with opacity */
    transition: all 0.3s ease;
}

/* Alternative manual highlight class (from JavaScript) */
.provision-anchor.target-highlight {
    background-color: #fef3c7 !important;
    padding: 2px 4px;
    border-radius: 4px;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
    animation: provision-pulse 2s ease-in-out;
}

@keyframes provision-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.4);
    }
}

.library-banner.jurisprudences.search,
.library-banner.jurisprudences.index {
    margin-right: 90px;
}

.library-banner.laws.search,
.library-banner.laws.index {
    margin-right: 100px;
}

.library-banner.taxations.search,
.library-banner.taxations.index {
    margin-right: 95px;
}

.library-banner.dojs.search,
.library-banner.dojs.index {
    margin-right: 95px;
}

.library-banner.jurisprudences.show {
    margin-right: 45px;
}

.library-banner.laws.show {
    margin-right: 50px;
}

.library-banner>span {
    font-size: 40pt;
    margin-right: 20px;
    font-family: 'Droid Serif', serif;
    color: black;
}

.library-banner>img {
    height: 70px;
    width: 70px;
    vertical-align: top;
}

.doc-view-citation,
.doc-view-container {
    padding-right: 15px;
    padding-left: 15px;
    margin-right: 40px;
    margin-left: 70px;
}

.doc-view.page-dss,
.doc-view.page-nav {
    padding-right: 15px;
    padding-left: 15px;
}

.doc-view.page-dss>a:not(:first-child) {
    margin-left: 5px;
}

.doc-view.page-dss.left,
.doc-view.page-nav.left {
    float: left;
}

.doc-view.page-dss.right,
.doc-view.page-nav.right {
    float: right;
    margin-right: 40px;
}

.doc-view.page-dss.bottom,
.doc-view.page-nav.bottom {
    margin-bottom: 40px;
}

.doc-view h4 {
    color: #000000;
}

.doc-view .cited-in .table-container,
.doc-view .x-reference .table-container {
    font-size: 14px;
    display: block;
    overflow: auto;
    max-height: 300px;
}

.cited-in .table-container table>thead>tr>th,
.x-reference .table-container table>thead>tr>th {
    font-weight: bold;
    width: 70%;
    align: middle;
}

.cited-in .table-container table>thead>tr>th:first-child,
.x-reference .table-container table>thead>tr>th:first-child {
    width: 20%;
}

.cited-in .table-container table>thead>tr>th:last-child,
.x-reference .table-container table>thead>tr>th:last-child {
    width: 10%;
}

.cited-in .table-container table>tbody>tr>td,
.x-reference .table-container table>tbody>tr>td {
    color: #000000;
}

.pagination>.active>a,
.pagination>.active>span {
    background-color: #e33244;
    border-color: #e33244;
}

.pagination>.active>a:hover,
.pagination>.active>span:hover,
.pagination>.active>a:focus,
.pagination>.active>span:focus {
    background-color: #dd1e32;
    border-color: #d01c2f;
}

.pagination>li>a,
.pagination>li>span {
    color: #e33244;
}

.pagination>li>a:hover,
.pagination>li>span:hover,
.pagination>li>a:focus,
.pagination>li>span:focus {
    color: #dd1e32;
}

.print-view .doc-view-container {
    padding-right: 15px;
    padding-left: 15px;
    margin-right: 70px;
    margin-left: 70px;
}

.bootstrap-datetimepicker-widget td.today:before {
    border-bottom: 7px solid #e33244;
}

.bootstrap-datetimepicker-widget td.active {
    background-color: #e33244;
}

.bootstrap-datetimepicker-widget td.active:hover {
    background-color: #cb1c2e;
}

.bootstrap-datetimepicker-widget td span.active {
    background-color: #e33244;
}

.citation-document .citation-document-view {
    max-height: 200px;
}

a.x-ref-link,
.x-ref-link a {
    color: #000000 !important;
    font-weight: bold !important;
}

.x-references a {
    color: #788288;
}

.x-references a:hover {
    color: #cb1c2e !important;
}

.x-references span[class^="cit_"] {
    position: relative;
    margin: 2px 0 2px 5px;
    padding: 3px 20px 3px 5px;
    border: 1px solid #eee;
    border-radius: 3px;
    background-color: #f5f5f5;
    background-clip: padding-box;
    line-height: 13px;
    cursor: default;
}

.i-draggable.i-widget>header,
.i-draggable .i-widget>header {
    cursor: move;
    -khtml-border-radius: 0;
    border-radius: 0;
    line-height: normal;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .05);
    -webkit-box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .05);
}

.i-widget>header {
    color: #333;
    border: 1px solid #C2C2C2;
    background: #fafafa;
    height: 34px;
    padding: 0;
    line-height: 40px;
}

.i-widget>header h2 {
    height: 100%;
    width: auto;
    display: inline-block;
    font-size: 14px;
    position: relative;
    margin: 0;
    line-height: 34px;
    font-weight: 400;
    letter-spacing: 0;
}

.i-widget>header>h2 {
    margin-left: 10px;
    float: left;
}

.i-widget .widget-ctrls {
    width: auto;
    float: right;
    padding: 0;
    margin: 0;
}

.i-widget .widget-ctrls .btn-ctrl {
    min-width: 30px;
    height: 32px;
    float: left;
    position: relative;
    font-family: Arial, Helvetica, sans-serif;
    border-left: 1px solid rgba(0, 0, 0, .09);
}

.i-widget .widget-ctrls a {
    text-decoration: none;
    font-size: 14px;
    text-align: center;
    display: inline-block;
    line-height: 32px;
    padding: 0;
    margin: 0;
    color: #333;
}

[data-role="editor-content"] {
    display: block;
    width: 100%;
    min-height: 100%;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    -o-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    -moz-box-shadow: inset hoff voff blur color;
    ;
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    -moz-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}

[data-role="editor-content"]:focus {
    border-color: #e33244;
    outline: 0;
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(241, 51, 69, 0.60);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(241, 51, 69, 0.60);
}

[data-role="editor-content"],
[data-role="editor-content"]:focus {
    -webkit-box-shadow: none;
    box-shadow: none;
}

[data-role="editor-content"] {
    border-color: #cbd5dd;
    border-radius: 2px;
}

[data-role="editor-content"]:focus {
    border-color: transparent;
}

html {
    background-color: #f2f4f8 !important;
}

.js-error {
    display: none;
}

.errorify {
    display: inline-block !important;
    position: relative;
    top: -10px;
    margin-left: -8px;
    color: #e33244;
}

[data-toggle="collapse"]:not(.collapsed)>i:first-of-type {
    display: none;
}

[data-toggle="collapse"]>i:last-of-type {
    display: none;
}

[data-toggle="collapse"]:not(.collapsed)>i:last-of-type {
    display: inline-block;
}

.user-detail [data-role="tab-toggle"].active {
    color: #fff !important;
    border-color: #177bbb;
    background-color: #177bbb;
}

.user-detail [data-role="tab-toggle"].active .text-muted {
    color: #7cc2ef !important;
}

.online-header-bar.centered {
    border: 0;
    overflow: hidden;
}

.online-header-bar.centered .header .logo {
    margin: 25px auto 20px;
    float: none;
    display: block;
    height: 52px;
    width: 250px;
}

.banner h2 {
    margin-bottom: 15px;
}

.banner h2 {
    font-family: 'Open Sans', arial;
    -webkit-font-smoothing: antialiased;
    color: #555;
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 20px;
}

.signin-other p.switch-account {
    margin: 0 0 30px;
    color: #555;
    font-size: 14px;
    text-align: center;
}

@media screen and (max-width: 800px),
screen and (max-height: 800px) {
    .online-header-bar.centered {
        height: 83px;
    }

    .online-header-bar.centered .header .logo {
        margin: 25px auto 20px;
    }
}

@media screen and (max-width: 580px) {
    .online-header-bar.centered {
        height: 73px;
    }

    .online-header-bar.centered .header .logo {
        margin: 20px auto 15px;
    }
}

.sidebar-box {
    background-color: #fff;
    color: #666;
    margin-bottom: 30px;
    padding: 15px;
    border-radius: 3px;
    -webkit-border-radius: 3px;
    box-shadow: 0px 1px 2px #999;
    -webkit-box-shadow: 0px 1px 2px #999;
}

.port-single-desc {
    margin-bottom: 10px !important;
    padding: 10px 20px !important;
}

.port-single-desc p {
    margin: 0px;
}

.port-single-desc a {
    display: block;
}

input.transparent-input:hover,
input.transparent-input {
    background-color: rgba(0, 0, 0, 0) !important;
    border: none !important;
}

input.transparent-input:focus {
    outline: none !important;
}

.has_error *,
.has_error :after,
.has_error :before {
    -webkit-box-sizing: content-box;
    -moz-box-sizing: content-box;
    box-sizing: content-box;
    margin: 0;
    padding: 0;
}

.has_error {
    font-weight: 400;
    position: relative;
    display: block;
}

.has_error .icon-error-append,
.has_error .icon-error-prepend {
    font-size: 14px;
    line-height: 22px;

    position: absolute;
    top: 5px;

    width: 22px;
    height: 22px;

    text-align: center;
}

.has_error .icon-error-append {
    right: 5px;

    padding-left: 3px;

}

.has_error .icon-error-prepend {
    left: 5px;

    padding-right: 3px;
}

.has_error .icon-error-prepend+input,
.has_error .icon-error-prepend+textarea {
    padding-left: 37px;
}

.has_error .icon-error-append+input,
.has_error .icon-error-append+textarea {
    padding-right: 37px;
}

.has_error .icon-error-prepend+.icon-error-append+input,
.has_error .icon-error-prepend+.icon-error-append+textarea {
    padding-left: 37px;
}

.has_error .tooltip {
    font-size: 11px;
    font-weight: 400;
    line-height: 16px;

    position: absolute;
    z-index: 99999;
    left: -9999px;

    padding: 2px 8px 3px;

    -o-transition: margin .3s, opacity .3s;
    -moz-transition: margin .3s, opacity .3s;
    -webkit-transition: margin .3s, opacity .3s;
    transition: margin .3s, opacity .3s;

    opacity: 0;
    color: #fff;
    background: rgba(0, 0, 0, .9);
}

.has_error .tooltip:after {
    position: absolute;

    content: '';
}

.has_error input:focus+.tooltip,
.has_error textarea:focus+.tooltip {
    opacity: 1;
}

.has_error .tooltip-top-right {
    bottom: 100%;

    margin-bottom: 15px;
}

.has_error .tooltip-top-right:after {
    top: 100%;
    right: 11px;

    border-top: 4px solid rgba(0, 0, 0, .9);
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

.has_error input:focus+.tooltip-top-right,
.has_error textarea:focus+.tooltip-top-right {
    right: 0;
    left: auto;
    margin-bottom: 5px;
}

.has_error .tooltip-top-left {
    bottom: 100%;

    margin-bottom: 15px;
}

.has_error .tooltip-top-left:after {
    top: 100%;
    left: 11px;
    border-top: 4px solid rgba(0, 0, 0, .9);
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

.has_error input:focus+.tooltip-top-left,
.has_error textarea:focus+.tooltip-top-left {
    right: auto;
    left: 0;
    margin-bottom: 5px;
}

.has_error .tooltip-right {
    top: 4px;
    margin-left: 15px;
    white-space: nowrap;
}

.has_error .tooltip-right:after {
    top: 6px;
    right: 100%;
    border-top: 4px solid transparent;
    border-right: 4px solid rgba(0, 0, 0, .9);
    border-bottom: 4px solid transparent;
}

.has_error input:focus+.tooltip-right,
.has_error textarea:focus+.tooltip-right {
    left: 100%;
    margin-left: 5px;
}

.has_error .tooltip-left {
    top: 4px;
    margin-right: 15px;
    white-space: nowrap;
}

.has_error .tooltip-left:after {
    top: 6px;
    left: 100%;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 4px solid rgba(0, 0, 0, .9);
}

.has_error input:focus+.tooltip-left,
.has_error textarea:focus+.tooltip-left {
    right: 100%;
    left: auto;
    margin-right: 5px;
}

.has_error .tooltip-bottom-right {
    top: 100%;
    margin-top: 15px;
}

.has_error .tooltip-bottom-right:after {
    right: 11px;
    bottom: 100%;
    border-right: 4px solid transparent;
    border-bottom: 4px solid rgba(0, 0, 0, .9);
    border-left: 4px solid transparent;
}

.has_error input:focus+.tooltip-bottom-right,
.has_error textarea:focus+.tooltip-bottom-right {
    right: 0;
    left: auto;
    margin-top: 5px;
}

.has_error .tooltip-bottom-left {
    top: 100%;

    margin-top: 15px;
}

.has_error .tooltip-bottom-left:after {
    bottom: 100%;
    left: 11px;
    border-right: 4px solid transparent;
    border-bottom: 4px solid rgba(0, 0, 0, .9);
    border-left: 4px solid transparent;
}

.has_error input:focus+.tooltip-bottom-left,
.has_error textarea:focus+.tooltip-bottom-left {
    right: auto;
    left: 0;
    margin-top: 5px;
}

.has_error .icon-error-append,
.has_error .icon-error-prepend {
    -o-transition: border-color .3s;
    -moz-transition: border-color .3s;
    -webkit-transition: border-color .3s;
    transition: border-color .3s;
    border-color: #bdbdbd;
}

.slide-default>img {
    background: url(<%= asset_path 'slide/0.png' %>) no-repeat;
}

.page-container {
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    background: white;
    max-width: 880px;
    margin: 20px auto;
    border: 1px solid #e1e8ed;
}

.page-container .icon-error-append {
    display: none;
}

.page-container input {
    width: 325px;
}

.page-container .form-smart fieldset {
    padding: 25px 0 5px;
}

.page-container .form-smart footer {
    display: block;
    padding: 7px 0 15px;
    border-top: none;
    background: none;
}

.page-container .form-smart .btn {
    float: right;
    height: 31px;
    margin: 5px 0 5px 0;
    padding: 0 22px;
    font: 300 15px/29px 'Open Sans', Helvetica, Arial, sans-serif;
    cursor: pointer;
    border-radius: 2px;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .05);
    box-sizing: border-box;
}

.page-container a {
    color: #e33244;
    text-decoration: none;
}

.page-section--header {
    font-size: 13px;
    line-height: 1.25;
    margin: 20px 0;
    overflow: hidden;
    padding-top: 0;
}

.page-section--header img {
    height: 48px;
    width: 48px;
    border-radius: 4px;
    float: left;
    margin-right: 10px;
}

.page-section--header details {
    margin-top: 8px;
}

.page-section--header .name {
    color: #8899a6;
}

.page-section {
    padding: 40px 30px 0 130px;
    margin-bottom: 25px;
}

.page-section+.page-section {
    border-top: 1px solid #e1e8ed;
}

.page-section--footer {
    padding-top: 0;
    margin-bottom: 0;
}

.page-section--footer a {
    font-size: 13px;
    line-height: 45px;
}

@media screen and (max-width: 880px) {
    .page-container {
        width: 100%;
        padding: 15px 0 0;
        border-bottom: 1px solid #e1e8ed;
        margin: 20px 0 0 0;
        border-radius: 0;
    }

    .page-container input {
        width: 320px;
    }

    .page-section {
        padding: 15px 12px 0;
    }
}

.page-container .page-header {
    font-size: 22px;
    font-weight: 200;
    margin: 0 0 3px 0;
    padding-bottom: 0;
    border-bottom: none;
}

.page-container .page-header+p {
    margin-top: 3px;
}

.form-smart .file-upload-button.btn {
    padding: 6px 12px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 400;
}

.list-group-item.collapse {
    display: none;
}

.list-group-item.collapse.in {
    display: block;
}

.ui-info-table {
    border: 0;
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

.ui-info-table .data-label,
.ui-info-table .data,
.ui-info-table .rightCol {
    font-size: 12px;
    padding: 3px 0 1px 0;
    text-align: left;
    vertical-align: top;
}

.ui-info-table .data-label {
    color: #666;
    font-weight: bold;
    padding-right: 10px;
    text-align: right;
    width: 130px;
}

.ui-info-table a {
    color: #3b5998;
    cursor: pointer;
    text-decoration: none;
}

.top-border {
    border-bottom: none;
    border-left: none;
    border-right: none;
}

.ui-box {
    overflow: hidden;
    zoom: 1;
}

.ui-box-gray {
    background-color: #f2f2f2;
    border: 1px solid #ccc;
}

.subscription.active {
    color: #008000;
    font-weight: 600;
}

.subscription.expired {
    color: #ff0000;
}

.section-footer {
    height: 50px;
}

#users_attributes {
    width: 100%;
}

.default-table-width {
    padding: 5px;
    width: 20%;
}

.products-table-width {
    padding: 5px;
    width: 80%;
}

.clickable-td {
    cursor: pointer;
}

.description-table-width {
    padding: 5px;
    width: 30%;
}

.groups-advanced-search-modal-body,
.users-advanced-search-modal-body {
    min-height: 300px;
    max-height: auto;
}

.g-recaptcha {
    display: inline-block;
}

.default-advanced-search-background {
    background-color: #525962;
}

.default-advanced-search-label-color {
    color: white;
}

.default-color-advanced-search-close-button {
    color: white;
    opacity: 1;
}

.svg-logo-1x {
    height: 48px;
    width: 48px;
}

.svg-logo-2x {
    height: 96px;
    width: 96px;
}

.svg-logo-3x {
    height: 144px;
    width: 144px;
}

.ant-body-nav {
    margin-top: 15px;
}

.ant-body-nav li.nav-item {
    border: 1px solid #dfdcdc;
    box-shadow: -1px 5px 4px -5px #000000;
    border-top-right-radius: 15px;
    border-top-left-radius: 15px;
    background: #dfdcdc;
}

.ant-body-nav li.nav-item a:focus {
    outline: none;
}

.sticky .navbar.navbar-default.collapsed.ant-body-nav {
    margin-right: 56px;
    border-bottom: 1px solid #c7c7c7;
    margin-left: 28px;
}

.ant-body-nav .nav-tabs li.active a {
    color: #000000 !important;
    font-size: 16px;
    font-weight: 700;
}

.ant-body-nav .nav-tabs li a {
    font-size: 16px;
    font-weight: 700;
}

.ant-body-nav .nav-tabs>li.active>a,
.nav-tabs>li.active>a:hover,
.nav-tabs>li.active>a:focus {
    background-color: #7d7c7c;
    border-top-right-radius: 15px;
    border-top-left-radius: 15px;
    border-bottom-color: transparent !important;
}

.ant-body-nav .nav-tabs-justified,
.nav-tabs.nav-justified {
    border-bottom: 0;
    background: #f4f3f3;
}

.ant-body-nav.navbar.navbar-default.collapsed {
    margin-bottom: 0;
    padding-bottom: 15px;
    background: #f2f4f9;
    margin-left: 28px;
    margin-right: 30px;
}

.nav>li>a:hover,
.nav>li>a:focus {
    background-color: #7d7c7c;
    border-top-right-radius: 15px;
    border-top-left-radius: 15px;
}/* ── Doctrine Library layout + card system ────────────────────────────
 * Replaces the old inline <style> failsafe in _layout_fix.html.erb.
 * Plain CSS only — no @apply (CDN Tailwind doesn't process external files).
 * Navy primary #C41230 per DESIGN.md §4. */

/* Layout: stacked on mobile, sidebar + main on desktop */
.doctrine-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
}
@media (min-width: 1024px) {
  .doctrine-layout { flex-direction: row; }
}

/* Sidebar */
.doctrine-sidebar {
  display: none;
  width: 20rem;
  min-width: 20rem;
  flex-shrink: 0;
  position: sticky;
  top: 4.5rem; /* just below global nav (64px) */
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}
.doctrine-sidebar::-webkit-scrollbar { width: 4px; }
.doctrine-sidebar::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }
.doctrine-sidebar::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }
@media (min-width: 1024px) {
  .doctrine-sidebar { display: block; }
}

/* Main content */
.doctrine-main {
  flex: 1;
  min-width: 0;
  width: 100%;
}

/* ── Doctrine card ── */
.doctrine-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  display: block;
  text-decoration: none;
}
.doctrine-card:hover {
  border-color: #FDA4AF;
  box-shadow: 0 4px 16px rgba(196,18,48,0.08);
}
.doctrine-card > .flex { display: flex; min-height: 0; }

/* Crimson left accent bar */
.doctrine-card__accent {
  flex-shrink: 0;
  width: 3px;
  background: #C41230;
}

/* Doctrine statement — 3-line clamp */
.doctrine-card__text {
  font-size: 0.8125rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Source quote — compact italic, 2-line clamp */
.doctrine-card__source {
  font-size: 0.75rem;
  font-style: italic;
  color: #64748b;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* CTA arrow */
.doctrine-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 700;
  color: #C41230;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Kept for show-page timeline usage */
.doctrine-card__meta-block { display: flex; flex-direction: column; gap: 0.25rem; }

/* Metadata label */
.doctrine-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

/* ── Doctrine badges ── */
.doctrine-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.625rem;
  border-radius: 9999px;
  border: 1px solid;
}
.doctrine-badge--verified {
  background: #ecfdf5; color: #065f46; border-color: #a7f3d0;
}
.doctrine-badge--new {
  background: #eff6ff; color: #1e40af; border-color: #bfdbfe;
}
.doctrine-badge--type {
  background: #f8f9fd; color: #C41230; border-color: #FECDD3;
}
.doctrine-badge--count {
  background: #f8fafc; color: #475569; border-color: #e2e8f0;
}

/* Timeline fixes (cases / show pages) */
@media (min-width: 768px) {
  .doctrine-timeline-grid {
    display: grid !important;
    grid-template-columns: 40px 1fr !important;
    gap: 1.5rem !important;
  }
  .doctrine-timeline-icon {
    display: flex !important;
    flex-direction: column;
    align-items: center;
  }
}
