@font-face {
  font-family: "Archivo Black";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("fonts/ArchivoBlack-400.woff2") format("woff2"), url("fonts/ArchivoBlack-400.ttf") format("truetype");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("fonts/SpaceGrotesk-400.woff2") format("woff2"), url("fonts/SpaceGrotesk-400.ttf") format("truetype");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url("fonts/SpaceGrotesk-500.woff2") format("woff2"), url("fonts/SpaceGrotesk-500.ttf") format("truetype");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url("fonts/SpaceGrotesk-700.woff2") format("woff2"), url("fonts/SpaceGrotesk-700.ttf") format("truetype");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("fonts/JetBrainsMono-400.woff2") format("woff2"), url("fonts/JetBrainsMono-400.ttf") format("truetype");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url("fonts/JetBrainsMono-500.woff2") format("woff2"), url("fonts/JetBrainsMono-500.ttf") format("truetype");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url("fonts/JetBrainsMono-700.woff2") format("woff2"), url("fonts/JetBrainsMono-700.ttf") format("truetype");
}

:root {
  --beige: #E8E6DF;
  --black: #111111;
  --ink: #161616;
  --muted: #3F3F3F;
  --green: #22C55E;
  --lime: #C8F31D;
  --line: rgba(17, 17, 17, 0.16);
  --grid: rgba(17, 17, 17, 0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
}

:root { --nav-h: 88px; }
html { scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background-color: var(--beige);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48'><path d='M0 0.5 H48' stroke='rgba(17,17,17,0.08)' stroke-width='1' stroke-dasharray='1.5 6' fill='none'/><path d='M0.5 0 V48' stroke='rgba(17,17,17,0.08)' stroke-width='1' stroke-dasharray='1.5 6' fill='none'/></svg>");
  background-size: 48px 48px;
  min-height: 100vh;
  overflow-x: clip;
  max-width: 100%;
  padding-top: var(--nav-h);
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: 18px 48px;
  height: var(--nav-h);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 200;
  background: rgba(245, 246, 247, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateZ(0);
}

.nav-logo-mark {
  position: relative;
  display: block;
  height: 36px;
  width: calc(36px * 1473 / 267);
  flex-shrink: 0;
  line-height: 0;
  overflow: visible;
}
.nav-logo-body {
  display: block;
  height: 36px;
  width: 100%;
}
.nav-logo-eye {
  position: absolute;
  top: 44.5693%;
  height: 20.2247%;
  width: 5.8384%;
  pointer-events: none;
  transform-origin: 50% 70%;
  transition: transform 0.16s ease-out;
  will-change: transform;
}
.nav-logo-eye-l { left: 2.7834%; }
.nav-logo-eye-r { left: 9.9796%; }
.nav.is-blinking .nav-logo-eye {
  transform: scaleY(0.15);
  transition-duration: 0.06s;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-email {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.nav-email { display: none; }
.nav-email:hover { color: var(--ink); }

.btn-lime {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--lime);
  color: var(--black);
  border: 1px solid var(--black);
  border-radius: 2px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 10px 18px;
  line-height: 1;
  cursor: pointer;
}

.btn-lime:hover { filter: brightness(1.03); }

.label {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

h1, .headline {
  font-family: "Archivo Black", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: var(--black);
}

h1 .accent, .headline .accent { color: var(--green); }

.sub {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 560px;
}

/* Mascot — continuously looping, never one-shot */
.mascot-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: mascot-bob 3.4s ease-in-out infinite;
  transform-origin: 50% 60%;
  will-change: transform;
}

.mascot-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes mascot-bob {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-12px) rotate(5deg); }
}

/* Prompt */
.prompt {
  background: #F6F5F0;
  border: 1px solid var(--black);
  border-radius: 2px;
  width: 100%;
  max-width: 680px;
  min-height: 112px;
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 3px 3px 0 rgba(17,17,17,0.06);
}

.prompt-placeholder {
  font-size: 16px;
  color: var(--ink);
  font-weight: 400;
  font-family: inherit;
  width: 100%;
  border: 0;
  background: transparent;
  resize: none;
  outline: none;
  min-height: 44px;
  padding: 0;
  margin: 0;
  line-height: 1.4;
  display: block;
}
.prompt-placeholder::placeholder { color: #8A8A85; }
.prompt-placeholder.is-filled { color: var(--ink); }

.prompt-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 10px;
}

.prompt-go {
  width: 36px;
  height: 36px;
  background: var(--lime);
  border: 1px solid var(--black);
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
}

.prompt-attach {
  width: 36px;
  height: 36px;
  grid-column: 1;
  justify-self: start;
  background: transparent;
  border: 1px solid var(--black);
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  cursor: pointer;
  padding: 0;
}
.prompt-attach:hover,
.prompt-attach:focus-visible { background: #F6F5F0; }
.prompt-attach:disabled { opacity: 0.45; cursor: default; }

.prompt-go { order: 1; }
.prompt-attach { order: 2; }
.prompt-go.is-busy { opacity: 0.6; pointer-events: none; }

.prompt.is-dragover {
  outline: 2px solid var(--black);
  outline-offset: 1px;
}

.prompt-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  min-height: 48px;
}
.prompt-preview[hidden],
.prompt-status[hidden],
.prompt-error[hidden],
.sop-upload-detect {
  display: none !important;
}
.prompt-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--black);
  border-radius: 2px;
  flex: none;
  background: #fff;
}
.prompt-file-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--black);
  border-radius: 2px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--black);
}
.prompt-preview-meta {
  flex: 1;
  min-width: 0;
}
.prompt-preview-name {
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prompt-preview-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.prompt-remove {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--black);
  border-radius: 2px;
  padding: 5px 8px;
  cursor: pointer;
  color: var(--black);
  flex: none;
}
.prompt-remove:hover,
.prompt-remove:focus-visible { background: #F6F5F0; }

.prompt-status {
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
  margin: 8px 0 0;
}
.prompt-error {
  font-size: 13px;
  line-height: 1.4;
  color: #9B1C1C;
  margin: 8px 0 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.chip {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--black);
  border-radius: 2px;
  padding: 7px 12px;
  background: transparent;
  color: var(--black);
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover, .chip:focus-visible { background: var(--green); }

.chip.is-on {
  background: var(--green);
  color: var(--black);
  border-color: var(--black);
}

/* Cards */
.card {
  background: rgba(246, 245, 240, 0.72);
  border: 1px solid var(--black);
  border-radius: 2px;
  padding: 18px 18px 16px;
}

.card h3 {
  font-family: "Archivo Black", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  font-size: 18px;
  line-height: 1.1;
  margin: 0 0 8px;
}

.card p {
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

/* Features strip */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  background: rgba(232, 230, 223, 0.85);
}

.feature {
  padding: 18px 22px;
  border-right: 1px solid var(--black);
}
.feature:last-child { border-right: 0; }

.feature .label { margin-bottom: 6px; display: block; color: var(--black); }
.feature p { font-size: 14px; color: var(--muted); line-height: 1.35; }

/* Dark footer band */
.band-dark {
  background: var(--black);
  color: var(--beige);
}

#how, #examples, #top, #system-map, #changeover, #contact, #about { scroll-margin-top: calc(var(--nav-h) + 12px); }

@media (max-width: 800px) {
  :root { --nav-h: 92px; }
  .nav { padding: 10px 16px 8px; }
  .nav-logo-mark { height: 30px; width: calc(30px * 1473 / 267); }
  .nav-logo-body { height: 30px; }
  .nav-email { display: none; }
  .features { grid-template-columns: 1fr; }
  .feature { border-right: 0; border-bottom: 1px solid var(--black); }
}
