/* Terms only: preserve the shared shell and legal content. */
main#main.terms-refined > section.page-head {
  min-height: 0;
  padding: 36px 0 32px !important;
  border-bottom: 1px solid var(--line);
}
.terms-refined .page-head h1 { font-size: clamp(2rem, 3.5vw, 3.2rem); }
.terms-refined .page-head .legal-updated { font-size: .85rem; color: var(--muted); }
main#main.terms-refined > section.legal-page { padding: 44px 0 72px !important; background: #fff; }
.terms-refined .terms-layout { display: grid; grid-template-columns: 270px minmax(0, 800px); gap: clamp(40px, 5vw, 80px); justify-content: space-between; align-items: start; }
.terms-refined .terms-sidebar { position: sticky; top: calc(var(--header-h) + 24px); }
.terms-refined .terms-contents-label { margin: 0 0 16px; font-size: .82rem; font-weight: 800; color: var(--muted); }
.terms-refined .legal-toc { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; max-width: none; }
.terms-refined .legal-toc a { padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; font-size: .9rem; font-weight: 600; line-height: 1.5; }
.terms-refined .legal-toc a:hover { transform: none; color: var(--accent-dark); }
.terms-refined .legal-toc a:focus-visible, .terms-refined summary:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 4px; }
.terms-refined .legal-card { width: 100%; max-width: none; padding: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; font-size: 1rem; line-height: 1.85; }
main#main.terms-refined .legal-card h2 { margin: 36px 0 16px; padding-top: 32px; border-top: 1px solid var(--line); font-size: clamp(1.25rem, 1.1rem + .6vw, 1.65rem) !important; line-height: 1.35 !important; letter-spacing: -.025em !important; scroll-margin-top: 20px; }
main#main.terms-refined .legal-card h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.terms-refined .legal-card p { margin: 0 0 16px; max-width: none; overflow-wrap: anywhere; }
.terms-refined .legal-card p:last-child { margin-bottom: 0; }
.terms-refined .terms-mobile-contents { display: none; }
@media (max-width: 900px) {
  main#main.terms-refined > section.page-head { padding: 24px 0 !important; }
  main#main.terms-refined > section.legal-page { padding: 24px 0 48px !important; }
  .terms-refined .terms-layout { display: block; }
  .terms-refined .terms-sidebar { display: none; }
  .terms-refined .terms-mobile-contents { display: block; margin-bottom: 28px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
  .terms-refined summary { padding: 14px 16px; cursor: pointer; font-size: .95rem; font-weight: 800; }
  .terms-refined .terms-mobile-contents .legal-toc { padding: 0 16px 8px; }
  .terms-refined .legal-toc a:last-child { border-bottom: 0; }
  .terms-refined .legal-card { line-height: 1.8; }
  main#main.terms-refined .legal-card h2 { margin-top: 28px; padding-top: 28px; }
}
