/* IFE documentation pages (served at /docs by the license server).
   Same brand as the admin page: Fira Sans, navy #293172, deep purple #411454,
   red #E20613 for the dot only. Light and dark follow the OS. */

@font-face { font-family: "Fira Sans"; font-weight: 400; font-display: swap; src: url(/admin/fonts/FiraSans-Regular.woff2) format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 500; font-display: swap; src: url(/admin/fonts/FiraSans-Medium.woff2) format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 600; font-display: swap; src: url(/admin/fonts/FiraSans-SemiBold.woff2) format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 700; font-display: swap; src: url(/admin/fonts/FiraSans-Bold.woff2) format("woff2"); }

:root {
  --navy: #293172;
  --purple: #411454;
  --red: #e20613;
  --text: #1c1a24;
  --muted: #625d6e;
  --link: #293172;
  --page: #f7f6f9;
  --panel: #ffffff;
  --hairline: rgba(65, 20, 84, .1);
  --code-bg: #f1eff5;
  --code-ink: #2a2140;
  --note-bg: rgba(41, 49, 114, .06);
  --warn-bg: rgba(214, 140, 30, .12);
  --warn-edge: #d68c1e;
  --step: #293172;
  --shadow: 0 1px 1px rgba(65, 20, 84, .04), 0 8px 26px rgba(65, 20, 84, .08);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #f3f0f7;
    --muted: #a69fb3;
    --link: #b9a8ec;
    --page: #150f1c;
    --panel: #1f1729;
    --hairline: rgba(255, 255, 255, .09);
    --code-bg: #2a2036;
    --code-ink: #ece6f6;
    --note-bg: rgba(134, 103, 179, .14);
    --warn-bg: rgba(214, 140, 30, .16);
    --step: #6a58b8;
    --shadow: 0 1px 1px rgba(0, 0, 0, .25), 0 10px 28px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--page); color: var(--text);
  font: 16px/1.6 "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* ---------- top bar */
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1.5rem; background: color-mix(in srgb, var(--page) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 600; color: var(--text); text-decoration: none; }
.mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #3a44a0 0%, #293172 45%, #411454 100%);
  box-shadow: 0 1px 2px rgba(41, 49, 114, .3);
}
.mark img { width: 58%; height: auto; }
.top .spacer { flex: 1; }
.top .signin { font-size: .9rem; color: var(--muted); text-decoration: none; }
.top .signin:hover { color: var(--link); }

/* ---------- layout */
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); max-width: 1180px; margin: 0 auto; gap: 2.5rem; padding: 2rem 1.5rem 4rem; }
nav.side { position: sticky; top: 5rem; align-self: start; font-size: .95rem; }
nav.side h2 { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 1.4rem 0 .4rem; font-weight: 600; }
nav.side h2:first-child { margin-top: 0; }
nav.side a { display: block; padding: .3rem .7rem; border-radius: 8px; color: var(--text); text-decoration: none; }
nav.side a:hover { background: var(--note-bg); }
nav.side a[aria-current="page"] { background: var(--note-bg); color: var(--link); font-weight: 600; }

main { min-width: 0; max-width: 820px; }
main h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 .4rem; letter-spacing: -.01em; }
main .lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 2rem; }
main h2 { font-size: 1.45rem; margin: 2.6rem 0 .6rem; padding-top: .4rem; border-top: 1px solid var(--hairline); }
main h3 { font-size: 1.1rem; margin: 1.8rem 0 .4rem; }
main p, main li { max-width: 72ch; }
main li + li { margin-top: .3rem; }

/* ---------- pieces */
code { font: .9em/1.4 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; background: var(--code-bg); color: var(--code-ink); padding: .1em .35em; border-radius: 5px; }
pre { background: var(--code-bg); color: var(--code-ink); padding: 1rem 1.1rem; border-radius: 12px; overflow-x: auto; line-height: 1.5; border: 1px solid var(--hairline); }
pre code { background: none; padding: 0; font-size: .86rem; }
pre .c { color: var(--muted); }
kbd { font: .85em "Fira Sans", sans-serif; border: 1px solid var(--hairline); border-bottom-width: 2px; border-radius: 6px; padding: .05em .4em; background: var(--panel); }

