:root {
  --bg: #e8f0ed;
  --bg-glow: #d7ebe3;
  --card: #ffffff;
  --ink: #14201c;
  --muted: #5a6b64;
  --line: #cfdcd6;
  --accent: #0b6e5f;
  --accent-deep: #085347;
  --accent-soft: #dff3ed;
  --result: #f3faf7;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(20, 32, 28, 0.06);
  --font-ui: "Outfit", "Segoe UI", sans-serif;
  --font-cite: "Source Serif 4", Georgia, serif;
  --shell: min(68rem, calc(100% - 1.5rem));
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.05rem;
  line-height: 1.5;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 8% -10%, rgba(11, 110, 95, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(232, 196, 120, 0.22), transparent 50%),
    radial-gradient(circle at 1px 1px, rgba(20, 32, 28, 0.07) 1px, transparent 0);
  background-size: auto, auto, 22px 22px;
  background-attachment: fixed;
}
.skip {
  position: absolute;
  left: 0.6rem;
  top: -3rem;
  background: var(--accent);
  color: #fff;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  z-index: 8;
}
.skip:focus { top: 0.6rem; }
.top {
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(207, 220, 214, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 6;
}
.shell {
  width: var(--shell);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.2rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}
.brand {
  font-family: var(--font-cite);
  font-weight: 700;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  line-height: 1;
}
.brand::before {
  content: "";
  width: 0.78rem;
  height: 0.78rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #17a388, var(--accent));
  flex: 0 0 auto;
}
nav { display: flex; flex-wrap: wrap; gap: 0.15rem 0.85rem; }
.top nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.2rem 0;
  transition: color 0.15s ease;
}
.top nav a:hover,
.top nav a:focus-visible {
  color: var(--accent);
  outline: none;
}
main {
  width: var(--shell);
  margin: 1.15rem auto 3rem;
}
.page-head {
  margin: 0 0 1rem;
  max-width: 40rem;
  animation: rise 0.4s ease both;
}
h1 {
  font-family: var(--font-cite);
  font-size: clamp(1.9rem, 4.4vw, 2.65rem);
  line-height: 1.12;
  margin: 0 0 0.4rem;
  letter-spacing: -0.03em;
}
.kicker {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 450;
}
h2 {
  font-family: var(--font-cite);
  font-size: 1.4rem;
  line-height: 1.25;
  margin: 1.8rem 0 0.45rem;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1.08rem;
  margin: 1.1rem 0 0.3rem;
  font-weight: 600;
}
a { color: var(--accent); }
.page-cover {
  margin: 1.4rem 0 1.6rem;
  max-width: 42rem;
  padding: 0;
}
.page-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--card);
}
.prose { max-width: 42rem; }
.prose p, .faq p, .sample > p { margin: 0.45rem 0 0.75rem; }
.cite-mount { margin: 0 0 1.2rem; }
.cite-mount.is-lead { animation: rise 0.5s ease 0.05s both; }
.cite-form {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 1rem;
  align-items: start;
}
.cite-fields,
.cite-results {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cite-fields {
  display: grid;
  gap: 0.7rem;
  padding: 1rem 1.05rem 1.1rem;
}
.cite-results {
  padding: 1rem 1.05rem 1.15rem;
  background:
    linear-gradient(180deg, var(--accent-soft), transparent 7rem),
    var(--card);
  position: sticky;
  top: 4.4rem;
  overflow: hidden;
}
.results-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.choices, .row {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0.65rem;
}
.row { grid-template-columns: repeat(3, 1fr); }
fieldset {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.7rem 0.55rem;
  background: #f8fbfa;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.35rem;
}
legend {
  padding: 0 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
}
fieldset label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
fieldset label:has(input:checked) {
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 600;
}
fieldset input[type="radio"] {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  accent-color: var(--accent);
}
input, select, textarea {
  font: inherit;
  color: inherit;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:hover, select:hover, textarea:hover { border-color: #b5c7c0; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 110, 95, 0.16);
}
textarea { resize: vertical; min-height: 4.4rem; }
.hint {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 450;
}
.outs {
  display: grid;
  gap: 0.95rem;
}
.out-block {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}
.out-block button {
  width: 100%;
  max-width: 100%;
}
.out-label {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
}
.out, .ref {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.8rem;
  background: var(--result);
  border: 1px solid #d5e8e1;
  border-radius: 8px;
  font-family: var(--font-cite);
  font-size: 1.02rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ref {
  padding-left: 1.65rem;
  text-indent: -1.05rem;
}
.alt { opacity: 0.95; }
button, .top button {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  padding: 0.62rem 0.9rem;
  background: var(--accent);
  color: #fff;
  transition: background 0.15s ease, transform 0.12s ease;
}
button:hover { background: var(--accent-deep); }
button:active { transform: translateY(1px); }
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button[data-copy="narrative"] {
  background: transparent;
  color: var(--accent);
  border: 1px solid #b7d4cb;
}
button[data-copy="narrative"]:hover {
  background: var(--accent-soft);
}
.notes {
  margin: 0.7rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.notes:empty, .copy-msg:empty { display: none; }
.copy-msg {
  margin: 0.65rem 0 0;
  width: fit-content;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.9rem;
  font-weight: 600;
}
.sample { margin-top: 1.6rem; }
.samples .sample + .sample { margin-top: 1.9rem; }
.cite-mount.is-preview .cite-preview {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.05rem 1.1rem;
  background: linear-gradient(180deg, var(--accent-soft), transparent 6rem), var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 42rem;
}
.cite-mount.is-preview .outs {
  grid-template-columns: 1fr 1.2fr;
  gap: 0.85rem;
}
.cite-mount.is-preview .out-block button { width: auto; }
@media (max-width: 760px) {
  .cite-mount.is-preview .outs { grid-template-columns: 1fr; }
  .cite-mount.is-preview .out-block button { width: 100%; }
}
.faq { max-width: 42rem; }
.faq h3 {
  margin-top: 1.2rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.talk {
  max-width: 42rem;
  margin-top: 1.8rem;
  padding: 1.05rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.foot {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}
.foot .shell {
  align-items: flex-start;
  padding-top: 1.5rem;
  padding-bottom: 2.1rem;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  max-width: 36rem;
  justify-content: flex-end;
}
.foot p {
  margin: 0;
  color: var(--muted);
  max-width: 34ch;
  font-size: 0.95rem;
}
.foot a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.foot a:hover { color: var(--accent); text-decoration: underline; }
.comment { border-top: 1px solid var(--line); padding: 0.7rem 0; }
[data-gf-c-owner] { display: none; }
[data-gf-owner] {
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
}
[data-gf-owner] [data-gf-c-owner] { display: inline; font-weight: 700; }
[data-gf-comments][data-gf-empty]::before {
  content: "No comments yet. Mention the source type if a field you need is missing.";
  color: var(--muted);
  display: block;
  margin-bottom: 0.6rem;
}
[data-gf-reply-cancel] {
  display: none;
  background: transparent;
  color: var(--accent);
  border: 0;
}
[data-gf-replying] [data-gf-reply-cancel] { display: inline-block; }
@keyframes rise {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 900px) {
  .cite-form { grid-template-columns: 1fr; }
  .cite-results { position: static; order: 2; }
  .cite-fields { order: 1; }
}
@media (max-width: 760px) {
  :root { --shell: calc(100% - 1.1rem); }
  .choices, .row { grid-template-columns: 1fr; }
  .top { position: static; }
  button { min-height: 2.75rem; width: 100%; }
}
