/* AgentCube GO web portal - the server-rendered Jinja pages that remain
   after issue #76 (sign-in, plain error pages, the guidance topic page).
   One stylesheet, no build step, no JavaScript, restyled with the same
   brand tokens and fonts as AgentCube's next-gen portal so a reader moving
   between the two feels like the same product (issue #76):
     - color tokens: ce/admin-app/app/globals.css (AgentCube's next-gen
       portal), whose own canonical source is landing/src/styles/global.css
       in the agentcube repo (CLAUDE.md: copying deliberately is fine).
     - fonts: Manrope (body) and Robout (headings), self-hosted from the
       same files ui-app/assets/fonts/ ships, so this page never depends on
       the Next.js build or a CDN.
   The register and use case pages this file used to style moved to
   ui-app/ (Next.js, Tailwind); this file now covers only the pages that
   stayed Jinja. */

@font-face {
  font-family: "Manrope";
  src: url("/app/static/fonts/Manrope-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/app/static/fonts/Manrope-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Robout";
  src: url("/app/static/fonts/Robout-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Robout";
  src: url("/app/static/fonts/Robout-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Caprus brand palette, light theme (Forest Green / Lime Green / Charcoal / Sage / Steel Gray). */
  --background: #ffffff;
  --foreground: #1e1e1e;
  --card: #ffffff;
  --primary: #1b4d3e;
  --primary-foreground: #ffffff;
  --muted: #dbe3e0;
  --muted-foreground: #757676;
  --accent: #aedf33;
  --accent-foreground: #1e1e1e;
  --destructive: #b3261e;
  --border: #dbe3e0;
  --radius: 0.625rem;
  --warn-bg: #fff4d6;
  --warn-line: #e3b341;
  font-size: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Lime Green takes the primary slot for visibility on Charcoal; Forest moves to accent. */
    --background: #1e1e1e;
    --foreground: #ffffff;
    --card: #292929;
    --primary: #aedf33;
    --primary-foreground: #1e1e1e;
    --muted: #2b2b2b;
    --muted-foreground: #9a9a9a;
    --accent: #1b4d3e;
    --accent-foreground: #ffffff;
    --destructive: #e5766b;
    --border: rgba(255, 255, 255, 0.12);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

a { color: var(--primary); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

h1, h2, h3 { font-family: "Robout", "Manrope", sans-serif; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0.5rem 0 0.75rem; }
h2 { font-size: 1.2rem; margin: 0 0 0.75rem; }

main { max-width: 40rem; margin: 0 auto; padding: 1rem 1rem 3rem; }
.muted { color: var(--muted-foreground); }
.small { font-size: 0.875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Header, dev note, footer ---- */

.devbar {
  background: var(--warn-bg);
  border-bottom: 2px solid var(--warn-line);
  color: #1e1e1e;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}
.devbar p { margin: 0; }

header.site {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.brand {
  font-family: "Robout", sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--foreground);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.brand .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.4rem;
  background: var(--primary);
  color: var(--primary-foreground);
}
.who { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: center; font-size: 0.9rem; }
.role { background: var(--muted); border-radius: 999px; padding: 0 0.6rem; }
form.inline { display: inline; margin: 0; }

footer.site { max-width: 40rem; margin: 0 auto; padding: 1rem; color: var(--muted-foreground); font-size: 0.85rem; }

/* ---- Controls ---- */

button, .button {
  background: var(--primary);
  color: var(--primary-foreground);
  border: 0;
  border-radius: var(--radius);
  padding: 0.5rem 1.1rem;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button.link { background: none; color: var(--primary); padding: 0; text-decoration: underline; }

.notice { background: var(--muted); border-left: 4px solid var(--primary); padding: 0.6rem 0.9rem; border-radius: 0 var(--radius) var(--radius) 0; }
.notice.warn { border-left-color: var(--warn-line); background: var(--warn-bg); color: #1e1e1e; }

/* ---- Sign-in / problem pages ---- */

.sign-in, .problem { max-width: 30rem; }

/* ---- Guidance topic ---- */

.guidance {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.guidance table { font-size: 0.9rem; display: block; overflow-x: auto; width: 100%; border-collapse: collapse; }
.guidance th, .guidance td { text-align: left; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--border); }

@media (max-width: 40rem) {
  main { padding: 0.75rem 0.75rem 2rem; }
  h1 { font-size: 1.3rem; }
  .who { margin-left: 0; }
}
