@font-face {
  font-family: "Noto Serif";
  src: url("/fonts/noto-serif-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif";
  src: url("/fonts/noto-serif-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
}

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

:root {
  color-scheme: light;
  --paper: #fbf9f2;
  --canvas: #f3f0e8;
  --ink: #333b2e;
  --muted: #6b725f;
  --line: #deded0;
  --olive: #56634b;
  --saffron: #946337;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 17px/1.85 "Noto Serif", Georgia, "Times New Roman", serif; -webkit-font-smoothing: antialiased; }
a { color: #405a34; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: #7b4d28; }
a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--saffron); outline-offset: 5px; }
::selection { background: #dce2cd; color: #273821; }
[lang="ne"], [lang="pi-Deva"] { font-family: "Noto Serif Devanagari", "Nirmala UI", serif; }
.skip-link { position: fixed; z-index: 10; left: 20px; top: -80px; padding: 10px 18px; background: #3d4d35; color: white; border-radius: 4px; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; z-index: 5; top: 0; min-height: 80px; padding: 17px max(28px, calc((100vw - 1390px) / 2)); display: flex; gap: 28px; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); background: #fbf9f2f7; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font: 30px/1 Georgia, serif; letter-spacing: -1px; }
.brand svg { width: 34px; height: 34px; stroke: #ab7443; stroke-width: 1.2; }
.brand-dot { color: #ab7443; }
.back-link { display: flex; align-items: center; gap: 10px; font-size: 13px; text-decoration: none; }
.back-link [lang="ne"] { font-size: 12px; }
.back-english { padding-left: 11px; border-left: 1px solid var(--line); }
.page-layout { max-width: 1390px; margin: 0 auto; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 52px; padding: 58px 28px 0; }
.page-contents { position: sticky; top: 118px; align-self: start; max-height: calc(100vh - 140px); overflow-y: auto; padding: 2px 0 25px; }
.eyebrow { margin: 0 0 19px; font: 10px/1.7 system-ui, sans-serif; letter-spacing: .15em; text-transform: uppercase; color: var(--saffron); }
.page-contents ol { padding: 0; margin: 0; list-style: none; counter-reset: contents; }
.page-contents li { counter-increment: contents; }
.page-contents a { display: flex; gap: 11px; padding: 8px 0; text-decoration: none; color: var(--muted); font: 12px/1.7 system-ui, sans-serif; }
.page-contents a::before { content: counter(contents, decimal-leading-zero); font-family: Georgia, serif; color: #8b927e; font-size: 10px; width: 16px; flex-shrink: 0; }
.page-contents a:hover { color: #3d4d35; }
.contents-note { border-top: 1px solid var(--line); padding-top: 20px; margin: 26px 15px 0 0; color: var(--muted); font-size: 13px; font-style: italic; }
main { min-width: 0; }
.page-intro { max-width: 800px; padding-bottom: 30px; }
h1 { font-weight: 500; line-height: 1.55; font-size: 40px; margin: 0 0 18px; letter-spacing: -.035em; color: #303b2a; }
.english-title { display: block; font: 28px/1.4 Georgia, serif; letter-spacing: -.015em; margin-top: 8px; }
.intro-text { max-width: 720px; color: var(--muted); margin: 0 0 19px; font-size: 17px; }
.audit-date { margin: 0; color: var(--muted); font: 11px/1.8 system-ui, sans-serif; }
.license-book { position: relative; padding: 46px 52px; background: var(--paper); border: 1px solid #e4e1d4; box-shadow: 0 8px 40px #42482f08; }
.license-book::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 8px; background: linear-gradient(90deg, #d7d2c54a, transparent); pointer-events: none; }
section { scroll-margin-top: 110px; }
section + section { margin-top: 47px; padding-top: 38px; border-top: 1px solid var(--line); }
.section-number { color: var(--saffron); font: 10px/1.7 system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 13px; }
h2 { font-weight: 400; color: #35472d; font-size: 28px; line-height: 1.4; letter-spacing: -.02em; margin: 0 0 22px; }
h3 { color: #405336; font-weight: 500; font-size: 19px; margin: 28px 0 13px; }
p { margin: 0 0 19px; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }
code { font: .77em/1.65 ui-monospace, Consolas, monospace; color: #566246; overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; margin: 25px 0; -webkit-overflow-scrolling: touch; }
table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; line-height: 1.75; text-align: left; }
caption { text-align: left; font: 11px/1.8 system-ui, sans-serif; color: var(--muted); padding: 0 0 11px; }
thead { background: #ebeede; color: #445638; }
th, td { padding: 14px 14px; vertical-align: top; border-bottom: 1px solid #dedfd2; overflow-wrap: anywhere; }
th { font-weight: 500; }
th:first-child, td:first-child { padding-left: 12px; }
th[scope="row"] { width: 29%; font-weight: 600; }
thead th { font: 11px/1.6 system-ui, sans-serif; }
td { color: #626b56; }
td a { color: #4a623d; }
small { display: block; font-size: 11px; line-height: 1.75; color: var(--muted); margin-top: 5px; font-weight: 400; }
.note { padding: 18px 22px; background: #edf0e4; border-left: 2px solid #879773; color: #546545; font-size: 14px; line-height: 1.85; margin-top: 26px; }
.source-credit { padding-left: 22px; border-left: 2px solid #c4aa83; }
.source-links { margin: 20px 0 0; padding-left: 21px; font-size: 14px; line-height: 1.9; }
.source-links li { margin-bottom: 8px; overflow-wrap: anywhere; }
.credit-example { margin: 24px 0 0; background: #f2ecde; border: 1px solid #e6dcc7; border-radius: 3px; padding: 20px 23px; color: #6c573b; font-size: 14px; line-height: 1.9; }
.credit-example strong { display: inline-block; margin-bottom: 5px; color: #795b38; font: 10px/1.7 system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.reuse-steps { padding-left: 25px; margin: 0; }
.reuse-steps li { padding-left: 7px; margin-bottom: 18px; }
.reuse-steps li::marker { color: var(--saffron); font-size: 14px; }
.record-links { display: grid; grid-template-columns: 1fr 1fr; margin: 27px 0; gap: 12px; }
.record-links a { border: 1px solid #dde1d1; border-radius: 3px; padding: 14px 17px; text-decoration: none; background: #f5f5eb; }
.record-links a:hover { background: #ecefdf; border-color: #b7c2a4; }
.record-links strong { display: block; font-size: 15px; line-height: 1.7; }
.record-links span { display: block; font: 10px/1.8 system-ui, sans-serif; color: var(--muted); margin-top: 5px; }
.page-footer { padding: 30px 0 50px; display: flex; align-items: center; justify-content: space-between; gap: 26px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.page-footer p { margin: 0; }
.page-footer [lang="ne"] { font-size: 12px; }
.page-footer > a { font-size: 12px; }

@media (max-width: 1120px) {
  .page-layout { grid-template-columns: 180px minmax(0, 1fr); gap: 30px; }
  .license-book { padding: 36px 32px; }
  body { font-size: 16px; }
}

@media (max-width: 820px) {
  html { scroll-padding-top: 95px; }
  .page-layout { display: block; padding-top: 32px; }
  .page-contents { position: static; max-height: none; padding: 0 0 25px; margin: 0 0 30px; border-bottom: 1px solid var(--line); }
  .page-contents ol { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .page-contents a { padding: 5px 0; }
  .contents-note { display: none; }
  .page-contents .eyebrow { margin-bottom: 10px; }
  .back-english { display: none; }
  .site-header { min-height: 72px; }
  h1 { font-size: 34px; }
  .english-title { font-size: 25px; }
  .intro-text { font-size: 16px; }
  .license-book { padding: 30px 27px; }
}

@media (max-width: 500px) {
  .site-header { padding: 16px 20px; gap: 14px; }
  .brand { font-size: 27px; gap: 8px; }
  .brand svg { width: 29px; height: 29px; }
  .back-link { gap: 6px; }
  .back-link [lang="ne"] { font-size: 10px; }
  .page-layout { padding: 27px 17px 0; }
  .page-contents ol { column-gap: 12px; }
  .page-contents a { font-size: 10px; gap: 7px; }
  .page-contents a::before { width: 13px; }
  h1 { font-size: 29px; }
  .english-title { font-size: 24px; }
  h2 { font-size: 25px; }
  .license-book { padding: 28px 20px; }
  section + section { margin-top: 34px; padding-top: 29px; }
  .record-links { grid-template-columns: 1fr; }
  .note, .credit-example { padding: 16px; }
  .page-footer { display: block; }
  .page-footer > a { display: inline-block; margin-top: 20px; }
}

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

@media print {
  @page { size: A4; margin: 18mm 17mm; }
  body, * { font-family: "Noto Serif", "Noto Serif Devanagari", serif !important; }
  html { scroll-padding-top: 0; }
  body { background: white; color: #222; font-size: 10pt; line-height: 1.6; }
  .site-header { position: static; padding: 0 0 12pt; margin-bottom: 18pt; background: none; }
  .brand { font-size: 22pt; }
  .brand svg { width: 25pt; height: 25pt; }
  .back-link, .page-contents, .skip-link, .page-footer > a { display: none; }
  .page-layout { display: block; max-width: none; padding: 0; }
  .page-intro { padding-bottom: 20pt; }
  .intro-text { font-size: 10pt; }
  h1 { font-size: 24pt; }
  .english-title { font-size: 20pt; }
  h2 { font-size: 18pt; }
  h3 { font-size: 13pt; }
  h1, h2, h3, .section-number { break-after: avoid; }
  .license-book { padding: 0; border: 0; box-shadow: none; background: none; }
  .license-book::before { display: none; }
  section + section { margin-top: 24pt; padding-top: 20pt; }
  .table-scroll { overflow: visible; }
  table { min-width: 0; font-size: 8pt; line-height: 1.6; }
  th, td { padding: 7pt; }
  thead { display: table-header-group; }
  tr { break-inside: avoid; }
  .note, .credit-example { font-size: 9pt; padding: 12pt; }
  a { color: inherit; }
  .record-links { gap: 8pt; }
  .record-links strong { font-size: 10pt; }
  .record-links span { font-size: 8pt; }
  .record-links a { break-inside: avoid; }
  .page-footer { padding-bottom: 0; font-size: 9pt; }
}
