.tool-page {
  background:
    linear-gradient(180deg, rgba(11, 11, 13, 0.98) 0, rgba(14, 14, 16, 0.98) 28rem, rgba(244, 244, 245, 0.96) 42rem),
    var(--paper);
}

.tool-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(177, 18, 38, 0.24), transparent 28%),
    linear-gradient(90deg, rgba(11, 11, 13, 0.98), rgba(18, 18, 21, 0.86) 58%, rgba(11, 11, 13, 0.98)),
    url("../img/claimgrid-atmosphere-dark.webp") center / cover no-repeat,
    var(--black);
}

.tool-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(177, 18, 38, 0.7), transparent);
}

.personal-injury-tool .tool-hero {
  background:
    linear-gradient(120deg, rgba(177, 18, 38, 0.26), transparent 31%),
    linear-gradient(90deg, rgba(11, 11, 13, 0.98), rgba(18, 18, 21, 0.82) 56%, rgba(11, 11, 13, 0.98)),
    url("../img/claimgrid-info-rta-evidence.webp") center / cover no-repeat,
    var(--black);
}

.personal-injury-tool .pack-document::before {
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(177, 18, 38, 0.92) 49% 55%, transparent 56%) right 0.6rem top 0.55rem / 1.35rem 1.35rem no-repeat,
    radial-gradient(circle at 50% 50%, rgba(177, 18, 38, 0.92) 0 0.22rem, transparent 0.24rem),
    linear-gradient(rgba(177, 18, 38, 0.92) 0 0) left 0.65rem bottom 0.75rem / 1.7rem 0.15rem no-repeat,
    rgba(177, 18, 38, 0.08);
}

.tool-hero-shell {
  position: relative;
  z-index: 1;
  min-height: min(760px, calc(92svh - 76px));
  padding: 4rem 0 4.5rem;
  display: grid;
  gap: 2rem;
  align-items: center;
}

.tool-hero-copy {
  max-width: 760px;
}

.tool-eyebrow {
  margin: 1.2rem 0 0.9rem;
  color: var(--red);
  font-size: 0.92rem;
  font-weight: 850;
}

.tool-hero h1 {
  max-width: 780px;
  font-size: clamp(2rem, 7vw, 4.1rem);
}

.tool-hero .lead {
  max-width: 680px;
  margin-top: 1.25rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.tool-privacy-pill {
  width: fit-content;
  max-width: 100%;
  margin-top: 1.35rem;
  padding: 0.78rem 0.9rem;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-left: 4px solid var(--red);
  border-radius: 0.65rem;
  font-weight: 720;
}

.evidence-pack-visual {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
}

.pack-folder {
  position: absolute;
  inset: 3rem 0 2rem;
  max-width: 390px;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.9rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.28);
}

.pack-folder::before {
  content: "";
  position: absolute;
  left: 1.1rem;
  top: -1.05rem;
  width: 8.6rem;
  height: 1.2rem;
  background: rgba(177, 18, 38, 0.8);
  border-radius: 0.55rem 0.55rem 0 0;
}

.pack-folder span {
  position: absolute;
  right: 1.2rem;
  width: 42%;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.pack-folder span:nth-child(1) {
  top: 4.2rem;
}

.pack-folder span:nth-child(2) {
  top: 6.1rem;
}

.pack-folder span:nth-child(3) {
  top: 8rem;
}

.pack-document {
  position: relative;
  width: min(320px, 78vw);
  min-height: 405px;
  padding: 1.55rem;
  color: var(--soft-black);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(241, 241, 244, 0.98)),
    var(--white);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 0.85rem;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.34);
}

.pack-document::before {
  content: "";
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 3.2rem;
  height: 3.2rem;
  border: 1px solid rgba(177, 18, 38, 0.18);
  border-radius: 0.55rem;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(177, 18, 38, 0.9) 49% 55%, transparent 56%) right 0.6rem top 0.55rem / 1.35rem 1.35rem no-repeat,
    linear-gradient(rgba(177, 18, 38, 0.9) 0 0) left 0.65rem bottom 0.75rem / 1.7rem 0.15rem no-repeat,
    rgba(177, 18, 38, 0.08);
}

