/* The admin's tokens (services/admin/src/lib/components/shell/Theme.svelte), with the type
   sizes a page read on a phone needs. Inter is served from here; nothing asks the network. */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --c-page: #ececea;
  --c-panel: #fafaf8;
  --c-card: #ffffff;
  --c-hairline: #e7e7e4;
  --c-text: #1b1b1b;
  --c-muted: #77777a;
  --c-active: #efefec;
  --c-accent: #dc2a2f;
  --c-accent-hover: #c22328;
  --c-on-accent: #ffffff;
  --c-positive: #22a55b;
  --c-warning: #e8a23a;
  --c-info: #6f78c8;
  --tint-green: #e6f5ec;
  --tint-amber: #fbf1e0;
  --tint-blue: #e9ebfa;

  --r-panel: 14px;
  --r-card: 10px;
  --r-control: 8px;
  --r-pill: 6px;

  --font-sans: 'Inter Variable', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --t-xs: 12px;
  --t-sm: 14px;
  --t-base: 16px;
  --t-md: 18px;
  --t-lg: 24px;
  --t-xl: 34px;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 48px;

  --h-button: 44px;
  --w-page: 60rem;
  --w-prose: 40rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--c-page);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--c-hairline);
  text-underline-offset: 0.15em;
}
a:hover {
  text-decoration-color: currentColor;
}
img {
  max-width: 100%;
}
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 1px;
}

/* the frame: the page on the warm grey, the panel off-white with a hairline */
.page {
  min-height: 100vh;
  padding: var(--s-3);
}
.panel {
  max-width: var(--w-page);
  margin: 0 auto;
  border: 1px solid var(--c-hairline);
  border-radius: var(--r-panel);
  background: var(--c-panel);
  overflow: hidden;
}

/* the top bar */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--c-hairline);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img {
  display: block;
  width: 24px;
  height: 24px;
}
.bar-link {
  color: var(--c-muted);
  font-size: var(--t-sm);
  text-decoration: none;
  white-space: nowrap;
}
.bar-link:hover {
  color: var(--c-text);
}

/* the body: sections one under another, with the page's padding */
.body {
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  padding: var(--s-7) var(--s-5) var(--s-8);
}

.hero {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  max-width: var(--w-prose);
}
.hero h1 {
  font-size: var(--t-xl);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hero .lead {
  font-size: var(--t-md);
  color: var(--c-muted);
}
.actions {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: var(--h-button);
  padding: 0 var(--s-5);
  border: 1px solid transparent;
  border-radius: var(--r-control);
  background: var(--c-accent);
  color: var(--c-on-accent);
  font-size: var(--t-base);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}
.button:hover {
  background: var(--c-accent-hover);
  text-decoration: none;
}
.button svg {
  width: 18px;
  height: 18px;
  flex: none;
}
/* the second action: the admin's outlined button */
.button.outlined {
  background: var(--c-card);
  border-color: var(--c-hairline);
  color: var(--c-text);
}
.button.outlined:hover {
  background: var(--c-active);
}
.beside {
  color: var(--c-muted);
  font-size: var(--t-sm);
}
.beside a {
  color: var(--c-text);
}

.section {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.section h2 {
  font-size: var(--t-lg);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.section > p {
  max-width: var(--w-prose);
}

/* three cards: what the bot does, in its own words */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-3);
  padding: 0;
  list-style: none;
}
.card {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-4);
  border: 1px solid var(--c-hairline);
  border-radius: var(--r-card);
  background: var(--c-card);
}
.card h3 {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-md);
  font-weight: 500;
}
.tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: var(--r-pill);
}
.tile svg {
  width: 14px;
  height: 14px;
}
.tint-green {
  background: var(--tint-green);
  color: var(--c-positive);
}
.tint-amber {
  background: var(--tint-amber);
  color: var(--c-warning);
}
.tint-blue {
  background: var(--tint-blue);
  color: var(--c-info);
}
.card p {
  color: var(--c-muted);
  font-size: var(--t-sm);
}
.card .example {
  color: var(--c-text);
  font-size: var(--t-sm);
}

/* the reasons: a two-column list of short paragraphs with a bold lead */
.reasons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4) var(--s-6);
  padding: 0;
  list-style: none;
}
.reasons li {
  padding-top: var(--s-3);
  border-top: 1px solid var(--c-hairline);
}
.reasons strong {
  display: block;
  font-weight: 500;
  margin-bottom: var(--s-1);
}
.reasons li p {
  color: var(--c-muted);
  font-size: var(--t-sm);
}

/* short facts in one row */
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  padding: 0;
  list-style: none;
}
.facts li {
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--c-hairline);
  border-radius: var(--r-pill);
  background: var(--c-card);
  font-size: var(--t-sm);
}

/* the closing invitation */
.closing {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-6);
  border: 1px solid var(--c-hairline);
  border-radius: var(--r-card);
  background: var(--c-card);
}
.closing h2 {
  font-size: var(--t-lg);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.closing p {
  color: var(--c-muted);
  max-width: var(--w-prose);
}

/* the foot: the legal pages, the other language, who runs this */
.foot {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-5);
  border-top: 1px solid var(--c-hairline);
  color: var(--c-muted);
  font-size: var(--t-sm);
}
.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  padding: 0;
  list-style: none;
}
.foot a {
  text-decoration: none;
}
.foot a:hover {
  text-decoration: underline;
}

/* a legal page: one measure of prose */
.prose {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  max-width: var(--w-prose);
  padding: var(--s-7) var(--s-5) var(--s-8);
}
.prose h1 {
  font-size: var(--t-lg);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.prose h2 {
  margin-top: var(--s-3);
  font-size: var(--t-md);
  font-weight: 500;
}
.prose .meta {
  color: var(--c-muted);
  font-size: var(--t-sm);
}
.prose ul,
.prose ol {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding-left: 1.25em;
}
.prose .other {
  color: var(--c-muted);
  font-size: var(--t-sm);
}

@media (max-width: 720px) {
  .page {
    padding: var(--s-2);
  }
  .body {
    gap: var(--s-7);
    padding: var(--s-6) var(--s-4) var(--s-7);
  }
  .bar,
  .foot {
    padding-left: var(--s-4);
    padding-right: var(--s-4);
  }
  .prose {
    padding: var(--s-6) var(--s-4) var(--s-7);
  }
  :root {
    --t-xl: 28px;
    --t-lg: 22px;
  }
  .cards,
  .reasons {
    grid-template-columns: minmax(0, 1fr);
  }
  .actions .button {
    width: 100%;
  }
}

code {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.9em;
}
