/* Legal pages (privacy.html, terms.html): shares the court-theme masthead and footer; everything below is scoped to .legal */
.legal { padding-top: 56px; padding-bottom: 88px; }
.legal-head { max-width: 760px; margin: 0 0 44px; }
.legal-head .eyebrow { margin-bottom: 14px; }
.legal-head h1 {
  font-family: var(--display); font-size: var(--heading-size); font-weight: 450;
  letter-spacing: -.045em; line-height: 1.13; margin: 0 0 18px; text-wrap: balance; color: var(--green);
}
.legal-head h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.04em; letter-spacing: -.01em; }
.legal-head p { font-size: 18px; line-height: 1.7; color: var(--reading-colour); margin: 0; max-width: 640px; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 22px; font-size: 15px; color: var(--muted); }
.legal-meta a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.legal-meta a:hover { color: var(--clay); }

/* Plain-English summary panel */
.legal-summary {
  background: var(--section-tint); border: 1px solid var(--line); border-radius: 4px;
  padding: 26px 28px 24px; margin: 0 0 48px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px;
}
.legal-summary h2 { grid-column: 1 / -1; font-size: 15px; font-weight: 600; letter-spacing: 0; margin: 0; color: var(--reading-colour); }
.legal-summary ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.legal-summary li { position: relative; padding-left: 28px; font-size: 16px; line-height: 1.55; color: var(--green); }
.legal-summary li::before {
  content: ''; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: #ffd200;
}
.legal-summary li.no::before { background: #e5e8e1; }
.legal-summary li::after {
  position: absolute; left: 0; top: 4px; width: 16px; height: 16px; line-height: 16px; text-align: center;
  font-size: 11px; font-weight: 700; color: var(--green);
}
.legal-summary li.yes::after { content: '✓'; }
.legal-summary li.no::after { content: '✕'; color: #6b716a; }

/* Two-column body: sticky contents on the left */
.legal-body { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 48px 64px; align-items: start; }
.legal-toc { position: sticky; top: 24px; }
.legal-toc p { font-size: 13px; font-weight: 600; letter-spacing: .025em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.legal-toc li a {
  display: block; padding: 7px 0 7px 16px; font-size: 14.5px; line-height: 1.4; color: var(--reading-colour);
  text-decoration: none; border-left: 2px solid transparent; margin-left: -1px;
}
.legal-toc li a:hover { color: var(--clay); }
.legal-toc li a.is-current { color: var(--green); border-left-color: var(--clay); font-weight: 600; }

.legal-article section { padding: 0 0 40px; margin: 0 0 40px; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.legal-article section:last-child { border-bottom: 0; margin-bottom: 0; }
.legal-article h2 {
  font-family: var(--display); font-size: 26px; font-weight: 550; letter-spacing: -.025em; line-height: 1.25;
  margin: 0 0 16px; color: var(--green); display: flex; gap: 14px; align-items: baseline;
}
.legal-article h2 .num { font-size: 15px; font-weight: 600; color: var(--clay); letter-spacing: 0; min-width: 22px; font-variant-numeric: tabular-nums; }
.legal-article h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 26px 0 8px; color: var(--green); }
.legal-article p, .legal-article li { font-size: 17px; line-height: 1.7; color: var(--reading-colour); }
.legal-article p { margin: 0 0 14px; }
.legal-article ul, .legal-article ol { margin: 0 0 16px; padding-left: 22px; }
.legal-article li { margin-bottom: 7px; }
.legal-article li::marker { color: var(--clay); }
.legal-article strong { color: var(--green); font-weight: 600; }
.legal-article a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #a9b0a7; }
.legal-article a:hover { color: var(--clay); text-decoration-color: currentColor; }

/* Data sources table */
.legal-table { width: 100%; border-collapse: collapse; margin: 10px 0 22px; font-size: 15.5px; line-height: 1.55; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); color: var(--reading-colour); }
.legal-table th { font-size: 13px; font-weight: 600; letter-spacing: .025em; text-transform: uppercase; color: var(--muted); padding-top: 0; }
.legal-table td:first-child { color: var(--green); font-weight: 600; width: 30%; }
.legal-table td:last-child { width: 24%; }
.tag { display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; padding: 3px 9px; border-radius: 3px; background: #e8ece5; color: var(--court); white-space: nowrap; }
.tag.warn { background: #f2e3da; color: #803723; }

/* Service options */
.service-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0 8px; }
.service-options > div { border: 1px solid var(--line); border-radius: 4px; padding: 16px 18px 14px; background: #fff; }
.service-options .label { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--green); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.service-options p { margin: 0; font-size: 15.5px; line-height: 1.6; }
@media (max-width: 760px) { .service-options { grid-template-columns: 1fr; } }

/* Call-out */
.legal-note { border-left: 3px solid #ffd200; background: var(--section-tint); padding: 14px 18px; margin: 18px 0 20px; border-radius: 0 4px 4px 0; }
.legal-note p { margin: 0; font-size: 15.5px; }

/* Draft review banner: remove before publishing */
.draft-banner { background: #fff6cc; border-bottom: 1px solid #e8d78a; color: #4a3f00; font-size: 14px; padding: 9px 4.2%; text-align: center; }
.draft-banner strong { font-weight: 700; }

/* Footer link to the other legal page */
.legal-foot { margin-top: 54px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 14px 32px; font-size: 15px; color: var(--muted); }
.legal-foot a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.legal-foot a:hover { color: var(--clay); }

@media (max-width: 960px) {
  .legal-body { grid-template-columns: 1fr; gap: 32px; }
  .legal-toc { position: static; }
  .legal-toc ol { display: flex; flex-wrap: wrap; gap: 4px 6px; border-left: 0; }
  .legal-toc li a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 3px; margin: 0; font-size: 13.5px; }
  .legal-toc li a.is-current { border-color: var(--clay); }
}
@media (max-width: 760px) {
  .legal { padding-top: 36px; padding-bottom: 64px; } /* side gutters come from .section-wrap */
  .legal-summary { grid-template-columns: 1fr; padding: 20px 18px; }
  .legal-article h2 { font-size: 23px; }
  .legal-article p, .legal-article li { font-size: 16px; }
  .legal-table, .legal-table thead, .legal-table tbody, .legal-table tr, .legal-table td { display: block; }
  .legal-table thead { display: none; }
  .legal-table tr { border-bottom: 1px solid var(--line); padding: 12px 0; }
  .legal-table td { border: 0; padding: 2px 0; width: auto !important; }
  .legal-table td:first-child { padding-bottom: 4px; }
}

/* Plain-English combined page */
.plain .legal-head { margin-bottom: 28px; }
.plain-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 56px; }
.plain-jump a { font-size: 14px; font-weight: 550; color: var(--green); text-decoration: none; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.plain-jump a:hover { border-color: var(--green); }
.plain-part { max-width: 760px; margin: 0 0 72px; }
.plain-part-head { margin: 0 0 26px; }
.plain-kicker { display: block; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--clay); margin-bottom: 10px; }
.plain-part-head h2 { font-size: 34px; line-height: 1.12; letter-spacing: -.02em; margin: 0 0 12px; color: var(--green); }
.plain-part-head p { font-size: 17.5px; line-height: 1.65; color: var(--reading-colour); margin: 0; max-width: 640px; }
.plain .legal-summary { margin-bottom: 36px; }
.plain-qa { display: grid; gap: 0; }
.qa { padding: 22px 0; border-top: 1px solid var(--line); }
.qa h3 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 8px; color: var(--green); }
.qa p { font-size: 17px; line-height: 1.7; color: var(--reading-colour); margin: 0; }
.qa p b { font-weight: 600; color: var(--green); }
.qa a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.qa a:hover { color: var(--clay); }
.plain-contact { max-width: 760px; background: var(--section-tint); border: 1px solid var(--line); border-radius: 4px; padding: 26px 28px; }
.plain-contact h2 { font-size: 22px; letter-spacing: -.01em; margin: 0 0 10px; color: var(--green); }
.plain-contact p { font-size: 16.5px; line-height: 1.65; color: var(--reading-colour); margin: 0 0 10px; }
.plain-contact p:last-child { margin-bottom: 0; }
.plain-contact a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.plain-caveat { font-size: 14.5px !important; color: var(--muted) !important; }
@media (max-width: 640px) {
  .plain-part-head h2 { font-size: 27px; }
  .qa h3 { font-size: 17.5px; }
  .qa p, .plain-part-head p { font-size: 16px; }
  .plain-contact { padding: 20px 18px; }
}

/* Agent plain page: link to household page */
.plain-link { margin: 0; }

/* Household page: stripped header and footer, since the reader is not a customer */
.hh-header { justify-content: space-between; }
.hh-optout { font-size: 13px; font-weight: 550; color: var(--green); padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.hh-optout:hover { border-color: var(--green); }
.hh-stop { background: var(--section-tint); border: 1px solid var(--line); border-radius: 4px; padding: 28px; }
.hh-stop .plain-part-head { margin-bottom: 18px; }
.hh-steps { margin: 0; padding-left: 22px; display: grid; gap: 12px; }
.hh-steps li { font-size: 17px; line-height: 1.65; color: var(--reading-colour); }
.hh-steps b { font-weight: 600; color: var(--green); }
.hh-steps a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.hh-note { margin: 18px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.hh-footer { padding-top: 0; }
.hh-footer .footer-bottom { border-top: 0; }
@media (max-width: 640px) { .hh-stop { padding: 20px 18px; } .hh-steps li { font-size: 16px; } }

/* Lean legal documents: single column, no decoration */
.legal-lean { max-width: 720px; padding-top: 44px; padding-bottom: 72px; }
.legal-lean .lean-head h1 { font-size: 34px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 10px; color: var(--green); }
.legal-lean .lean-head p { font-size: 17px; line-height: 1.6; color: var(--reading-colour); margin: 0; }
.legal-lean .lean-head .lean-meta { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 16px 0 36px; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.legal-lean .lean-head .lean-meta a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.lean-summary { margin: 30px 0 38px; padding: 20px 22px; background: var(--section-tint); border: 1px solid var(--line); border-radius: 4px; }
.lean-summary h2 { font-size: 14px; font-weight: 600; letter-spacing: 0; margin: 0 0 10px; color: var(--green); }
.lean-summary ul { margin: 0; padding-left: 18px; columns: 2; column-gap: 32px; }
.lean-summary li { font-size: 15.5px; line-height: 1.5; color: var(--reading-colour); margin: 0 0 6px; break-inside: avoid; }
.lean-toc { font-size: 14px; line-height: 1.9; color: var(--muted); margin: 28px 0 36px; padding: 0 0 20px; border-bottom: 1px solid var(--line); }
.lean-toc a { color: var(--green); text-decoration: none; }
.lean-toc a:hover { color: var(--clay); text-decoration: underline; }
.lean-toc span { margin: 0 8px; color: var(--line); }
.legal-lean section { margin: 0 0 30px; }
.legal-lean section h2 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; margin: 0 0 10px; color: var(--green); }
.legal-lean section h2 .num { color: var(--muted); margin-right: 10px; font-variant-numeric: tabular-nums; }
.legal-lean section h3 { font-size: 16px; font-weight: 600; margin: 16px 0 6px; color: var(--green); }
.legal-lean section p, .legal-lean section li { font-size: 16px; line-height: 1.6; color: var(--reading-colour); }
.legal-lean section p { margin: 0 0 10px; }
.legal-lean section ul, .legal-lean section ol { margin: 0 0 10px; padding-left: 20px; }
.legal-lean section li { margin: 0 0 5px; }
.legal-lean section li b, .legal-lean section p b { font-weight: 600; color: var(--green); }
.legal-lean section a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.legal-lean section a:hover { color: var(--clay); }
.lean-attrib { font-size: 14.5px !important; color: var(--muted) !important; border-left: 3px solid #ffd200; padding-left: 14px; }
.lean-contact { font-size: 16px; line-height: 1.6; margin: 0; }
.legal-lean .legal-foot { margin-top: 36px; padding-top: 18px; font-size: 14px; }
@media (max-width: 640px) {
  .legal-lean .lean-head h1 { font-size: 28px; }
  .lean-summary ul { columns: 1; }
  .legal-lean section p, .legal-lean section li { font-size: 15.5px; }
}
.legal-lean .lean-head p b { font-weight: 600; color: var(--green); }
