/* The server-rendered pages, on the same design system as the workspace app.
 *
 * These tokens mirror frontend/src/theme.ts. A customer must not cross a visual seam
 * when they sign in, so the marketing site, the account pages and the app share one
 * palette, one type scale and one card treatment.
 *
 * Indigo carries navigation and primary actions. Amber is reserved for the document
 * highlight in the workspace and appears nowhere here, so it never loses its meaning.
 */

:root {
  --canvas: #f6f7fb;
  --paper: #fff;
  --line: #e6e8f0;
  --line2: #eef0f6;

  --indigo: #5b5bd6;
  --indigo-dark: #4a4ac4;
  --indigo-soft: #eeeefc;

  --verify: #17a673;
  --flag: #e5484d;

  --text: #1a1d27;
  --dim: #61667a;
  --faint: #8b90a3;

  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .03);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 15px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--indigo); }
::selection { background: var(--indigo-soft); }

/* Header ------------------------------------------------------------------ */

.nav {
  display: flex; align-items: center; gap: 20px;
  height: 60px; padding: 0 24px;
  background: var(--paper); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.nav h1 { font-size: 16.5px; font-weight: 750; letter-spacing: -.025em; margin: 0; }
.nav h1 a { color: var(--text); text-decoration: none; }
.nav h1 a span { color: var(--indigo); }
.nav nav { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.nav nav a {
  color: var(--dim); text-decoration: none; font-size: 13.5px; font-weight: 500;
  padding: 7px 12px; border-radius: 8px;
}
.nav nav a:hover { background: var(--line2); color: var(--text); }
.nav nav a.cta { background: var(--indigo); color: #fff; font-weight: 600; }
.nav nav a.cta:hover { background: var(--indigo-dark); }
.who { color: var(--faint); font-size: 13px; padding-left: 4px; }

/* Page --------------------------------------------------------------------- */

main { max-width: 1080px; margin: 0 auto; padding: 36px 24px 80px; }

h2 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 8px; }
h3 { font-size: 15px; font-weight: 650; margin: 32px 0 12px; }
p { margin: 0 0 14px; }
.note, .muted { color: var(--dim); font-size: 13.5px; }
.muted { color: var(--faint); }

.hero { margin: 8px 0 36px; }
.hero p { font-size: 17px; color: var(--dim); max-width: 62ch; }
.hero p strong { color: var(--text); }

.btn {
  display: inline-block; background: var(--indigo); color: #fff !important;
  padding: 11px 20px; border-radius: 9px; text-decoration: none; font-weight: 600;
  font-size: 14.5px;
}
.btn:hover { background: var(--indigo-dark); }

/* Cards -------------------------------------------------------------------- */

.grid {
  display: grid; gap: 16px; margin: 20px 0;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 6px; font-size: 14.5px; font-weight: 650; }
.card p { margin: 0; color: var(--dim); font-size: 13.5px; }

/* Forms -------------------------------------------------------------------- */

form { background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 22px; box-shadow: var(--shadow); }
label { display: block; font-size: 12.5px; font-weight: 650; margin: 18px 0 6px; }
label:first-of-type { margin-top: 0; }
input, select, textarea {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 14px;
  background: var(--paper); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
}
textarea { font: 13px/1.7 var(--mono); resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--indigo); outline-offset: 2px;
}
button {
  margin-top: 20px; padding: 11px 20px; font: 600 14.5px var(--ui);
  background: var(--indigo); color: #fff; border: 0; border-radius: 9px; cursor: pointer;
}
button:hover { background: var(--indigo-dark); }
button[disabled] { opacity: .55; cursor: progress; }

pre {
  background: #f8f9fc; border: 1px solid var(--line); color: #41465c;
  padding: 12px 14px; border-radius: 9px; overflow-x: auto;
  font: 12px/1.7 var(--mono);
}
code {
  font: 12.5px var(--mono); background: var(--line2);
  padding: 1.5px 6px; border-radius: 5px; color: #41465c;
}

/* Feedback ------------------------------------------------------------------ */

.err, .ok, .status {
  padding: 12px 14px; border-radius: 9px; margin: 16px 0; font-size: 14px;
  border: 1px solid transparent;
}
.err { background: #fdecec; border-color: #f7d4d4; color: #a3282c; }
.ok { background: #e8f7f1; border-color: #cceade; color: #10714f; }
.status { background: var(--indigo-soft); border-color: #dcdcfa; color: #3d3da8; }

/* Tables --------------------------------------------------------------------- */

table {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow);
}
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line2); }
th {
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--faint); background: #fbfcfe;
}
tr:last-child td { border-bottom: 0; }

/* Progress ------------------------------------------------------------------- */

.progress { background: var(--line2); border-radius: 4px; height: 8px; overflow: hidden;
  max-width: 26rem; margin: 10px 0; }
.progress .fill { height: 100%; background: var(--verify); border-radius: 4px;
  transition: width .5s ease; text-indent: -9999px; }

.spin {
  display: inline-block; width: 13px; height: 13px; margin-right: 8px;
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; transition-duration: .01ms !important;
  }
}

@media (max-width: 640px) {
  .nav { padding: 0 16px; gap: 10px; }
  .nav nav a { padding: 6px 9px; font-size: 13px; }
  .who { display: none; }
  main { padding: 24px 16px 56px; }
  h2 { font-size: 19px; }
}

/* /try: input beside output, and model output shown as source ----------------- */

.cols {
  display: grid; gap: 20px; margin: 18px 0;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
}
.lbl {
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--faint); margin: 20px 0 8px;
}
.shot { max-width: 100%; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); }
.out {
  white-space: pre-wrap; word-break: break-word;
  max-height: 32rem; overflow: auto; font-size: 12px;
}