.doc-kicker {
  display: block;
  margin-bottom: 2rem;
  color: var(--red);
  font-weight: 850;
}

.doc-line {
  display: block;
  height: 0.72rem;
  margin-top: 0.8rem;
  background: #d8d8de;
  border-radius: 999px;
}

.doc-line-strong {
  width: 72%;
  height: 0.9rem;
  background: var(--soft-black);
}

.doc-line-short {
  width: 48%;
}

.doc-timeline {
  position: absolute;
  left: 1.55rem;
  right: 1.55rem;
  bottom: 1.6rem;
  display: grid;
  gap: 1rem;
}

.doc-timeline i {
  position: relative;
  display: block;
  height: 2.3rem;
  padding-left: 2rem;
  border-left: 2px solid rgba(177, 18, 38, 0.32);
}

.doc-timeline i::before {
  content: "";
  position: absolute;
  left: -0.46rem;
  top: 0;
  width: 0.82rem;
  height: 0.82rem;
  background: var(--red);
  border-radius: 50%;
}

.doc-timeline i::after {
  content: "";
  position: absolute;
  left: 1.1rem;
  right: 0;
  top: 0.1rem;
  height: 0.62rem;
  background: #d8d8de;
  border-radius: 999px;
}

.tool-section {
  padding: 3rem 0 5rem;
  background:
    linear-gradient(180deg, rgba(244, 244, 245, 0.96), rgba(255, 255, 255, 0.94)),
    var(--paper);
}

.tool-local-notice {
  margin-bottom: 1rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: center;
  color: var(--soft-black);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--surface-line);
  border-left: 4px solid var(--red);
  border-radius: 0.75rem;
  box-shadow: 0 8px 12px rgba(11, 11, 13, 0.05);
}

.tool-local-notice span {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.55rem;
  background:
    linear-gradient(var(--red) 0 0) center / 1rem 0.14rem no-repeat,
    linear-gradient(var(--red) 0 0) center / 0.14rem 1rem no-repeat,
    rgba(177, 18, 38, 0.1);
  transform: rotate(45deg);
}

.tool-local-notice p {
  font-weight: 760;
}

.organizer-shell {
  display: grid;
  gap: 1rem;
}

.organizer-sidebar,
.evidence-organizer-form {
  min-width: 0;
  border: 1px solid var(--surface-line);
  border-radius: 0.85rem;
  box-shadow: 0 10px 18px rgba(11, 11, 13, 0.08);
}

.organizer-sidebar {
  padding: 1rem;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(21, 21, 24, 0.96), rgba(11, 11, 13, 0.98)),
    var(--black);
}

.organizer-sidebar-label {
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 850;
}

.organizer-sidebar h2 {
  margin-top: 0.45rem;
  font-size: 1.35rem;
}

.organizer-progress {
  overflow: hidden;
  height: 0.55rem;
  margin: 1rem 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.organizer-progress span {
  display: block;
  width: 16.666%;
  height: 100%;
  background: linear-gradient(90deg, var(--red), rgba(255, 255, 255, 0.72));
  border-radius: inherit;
  transition: width 220ms var(--ease-out);
}

.organizer-step-list {
  min-width: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  list-style: none;
}

.organizer-step-list button {
  width: 100%;
  min-height: 48px;
  padding: 0.55rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: center;
  color: rgba(255, 255, 255, 0.74);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.6rem;
  font: inherit;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}

.organizer-step-list button span {
  width: 1.75rem;
  height: 1.75rem;
  display: inline-grid;
  place-items: center;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  font-size: 0.85rem;
}

.organizer-step-list button:hover,
.organizer-step-list button:focus-visible,
.organizer-step-list button.is-active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.13);
}

.organizer-step-list button.is-active span {
  background: var(--red);
  border-color: var(--red);
}

.evidence-organizer-form {
  overflow: hidden;
  color: var(--soft-black);
  background: rgba(255, 255, 255, 0.96);
}

