.package-hero .hero-copy { max-width: 1200px; }

.packages-layout {
  display: grid;
  grid-template-columns: minmax(290px, .72fr) minmax(250px, .62fr) minmax(430px, 1.16fr);
  gap: 16px;
  max-width: 1540px;
  margin: 0 auto;
  padding: 22px 24px 38px;
  align-items: start;
}
.package-browser {
  position: sticky;
  top: 16px;
}
.package-search { margin-bottom: 12px; }
.package-search .results-summary { gap: 12px; }
.package-search-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.filter-chip {
  padding: 7px 10px;
  border: 1px solid #d7e4ef;
  border-radius: 999px;
  color: #466079;
  background: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.filter-chip.active {
  border-color: rgba(0,111,201,.38);
  color: var(--accent-dark);
  background: #eaf4fc;
  font-weight: 600;
}
.package-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 328px);
  overflow: auto;
}
.package-card {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
  background: #fff;
  cursor: pointer;
}
.package-card:hover, .package-card.active {
  border-color: rgba(0,111,201,.42);
  background: #f4f9ff;
}
.package-number {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--accent-dark);
  background: #e9f3fb;
  font-weight: 700;
}
.package-card strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}
.match-label {
  display: block;
  margin-top: 5px;
  color: var(--accent-dark);
  font-size: 11px;
}
.package-outline, .package-reader {
  position: sticky;
  top: 16px;
  min-height: calc(100vh - 170px);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.package-outline { max-height: calc(100vh - 32px); overflow: auto; }
.outline-number {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}
.package-outline h2 {
  margin: 8px 0 14px;
  font-size: 19px;
  line-height: 1.35;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 18px; }
.package-tag {
  padding: 5px 7px;
  border-radius: 7px;
  color: #13685c;
  background: #e7f5f1;
  font-size: 11px;
  font-weight: 700;
}
.unit-heading {
  margin: 17px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-transform: uppercase;
}
.outline-link {
  display: block;
  width: 100%;
  margin-bottom: 5px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.outline-link:hover, .outline-link.active { color: var(--accent-dark); background: #edf6fd; }
.outline-link span { float: right; color: var(--muted); font-size: 11px; }
.package-reader h2 { margin: 0 0 7px; font-size: 26px; letter-spacing: -.03em; }
.reader-context { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.source-heading {
  margin: 0 0 13px;
  padding: 12px 14px;
  border-radius: 11px;
  color: #27465e;
  background: var(--soft);
  font-size: 13px;
  line-height: 1.5;
}
.requirement-list {
  margin: 0;
  padding: 0;
  color: #253b52;
}
.requirement-item {
  display: grid;
  grid-template-columns: minmax(34px, auto) 1fr;
  gap: 9px;
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.58;
}
.requirement-marker {
  color: var(--accent-dark);
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}
.requirement-text { min-width: 0; }
.requirement-item.level-1 { margin-left: 22px; }
.requirement-item.level-2 { margin-left: 44px; }
.requirement-item.level-3,
.requirement-item.level-4,
.requirement-item.level-5 { margin-left: 60px; }
mark { padding: 0 2px; border-radius: 3px; color: inherit; background: #ffe69a; }
.package-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.related-explanations { margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--line); }
.related-explanations h3 { margin: 0 0 10px; font-size: 15px; }
.related-link {
  display: block;
  margin-bottom: 7px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
}
.related-link:hover { border-color: rgba(0,111,201,.38); background: #f7fbff; }
.law-related-link {
  display: block;
  margin-bottom: 7px;
  padding: 10px 11px;
  border: 1px solid #d5e5f3;
  border-radius: 10px;
  color: var(--ink);
  background: #f5faff;
  font-size: 12px;
  line-height: 1.42;
  text-decoration: none;
}
.law-related-link strong, .law-related-link span { display: block; }
.law-related-link span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.law-related-link:hover { border-color: rgba(0,111,201,.45); background: #eaf4fc; }
.resolution-connections { border-top-color: #d5e5f3; }
.reader-empty { display: grid; place-items: center; color: var(--muted); text-align: center; }
.report-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px 44px;
}
.report-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.report-panel {
  padding: 18px;
  margin-bottom: 16px;
}
.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}
.report-section-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.report-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.report-copy-box {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.report-copy-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}
.report-copy-head h2 {
  margin: 0;
  font-size: 16px;
}
.report-copy-box textarea {
  width: 100%;
  min-height: 360px;
  max-height: 62vh;
  padding: 12px 13px;
  border: 1px solid #cddbe7;
  border-radius: 13px;
  color: var(--ink);
  background: var(--soft);
  font: 13px/1.45 "Segoe UI", Arial, sans-serif;
  resize: vertical;
}
@media (max-width: 1180px) {
  .packages-layout { grid-template-columns: minmax(280px, .9fr) minmax(450px, 1.1fr); }
  .package-browser { position: static; }
  .package-outline { position: static; grid-column: 1; min-height: 0; }
  .package-reader { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 820px) {
  .packages-layout { display: block; padding: 15px; }
  .package-cards { max-height: 43vh; margin-bottom: 14px; }
  .package-outline, .package-reader { position: static; min-height: 0; margin-bottom: 14px; }
}
