:root {
  color-scheme: light;
  color: #211b1c;
  background: #f9f5ee;
  --paper: #fffdf8;
  --ink: #211b1c;
  --muted: #665758;
  --red: #a01930;
  --line: #ded2c9;
  font-family: "Inter", system-ui, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
a { color: var(--ink); text-underline-offset: .25em; text-decoration-color: var(--red); }
button, select { font: inherit; }
button { cursor: pointer; }
button:disabled, select:disabled { opacity: .5; cursor: default; }

.shell { width: min(67rem, calc(100% - 2rem)); margin-inline: auto; }
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top .shell { display: flex; align-items: center; min-height: 3.3rem; }
.lupa-brand { font-size: .94rem; font-weight: 750; }
.intro { padding-block: clamp(1.4rem, 4vw, 3rem) .8rem; }
h1 {
  margin: 0;
  font-family: "Baskervville", Georgia, serif;
  font-size: clamp(2.65rem, 7.5vw, 5.1rem);
  letter-spacing: -.06em;
  line-height: 1;
}
.intro p { color: var(--muted); margin: .65rem 0 0; line-height: 1.45; }
.controls {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: end;
  padding: .7rem 0 1rem;
}
.topic-field { display: grid; gap: .35rem; flex: 1 1 10rem; max-width: 14rem; min-width: 0; }
.topic-field label { font-size: .86rem; font-weight: 700; }
select, .primary, .secondary {
  min-height: 2.75rem;
  padding: .5rem .68rem;
  border: 1px solid;
  border-radius: .38rem;
}
select { width: 100%; background: var(--paper); color: var(--ink); border-color: var(--line); }
.primary, .secondary { font-weight: 720; border-color: var(--red); }
.primary { background: var(--red); color: #fff; }
.secondary { background: var(--paper); color: var(--red); }
.primary:hover { background: #7f1225; }
.secondary:hover { background: #faede8; }

.desk {
  display: grid;
  grid-template-columns: minmax(0, 1.37fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.draft, .margin-note {
  min-width: 0;
  padding: clamp(.95rem, 2.65vw, 1.65rem);
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: .5rem;
}
.draft { border-top: 3px solid var(--red); }
#lupa-sentence {
  margin: 0;
  font-family: "Baskervville", Georgia, serif;
  font-size: clamp(1.58rem, 3.7vw, 2.74rem);
  line-height: 1.34;
  overflow-wrap: anywhere;
}
.fragment {
  --mark: #f3eadf;
  border-radius: .12em;
  padding-block: .015em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  cursor: pointer;
  background: var(--mark);
  text-decoration: underline;
  text-decoration-color: #89777a;
  text-decoration-thickness: 1px;
  text-underline-offset: .13em;
}
.fragment[data-column="accion"] { --mark: #f9edb4; }
.fragment[data-column="buzzword"] { --mark: #f7d7df; }
.fragment[data-column="objeto"] { --mark: #e4ebfb; }
.fragment[data-column="finalidad"] { --mark: #def1d4; }
.fragment[data-column="medio"] { --mark: #eee0f9; }
.fragment[data-column="extra"] { --mark: #fae3ca; }
.fragment[aria-pressed="true"], .fragment:hover {
  text-decoration-color: var(--red);
  text-decoration-thickness: .095em;
}
.fragment[aria-pressed="true"] { font-weight: 700; }
.margin-note h2 { margin: 0; color: var(--red); font-size: 1rem; }
#lupa-quote { font-family: Georgia, serif; font-size: 1.17rem; line-height: 1.35; margin: .55rem 0 0; }
.margin-note dl { margin: .95rem 0 1rem; }
.margin-note dt {
  padding-top: .68rem;
  border-top: 1px solid var(--line);
  font-size: .85rem;
  font-weight: 770;
}
.margin-note dd { margin: .29rem 0 .73rem; color: var(--muted); line-height: 1.48; }
#lupa-question { color: var(--ink); font-weight: 700; }
.status { min-height: 1.15em; margin: .6rem 0 1rem; color: var(--muted); font-size: .84rem; }

@media (max-width: 42rem) {
  .desk { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .intro { padding-top: 1.25rem; }
}
@media (max-width: 24rem) {
  .shell { width: calc(100% - 1.5rem); }
  .controls { column-gap: .45rem; }
  .topic-field { flex-basis: 8.1rem; }
  #lupa-sentence { font-size: 1.46rem; }
}
