/* AiNoch legal pages: same tokens and typeface as the landing page (../styles.css). */
@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url("../assets/fonts/Montserrat-Regular.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url("../assets/fonts/Montserrat-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("../assets/fonts/Montserrat-Bold.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-weight: 800; font-display: swap; src: url("../assets/fonts/Montserrat-ExtraBold.ttf") format("truetype"); }

:root {
  --teal-900: #0B2524;
  --teal-700: #163F3E;
  --teal-500: #2F7A72;
  --teal-300: #7ED0B4;
  --mint: #BFF0DC;
  --paper: #F3FAF6;
  --paper-2: #E6F4EC;
  --ink: #0F2E2D;
  --ink-2: rgba(15, 46, 45, 0.68);
  --line: rgba(15, 46, 45, 0.1);
  --white-2: rgba(255, 255, 255, 0.72);
  --app-gradient: linear-gradient(160deg, #163F3E 0%, #2F7A72 55%, #7ED0B4 100%);
  --radius: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16.5px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--teal-500); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--teal-700); }
:focus-visible { outline: 3px solid var(--teal-500); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 12px; padding: 10px 16px; border-radius: 999px; background: var(--mint); color: var(--ink); font-weight: 700; z-index: 30; }
.skip:focus { left: 16px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ---------- Top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(11, 37, 36, 0.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand img { border-radius: 10px; }
.brand small { font-weight: 600; font-size: 13px; color: var(--white-2); letter-spacing: 0; padding-left: 10px; margin-left: 2px; border-left: 1px solid rgba(255, 255, 255, 0.2); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.top-link { color: var(--white-2); font-size: 14px; font-weight: 700; text-decoration: none; padding: 8px 12px; border-radius: 999px; }
.top-link:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.pill { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px; background: var(--mint); color: var(--ink); font-weight: 800; font-size: 14px; text-decoration: none; }
.pill:hover { color: var(--ink); filter: brightness(1.04); }

.lang { position: relative; }
.lang summary { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; cursor: pointer; list-style: none;
  color: #fff; font-size: 14px; font-weight: 700; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lang summary:hover { background: rgba(255, 255, 255, 0.16); }
.lang ul { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; margin: 0; padding: 6px; list-style: none; z-index: 40;
  background: #0f2e2d; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4); }
.lang ul a { display: block; padding: 10px 12px; border-radius: 10px; color: rgba(255, 255, 255, 0.82); font-size: 14.5px; font-weight: 600; text-decoration: none; }
.lang ul a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.lang ul a[aria-current="true"] { color: var(--mint); font-weight: 800; }

/* ---------- Hero ---------- */
.hero { background: var(--app-gradient); color: #fff; padding: 64px 0 72px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(191, 240, 220, 0.28), transparent 65%); pointer-events: none; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; font-size: 14px; font-weight: 600; color: var(--white-2); }
.crumbs a { color: var(--white-2); text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: 0.6; }
.doc-number { display: inline-grid; place-items: center; min-width: 44px; height: 30px; padding: 0 10px; margin-bottom: 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22); font-size: 13px; font-weight: 800; letter-spacing: 0.06em; }
.hero h1 { margin: 0; max-width: 18em; font-size: clamp(32px, 5vw, 56px); line-height: 1.05; font-weight: 800; letter-spacing: -0.035em; }
.hero .summary { margin: 16px 0 0; max-width: 40em; font-size: clamp(17px, 2vw, 20px); line-height: 1.5; color: var(--white-2); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: rgba(0, 0, 0, 0.18); border: 1px solid rgba(255, 255, 255, 0.18); }
.chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lang-note { margin: 18px 0 0; font-size: 13px; color: var(--white-2); max-width: 52em; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; align-items: start; padding: 48px 0 80px; }
.side { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; padding-right: 6px; scrollbar-width: thin; }
.side-block + .side-block { margin-top: 28px; }
.side h2 { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.side ol, .side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side a { display: block; padding: 6px 12px; border-radius: 10px; color: var(--ink-2); font-size: 14px; font-weight: 600; line-height: 1.35; text-decoration: none; border-left: 2px solid transparent; }
.side a:hover { color: var(--ink); background: var(--paper-2); }
.side a.active { color: var(--teal-700); background: #fff; border-left-color: var(--teal-500); }
.side a[aria-current="page"] { color: var(--teal-700); background: #fff; font-weight: 800; }
.side-mobile { display: none; }

/* ---------- Document ---------- */
.doc { background: #fff; border-radius: var(--radius); padding: clamp(28px, 4vw, 56px); box-shadow: 0 1px 0 rgba(15, 46, 45, 0.05), 0 24px 60px rgba(15, 46, 45, 0.07); }
.doc > :first-child { margin-top: 0; }
.doc h2 { margin: 48px 0 14px; padding-top: 28px; border-top: 1px solid var(--line); font-size: clamp(21px, 2.4vw, 26px); line-height: 1.25; letter-spacing: -0.02em; font-weight: 800; }
.doc h2:first-child, .doc > p:first-child + h2 { border-top: 0; padding-top: 0; }
.doc h3 { margin: 30px 0 8px; font-size: 18px; line-height: 1.35; font-weight: 800; color: var(--teal-700); }
.doc p { margin: 0 0 14px; color: #1d3b3a; }
.doc strong { color: var(--ink); font-weight: 800; }
.doc ul { margin: 0 0 18px; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.doc ul li { position: relative; padding-left: 26px; color: #1d3b3a; }
.doc ul li::before { content: ""; position: absolute; left: 4px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--teal-300); }
.doc code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.86em; padding: 2px 6px; border-radius: 6px; background: var(--paper-2); color: var(--teal-700); }
.doc blockquote { margin: 16px 0; padding: 20px 22px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--teal-500); font-size: 16px; line-height: 1.65; color: var(--ink); }
.table-wrap { margin: 8px 0 22px; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.doc th { text-align: left; padding: 12px 16px; background: var(--paper-2); font-size: 12.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--teal-700); white-space: nowrap; }
.doc td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; color: #1d3b3a; }
.doc tbody tr:nth-child(even) td { background: rgba(243, 250, 246, 0.6); }
.doc table.kv td:first-child { width: 42%; font-weight: 700; color: var(--ink); }
.doc table.kv tr:first-child td { border-top: 0; }
.rowcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin: 8px 0 22px; }
.rowcard { padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); }
.rowcard h4 { margin: 0 0 10px; font-size: 15.5px; font-weight: 800; line-height: 1.4; color: var(--ink); }
.rowcard dl { margin: 0; display: grid; grid-template-columns: 112px 1fr; gap: 6px 12px; font-size: 14px; line-height: 1.5; }
.rowcard dt { font-weight: 700; color: var(--ink-2); }
.rowcard dd { margin: 0; color: #1d3b3a; }
.form { margin: 10px 0 22px; padding: 24px 26px; border-radius: 18px; border: 1.5px dashed rgba(47, 122, 114, 0.45); background: var(--paper); font-size: 15.5px; line-height: 1.9; }
.form p { margin: 0 0 12px; }
.form p:last-child { margin: 0; }
.pending { display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px 1px 8px; border-radius: 999px; background: #FFF4D6; border: 1px solid #F1D48A;
  color: #7A5A00; font-size: 0.8em; font-weight: 700; line-height: 1.6; white-space: nowrap; vertical-align: 1px; }
.pending::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #E2A700; }
.notice { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 28px; padding: 16px 18px; border-radius: 16px; background: #FFF9E8; border: 1px solid #F1D48A; font-size: 14.5px; line-height: 1.55; color: #5d4600; }
.notice svg { flex: none; width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: #B98900; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.doc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.print-button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.print-button:hover { background: var(--paper-2); }
.print-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.pager a { display: block; padding: 18px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.pager a:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(15, 46, 45, 0.08); }
.pager span { display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.pager b { display: block; margin-top: 4px; font-size: 16px; line-height: 1.3; }
.pager .next { text-align: right; grid-column: 2; }

/* ---------- Index ---------- */
.groups { padding: 48px 0 80px; display: grid; gap: 44px; }
.group h2 { margin: 0 0 16px; font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  box-shadow: 0 1px 0 rgba(15, 46, 45, 0.04); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s; }
.card:hover { transform: translateY(-3px); border-color: rgba(47, 122, 114, 0.35); box-shadow: 0 22px 50px rgba(15, 46, 45, 0.1); color: var(--ink); }
.card .num { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: var(--teal-500); }
.card h3 { margin: 0; font-size: 19px; line-height: 1.25; letter-spacing: -0.015em; }
.card p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.card .go { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 800; color: var(--teal-500); }

/* ---------- Footer ---------- */
.foot { background: var(--teal-900); color: var(--white-2); padding: 44px 0; font-size: 14px; }
.foot-inner { display: grid; gap: 22px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
.foot a { color: var(--white-2); text-decoration: none; font-weight: 600; }
.foot a:hover { color: #fff; }
.foot p { margin: 0; }

@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 24px; }
  .side { display: none; }
  .side-mobile { display: block; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
  .side-mobile summary { cursor: pointer; padding: 14px 18px; font-weight: 800; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
  .side-mobile summary::-webkit-details-marker { display: none; }
  .side-mobile summary::after { content: "+"; font-size: 20px; color: var(--teal-500); }
  .side-mobile[open] summary::after { content: "−"; }
  .side-mobile ol { margin: 0; padding: 0 10px 12px; list-style: none; display: grid; gap: 2px; }
  .side-mobile a { display: block; padding: 8px 10px; border-radius: 10px; color: var(--ink-2); font-size: 14.5px; font-weight: 600; text-decoration: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand small, .top-link.hide-sm { display: none; }
  .lang summary span { display: none; }
  .lang summary { padding: 0 11px; }
  .pill { padding: 0 12px; font-size: 13px; }
  .hero { padding: 44px 0 52px; }
  .cards, .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: auto; }
  .doc th { white-space: normal; }
  .rowcards { grid-template-columns: 1fr; }
  .doc table.kv td { display: block; width: auto !important; }
  .doc table.kv td:first-child { padding-bottom: 2px; }
  .doc table.kv td + td { border-top: 0; padding-top: 0; }
  .rowcard dl { grid-template-columns: 1fr; gap: 2px; }
  .rowcard dd { margin-bottom: 8px; }
  .pending { white-space: normal; }
  .doc { overflow-wrap: break-word; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .pager a { transition: none; }
}
@media print {
  .top, .side, .side-mobile, .foot, .pager, .print-button, .skip { display: none !important; }
  .hero { background: none; color: #000; padding: 0 0 16px; }
  .hero .summary, .lang-note, .crumbs { color: #333; }
  .chip { border-color: #999; background: none; }
  .layout { display: block; padding: 0; }
  .doc { box-shadow: none; padding: 0; }
  body { background: #fff; font-size: 11pt; }
}
