/* erc-ai-feedback: the web page. Plain CSS, system fonts, no third-party requests. */

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #1c2321;
  --muted: #5b6461;
  --line: #e2dfd6;
  --line-strong: #cfcbc0;
  --accent: #234e52;
  --accent-ink: #ffffff;
  --accent-soft: #e6efed;
  --warn: #7f4a12;
  --warn-soft: #f8eedf;
  --code-bg: #f1efe8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 28, .05), 0 6px 20px rgba(20, 30, 28, .05);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Charter, "Bitstream Charter", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131918;
    --surface: #1b2321;
    --ink: #e8ecea;
    --muted: #a2aca8;
    --line: #2c3734;
    --line-strong: #3b4844;
    --accent: #82c7bd;
    --accent-ink: #0f1a18;
    --accent-soft: #1f322e;
    --warn: #efb46e;
    --warn-soft: #362a1a;
    --code-bg: #161d1b;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.62 var(--sans); }
a { color: var(--accent); text-underline-offset: .16em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0 0 12px; }
code, pre, textarea { font-family: var(--mono); }
.wrap { max-width: 780px; margin: 0 auto; padding-inline: 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.basic:focus { outline: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top-row { display: flex; align-items: center; gap: 12px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; letter-spacing: -.005em; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand rect { fill: var(--accent); }
.brand path { fill: var(--accent-ink); }
.pill { font-size: 13px; padding: 1px 10px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--muted); }
.top-link { margin-left: auto; font-size: 15px; }

/* hero */
.stale { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 12px 14px; margin: 20px 0 0; font-weight: 600; }
.hero { padding-block: 48px 4px; }
.hero h1 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(31px, 5.2vw, 46px);
  line-height: 1.12; letter-spacing: -.012em; margin: 0 0 20px; text-wrap: balance;
}
.lead { font-size: 19.5px; line-height: 1.55; margin: 0 0 12px; }
.points { margin: 0 0 18px; }
.byline { margin: 0 0 4px; color: var(--muted); }
.byline a { font-weight: 600; }
.note { margin: 0; font-size: 14.5px; color: var(--muted); }

/* the rule for evaluators */
.boundary {
  margin: 28px 0 8px; padding: 20px 24px 10px; background: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 4px var(--radius) var(--radius) 4px;
  box-shadow: var(--shadow);
}
.boundary h2 { font-size: 18px; margin: 0 0 8px; letter-spacing: -.005em; }
.boundary p { font-size: 15.5px; }

/* section headings */
.section-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin: 48px 0 6px; }
.basic h2, .others > h2, .limits h2 {
  font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.2; letter-spacing: -.01em; margin: 0;
}
.others > h2, .limits h2 { margin: 56px 0 8px; }
.tag { font-size: 13px; color: var(--accent); border: 1px solid var(--accent); border-radius: 99px; padding: 0 10px; }
.intro { color: var(--muted); margin-bottom: 18px; }

/* the four steps, joined by a rail */
.steps { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: s; }
.steps > li { position: relative; padding: 0 0 34px 56px; counter-increment: s; }
.steps > li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 99px;
  background: var(--surface); border: 1.5px solid var(--accent); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: 16px; z-index: 1;
}
.steps > li::after { content: ""; position: absolute; left: 17.5px; top: 36px; bottom: 0; width: 1px; background: var(--line-strong); }
.steps > li:last-child { padding-bottom: 0; }
.steps > li:last-child::after { display: none; }
.steps h3 { margin: 3px 0 8px; font-size: 19px; line-height: 1.35; letter-spacing: -.005em; }

/* buttons */
.btn {
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 10px; padding: 9px 18px;
  border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  text-decoration: none; display: inline-block; line-height: 1.4;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: progress; }
.btn-big { font-size: 18px; padding: 13px 30px; border-radius: 12px; }

