/* GRL Workshop Linter — design system from grl-design-v2 */

:root {
  --teal:#0D3D44;       --teal-ink:#0A2D33;
  --mint:#DEEFE5;       --mint-soft:#EBF6F0;
  --mint-ink:#2F8068;   --mint-deep:#1F6D58;
  --peach:#FCE8DC;      --peach-soft:#FEF4ED;  --peach-ink:#C25B2F;
  --amber:#F4D9A0;      --amber-ink:#9C6A1A;
  --paper:#FBFAF6;
  --line:#ECE9DF;       --line-2:#F5F2EA;
  --text:#1B2528;       --muted:#6B7479;       --muted-2:#8B9094;
  --mono: 'Inter', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background: #ECE9DF;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: var(--mint-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

/* PAGE FRAME */
.page  { max-width: 980px; margin: 0 auto; padding: 56px 32px 96px; }
.page-header { margin-bottom: 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

.brand { display: flex; align-items: center; gap: 12px; line-height: 1.1; }
.brand-logo { height: 64px; width: auto; display: block; }
.brand-divider { width: 1px; height: 64px; background: var(--line); display: inline-block; }
.brand-product {
  font-size: 11px; font-weight: 700; color: var(--muted);
  letter-spacing: 0.16em; text-transform: uppercase;
}

.tagpill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 999px;
  background: white; border: 1px solid var(--line);
  font-size: 12px; font-weight: 600; color: var(--teal-ink);
  letter-spacing: 0.04em;
}
.tagpill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint-ink); }

/* HERO */
.hero h1 {
  font-family: 'Manrope', sans-serif;
  font-weight: 500; font-size: 44px; line-height: 1.05; letter-spacing: -0.025em;
  margin: 0 0 12px; color: var(--teal-ink);
}
.hero h1 .accent { color: var(--mint-ink); }
.hero p {
  font-size: 17px; color: var(--muted); max-width: 640px; margin: 0;
}
.hero .meta {
  margin-top: 18px;
  display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px;
}
.hero .meta .chip {
  padding: 6px 12px; border-radius: 999px; background: white;
  border: 1px solid var(--line); color: var(--muted); font-weight: 500;
}

/* CARD */
.card {
  background: white; border: 1px solid var(--line); border-radius: 16px;
  padding: 32px;
  box-shadow: 0 24px 48px -28px rgba(10,45,51,0.18), 0 6px 14px -8px rgba(10,45,51,0.06);
  margin-top: 32px;
}
.card-h { font-size: 20px; font-weight: 600; color: var(--teal-ink); margin: 0 0 6px; letter-spacing: -0.01em; }
.card-sub { font-size: 14px; color: var(--muted); margin: 0 0 24px; }

/* DROPZONE */
.dropzone {
  border: 1.5px dashed var(--line); border-radius: 14px;
  padding: 56px 32px; text-align: center; background: var(--paper);
  cursor: pointer; transition: border-color 120ms, background 120ms;
}
.dropzone.over { border-color: var(--mint-ink); background: var(--mint-soft); border-style: solid; }
.dropzone .icon {
  width: 56px; height: 56px; margin: 0 auto 16px;
  background: var(--mint); color: var(--mint-ink);
  display: grid; place-items: center; border-radius: 50%;
  font-size: 22px;
}
.dropzone .title { margin: 0 0 6px; font-size: 18px; font-weight: 600; color: var(--teal-ink); }
.dropzone small { color: var(--muted); font-size: 13px; }
.dropzone .types { margin-top: 18px; font-size: 12px; color: var(--muted-2); display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.dropzone .types span { padding: 4px 10px; background: white; border-radius: 999px; border: 1px solid var(--line); }

.dropzone-or { text-align: center; padding: 14px 0; color: var(--muted-2); font-size: 13px; }
.paste-area {
  width: 100%; min-height: 90px;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; font-family: var(--mono); font-size: 13px;
  background: var(--paper); color: var(--text); resize: vertical;
}
.paste-area:focus { outline: none; border-color: var(--mint-ink); background: white; }

.actions { display: flex; gap: 12px; align-items: center; margin-top: 20px; flex-wrap: wrap; }

/* BUTTONS */
.btn {
  height: 48px; padding: 0 24px; border-radius: 999px;
  font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; transition: background 120ms, color 120ms, border-color 120ms;
}
.btn-primary {
  background: var(--mint-ink); color: white;
  box-shadow: 0 6px 20px -8px rgba(47,128,104,0.5);
}
.btn-primary:hover { background: var(--mint-deep); }
.btn-primary:disabled { background: var(--line); color: var(--muted-2); box-shadow: none; cursor: not-allowed; }
.btn-ghost {
  background: white; color: var(--teal-ink); border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--paper); }
.btn-link {
  background: transparent; color: var(--mint-ink); border: 0;
  height: auto; padding: 8px 12px; font-size: 14px;
}
.btn-link:hover { background: var(--mint-soft); }

