/* CobDiff — same color tokens and header pattern as CobPlain. */
:root {
  --corn: #f7c948;
  --corn-deep: #b7791f;
  --husk: #2f855a;
  --husk-dark: #22543d;
  --ink: #1f2933;
  --muted: #617080;
  --cream: #fff8df;
  --field: #f3ead0;
  --panel: #fffdf5;
  --line: #ded2aa;
  --shadow: 0 18px 45px rgba(74, 50, 12, .14);
  --radius: 8px;
  --removed: #f6d0cb;
  --removed-ink: #9b2c2c;
  --added: #d3edda;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 10%, rgba(247, 201, 72, .28), transparent 26rem),
    linear-gradient(135deg, #fffaf0 0%, #f4edd5 45%, #edf7ed 100%);
}

button,
textarea {
  font: inherit;
}

button:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(247, 201, 72, .45);
  outline-offset: 2px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem clamp(1rem, 3vw, 2rem);
  background: rgba(255, 253, 245, .92);
  border-bottom: 1px solid rgba(183, 121, 31, .25);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 50%;
  color: #233d21;
  font-weight: 900;
  background:
    linear-gradient(90deg, transparent 44%, rgba(255, 255, 255, .42) 44% 56%, transparent 56%),
    var(--corn);
  border: 2px solid var(--husk);
}

.brand strong,
.brand small { display: block; }

.brand small,
.eyebrow,
.page-footer { color: var(--muted); }

.page {
  width: min(960px, calc(100% - 2rem));
  margin: 1.5rem auto 2.5rem;
}

.eyebrow {
  margin: 0 0 .35rem;
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 .6rem;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.15;
}

.lede {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  line-height: 1.5;
}

.card {
  padding: 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem 1rem;
}

label,
.diff-heading {
  display: block;
  margin-bottom: .4rem;
  font-weight: 700;
}

.diff-heading {
  margin-top: 1rem;
  font-size: 1rem;
}

textarea {
  width: 100%;
  min-height: 9rem;
  padding: .75rem .8rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .95rem;
  line-height: 1.45;
}

.diff {
  position: relative;
  min-height: 6.5rem;
  max-height: 24rem;
  overflow: auto;
  padding: .75rem .8rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .95rem;
  line-height: 1.55;
}

.diff-del,
.diff-ins {
  border-radius: 3px;
  text-decoration: none;
}

.diff-del { background: var(--removed); }

.diff-ins { background: var(--added); }

.diff-del .diff-text {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.mark {
  font-weight: 800;
  user-select: none;
  padding-right: .12em;
}

.diff-del .mark { color: var(--removed-ink); }

.diff-ins .mark { color: var(--husk-dark); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  user-select: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: .85rem;
}

button {
  min-height: 2.5rem;
  padding: .55rem .9rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

button:hover { border-color: var(--corn-deep); }

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.primary {
  color: #233d21;
  background: var(--corn);
  border-color: var(--husk);
  font-weight: 700;
}

#status {
  min-height: 1.4rem;
  margin: .85rem 0 0;
}

.page-footer {
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto 2rem;
  font-size: .92rem;
}

@media (max-width: 720px) {
  .columns { grid-template-columns: 1fr; }
}
