/* NovaRadix app policies — Glass Aurora theme */
@font-face {
  font-family: "Lexend";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/lexend-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  --navy: #18488B;
  --navy-deep: #0E2A55;
  --green: #4CB048;
  --green-deep: #2F7F2C;
  --ink: #15233A;
  --muted: #4A5B78;
  --bg: #EAF0F8;
  --glass: rgba(255, 255, 255, .55);
  --glass-edge: rgba(255, 255, 255, .8);
  --paper: rgba(255, 255, 255, .9);
  --line: rgba(24, 72, 139, .14);
  --tint-navy: #EEF3FA;
  --tint-green: #EEF8ED;
  --radius: 22px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 300 16px/1.75 "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--navy); text-decoration-color: rgba(76, 176, 72, .6); text-underline-offset: 3px; }
a:hover { color: var(--navy-deep); text-decoration-color: var(--green); }
a:focus-visible, .nx-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.nx-aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 45% at 10% 8%, rgba(24, 72, 139, .38), transparent 70%),
    radial-gradient(36% 42% at 92% 12%, rgba(76, 176, 72, .34), transparent 70%),
    radial-gradient(45% 40% at 70% 100%, rgba(90, 140, 220, .28), transparent 70%);
  filter: blur(8px);
}

.nx-glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-edge);
}

/* Top bar */
.nx-top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  max-width: 1080px; margin: 14px auto 0; padding: 10px 14px 10px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-radius: 18px;
}
.nx-shell { padding-inline: 16px; }
.nx-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nx-brand .mark { height: 36px; width: auto; }
.nx-brand .word { height: 19px; width: auto; }
.nx-top nav { display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 400; }
.nx-top nav a:not(.nx-btn) { color: var(--ink); text-decoration: none; white-space: nowrap; }
.nx-top nav a:not(.nx-btn):hover { color: var(--navy); }

