/* 227Law Court Bundle Tool. Uses the shared service palette. */
html, body.law-tool-page { background-color: #020403; }
body.law-tool-page {
  margin: 0;
  color: var(--law-text, #f4fff9);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}
.law-tool-page *, .law-tool-page *::before, .law-tool-page *::after { box-sizing: border-box; }
.law-tool-page [hidden] { display: none !important; }
.law-tool-page a { text-underline-offset: .2em; }
.law-tool-page :focus-visible { outline: 3px solid var(--law-green, #00d47a); outline-offset: 3px; }
.law-skip-link { position: fixed; z-index: 100; top: .75rem; left: .75rem; padding: .75rem 1rem; border-radius: .375rem; background: #0b1b13; color: #f4fff9; transform: translateY(-180%); }
.law-skip-link:focus { transform: translateY(0); }
.law-tool-header { position: relative; }
.law-tool-header-inner { width: min(100% - 2rem, 1240px); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding: .75rem 0; }
.law-tool-brand { display: inline-flex; flex: 0 0 auto; align-items: center; }
.law-tool-brand img { display: block; width: 190px; height: 72px; object-fit: contain; }
.law-tool-header nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .25rem 1rem; }
.law-tool-header nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .8125rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.law-tool-header nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--law-green, #00d47a); }
.law-workspace { width: min(100% - 2rem, 1184px); margin: 0 auto; padding: 2rem 0 2.5rem; min-width: 0; }
.law-tool-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.25rem; }
.law-tool-eyebrow { margin: 0 0 .25rem; color: var(--law-link, #6ee7b7); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.law-tool-intro h1 { margin: 0; font-size: clamp(1.875rem, 3vw, 2.625rem); line-height: 1.15; font-weight: 750; letter-spacing: -.035em; }
.law-tool-summary { margin: .625rem 0 0; color: var(--law-muted, #a7c7b7); font-size: .9375rem; }
.law-button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; max-width: 100%; padding: .625rem 1rem; border: 1px solid #547363; border-radius: .375rem; font: inherit; font-size: .8125rem; font-weight: 650; text-align: center; text-decoration: none; cursor: pointer; }
.law-button-secondary { background: #0b1b13; color: var(--law-text, #f4fff9); }
.law-button-secondary:hover { background: #143122; color: #fff; border-color: var(--law-green, #00d47a); }
.law-button-primary { background: #006d40; border-color: #00d47a; color: #fff; }
.law-button-primary:hover:not(:disabled) { background: #005a35; }
.law-button:disabled { color: #a7b5ad; background: #1b2821; border-color: #475c50; cursor: not-allowed; }
.law-privacy-note { display: flex; align-items: flex-start; gap: .625rem; padding: .875rem 1rem; border: 1px solid var(--law-line, #2c6045); border-left: 3px solid var(--law-green, #00d47a); border-radius: .375rem; background: #07170f; margin-bottom: 1rem; }
.law-privacy-note svg { flex: 0 0 auto; color: var(--law-link, #6ee7b7); margin-top: .0625rem; }
.law-privacy-note p { margin: 0; color: #dceee4; font-size: .8125rem; }
.law-account-panel { border: 1px solid var(--law-line, #2c6045); border-radius: .5rem; background: var(--law-surface, #06110c); margin-bottom: 1rem; }
.law-account-panel summary { min-height: 48px; padding: .75rem 1rem; cursor: pointer; font-size: .875rem; font-weight: 650; }
.law-account-panel summary::marker { color: var(--law-green, #00d47a); }
.law-optional { margin-left: .75rem; color: var(--law-muted, #a7c7b7); font-size: .75rem; font-weight: 400; }
.law-account-content { border-top: 1px solid var(--law-line, #2c6045); padding: 1rem; }
.law-account-content p { margin: 0 0 .75rem; font-size: .8125rem; }
#law-account-status { min-height: 1.5em; color: var(--law-text, #f4fff9); }
.law-account-help { color: var(--law-muted, #a7c7b7); max-width: 72ch; }
.law-account-links, .law-account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.law-account-links:has(a:not([hidden])) { margin: 0 0 .75rem; }
.law-account-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--law-link, #6ee7b7); }
.law-consent { display: flex; align-items: flex-start; gap: .625rem; max-width: 75ch; margin: 1rem 0; font-size: .8125rem; cursor: pointer; }
.law-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: .125rem; accent-color: var(--law-green, #00d47a); }
.law-saved-bundles { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--law-line, #2c6045); }
.law-saved-bundles h2 { margin: 0 0 .625rem; font-size: .9375rem; font-weight: 700; }
.law-bundle-list { list-style: none; padding: 0; margin: 0; overflow-wrap: anywhere; }
.law-bundle-list li { padding: .75rem 0; border-top: 1px solid #284133; font-size: .8125rem; }
.law-bundle-list li:first-child { border-top: 0; }
.law-bundle-list li a, .law-bundle-list li button { margin: .25rem .5rem .25rem 0; }
.law-bundle-workspace { min-width: 0; }
.law-device-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--law-line, #2c6045); }
.law-device-note p { margin: 0; color: var(--law-muted, #a7c7b7); font-size: .8125rem; max-width: 65ch; }
.law-device-note strong { color: var(--law-text, #f4fff9); font-weight: 600; }
.law-filing-note { margin: 1rem 0 0; color: var(--law-muted, #a7c7b7); font-size: .8125rem; max-width: 94ch; }
.law-noscript { padding: 1rem; border: 1px solid #c8a764; color: #ffedc9; background: #261e0e; }
.law-tool-footer-inner { width: min(100% - 2rem, 1184px); margin: 0 auto; padding: 1.25rem 0; display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; font-size: .75rem; }
.law-tool-footer p { margin: 0; color: var(--law-muted, #a7c7b7); max-width: 65ch; }
.law-tool-footer nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.law-tool-footer nav a { display: inline-flex; align-items: center; min-height: 32px; }

/* Restyle the existing BunTool controls without changing their state classes. */
.law-bundle-workspace { color: var(--law-text, #f4fff9); }
.law-bundle-workspace :is(.bg-white, .bg-slate-50, .bg-gray-50, .bg-gray-100, .bg-slate-100, .bg-stone-100) { background-color: #07140d; }
.law-bundle-workspace :is(.bg-blue-50, .bg-blue-100, .bg-green-50, .bg-green-100) { background-color: #0e291b; }
.law-bundle-workspace :is(.bg-slate-200, .bg-gray-200, .bg-slate-600, .bg-slate-700, .bg-slate-800) { background-color: #173525; }
.law-bundle-workspace [class*="bg-gradient-"] { background-image: none; background-color: #07140d; }
.law-bundle-workspace .from-slate-700 { background-color: #103021; }
.law-bundle-workspace :is(.text-gray-900, .text-gray-800, .text-gray-700, .text-slate-900, .text-slate-800, .text-slate-700) { color: #f4fff9; }
.law-bundle-workspace :is(.text-gray-600, .text-gray-500, .text-gray-400, .text-slate-600, .text-slate-500, .text-slate-400, .text-slate-300, .text-slate-200) { color: #b7d0c3; }
.law-bundle-workspace :is(.text-blue-800, .text-blue-700, .text-blue-600, .text-blue-500, .text-blue-400, .text-blue-300, .text-green-700, .text-green-600, .text-pink-400) { color: #91efc3; }
.law-bundle-workspace :is(.text-red-500, .text-red-600, .text-red-700) { color: #ffabb2; }
.law-bundle-workspace :is(.bg-pink-500, .bg-pink-600, .bg-blue-500, .bg-blue-600, .bg-blue-700, .bg-green-500, .bg-green-600, .bg-green-700) { background-color: #006d40; color: #fff; }
.law-bundle-workspace :is(.bg-red-50, .bg-red-100) { background-color: #301418; }
.law-bundle-workspace :is(.bg-amber-50, .bg-yellow-50) { background-color: #261e0e; }
.law-bundle-workspace :is(.text-amber-700, .text-yellow-700, .text-yellow-800, .text-amber-800) { color: #ffedc9; }
.law-bundle-workspace :is(.border-gray-200, .border-gray-300, .border-slate-200, .border-slate-300, .border-blue-100, .border-blue-200, .border-blue-300, .border-blue-400) { border-color: #3f604e; }
.law-bundle-workspace :is(.divide-gray-200, .divide-slate-200) > :not(:last-child) { border-color: #3f604e; }
.law-bundle-workspace :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select) { color: #f4fff9; background-color: #020a06; border-color: #547363; min-height: 36px; max-width: 100%; }
.law-bundle-workspace :is(input, textarea)::placeholder { color: #a7c0b3; opacity: 1; }
.law-bundle-workspace :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--law-green, #00d47a); }
.law-bundle-workspace :is(button, label[for="file-input"], label[for="coversheet-input"], label[for="bundle-input"]) { touch-action: manipulation; }
.law-bundle-workspace :is(button, a, input, textarea, select):focus-visible { outline: 3px solid #00d47a !important; outline-offset: 3px; }
.law-bundle-workspace label:has(input.sr-only:focus-visible) { outline: 3px solid #00d47a; outline-offset: 3px; }
.law-bundle-workspace :is(.hover\:bg-blue-50, .hover\:bg-blue-100, .hover\:bg-slate-200, .hover\:bg-gray-200, .hover\:bg-gray-100):hover { background-color: #1a3b29; }
.law-bundle-workspace :is(.hover\:bg-pink-600, .hover\:bg-blue-700, .hover\:bg-green-700):hover { background-color: #005a35; }
.law-bundle-workspace :is(.hover\:text-gray-700, .hover\:text-gray-600, .hover\:text-blue-800, .hover\:text-blue-700):hover { color: #d4ffe8; }
.law-bundle-workspace .shadow-lg, .law-bundle-workspace .shadow-xl { box-shadow: 0 8px 24px rgb(0 0 0 / .2); }
.law-bundle-workspace #file-table .section-header-row { background: #123322; border-top-color: #00a861; }
.law-bundle-workspace #file-table .section-tbody tr.file-row { background-color: #07140d; border-color: #3f604e; }
.law-bundle-workspace #file-table .section-tbody tr.file-row:hover { background-color: #10291b; }
.law-bundle-workspace #file-table .title-cell { color: #f4fff9; }
.law-bundle-workspace #file-table :is(.date-cell, .filename-cell, .pages-cell) { color: #b7d0c3; }
.law-bundle-workspace #file-table :is(.title-cell, .date-cell):hover { background-color: #123322; }
.law-bundle-workspace .empty-section-placeholder td { background-color: #0b1b13; color: #b7d0c3; border-color: #3f604e; }
.law-bundle-workspace .empty-section-placeholder:hover td { background-color: #123322; color: #e5fff1; }
.law-bundle-workspace .pages-cell::before { color: #b7d0c3 !important; }
.law-bundle-workspace #file-drop-zone.pulse-ring { outline-color: #00d47a; }
.law-bundle-workspace #file-table-content { max-width: 100%; overscroll-behavior-x: contain; }
.law-bundle-workspace [class*="fixed inset-0"] { padding: 1rem .75rem; overflow-y: auto; }
.law-bundle-workspace [class*="fixed inset-0"] > div { max-height: calc(100dvh - 2rem); overflow-y: auto; }
.law-bundle-workspace [class*="text-[10px]"] { font-size: .75rem; }

@media (max-width: 1040px) {
  .law-tool-header-inner { flex-direction: column; gap: .5rem; }
  .law-tool-header nav { justify-content: center; }
}
@media (max-width: 640px) {
  .law-workspace { width: calc(100% - 1.5rem); padding-top: 1.25rem; }
  .law-tool-header-inner { width: calc(100% - 1.5rem); }
  .law-tool-brand img { width: 160px; height: 60px; }
  .law-tool-header nav { gap: 0 .875rem; }
  .law-tool-header nav a { font-size: .75rem; }
  .law-tool-intro { align-items: flex-start; flex-direction: column; gap: .75rem; }
  .law-tool-intro > .law-button { align-self: flex-start; }
  .law-tool-summary { font-size: .875rem; }
  .law-account-panel summary, .law-account-content, .law-privacy-note { padding-left: .75rem; padding-right: .75rem; }
  .law-account-actions { align-items: stretch; flex-direction: column; }
  .law-device-note { align-items: stretch; }
  .law-bundle-workspace :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea, select) { font-size: 16px; min-height: 40px; }
  .law-bundle-workspace :is(button, label[for="file-input"], label[for="coversheet-input"], label[for="bundle-input"]) { min-height: 40px; }
  .law-bundle-workspace #edit-bundle-panel > div { flex: 1 1 8rem; min-width: 0; }
  .law-bundle-workspace #edit-bundle-panel :is(button, label) { width: 100%; }
  .law-bundle-workspace .section-header-row { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  .law-tool-page *, .law-tool-page *::before, .law-tool-page *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  .law-tool-header, .law-tool-footer, .law-account-panel, .law-device-note, .law-skip-link { display: none !important; }
}