/* SCAN STATE */
.scan-state { text-align: center; padding: 48px 32px; }
.scan-engine {
  width: 96px; height: 96px; margin: 0 auto 24px;
  background: white; border: 2px solid var(--mint-ink); border-radius: 50%;
  display: grid; place-items: center; color: var(--mint-ink); position: relative;
  box-shadow: 0 6px 24px -8px rgba(47,128,104,0.4);
  font-size: 28px; font-weight: 700;
}
.scan-engine::before {
  content: ''; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px dashed var(--mint); opacity: 0.7;
  animation: spin 6s linear infinite;
}
.scan-engine::after {
  content: ''; position: absolute; inset: -22px; border-radius: 50%;
  border: 1px solid var(--mint); opacity: 0.4;
}
@keyframes spin { to { transform: rotate(360deg); } }

.scan-state h3 { margin: 0 0 8px; font-size: 22px; font-weight: 600; color: var(--teal-ink); letter-spacing: -0.01em; }
.scan-state p { margin: 0; color: var(--muted); font-size: 14px; }

/* RESULTS */
.summary {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 12px; margin-bottom: 28px;
}
.summary .stat {
  background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px;
}
.summary .stat .k { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
.summary .stat .v {
  font-family: 'Manrope', sans-serif; font-size: 28px; font-weight: 500;
  color: var(--teal-ink); letter-spacing: -0.02em; line-height: 1.1; margin-top: 6px;
}
.summary .stat .delta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.scan-meta {
  background: var(--mint-soft); border: 1px solid var(--mint); border-radius: 12px;
  padding: 14px 18px; margin-bottom: 24px;
  font-size: 13px; color: var(--mint-deep);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.scan-meta b { color: var(--mint-ink); font-weight: 700; }
.scan-meta .sep { color: var(--mint); }

.findings {
  display: flex; flex-direction: column; gap: 12px;
}
.finding {
  background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 24px;
}
.finding-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.severity-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.severity-dot.warning  { background: var(--amber-ink); }
.severity-dot.info     { background: var(--mint-ink); }
.severity-dot.error    { background: var(--peach-ink); }
.rule-id {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  background: var(--mint-soft); color: var(--mint-ink); letter-spacing: 0.04em;
}
.rule-id.struct { background: var(--paper); color: var(--teal-ink); }
.rule-name { font-size: 16px; font-weight: 600; color: var(--teal-ink); }
.rule-count {
  margin-left: auto;
  font-size: 12px; color: var(--muted); padding: 4px 10px;
  background: var(--paper); border-radius: 999px;
}
.finding-desc {
  font-size: 14px; color: var(--muted); margin: 12px 0 14px;
  line-height: 1.55; max-width: 760px;
}
.finding-list {
  background: var(--paper); border-radius: 8px; padding: 12px 16px;
  font-family: var(--mono); font-size: 12px; color: var(--text);
  display: flex; flex-direction: column; gap: 4px;
}
.finding-list .iri { color: var(--teal-ink); word-break: break-all; }
.finding-list .iri.extra { display: none; }
.finding-list.expanded .iri.extra { display: block; }
.finding-list .more-toggle {
  align-self: flex-start;
  margin-top: 6px;
  background: none; border: 0; padding: 4px 0;
  color: var(--mint-ink); font-family: var(--mono); font-size: 12px;
  font-weight: 600; cursor: pointer;
}
.finding-list .more-toggle:hover { color: var(--mint-deep); text-decoration: underline; }

.no-findings {
  background: white; border: 1px solid var(--mint); border-radius: 14px;
  padding: 36px; text-align: center;
}
.no-findings .ic {
  width: 56px; height: 56px; margin: 0 auto 16px;
  background: var(--mint-ink); color: white;
  border-radius: 50%; display: grid; place-items: center; font-size: 22px;
  box-shadow: 0 8px 24px -8px rgba(47,128,104,0.5);
}
.no-findings h3 { margin: 0 0 8px; font-size: 22px; color: var(--teal-ink); font-weight: 600; }
.no-findings p { margin: 0; color: var(--muted); font-size: 14px; }

.error-card {
  background: var(--peach-soft); border: 1px solid var(--peach);
  border-radius: 12px; padding: 20px 24px;
}
.error-card h3 { margin: 0 0 8px; color: var(--peach-ink); font-size: 16px; font-weight: 700; }
.error-card pre { margin: 0; white-space: pre-wrap; font-family: var(--mono); font-size: 12px; color: var(--text); }

/* FOOTER */
.foot {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted); display: flex; gap: 18px; justify-content: space-between; flex-wrap: wrap;
}
.foot a { color: var(--mint-ink); }
.foot .l { display: flex; gap: 18px; flex-wrap: wrap; }

/* Upgrade callout */
.upgrade {
  margin-top: 28px;
  background: linear-gradient(135deg, var(--mint-soft), white);
  border: 1px solid var(--mint); border-radius: 14px;
  padding: 22px 24px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.upgrade .lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mint-ink); }