.nx-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 14px;
  background: #2A66C4; color: #fff !important; text-decoration: none;
  font-weight: 500; font-size: 14px; line-height: 1.2; white-space: nowrap;
  transition: background .15s;
}
.nx-btn:hover { background: #1F56A3; }
.nx-btn.alt { background: rgba(255, 255, 255, .75); color: var(--navy) !important; box-shadow: inset 0 0 0 1px var(--line); }
.nx-btn.alt:hover { background: #fff; }
.nx-btn.play { background: var(--ink); }
.nx-btn svg { width: 16px; height: 16px; flex: none; }

/* Page layout */
.nx-main { max-width: 880px; margin: 0 auto; padding-block: 28px 64px; display: grid; gap: 20px; }

.nx-hero {
  border-radius: var(--radius); padding: clamp(22px, 4vw, 36px);
  display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center;
}
.nx-icon { width: 76px; height: 76px; border-radius: 20px; box-shadow: 0 10px 24px -12px rgba(14, 42, 85, .5); background: #fff; object-fit: cover; }
.nx-icon.brand { object-fit: contain; padding: 12px; }
.nx-eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--green-deep); }
.nx-hero h1 { margin: 0; font-weight: 600; font-size: clamp(30px, 5vw, 44px); line-height: 1.1; color: var(--navy-deep); text-wrap: balance; }
.nx-chips { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.nx-chips li { background: rgba(255, 255, 255, .75); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--muted); }
.nx-chips code { font: 12px var(--mono); color: var(--ink); }
.nx-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

@media (max-width: 560px) {
  .nx-hero { grid-template-columns: 1fr; }
  .nx-icon { width: 64px; height: 64px; border-radius: 16px; }
  .nx-top nav .hide-sm { display: none; }
  .nx-brand .word { height: 12px; }
  .nx-brand .mark { height: 26px; }
  .nx-brand { gap: 7px; }
  .nx-top { padding: 10px 14px; gap: 10px; }
  .nx-top nav { font-size: 13px; }
}

/* "Used by" strip for shared policies */
.nx-usedby { border-radius: var(--radius); padding: 18px 22px; }
.nx-usedby h2 { margin: 0 0 12px; font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.nx-usedby ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.nx-usedby li a { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; background: rgba(255, 255, 255, .8); border-radius: 12px; text-decoration: none; color: var(--ink); font-size: 14px; }
.nx-usedby li img { width: 28px; height: 28px; border-radius: 8px; }

/* Policy document */
.doc {
  background: var(--paper); border: 1px solid var(--glass-edge); border-radius: var(--radius);
  padding: clamp(22px, 5vw, 56px);
  box-shadow: 0 30px 60px -40px rgba(14, 42, 85, .45);
  overflow-wrap: anywhere;
}
.doc > * { max-width: 70ch; }
.doc > .nx-table, .doc .nx-table { max-width: 100%; }
.doc h2 { margin: 2.2em 0 .5em; padding-top: 1.1em; border-top: 1px solid var(--line); font-weight: 600; font-size: 22px; line-height: 1.3; color: var(--navy-deep); text-wrap: balance; }
.doc h3 { margin: 1.6em 0 .4em; font-weight: 600; font-size: 17px; color: var(--navy-deep); }
.doc > :first-child, .doc > :first-child > :first-child, .doc > :first-child > :first-child > :first-child { margin-top: 0; }
.doc h2:first-child, .doc .card:first-child h2, .doc .summary h2 { border-top: 0; padding-top: 0; }
.doc .summary h2, .doc .callout h2 { margin-top: 0; font-size: 18px; color: var(--green-deep); }
.doc p, .doc ul, .doc ol { margin: 0 0 1em; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: .35em; }
.doc li::marker { color: var(--green); }
.doc strong, .doc b { font-weight: 600; color: var(--ink); }
.doc code { font: 13.5px var(--mono); background: var(--tint-navy); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* Tables */
.nx-table { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.doc .table-wrap, .doc .table-scroll, .doc .scroll { overflow: visible; margin: 0; border: 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.doc th { background: var(--tint-navy); font-weight: 600; color: var(--navy-deep); }
.doc tr:last-child td { border-bottom: 0; }

/* Classes used by the original policy files */
.doc .lead { font-size: 18px; font-weight: 400; color: var(--ink); }
.doc .summary, .doc .callout {
  background: var(--tint-green); border: 1px solid #CFE9CC; border-radius: 16px;
  padding: 18px 22px; margin: 0 0 1.4em; max-width: none;
}
.doc .summary > strong:first-child, .doc .callout > strong:first-child { display: block; margin-bottom: 6px; color: var(--green-deep); }
.doc .summary ul { margin-bottom: 0; }
.doc .notice, .doc .note {
  background: var(--tint-navy); border: 1px solid #D3DFF0; border-radius: 16px;
  padding: 16px 20px; margin: 0 0 1.4em; max-width: none;
}
.doc .caps { font-size: 14px; letter-spacing: .01em; color: var(--muted); }
.doc .meta { display: grid; gap: 4px; background: var(--tint-navy); border-radius: 16px; padding: 16px 20px; margin: 0 0 1.4em; font-size: 14.5px; max-width: none; }
.doc .toc { background: var(--tint-navy); border-radius: 16px; padding: 16px 22px; margin: 0 0 1.6em; max-width: none; font-size: 14.5px; }
.doc .toc ol, .doc .toc ul { margin: 0; columns: 2 240px; column-gap: 32px; }
.doc .toc a { text-decoration: none; }
.doc .card { margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.doc .card.summary { background: var(--tint-green); border: 1px solid #CFE9CC; padding: 18px 22px; margin-bottom: 1.4em; }
.doc .muted { color: var(--muted); font-size: 14.5px; }
.doc .pill { display: inline-block; font-size: 12.5px; padding: 1px 9px; border-radius: 999px; background: var(--tint-navy); color: var(--navy); }
.doc .wrap, .doc .inner { max-width: none; padding: 0; margin: 0; }

/* Policies index */
.nx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.nx-app { border-radius: 20px; padding: 18px; display: grid; gap: 12px; align-content: start; }
.nx-app header { display: flex; gap: 12px; align-items: center; }
.nx-app header img { width: 52px; height: 52px; border-radius: 14px; background: #fff; flex: none; }
.nx-app h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--navy-deep); }
.nx-app .pkg { font: 11.5px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.nx-app .links { display: flex; flex-wrap: wrap; gap: 8px; }
.nx-app .links a { font-size: 13.5px; font-weight: 500; text-decoration: none; background: rgba(255, 255, 255, .8); border: 1px solid var(--line); padding: 5px 12px; border-radius: 10px; }
.nx-app .links a:hover { border-color: var(--green); }
.nx-status { justify-self: start; font-size: 12px; font-weight: 500; padding: 2px 10px; border-radius: 999px; }
.nx-status.live { background: var(--tint-green); color: var(--green-deep); }
.nx-status.soon { background: var(--tint-navy); color: var(--navy); }
.nx-section-title { margin: 18px 4px 0; font-size: 14px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nx-lede { margin: 12px 0 0; color: var(--muted); max-width: 60ch; }

/* Footer */
.nx-foot { background: var(--navy-deep); color: #C8D6EA; padding: 40px 16px calc(28px + env(safe-area-inset-bottom, 0px)); font-size: 14px; }
.nx-foot .in { max-width: 1080px; margin: 0 auto; display: grid; gap: 22px; grid-template-columns: 1.3fr 1fr; align-items: start; }
.nx-foot .word { height: 16px; width: auto; display: block; margin-bottom: 12px; }
.nx-foot p { margin: 0 0 6px; }
.nx-foot a { color: #fff; }
.nx-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: flex-end; }
.nx-foot .copy { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 16px; font-size: 13px; color: #9FB3CF; }
@media (max-width: 640px) { .nx-foot .in { grid-template-columns: 1fr; } .nx-foot nav { justify-content: flex-start; } }

@media print {
  .nx-aurora, .nx-top, .nx-actions, .nx-foot nav { display: none; }
  body { background: #fff; }
  .nx-hero, .doc { box-shadow: none; border: 0; background: #fff; }
}
