:root {
  color-scheme: light;
  --paper: #f6f3ee;
  --card: #fffcf6;
  --ink: #262339;
  --muted: #5c5b6b;
  --rule: #c4c1cc;
  --purple: #4c3c76;
  --tint: #e8e2f4;
  --green: #22664e;
  --red: #893d34;
  --body: 'Inter', Arial, sans-serif;
  --mono: 'Martian Mono', ui-monospace, monospace;
  --display: 'Fraunces', Georgia, serif;
}
*,
*::after,
*::before {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.45 var(--body);
}
main {
  max-width: 1250px;
  padding: 0 clamp(0.85rem, 4vw, 3.55rem);
  margin: auto;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.045em;
}
h1 {
  font-size: clamp(3.1rem, 6.4vw, 5.6rem);
  margin: 0.2em 0 0.13em;
}
h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.25rem);
}
a {
  color: var(--purple);
  text-underline-offset: 3px;
}
button,
input,
textarea,
select {
  color: var(--ink);
  font: inherit;
}
button,
select,
input:not([type='checkbox']),
textarea {
  background: var(--card);
  border: 1px solid #8c899c;
  border-radius: 3px;
}
button {
  cursor: pointer;
  font-size: 0.87rem;
  font-weight: 650;
  min-height: 37px;
  padding: 0.42rem 0.77rem;
}
button:hover:enabled {
  background: var(--tint);
  border-color: var(--purple);
}
button:disabled {
  opacity: 0.53;
  cursor: default;
}
button.primary {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
button.primary:hover:enabled {
  background: #392955;
}
input,
select,
textarea {
  padding: 0.45rem 0.56rem;
  min-width: 0;
  max-width: 100%;
}
label {
  font-size: 0.84rem;
  font-weight: 650;
}
:focus-visible {
  outline: 3px solid #c16c42;
  outline-offset: 3px;
}
.skip {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 25;
  background: var(--card);
  padding: 0.7rem;
  transform: translateY(-180%);
}
.skip:focus {
  transform: none;
}
.mast {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 260px);
  gap: 2rem;
  align-items: end;
  padding: clamp(1.4rem, 4vw, 3rem) 0 1.4rem;
}
.back,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font: 650 0.68rem/1.5 var(--mono);
}
.back {
  text-decoration: none;
  border-bottom: 1px solid #b0a6c4;
}
.lede {
  max-width: 42rem;
  font-size: clamp(1rem, 1.7vw, 1.21rem);
  color: var(--muted);
}
.casebox {
  border-top: 3px double var(--ink);
  border-bottom: 1px solid var(--rule);
  padding: 0.6rem 0;
}
.casebox > div,
.row,
.exports,
.solve-buttons {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.casebox select {
  flex: 1;
  font-size: 0.87rem;
}
.casebox > div {
  margin-top: 0.32rem;
}
.casebox .links {
  gap: 1rem;
}
.links button,
.text-btn {
  color: var(--purple);
  border: 0;
  font-size: 0.77rem;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
  min-height: 26px;
}
.links button:hover:enabled,
.text-btn:hover:enabled {
  background: transparent;
}
.solution {
  padding: 1.1rem clamp(1rem, 2.8vw, 2rem) 1.25rem;
  color: #fcf6f0;
  background: #322c49;
  border-top: 5px solid #e3b283;
}
.status-top,
.section-head,
.panel-head,
.verdict,
.proof-label,
.list-row,
.takeaway {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.status-top {
  color: #ead2b7;
}
#size {
  font-size: 0.78rem;
}
.verdict {
  margin: 0.48rem 0 0.2rem;
}
.verdict h2 {
  font-size: clamp(1.95rem, 3.7vw, 3.25rem);
}
.verdict p {
  color: #e0dce7;
  font-size: 0.91rem;
  margin: 0.42rem 0;
}
.changes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
}
.change {
  padding: 0.43rem 0.64rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  border: 1px solid #756c87;
  background: #403951;
  font-size: 0.79rem;
  overflow-wrap: anywhere;
  min-width: 0;
}
.chip {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  display: inline-block;
  border: 1px solid #8c8793;
  border-radius: 2px;
}
.change .chip {
  border-color: #aaa3b5;
}
#conflicts ul {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.85rem;
}
.proof,
.editor,
.takeaway,
.method {
  margin: 1.25rem 0;
}
.proof .section-head,
.editor > .section-head {
  margin-bottom: 0.68rem;
}
.section-head label {
  color: var(--muted);
}
.section-head select {
  margin-left: 0.4rem;
  font-size: 0.84rem;
  max-width: 18rem;
}
.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.proof-card {
  border: 1px solid var(--rule);
  background: var(--card);
}
.proof-label {
  padding: 0.45rem 0.8rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.79rem;
}
.proof-label strong {
  font: 550 0.73rem var(--mono);
}
.specimen {
  min-height: clamp(92px, 12vw, 140px);
  padding: 0.7rem clamp(0.9rem, 2.5vw, 1.8rem);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  overflow-wrap: anywhere;
}
.sample-text {
  font: 500 clamp(2.5rem, 6vw, 5rem) / 1 var(--display);
  letter-spacing: -0.08em;
}
.sample-role {
  font-size: clamp(0.87rem, 1.7vw, 1.1rem);
  font-weight: 650;
}
.specimen.empty {
  background: repeating-linear-gradient(130deg, #f0eee9 0px, #f0eee9 7px, #e5e2e7 7px, #e5e2e7 8px);
  color: var(--muted);
}
.specimen.empty .sample-text {
  display: none;
}
.hint,
.panel-head p,
.takeaway p,
.method p,
.err {
  font-size: 0.86rem;
  color: var(--muted);
}
.proof > .hint {
  margin-top: 0.46rem;
}
.notice:not(:empty),
.err:not(:empty) {
  padding: 0.65rem 0.85rem;
  background: var(--tint);
  border-left: 3px solid var(--purple);
  margin: 0.6rem 0;
  font-size: 0.87rem;
}
.notice.error,
.err:not(:empty) {
  background: #f6e2db;
  color: #672e25;
  border-color: var(--red);
}
.tabs {
  display: flex;
  border-bottom: 2px solid var(--purple);
}
.tabs button {
  border-radius: 3px 3px 0 0;
  border-bottom: 0;
  background: #eae7e6;
}
.tabs button + button {
  margin-left: 0.25rem;
}
.tabs button[aria-pressed='true'] {
  color: white;
  background: var(--purple);
  border-color: var(--purple);
}
.tabs button span {
  margin-left: 0.2rem;
}
.panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 0;
}
.panel-head,
.list-row {
  padding: 0.65rem 0.95rem;
}
.panel-head {
  background: #edeaf0;
  border-bottom: 1px solid var(--rule);
}
.list-row + .list-row {
  border-top: 1px solid #d9d7df;
}
.list-row > div:first-child {
  flex: 1;
  min-width: 0;
}
.row-title {
  font-size: 0.94rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.row-meta {
  color: var(--muted);
  font-size: 0.78rem;
  display: block;
  overflow-wrap: anywhere;
}
.row-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}
.row-actions button {
  min-height: 30px;
  font-size: 0.75rem;
  padding: 0.28rem 0.55rem;
}
.readout {
  font: 0.74rem/1.6 var(--mono);
}
.pass {
  color: var(--green);
}
.fail {
  color: var(--red);
}
.row-title .chip {
  vertical-align: middle;
  margin-right: 0.32rem;
}
.swatch-list,
.choices {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.swatch-list {
  padding: 0.8rem 0.95rem;
}
.swatch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.45rem;
  font: 0.77rem var(--mono);
  border: 1px solid var(--rule);
}
.swatch button {
  padding: 0.1rem 0.35rem;
  min-height: 26px;
  font-size: 0.73rem;
}
#swatch-form {
  border-top: 1px solid var(--rule);
  padding: 0.7rem 0.95rem;
}
input[type='color'] {
  height: 38px;
  width: 3.1rem;
  padding: 0.2rem;
  cursor: pointer;
}
#swatch-hex,
#role-hex {
  width: 8.7rem;
  font-family: var(--mono);
  font-size: 0.86rem;
}
.takeaway {
  background: #e7e0eb;
  border: 1px solid #b9afc5;
  padding: 1.05rem 1.2rem;
}
.takeaway p {
  max-width: 38rem;
  margin-top: 0.32rem;
}
.exports {
  flex-wrap: wrap;
}
.method {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.8rem 0;
}
.method summary {
  cursor: pointer;
  font-weight: 650;
}
.method div {
  max-width: 54rem;
}
.method p {
  margin: 0.55rem 0;
}
code {
  font: 0.85em var(--mono);
  overflow-wrap: anywhere;
}
.aw-wayout {
  padding: 1rem 1rem 2rem;
  text-align: center;
  font-size: 0.8rem;
}
dialog {
  width: min(34rem, calc(100% - 1.3rem));
  max-height: 88dvh;
  border: 1px solid var(--muted);
  border-top: 4px solid var(--purple);
  background: var(--card);
  color: var(--ink);
  border-radius: 3px;
  padding: 1.1rem 1.3rem;
}
dialog::backdrop {
  background: rgb(28 24 43 / 0.6);
}
dialog form > label,
dialog form > .two {
  display: block;
  margin: 0.8rem 0 0.2rem;
}
dialog form > select,
dialog form > input:not([type='checkbox']),
textarea {
  width: 100%;
}
dialog .hint {
  margin: 0.7rem 0;
}
dialog form > .primary {
  margin-top: 0.6rem;
}
.prefixed,
.check,
.choices label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.prefixed span {
  font: 1rem var(--mono);
}
.prefixed input {
  flex: 1;
}
dialog form > .two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.7rem;
}
.two select {
  display: block;
  width: 100%;
}
input[type='checkbox'] {
  accent-color: var(--purple);
}
.choices {
  margin: 0.5rem 0;
}
.choices label {
  font: 0.75rem var(--mono);
  padding: 0.3rem;
  border: 1px solid var(--rule);
}
textarea {
  resize: vertical;
  font: 0.84rem/1.4 var(--mono);
}
[hidden] {
  display: none !important;
}
@media (max-width: 860px) {
  .takeaway {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 620px) {
  .mast {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem;
  }
  .casebox {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.15rem 0.55rem;
  }
  .casebox .links {
    grid-column: 1/-1;
  }
  .casebox > div {
    margin: 0;
  }
  .section-head {
    flex-wrap: wrap;
    gap: 0.45rem;
  }
  .proof .section-head label {
    display: block;
    width: 100%;
  }
  .proof .section-head select {
    max-width: 72%;
  }
  .proof-grid {
    gap: 0.45rem;
  }
  .proof-label {
    flex-wrap: wrap;
    gap: 0.18rem;
    padding: 0.4rem 0.55rem;
  }
  .specimen {
    display: block;
    padding: 0.65rem;
  }
  .sample-role {
    display: block;
    margin-top: 0.4rem;
  }
  .tabs button {
    padding: 0.42rem 0.48rem;
    flex: 1;
    font-size: 0.76rem;
  }
  .panel-head,
  .list-row {
    padding: 0.6rem;
    gap: 0.5rem;
  }
  .list-row {
    flex-wrap: wrap;
  }
  .list-row > div:first-child {
    flex-basis: 55%;
  }
  .list-row .readout {
    margin-left: auto;
  }
  .list-row .row-actions {
    flex-basis: 100%;
  }
  .panel-head p {
    max-width: 70%;
  }
  .takeaway {
    padding: 0.85rem;
  }
  .change {
    font-size: 0.72rem;
  }
}

.specimen-note {
  padding: 0.35rem 0.75rem;
  border-top: 1px solid var(--rule);
  font: 0.72rem/1.6 var(--mono);
  color: var(--muted);
  min-height: 1.75rem;
}
body .aw-holds,
body .aw-holds .aw-holds-k,
body .aw-holds .aw-holds-note {
  opacity: 1;
}

.skip:focus {
  position: fixed;
  top: 0.42rem;
  left: 0.42rem;
  z-index: 10001;
  transform: none;
}