.upgrade h4 { margin: 4px 0 4px; font-size: 16px; font-weight: 700; color: var(--teal-ink); }
.upgrade p { margin: 0; font-size: 13px; color: var(--muted); }
.upgrade .right { margin-left: auto; }

/* RESPONSIVE */
@media (max-width: 720px) {
  .page { padding: 32px 18px 64px; }
  .hero h1 { font-size: 32px; }
  .summary { grid-template-columns: 1fr 1fr; }
  .card { padding: 22px; }
}

/* -------------------------- DOCUMENT PAGES -------------------------- */
/* Used by methodology.html, prompts.html, examples.html */

.doc-intro { max-width: 720px; margin: 0 0 28px; }
.doc-intro p { font-size: 16px; color: var(--muted); margin: 12px 0 0; line-height: 1.55; }

/* Prose styling for rendered markdown */
.prose { max-width: 760px; color: var(--text); font-size: 15px; line-height: 1.65; }
.prose h1 { font-family: 'Manrope', sans-serif; font-weight: 500; font-size: 32px; line-height: 1.15; letter-spacing: -0.02em; margin: 36px 0 16px; color: var(--teal-ink); }
.prose h2 { font-family: 'Manrope', sans-serif; font-weight: 600; font-size: 22px; margin: 32px 0 12px; color: var(--teal-ink); letter-spacing: -0.01em; }
.prose h3 { font-family: 'Manrope', sans-serif; font-weight: 600; font-size: 17px; margin: 24px 0 10px; color: var(--teal-ink); }
.prose p { margin: 12px 0; }
.prose ul, .prose ol { padding-left: 22px; margin: 12px 0; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--teal-ink); font-weight: 700; }
.prose em { color: var(--muted); font-style: italic; }
.prose code {
  font-family: var(--mono); font-size: 13px;
  background: var(--paper); padding: 2px 6px; border-radius: 4px;
  color: var(--teal-ink);
}
.prose pre {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; overflow-x: auto;
  font-family: var(--mono); font-size: 12px; line-height: 1.5;
  color: var(--text); margin: 16px 0;
}
.prose pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.prose blockquote { border-left: 3px solid var(--mint-ink); margin: 16px 0; padding: 4px 16px; color: var(--muted); }
.prose table { border-collapse: collapse; margin: 16px 0; width: 100%; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; }
.prose th { background: var(--paper); font-weight: 700; color: var(--teal-ink); }
/* First column gets a sensible minimum so short phase names like
   "1. Review" don't get squeezed. Long sentences (e.g. checklist
   descriptions) wrap naturally. */
.prose table th:first-child,
.prose table td:first-child { min-width: 120px; }

/* Methodology page only — article.prose is unique to methodology.html.
   Fixed layout + explicit column widths give the three content columns
   equal width, so Purpose / Human's job / LLM's job line up. */
article.prose table { table-layout: fixed; }
article.prose table th:first-child,
article.prose table td:first-child       { width: 16%; }
article.prose table th:not(:first-child),
article.prose table td:not(:first-child) { width: 28%; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.prose a { color: var(--mint-ink); }

/* Copy-prompt card */
.prompt-card { margin-bottom: 28px; }
.prompt-card .head {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; flex-wrap: wrap;
}
.prompt-card .num {
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  padding: 3px 10px; border-radius: 999px; background: var(--mint-soft); color: var(--mint-ink);
}
.copy-wrap { position: relative; }
.copy-btn {
  position: absolute; top: 10px; right: 10px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  background: white; color: var(--teal-ink); border: 1px solid var(--line);
  font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.copy-btn:hover { background: var(--paper); }
.copy-btn.done { background: var(--mint); color: var(--mint-ink); border-color: var(--mint); }

/* File list (AFMRO examples) */
.file-list { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; max-width: 840px; }
.file-row {
  background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 22px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
}
.file-row .ic {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--mint-soft); color: var(--mint-ink);
  display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 700;
}
.file-row .meta { min-width: 0; }
.file-row .meta .name {
  font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--teal-ink);
  word-break: break-all;
}
.file-row .meta .desc { font-size: 13px; color: var(--muted); margin-top: 4px; }
.file-row .actions {
  display: flex; gap: 8px; align-items: center;
}
.file-row .file-btn {
  height: 36px; padding: 0 14px; border-radius: 999px;
  background: white; color: var(--teal-ink); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.file-row .file-btn.primary {
  background: var(--mint-ink); color: white; border-color: var(--mint-ink);
}
.file-row .file-btn:hover { background: var(--paper); }
.file-row .file-btn.primary:hover { background: var(--mint-deep); }

@media (max-width: 720px) {
  .file-row { grid-template-columns: 1fr; }
  .file-row .actions { justify-content: flex-start; }
}
