@font-face {
    font-family: "Noto Sans";
    src: url("/fonts/NotoSans.ttf") format("truetype");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --legal-accent: #ff7a21;
    --legal-accent-dark: #d95708;
    --legal-text: #24201d;
    --legal-muted: #6d6660;
    --legal-border: #eadfd6;
    --legal-bg: #fff9f5;
    --legal-surface: #ffffff;
    color-scheme: light only;
    font-family: "Noto Sans", Arial, sans-serif;
    font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 0; scroll-behavior: smooth; scroll-padding-top: 160px; }
body { min-width: 0; margin: 0; overflow-x: hidden; background: var(--legal-bg); color: var(--legal-text); }
a { color: var(--legal-accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #a94306; }
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.legal-table-scroll:focus-visible { outline: 3px solid rgba(255, 122, 33, .38); outline-offset: 3px; }

.skip-link { position: fixed; z-index: 20; left: 16px; top: 12px; padding: 10px 14px; border-radius: 8px; background: var(--legal-text); color: #fff; transform: translateY(-160%); }
.skip-link:focus { color: #fff; transform: translateY(0); }

.legal-header { position: sticky; z-index: 10; top: 0; border-bottom: 1px solid var(--legal-border); background: rgba(255, 255, 255, .96); }
.legal-header__inner { width: min(1180px, calc(100% - 40px)); min-height: 68px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.legal-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--legal-text); font-size: 23px; font-weight: 760; letter-spacing: -.04em; text-decoration: none; }
.legal-brand img { width: 40px; height: 40px; object-fit: contain; }
.legal-languages { display: flex; align-items: center; gap: 5px; }
.legal-languages a { min-width: 42px; padding: 8px 10px; border: 1px solid transparent; border-radius: 999px; color: var(--legal-muted); font-size: 13px; font-weight: 700; text-align: center; text-decoration: none; }
.legal-languages a:hover { border-color: var(--legal-border); color: var(--legal-text); }
.legal-languages a[aria-current="true"] { border-color: #ffd6bd; background: #fff0e6; color: var(--legal-accent-dark); }

.legal-document-nav { position: sticky; z-index: 9; top: 68px; border-bottom: 1px solid var(--legal-border); background: rgba(255, 249, 245, .97); }
.legal-document-nav > div { width: min(1180px, calc(100% - 40px)); min-height: 58px; margin: 0 auto; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 20px; padding: 9px 0; }
.legal-document-nav a { min-height: 38px; display: inline-flex; align-items: center; padding: 7px 1px; border-bottom: 2px solid transparent; color: var(--legal-muted); font-size: 13px; font-weight: 620; line-height: 1.35; text-decoration: none; }
.legal-document-nav a:hover { color: var(--legal-text); }
.legal-document-nav a[aria-current="page"] { border-bottom-color: var(--legal-accent); color: var(--legal-text); }

.legal-layout { width: min(1180px, calc(100% - 40px)); margin: 34px auto 64px; display: grid; grid-template-columns: minmax(180px, 230px) minmax(0, 820px); justify-content: center; align-items: start; gap: 34px; }
.legal-sidebar { position: sticky; top: 154px; min-width: 0; max-height: calc(100vh - 180px); overflow: auto; padding: 8px 8px 8px 0; }
.legal-toc strong { display: block; margin-bottom: 12px; color: var(--legal-text); font-size: 13px; }
.legal-toc ol { margin: 0; padding: 0; display: grid; gap: 3px; list-style: none; }
.legal-toc a { display: block; padding: 6px 8px; border-left: 2px solid var(--legal-border); color: var(--legal-muted); font-size: 12px; line-height: 1.4; text-decoration: none; }
.legal-toc a:hover { border-left-color: var(--legal-accent); color: var(--legal-text); }
.legal-toc-mobile { display: none; }

.legal-document { min-width: 0; overflow: hidden; border: 1px solid var(--legal-border); border-radius: 22px; background: var(--legal-surface); }
.legal-document__content { padding: clamp(30px, 5vw, 60px); }
.legal-document h1 { max-width: 720px; margin: 0 0 12px; color: #171310; font-size: clamp(31px, 4vw, 46px); font-weight: 720; line-height: 1.16; letter-spacing: -.035em; }
.legal-document h2 { margin: 42px 0 14px; scroll-margin-top: 158px; color: #211b17; font-size: clamp(21px, 2.5vw, 27px); font-weight: 700; line-height: 1.3; letter-spacing: -.02em; }
.legal-document h3 { margin: 28px 0 12px; scroll-margin-top: 158px; font-size: 19px; line-height: 1.4; }
.legal-document p { margin: 0 0 18px; font-size: 16.5px; line-height: 1.65; }
.legal-document .legal-version { margin-bottom: 30px; color: var(--legal-muted); font-size: 14px; font-weight: 650; }
.legal-document strong { font-weight: 720; }
.legal-document code { padding: .1em .3em; border-radius: 5px; background: #f7f1ec; font: .92em ui-monospace, SFMono-Regular, Consolas, monospace; }
.legal-document blockquote { margin: 24px 0; padding: 16px 18px; border-left: 3px solid var(--legal-accent); background: #fff8f2; color: #514941; }
.legal-document blockquote p { margin: 0; }

.legal-table-scroll { width: 100%; margin: 22px 0 28px; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--legal-border); border-radius: 14px; }
.legal-table-scroll table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.legal-table-scroll th,
.legal-table-scroll td { padding: 13px 14px; border-right: 1px solid var(--legal-border); border-bottom: 1px solid var(--legal-border); text-align: left; vertical-align: top; }
.legal-table-scroll th:last-child,
.legal-table-scroll td:last-child { border-right: 0; }
.legal-table-scroll tr:last-child td { border-bottom: 0; }
.legal-table-scroll th { background: #fff5ed; color: #352d27; font-weight: 700; }
.legal-table-scroll td { min-width: 170px; }

.deletion-actions { margin: 0 0 38px; padding: 22px; border: 1px solid #ffd5bb; border-radius: 16px; background: #fff8f2; }
.deletion-actions h2 { margin: 0 0 9px; font-size: 21px; }
.deletion-actions p { margin-bottom: 8px; font-size: 15px; }
.deletion-actions .deletion-actions__hint { margin-bottom: 0; color: var(--legal-muted); font-size: 14px; }
.deletion-actions__buttons { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.legal-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border: 1px solid #e7cbbb; border-radius: 999px; background: #fff; color: var(--legal-text); font: inherit; font-size: 14px; font-weight: 680; text-decoration: none; cursor: pointer; }
.legal-button:hover { border-color: #d7a98d; color: var(--legal-text); }
.legal-button--primary { border-color: var(--legal-accent); background: var(--legal-accent); color: #fff; }
.legal-button--primary:hover { border-color: var(--legal-accent-dark); background: var(--legal-accent-dark); color: #fff; }
.deletion-actions .deletion-actions__status { min-height: 1.5em; margin: 10px 0 0; color: var(--legal-muted); font-size: 13px; }

@media (max-width: 900px) {
    html { scroll-padding-top: 128px; }
    .legal-document-nav { top: 64px; }
    .legal-document-nav > div { width: min(100% - 28px, 720px); justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; }
    .legal-document-nav a { flex: 0 0 auto; }
    .legal-layout { width: min(100% - 28px, 820px); margin-top: 22px; display: block; }
    .legal-sidebar { display: none; }
    .legal-toc-mobile { display: block; margin: 18px 18px 0; border: 1px solid var(--legal-border); border-radius: 12px; background: #fffaf6; }
    .legal-toc-mobile summary { min-height: 48px; display: flex; align-items: center; padding: 11px 14px; color: var(--legal-text); font-size: 14px; font-weight: 680; cursor: pointer; }
    .legal-toc--mobile { padding: 0 14px 14px; }
    .legal-toc--mobile > strong { display: none; }
    .legal-toc--mobile a { padding-block: 8px; font-size: 13px; }
    .legal-document__content { padding: 32px clamp(20px, 5vw, 42px) 42px; }
    .legal-document h2,
    .legal-document h3 { scroll-margin-top: 132px; }
}

@media (max-width: 560px) {
    .legal-header__inner { width: calc(100% - 28px); min-height: 64px; gap: 12px; }
    .legal-brand { gap: 7px; font-size: 20px; }
    .legal-brand img { width: 34px; height: 34px; }
    .legal-languages { gap: 1px; }
    .legal-languages a { min-width: 37px; padding: 7px 6px; font-size: 12px; }
    .legal-document { border-radius: 16px; }
    .legal-document__content { padding-inline: 19px; }
    .legal-document h1 { font-size: 30px; }
    .legal-document h2 { margin-top: 36px; font-size: 22px; }
    .legal-document p { font-size: 16px; line-height: 1.63; }
    .deletion-actions { padding: 18px; }
    .deletion-actions__buttons { align-items: stretch; flex-direction: column; }
    .legal-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

@media print {
    @page { margin: 18mm; }
    body { overflow: visible; background: #fff; color: #000; }
    .skip-link,
    .legal-header,
    .legal-document-nav,
    .legal-sidebar,
    .legal-toc-mobile,
    .deletion-actions { display: none !important; }
    .legal-layout { width: 100%; margin: 0; display: block; }
    .legal-document { overflow: visible; border: 0; border-radius: 0; }
    .legal-document__content { padding: 0; }
    .legal-document h1 { font-size: 25pt; }
    .legal-document h2 { break-after: avoid; margin-top: 24pt; font-size: 17pt; }
    .legal-document p { orphans: 3; widows: 3; font-size: 10.5pt; }
    .legal-table-scroll { overflow: visible; break-inside: avoid; }
    .legal-table-scroll table { min-width: 0; font-size: 8.5pt; }
    .legal-table-scroll th,
    .legal-table-scroll td { padding: 6pt; }
    a { color: #000; text-decoration: underline; }
}
