/* Shared style of the legal pages in the game's look, Radiant Edge
   (docs/art-direction.md): navy glass, steel hairlines, radiant gold titles,
   azure links, blade corners. A file, because the CSP allows no inline styles;
   the fonts are the game's own, self-hosted (fonts/, SIL OFL): Chakra Petch as
   a Latin WOFF2 subset, Saira Semi Condensed unmodified, since its license
   reserves the name "Saira" for the original. */
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/ChakraPetch-Bold.woff2") format("woff2"); }
@font-face { font-family: "Saira Semi Condensed"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("fonts/SairaSemiCondensed-Medium.ttf") format("truetype"); }
@font-face { font-family: "Saira Semi Condensed"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/SairaSemiCondensed-Bold.ttf") format("truetype"); }

:root { color-scheme: dark;
  --bg: #081120; --slate: #0f1b2e; --slate-2: #16243b; --slate-3: #223553;
  --steel: #2f4a73; --hairline: #7b9dcc;
  --ink: #eef4fc; --dim: #a8bad3; --muted: #8297b5;
  --gold: #f2c14e; --gold-bright: #fff1c7; --azure: #36c8ff; --azure-light: #a6ecff; --azure-deep: #0a3d63;
  --amber: #ffc845;
  --cut: 14px; --nick: 3px;
  --display: "Chakra Petch", "Segoe UI", Roboto, system-ui, sans-serif;
  --text: "Saira Semi Condensed", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--ink);
  background: radial-gradient(120% 60% at 50% 0%, var(--slate-3) 0%, var(--slate) 45%, var(--bg) 100%) fixed;
  font: 500 1.0625rem/1.65 var(--text); overflow-wrap: break-word; }
.wrap { padding: 20px 16px 48px; }
@media (min-width: 720px) { .wrap { padding: 32px 48px 64px; } }

/* The brand bar: the name in spaced capitals over a hairline with an azure core. */
.top { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; align-items: center;
  padding-bottom: 14px; margin-bottom: 28px; position: relative; }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline) 12%, var(--azure) 50%, var(--hairline) 88%, transparent); }
.brand { font: 700 1.15rem/1 var(--display); letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); text-decoration: none; display: inline-flex; align-items: center; gap: 12px; }
.brand::before { content: ""; width: 12px; height: 12px; transform: rotate(45deg);
  background: var(--azure); box-shadow: 0 0 10px var(--azure); }
.brand:hover, .brand:focus { color: var(--gold-bright); }

h1, h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; }
h1 { color: var(--gold); font-size: 2rem; line-height: 1.2; letter-spacing: .08em; margin: 0 0 8px; }
h2 { color: var(--gold); font-size: 1.2rem; line-height: 1.3; letter-spacing: .06em; margin: 40px 0 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--steel); }
h3 { color: var(--ink); font-weight: 700; font-size: 1.06rem; margin: 24px 0 4px; }
b, strong { font-weight: 700; color: var(--ink); }
p { margin: 0 0 14px; }
a { color: var(--azure); text-decoration-color: rgba(54, 200, 255, .45); text-underline-offset: 3px; }
a:hover, a:focus { color: var(--azure-light); text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--azure-light); outline-offset: 2px; }
.meta { color: var(--dim); margin: 0 0 28px; }

/* Cards, notes, index tiles and footer chips are blades: the top left and
   bottom right corners cut. The edge is the element's own ground, the fill a
   layer 1px inside it, so the cut corners keep their line too. */
.card, .draft, .page, footer a { --edge: rgba(123, 157, 204, .4); --fill: rgba(14, 24, 41, .96);
  position: relative; isolation: isolate; border: 0; background: var(--edge);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.card::before, .draft::before, .page::before, footer a::before { content: ""; position: absolute; inset: 1px; z-index: -1;
  background: var(--fill); clip-path: inherit; }
.card { padding: 14px 18px; }
.draft { --edge: var(--amber); --fill: #1d1b16; color: var(--amber); padding: 14px 18px; margin: 0 0 28px; font-weight: 700; }
.draft span { display: block; font-weight: 500; color: var(--ink); margin-top: 4px; }
.review { border-left: 3px solid var(--amber); background: rgba(255, 200, 69, .06); padding: 10px 14px;
  margin: 14px 0; color: var(--dim); font-size: .95rem; }
.review b { color: var(--amber); }

.table { overflow-x: auto; margin: 14px 0; }
table { border-collapse: collapse; width: 100%; font-size: .97rem; }
th, td { border: 1px solid var(--steel); padding: 9px 12px; text-align: left; vertical-align: top; }
th { background: var(--slate-2); color: var(--gold); font-family: var(--display); font-weight: 700;
  letter-spacing: .04em; }
tr:nth-child(even) td { background: rgba(15, 27, 46, .55); }

/* The index: every page as a card. */
.pages { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin: 8px 0 0; }
.page { display: block; padding: 18px 20px; text-decoration: none; color: var(--dim); }
.page b { display: block; font: 700 1.05rem/1.3 var(--display); text-transform: uppercase; letter-spacing: .06em;
  color: var(--gold); margin-bottom: 6px; }
.page:hover, .page:focus { color: var(--ink); --edge: var(--azure); --fill: rgba(15, 41, 66, .98); }
.page:hover b, .page:focus b { color: var(--gold-bright); }

ul, ol { padding-left: 1.4em; margin: 0 0 14px; }
li { margin: 6px 0; }
ul li::marker { color: var(--azure); }
ol li::marker { color: var(--gold); font-family: var(--display); font-weight: 700; }
.steps li { margin: 10px 0; }

/* The footer: the other pages as chips. */
footer { margin-top: 56px; padding-top: 18px; color: var(--dim); font-size: .95rem; position: relative; }
footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline) 12%, var(--azure) 50%, var(--hairline) 88%, transparent); }
footer nav { display: flex; flex-wrap: wrap; gap: 10px; }
footer a { --cut: 10px; --edge: rgba(123, 157, 204, .55); --fill: var(--slate-2);
  display: inline-block; padding: 8px 16px; min-height: 40px; color: var(--ink); text-decoration: none; }
footer a:hover, footer a:focus { color: var(--bg); --edge: var(--azure); --fill: var(--azure); }
footer a[aria-current="page"] { color: var(--azure-light); --edge: var(--azure); --fill: var(--azure-deep); }
