:root {
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  color: #173a34;
  background: #f5f6f1;
  font-size: 16px;
  line-height: 1.5;
  --ink: #173a34;
  --muted: #536b62;
  --line: #d4ded4;
  --forest: #216853;
  --pale: #eaf2e9;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 75px;
  display: flex;
  align-items: center;
  gap: 22px;
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 0 max(5vw, 24px);
}
a {
  color: var(--forest);
  overflow-wrap: anywhere;
}
h1,
h2,
h3,
p {
  margin: 0 0 0.6em;
}
h1 {
  font-family: Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: -0.05em;
  line-height: 1.05;
}
h2 {
  font-size: 1.35rem;
  letter-spacing: -0.035em;
}
h3 {
  font-size: 1.05rem;
}
.logo {
  font-weight: 780;
  letter-spacing: -0.065em;
  text-decoration: none;
  font-size: 1.7rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo span {
  font-size: 2.6rem;
  line-height: 1;
}
.headlabel {
  border-left: 1px solid var(--line);
  padding-left: 20px;
  color: var(--muted);
}
#logout {
  margin-left: auto;
}
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 28px 70px;
}
.sub,
.muted,
small,
.meta {
  color: var(--muted);
}
.sub {
  max-width: 660px;
}
.over {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: bold;
  color: var(--forest);
  margin-bottom: 12px;
}
.card,
details.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 16px;
}
.card input:not([type="checkbox"]),
textarea {
  font: inherit;
  display: block;
  width: 100%;
  border: 1px solid #a9baae;
  padding: 0.65rem 0.8rem;
  border-radius: 7px;
  color: var(--ink);
  background: white;
}
textarea {
  min-height: 68px;
  resize: vertical;
}
.card label:not(.check) {
  font-weight: 600;
  display: block;
  margin: 10px 0 4px;
}
button {
  font: inherit;
  font-weight: 630;
  line-height: 1.3;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: var(--forest);
  color: white;
  border: 1px solid transparent;
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
button.quiet,
button.tab {
  background: white;
  color: var(--forest);
  border-color: var(--line);
}
button.link {
  border: 0;
  padding: 0;
  color: var(--forest);
  background: transparent;
  text-decoration: underline;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 12px;
}
.tab[aria-pressed="true"] {
  background: var(--ink);
  color: white;
}
.row,
.flexline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.flexline {
  justify-content: space-between;
}
.row input {
  flex: 1;
  min-width: 180px;
}
summary {
  cursor: pointer;
  color: var(--forest);
  font-weight: 600;
}
details > summary {
  margin-bottom: 3px;
}
details[open] > summary {
  margin-bottom: 12px;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(250px, 1fr);
  gap: 18px;
  align-items: start;
}
.hero {
  margin: 18px 0 22px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: white;
  margin: 18px 0;
}
.stat {
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}
.stat:last-child {
  border: 0;
}
.stat b {
  display: block;
  font-size: 1.6rem;
  letter-spacing: -0.05em;
}
.stat small {
  font-weight: 550;
}
.pill {
  display: inline-block;
  background: var(--pale);
  color: #315d4b;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.77rem;
  font-weight: 650;
}
.pill.warn {
  background: #fff0cb;
  color: #71551e;
}
.qtitle {
  margin: 8px 0 4px;
  font-size: 1.06rem;
  line-height: 1.4;
}
.qbody {
  margin-top: 15px;
  border-top: 1px solid var(--line);
  padding-top: 11px;
}
blockquote {
  border-left: 3px solid #759e83;
  background: #f0f5ed;
  padding: 10px 14px;
  margin: 8px 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 550;
}
input[type="checkbox"] {
  accent-color: var(--forest);
  width: 18px;
  height: 18px;
}
.lang {
  font-size: 0.83rem;
  font-weight: bold;
  color: var(--muted);
}
.languages {
  display: flex;
  gap: 12px;
  margin: 8px 0 16px;
}
.intro {
  background: #e6efe1;
}
.progress {
  height: 6px;
  background: var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.progress i {
  display: block;
  width: 35%;
  height: 100%;
  background: #649b78;
  animation: slide 2s ease-in-out infinite alternate;
}
@keyframes slide {
  to {
    transform: translateX(180%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .progress i {
    animation: none;
  }
}
.ledger {
  width: 100%;
  font-size: 0.91rem;
  border-collapse: collapse;
}
.ledger td,
.ledger th {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 6px;
}
.auth {
  max-width: 540px;
  margin: 6vh auto;
}
.error {
  color: #8a3328;
}
.compact {
  margin-top: 14px;
}
.saved {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
#notice:not(:empty) {
  position: fixed;
  z-index: 5;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 12px 18px;
  border-radius: 9px;
  max-width: 88vw;
}
.answer {
  white-space: pre-wrap;
}
.url {
  font-size: 0.86rem;
}
.side .card {
  padding: 18px;
}
.stack {
  display: grid;
  gap: 6px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible,
textarea:focus-visible {
  outline: 3px solid #d68d18;
  outline-offset: 2px;
}
@media (max-width: 760px) {
  main {
    padding: 25px 15px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .headlabel {
    font-size: 0.86rem;
  }
  .card {
    padding: 16px;
  }
  .stat {
    padding: 10px;
  }
  .hero {
    margin-top: 10px;
  }
}
.findings-summary ul,
.all-citations {
  margin: 0;
  padding: 0;
  list-style: none;
}
.finding-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 13px 0;
  text-decoration: none;
  border-top: 1px solid var(--line);
}
.finding-row strong,
.finding-row small {
  display: block;
}
.finding-row:hover strong,
.case-nav a:hover {
  text-decoration: underline;
}
.case-lang {
  white-space: nowrap;
  font-size: 0.88rem;
}
.case-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.3rem 0;
}
.case-nav a {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
}
.case-nav a[aria-current="page"] {
  background: var(--forest);
  color: white;
}
.case-title {
  margin: 2rem 0;
}
.evidence-set {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.evidence {
  border-top: 4px solid #899a94;
  overflow-wrap: anywhere;
}
.evidence.answer-side {
  border-top-color: #b87936;
}
.evidence.fact-side {
  border-top-color: var(--forest);
}
.evidence h2 {
  font-size: 1.12rem;
}
.evidence blockquote {
  margin: 0.65rem 0;
  padding: 0.45rem 0.7rem;
  border-left: 2px solid var(--line);
  background: #f6f7f3;
}
.evidence details {
  margin-top: 1rem;
}
.source-ref {
  margin: 0.65rem 0;
}
.all-citations li {
  margin: 0.55rem 0;
}
.findings-summary h2 .pill {
  vertical-align: middle;
}
.action-card {
  max-width: 100%;
}
.action-card .route-note,
.retest {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 1rem;
}
#draft-preview {
  background: #f9faf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-top: 1rem;
}
.draft-address {
  font-size: 0.94rem;
}
.draft-paragraph {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.action-tools {
  margin: 1rem 0 0.4rem;
}
.sender-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 760px) {
  .evidence-set,
  .sender-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .case-title {
    margin: 1.3rem 0;
  }
  .finding-row {
    align-items: flex-start;
  }
  .case-nav a {
    font-size: 0.81rem;
  }
  .card.evidence {
    padding: 14px;
  }
  .case-nav {
    gap: 0.3rem;
  }
}