/* copy blocks */
.copy { margin: 4px 0 6px; }
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.status { margin: 0; font-size: 15px; font-weight: 600; color: var(--accent); }
.status.err { color: var(--warn); font-weight: 500; }
.source { margin: 6px 0 0; font-family: var(--mono); font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.source a { color: inherit; text-decoration-color: var(--line-strong); }
.source a:hover { color: var(--accent); }
.show { margin-top: 6px; }
.show summary { cursor: pointer; color: var(--accent); font-size: 15px; font-weight: 600; width: fit-content; }
.show textarea {
  display: block; width: 100%; margin-top: 8px; padding: 10px 12px; resize: vertical;
  font-size: 12.5px; line-height: 1.45; color: var(--ink); background: var(--code-bg);
  border: 1px solid var(--line); border-radius: 10px;
}

/* stages */
.stages { margin: 0 0 10px; border-top: 1px solid var(--line); }
.stages > div { display: grid; grid-template-columns: 12em 1fr; gap: 2px 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.stages dt { margin: 0; }
.stages dd { margin: 0; font-size: 15.5px; color: var(--muted); }
code { font-size: .88em; background: var(--code-bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.hint { font-size: 14.5px; color: var(--muted); }

/* the specimen of the report */
.specimen {
  margin: 6px 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px 12px; box-shadow: var(--shadow); position: relative;
}
.specimen::before { content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.specimen-title { display: block; font-family: var(--serif); font-size: 20px; font-weight: 600; margin: 2px 0 10px; }
.specimen ol { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.specimen li { counter-increment: r; position: relative; padding: 8px 0 8px 30px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.specimen li::before { content: counter(r); position: absolute; left: 0; top: 8px; font-size: 12.5px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.specimen b { color: var(--ink); font-weight: 650; }

/* the other options */
.row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 12px; box-shadow: var(--shadow); }
.row > summary {
  list-style: none; cursor: pointer; padding: 16px 52px 16px 22px; position: relative;
  display: flex; flex-direction: column; gap: 2px; border-radius: var(--radius);
}
.row > summary::-webkit-details-marker { display: none; }
.row > summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .15s;
}
.row[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.row > summary:hover .row-title { color: var(--accent); }
.row-title { margin: 0; font-family: var(--sans); font-weight: 650; font-size: 18px; line-height: 1.35; letter-spacing: 0; }
.row-meta { color: var(--muted); font-size: 14.5px; }
.row-body { padding: 4px 22px 10px; border-top: 1px solid var(--line); }
.row-body > p:first-child, .row-body > .warn:first-child { margin-top: 16px; }
.row-quiet { background: transparent; box-shadow: none; border-style: dashed; }
.mini { margin: 6px 0 14px; padding-left: 22px; }
.mini > li { margin: 0 0 12px; padding-left: 4px; }
.mini > li::marker { color: var(--accent); font-weight: 700; }
.mini p { margin-bottom: 8px; }
.warn { background: var(--warn-soft); border-radius: 10px; padding: 14px 16px 4px; margin: 0 0 14px; }
.warn h4 { color: var(--warn); font-size: 16px; margin: 0 0 6px; }
.warn p { font-size: 15.5px; }
.labels {
  margin: 4px 0 0; padding: 12px 14px; background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px;
  font-size: 13px; line-height: 1.5; overflow-x: auto; white-space: pre;
}
.maturity { color: var(--muted); font-style: italic; }

/* good to know */
.limits ul { list-style: none; margin: 0; padding: 0; }
.limits li { position: relative; padding: 0 0 0 22px; margin: 0 0 12px; }
.limits li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 9px; height: 1.5px; background: var(--accent); }

/* footer */
.foot { margin-top: 64px; border-top: 1px solid var(--line); background: var(--surface); padding-block: 26px 34px; font-size: 15px; color: var(--muted); }
.foot p { margin: 0 0 8px; }
.small { font-size: 13.5px; }
.noscript { background: var(--warn-soft); color: var(--warn); padding: 14px 20px; border-radius: 10px; margin-block: 16px; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding-inline: 16px; }
  .wide-only { display: none; }
  .hero { padding-top: 30px; }
  .lead { font-size: 18px; }
  .boundary { padding: 16px 16px 6px; }
  .section-head { margin-top: 40px; }
  .basic h2, .others > h2, .limits h2 { font-size: 26px; }
  .others > h2, .limits h2 { margin-top: 44px; }
  .steps > li { padding-left: 46px; }
  .steps > li::before { width: 32px; height: 32px; font-size: 15px; }
  .steps > li::after { left: 15.5px; top: 32px; }
  .btn-big { width: 100%; }
  .copy-row .btn-big + .status:not(:empty) { flex-basis: 100%; }
  .show textarea { font-size: 16px; }
  .stages > div { grid-template-columns: 1fr; }
  .specimen { padding: 18px 16px 10px; }
  .specimen::before { left: 16px; right: 16px; }
  .row > summary { padding: 14px 46px 14px 16px; }
  .row > summary::after { right: 18px; }
  .row-body { padding: 2px 16px 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