.note, .warn { padding: .85rem 1.1rem; border-radius: 12px; margin: 1.2rem 0; background: var(--note-bg); border-left: 4px solid var(--navy); }
.warn { background: var(--warn-bg); border-left-color: var(--warn-edge); }
.note > :first-child, .warn > :first-child { margin-top: 0; }
.note > :last-child, .warn > :last-child { margin-bottom: 0; }

figure { margin: 1.4rem 0 1.8rem; }
figure img { display: block; max-width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--hairline); box-shadow: var(--shadow); background: #fff; }
figure.small img { max-width: 420px; }
figcaption { font-size: .9rem; color: var(--muted); margin-top: .55rem; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pair figure { margin: 0; }

ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 1.5rem 0; }
ol.steps > li { counter-increment: step; position: relative; padding: 0 0 1.6rem 3.2rem; max-width: none; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -.1rem; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--step); color: #fff; font-weight: 600; font-size: .95rem;
}
ol.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 1.03rem; top: 2.3rem; bottom: .3rem; width: 2px; background: var(--hairline); }
ol.steps > li > h3 { margin: 0 0 .35rem; font-size: 1.15rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.card { display: block; padding: 1.15rem 1.2rem; border-radius: 16px; background: var(--panel); border: 1px solid var(--hairline); box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
.card:hover { transform: translateY(-2px); }
.card strong { display: block; font-size: 1.05rem; margin-bottom: .25rem; color: var(--link); }
.card span { color: var(--muted); font-size: .95rem; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0 1.5rem; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--hairline); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }

.dl { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1rem 0; }
.button { display: inline-flex; align-items: center; gap: .5rem; padding: .65rem 1.2rem; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 600; text-decoration: none; }
.button.secondary { background: var(--note-bg); color: var(--link); }
.button:hover { filter: brightness(1.08); }

footer { max-width: 1180px; margin: 0 auto; padding: 1.5rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--hairline); }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; gap: 1rem; padding-top: 1rem; }
  nav.side { position: static; display: flex; flex-wrap: wrap; gap: .3rem; }
  nav.side h2 { display: none; }
  .pair { grid-template-columns: 1fr; }
  main h1 { font-size: 1.7rem; }
}
@media print {
  .top, nav.side { display: none; }
  .layout { display: block; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.fine { font-size: .9rem; color: var(--muted); }

/* ---------- signed-in account in the top bar, sign-in page */
.top .account { font-size: .9rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.top form.signout { margin: 0; }
.top form.signout button {
  font: inherit; font-size: .9rem; color: var(--link); background: none; border: 1px solid var(--hairline);
  border-radius: 8px; padding: .25rem .7rem; cursor: pointer;
}
.top form.signout button:hover { background: var(--note-bg); }
main.signin-card {
  max-width: 27rem; margin: 3.5rem auto 4rem; padding: 2rem 2rem 1.5rem; background: var(--panel);
  border: 1px solid var(--hairline); border-radius: 16px; box-shadow: var(--shadow);
}
main.signin-card h1 { font-size: 1.7rem; }
main.signin-card .lead { font-size: 1rem; margin-bottom: 1.4rem; }
main.signin-card .note { margin: 0 0 1.2rem; }
main.signin-card .note p { margin: 0; }
.signin-card label { display: block; font-weight: 500; font-size: .95rem; margin: 0 0 .9rem; }
.signin-card .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.signin-card input {
  display: block; width: 100%; margin-top: .3rem; padding: .6rem .75rem; font: inherit; color: var(--text);
  background: var(--page); border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent); border-radius: 10px;
}
.signin-card input:focus-visible { outline: 3px solid color-mix(in srgb, var(--step) 45%, transparent); outline-offset: 1px; border-color: var(--step); }
.signin-card button[type="submit"] {
  width: 100%; margin-top: .3rem; padding: .7rem 1rem; font: inherit; font-weight: 600; color: #fff;
  background: var(--navy); border: 0; border-radius: 10px; cursor: pointer;
}
.signin-card button[type="submit"]:hover { background: color-mix(in srgb, var(--navy) 85%, #000); }
.signin-card details { margin: 1.4rem 0 .6rem; padding-top: 1rem; border-top: 1px solid var(--hairline); }
.signin-card summary { cursor: pointer; color: var(--link); font-weight: 500; }
.signin-card details p { font-size: .92rem; color: var(--muted); }
.signin-card > p.hint { margin: 1rem 0 0; }
@media (max-width: 520px) { main.signin-card { margin: 1.5rem 16px; padding: 1.5rem 1.2rem 1.2rem; } }