.mobile-step-summary {
  padding: 1rem;
  display: grid;
  gap: 0.2rem;
  color: var(--white);
  background: var(--soft-black);
}

.mobile-step-summary span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.88rem;
  font-weight: 760;
}

.mobile-step-summary strong {
  font-size: 1.06rem;
}

.organizer-step-panel {
  padding: 1.1rem;
}

.organizer-step-panel[hidden] {
  display: none;
}

.step-panel-heading {
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--surface-line);
}

.step-panel-heading p {
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 850;
}

.step-panel-heading h2 {
  margin-top: 0.28rem;
  font-size: clamp(1.55rem, 4vw, 2.2rem);
}

.step-panel-heading span {
  display: block;
  max-width: 680px;
  margin-top: 0.5rem;
  color: #5a5a63;
}

.form-grid-2 {
  display: grid;
  gap: 0.9rem;
}

.form-grid-wide {
  grid-column: 1 / -1;
}

.evidence-organizer-form textarea {
  min-height: 118px;
}

.repeat-list {
  display: grid;
  gap: 0.9rem;
}

.repeat-entry {
  position: relative;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 248, 249, 0.96)),
    var(--white);
  border: 1px solid var(--surface-line);
  border-radius: 0.78rem;
}

.repeat-entry-header {
  margin-bottom: 0.95rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.repeat-entry-header h3 {
  font-size: 1.08rem;
}

.remove-entry-button {
  min-height: 40px;
  padding: 0.68rem 0.8rem;
  color: var(--soft-black);
  background: #f7f7f8;
  border: 1px solid #d8d8de;
  border-radius: 0.55rem;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.remove-entry-button:hover,
.remove-entry-button:focus-visible {
  border-color: rgba(177, 18, 38, 0.38);
}

.add-entry-button {
  margin-top: 0.95rem;
  width: 100%;
}

.timeline-hint {
  margin-bottom: 0.9rem;
  padding: 0.9rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
  background: rgba(11, 11, 13, 0.035);
  border: 1px solid var(--surface-line);
  border-radius: 0.7rem;
}

.timeline-hint span {
  width: 2rem;
  height: 2rem;
  border-left: 2px solid var(--red);
  position: relative;
}

.timeline-hint span::before,
.timeline-hint span::after {
  content: "";
  position: absolute;
  left: -0.42rem;
  width: 0.72rem;
  height: 0.72rem;
  background: var(--red);
  border-radius: 50%;
}

.timeline-hint span::before {
  top: 0;
}

.timeline-hint span::after {
  bottom: 0;
}

.timeline-hint p {
  color: #55555f;
  font-size: 0.94rem;
}

.evidence-checklist {
  display: grid;
  gap: 0.7rem;
}

.evidence-check-item {
  padding: 0.8rem;
  display: grid;
  gap: 0.65rem;
  background: rgba(247, 247, 248, 0.88);
  border: 1px solid var(--surface-line);
  border-radius: 0.7rem;
}

.evidence-check-item label {
  min-height: 32px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: center;
}

.evidence-check-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  accent-color: var(--red);
}

.evidence-check-item:has(input[type="checkbox"]:checked) {
  border-color: rgba(177, 18, 38, 0.28);
  background: rgba(177, 18, 38, 0.06);
}

.local-file-panel {
  margin: 1rem 0;
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
  background: var(--soft-black);
  border: 1px solid rgba(177, 18, 38, 0.28);
  border-radius: 0.8rem;
}

.local-file-panel label {
  color: var(--white);
}

.local-file-panel p {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.94rem;
}

.local-file-panel input[type="file"] {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.selected-file-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  list-style: none;
}

.selected-file-list li {
  padding: 0.55rem 0.65rem;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.55rem;
  overflow-wrap: anywhere;
}

.review-accordion {
  display: grid;
  gap: 0.75rem;
}

.review-section {
  overflow: hidden;
  border: 1px solid var(--surface-line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.94);
}

.review-section summary {
  min-height: 54px;
  padding: 0.9rem 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  color: var(--soft-black);
  cursor: pointer;
  font-weight: 850;
}

.review-section summary::-webkit-details-marker {
  display: none;
}

.review-section summary::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.review-section[open] summary::after {
  transform: rotate(225deg);
}

.review-section-body {
  padding: 0 1rem 1rem;
  display: grid;
  gap: 0.8rem;
  border-top: 1px solid var(--surface-line);
}

.review-edit-button {
  width: fit-content;
  min-height: 38px;
  padding: 0.6rem 0.8rem;
  color: var(--soft-black);
  background: #f7f7f8;
  border: 1px solid #d8d8de;
  border-radius: 0.55rem;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.review-grid {
  display: grid;
  gap: 0.55rem;
}

.review-row {
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(222, 222, 228, 0.72);
}

.review-row dt {
  color: #65656f;
  font-size: 0.88rem;
  font-weight: 800;
}

.review-row dd {
  margin: 0;
  color: var(--soft-black);
  overflow-wrap: anywhere;
}

.review-empty {
  padding: 0.8rem;
  color: #62626b;
  background: rgba(247, 247, 248, 0.88);
  border: 1px solid var(--surface-line);
  border-radius: 0.65rem;
}

.review-card-list {
  display: grid;
  gap: 0.7rem;
}

.review-mini-card {
  padding: 0.85rem;
  background: rgba(247, 247, 248, 0.86);
  border: 1px solid var(--surface-line);
  border-radius: 0.68rem;
}

.review-mini-card h4 {
  margin: 0 0 0.45rem;
  color: var(--soft-black);
  font-size: 1rem;
}

.evidence-pack-download {
  margin-top: 1.1rem;
  padding: 1rem;
  display: grid;
  gap: 1rem;
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(11, 11, 13, 0.97), rgba(21, 21, 24, 0.95)),
    var(--black);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.85rem;
}

.evidence-pack-download .tool-eyebrow {
  margin: 0 0 0.45rem;
}

.evidence-pack-download h3 {
  font-size: clamp(1.35rem, 4vw, 2rem);
}

.evidence-pack-download p {
  color: rgba(255, 255, 255, 0.76);
}

.pack-download-actions {
  display: grid;
  gap: 0.65rem;
}

.pack-download-actions .button {
  width: 100%;
}

.download-status {
  min-height: 1.4rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.94rem;
}

.organizer-actions {
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  background: rgba(247, 247, 248, 0.9);
  border-top: 1px solid var(--surface-line);
}

.organizer-actions .button {
  width: 100%;
}

.organizer-actions .button-secondary {
  color: var(--soft-black);
  background: var(--white);
  border-color: #d8d8de;
}

.organizer-actions .button-secondary:hover,
.organizer-actions .button-secondary:focus-visible {
  background: #eeeeef;
}

.organizer-actions .button[hidden] {
  display: none;
}

.organizer-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

@media (min-width: 700px) {
  .tool-hero-shell {
    grid-template-columns: minmax(0, 1fr) minmax(310px, 420px);
  }

  .form-grid-2,
  .evidence-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .organizer-actions {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }

  .pack-download-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .organizer-shell {
    grid-template-columns: 310px minmax(0, 1fr);
    align-items: start;
  }

  .organizer-sidebar {
    position: sticky;
    top: 96px;
  }

  .mobile-step-summary {
    display: none;
  }

  .organizer-step-panel {
    padding: 1.35rem;
  }
}

@media (max-width: 979px) {
  .organizer-step-list {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 0.2rem;
  }

  .organizer-step-list li {
    flex: 0 0 min(76vw, 270px);
  }
}

@media (max-width: 699px) {
  .tool-hero-shell {
    min-height: auto;
    padding: 3rem 0 3.5rem;
  }

  .evidence-pack-visual {
    min-height: 280px;
  }

  .pack-document {
    min-height: 320px;
  }

  .pack-folder {
    inset: 2rem 0 1rem;
  }

  .tool-local-notice,
  .timeline-hint {
    grid-template-columns: 1fr;
  }

  .repeat-entry-header {
    align-items: stretch;
    flex-direction: column;
  }

  .remove-entry-button {
    width: 100%;
  }

  .review-section summary {
    align-items: flex-start;
  }
}
