/* Legal pages: terms, privacy, data processing agreement, imprint (views/legal/*.ejs)
   and the consumer withdrawal page. Calm reading layout: white page, 14.5 px text,
   sticky contents, small section markers. */
:root {
  --lg-ink: #0f172a; --lg-text: #334155; --lg-muted: #64748b; --lg-faint: #94a3b8;
  --lg-line: #e5e7eb; --lg-soft: #f8fafc; --lg-accent: #4f46e5; --lg-accent-soft: #eef2ff;
  --lg-w: 1120px;
}
* { box-sizing: border-box; }
body.lg { margin: 0; background: #fff; color: var(--lg-text); font: 14.5px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.lg a { color: var(--lg-accent); text-decoration: none; }
.lg a:hover { text-decoration: underline; }

/* top bar + document tabs */
.lg-top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(6px); border-bottom: 1px solid var(--lg-line); }
.lg-top__in, .lg-tabs__in, .lg-hero__in, .lg-foot__in, .lg-notice__in { max-width: var(--lg-w); margin: 0 auto; padding: 0 24px; }
.lg-top__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; }
.lg-brand { display: inline-flex; align-items: center; gap: 12px; }
.lg-brand a { text-decoration: none !important; }
.lg-brand__home, a.lg-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--lg-ink) !important; font-weight: 700; font-size: 15px; text-decoration: none !important; }
.lg-brand__section { font-weight: 500; font-size: 15px; color: var(--lg-muted) !important; padding-left: 12px; border-left: 1px solid var(--lg-line); }
.lg-brand__section:hover { color: var(--lg-ink) !important; }
.lg-langs { display: flex; gap: 2px; background: #f1f5f9; border-radius: 8px; padding: 2px; }
.lg-langs a { font-size: 12px; font-weight: 600; letter-spacing: .03em; color: var(--lg-muted) !important; padding: 4px 9px; border-radius: 6px; text-decoration: none !important; }
.lg-langs a.is-active { background: #fff; color: var(--lg-ink) !important; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.lg-tabs__in { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.lg-tabs__in::-webkit-scrollbar { display: none; }
.lg-tabs a { flex: 0 0 auto; font-size: 13.5px; font-weight: 500; color: var(--lg-muted) !important; padding: 10px 0 11px; border-bottom: 2px solid transparent; text-decoration: none !important; }
.lg-tabs a:hover { color: var(--lg-ink) !important; }
.lg-tabs a.is-active { color: var(--lg-ink) !important; border-bottom-color: var(--lg-accent); }

/* header band */
.lg-hero { background: var(--lg-soft); border-bottom: 1px solid var(--lg-line); }
.lg-hero__in { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-top: 34px; padding-bottom: 26px; flex-wrap: wrap; }
.lg-hero h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; color: var(--lg-ink); }
.lg-meta { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--lg-muted); }
.lg-dot { color: var(--lg-faint); }
.lg-badge { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #f1f5f9; color: #475569; border: 1px solid var(--lg-line); }
.lg-badge.is-binding { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.lg-notice { background: var(--lg-accent-soft); border-bottom: 1px solid #c7d2fe; color: #312e81; font-size: 13.5px; }
.lg-notice__in { padding-top: 10px; padding-bottom: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

/* layout */
.lg-layout { max-width: var(--lg-w); margin: 0 auto; padding: 34px 24px 56px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.lg-layout--single { grid-template-columns: minmax(0, 760px); justify-content: start; }
.lg-side { position: sticky; top: 112px; max-height: calc(100vh - 130px); overflow-y: auto; padding-right: 4px; font-size: 13px; scrollbar-width: thin; }
.lg-side__title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--lg-faint); margin: 0 0 8px; }
.lg-side__title:not(:first-child) { margin-top: 22px; }
.lg-toc { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--lg-line); }
.lg-toc a { display: flex; gap: 8px; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--lg-muted) !important; line-height: 1.4; text-decoration: none !important; }
.lg-toc a span { flex: 0 0 18px; color: var(--lg-faint); font-variant-numeric: tabular-nums; }
.lg-toc a:hover { color: var(--lg-ink) !important; }
.lg-toc a.is-active { color: var(--lg-accent) !important; border-left-color: var(--lg-accent); font-weight: 500; }
.lg-toc a.is-active span { color: var(--lg-accent); }
.lg-toc a.is-current { color: var(--lg-ink) !important; font-weight: 600; }
.lg-toc small { color: var(--lg-faint); font-weight: 400; margin-left: 4px; }

/* document text */
.lg-doc { min-width: 0; max-width: 760px; overflow-wrap: anywhere; }
.lg-doc > p:first-child { margin-top: 0; }
.lg-doc h2 { display: block; margin: 36px 0 10px; padding-top: 0; font-size: 17px; line-height: 1.35; font-weight: 650; color: var(--lg-ink); scroll-margin-top: 120px; }
.lg-num { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--lg-accent-soft); color: var(--lg-accent); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; position: relative; top: -2px; margin-right: 10px; vertical-align: middle; }
.lg-doc h3 { font-size: 14.5px; margin: 20px 0 6px; color: var(--lg-ink); }
.lg-doc p { margin: 0 0 10px; }
.lg-doc ul { margin: 4px 0 12px; padding-left: 20px; }
.lg-doc li { margin: 3px 0; }
.lg-doc li::marker { color: var(--lg-faint); }
.lg-doc strong { color: var(--lg-ink); font-weight: 600; }
.lg-doc em { color: var(--lg-muted); }
.lg-doc hr { border: 0; border-top: 1px solid var(--lg-line); margin: 28px 0; }
.lg-doc hr + h2 { margin-top: 0; }
.lg-doc blockquote { margin: 12px 0; padding: 12px 16px; background: var(--lg-soft); border: 1px solid var(--lg-line); border-left: 3px solid #c7d2fe; border-radius: 8px; font-size: 13.5px; }
.lg-table { overflow-x: auto; margin: 12px 0 18px; border: 1px solid var(--lg-line); border-radius: 10px; }
.lg-table table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 620px; line-height: 1.5; }
.lg-table th { background: var(--lg-soft); text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--lg-line); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--lg-muted); }
.lg-table td { padding: 9px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.lg-table tr:last-child td { border-bottom: 0; }
.lg-muted { color: var(--lg-muted); font-size: 13px; }
.lg-pending { font-size: 13px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 8px 12px; margin: 0 0 10px; }

/* imprint */
.lg-imprint h2 { margin-top: 30px; }
.lg-imp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 8px; }
.lg-imp-block { border: 1px solid var(--lg-line); border-radius: 12px; padding: 16px 18px; background: #fff; }
.lg-imp-block h2 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--lg-faint); font-weight: 700; }
.lg-imp-block p { margin: 0; }
.lg-dl { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); margin: 0; border: 1px solid var(--lg-line); border-radius: 12px; overflow: hidden; }
.lg-dl dt, .lg-dl dd { margin: 0; padding: 9px 16px; border-bottom: 1px solid #f1f5f9; }
.lg-dl dt { color: var(--lg-muted); font-size: 13px; background: var(--lg-soft); }
.lg-dl dt:nth-last-of-type(1), .lg-dl dd:last-of-type { border-bottom: 0; }
.lg-links { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 8px; }
.lg-links a { display: inline-block; padding: 6px 12px; border: 1px solid var(--lg-line); border-radius: 999px; font-size: 13px; color: var(--lg-ink) !important; text-decoration: none !important; }
.lg-links a:hover { border-color: #c7d2fe; background: var(--lg-accent-soft); }

/* buttons, accept form */
.lg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 600; font-size: 13.5px; padding: 8px 15px; border-radius: 8px; border: 1px solid var(--lg-accent); background: var(--lg-accent); color: #fff !important; cursor: pointer; text-decoration: none !important; }
.lg-btn--ghost { background: #fff; color: var(--lg-ink) !important; border-color: var(--lg-line); }
.lg-btn--ghost:hover { border-color: #cbd5e1; }
.lg-btn--danger { background: #b91c1c; border-color: #b91c1c; }
.lg-accept { margin-top: 32px; padding: 18px; border: 1px solid #c7d2fe; border-radius: 12px; background: var(--lg-accent-soft); }
.lg-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; color: var(--lg-ink); cursor: pointer; }
.lg-check input { margin-top: 4px; width: 16px; height: 16px; flex: 0 0 auto; }
.lg-accept__row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.lg-error { color: #b91c1c; font-weight: 600; margin-bottom: 8px; }

/* withdrawal page (single card) */
.lg-card { max-width: 600px; margin: 40px auto; background: #fff; border: 1px solid var(--lg-line); border-radius: 14px; padding: 26px 28px; }
.lg-card h1 { font-size: 22px; margin-top: 0; color: var(--lg-ink); }
.lg-list { padding-left: 20px; }
.lg-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; }
.lg-icon.is-ok { background: #ecfdf5; color: #047857; }
body.lg:has(.lg-card) { background: var(--lg-soft); }

/* footer */
.lg-foot { border-top: 1px solid var(--lg-line); }
.lg-foot__in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 26px; font-size: 12.5px; color: var(--lg-faint); }
.lg-foot a { color: var(--lg-muted) !important; }

@media (max-width: 900px) {
  .lg-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 22px 16px 40px; }
  .lg-side { display: none; }
  .lg-top__in, .lg-tabs__in, .lg-hero__in, .lg-foot__in, .lg-notice__in { padding-left: 16px; padding-right: 16px; }
  .lg-hero__in { padding-top: 24px; padding-bottom: 18px; }
  .lg-hero h1 { font-size: 23px; }
  .lg-brand__section { display: none; }
  .lg-imp-grid, .lg-dl { grid-template-columns: minmax(0, 1fr); }
  .lg-dl dt { border-bottom: 0; padding-bottom: 2px; }
}
@media print {
  .lg-top, .lg-side, .lg-notice, .lg-accept, .lg-foot, .lg-print { display: none !important; }
  .lg-hero { background: #fff; border: 0; }
  .lg-layout { display: block; padding: 0 24px; }
  .lg-table { overflow: visible; } .lg-table table { min-width: 0; }
}
