@import url("fonts.css");
:root {
  color-scheme: light;
  --ink: #311e2b;
  --muted: #705864;
  --paper: #fff;
  --pale: #fff7fa;
  --blush: #fbecf2;
  --line: #eedbe3;
  --rose: #a33263;
  --dark: #792448;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font: 16px/1.48 var(--sans);
  background: #fffafb;
  color: var(--ink);
}
a {
  color: var(--dark);
  text-underline-offset: 0.18em;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
select,
input,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #b9497c;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
header {
  border-bottom: 1px solid var(--line);
  background: white;
}
.bar,
main,
footer {
  width: min(1176px, calc(100% - 72px));
  margin: auto;
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 20px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 29px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.1;
}
.mark {
  display: grid;
  place-items: center;
  background: var(--blush);
  color: var(--rose);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font: 30px/1 Georgia;
}
nav {
  display: flex;
  align-self: stretch;
  align-items: stretch;
  gap: 25px;
}
nav a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  padding-top: 2px;
}
nav a[aria-current] {
  color: var(--dark);
  border-color: var(--rose);
}
main {
  padding: 30px 0 35px;
  min-height: 78vh;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 31%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #f8e3ed;
  border: 1px solid #ecd1dd;
  border-radius: 20px;
  min-height: 175px;
}
.intro {
  padding: 25px 34px;
  align-self: center;
}
.eyebrow,
.label {
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--dark);
  font-size: 0.76rem;
}
.hero h1,
.view-title {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-size: clamp(3rem, 6vw, 5.15rem);
  margin: 6px 0;
}
.hero p {
  color: #68535d;
}
.micro {
  margin: 0;
  position: relative;
  background: #6a2b4f;
  overflow: hidden;
  min-height: 100%;
}
.micro img {
  width: 100%;
  height: 100%;
  position: absolute;
  object-fit: cover;
  filter: grayscale(1);
  mix-blend-mode: screen;
  opacity: 0.88;
  transform: scale(1.045);
}
.micro figcaption {
  position: absolute;
  bottom: 12px;
  right: 12px;
  color: white;
  background: #442337bd;
  border-radius: 20px;
  font-size: 0.75rem;
  padding: 3px 10px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: 22px;
  align-items: start;
  margin-top: 23px;
}
.card,
.panel,
.deck,
.bank-row {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.card {
  padding: 27px 30px 24px;
}
.panel {
  padding: 21px 22px;
}
.panel + .panel {
  margin-top: 14px;
}
.panel h2,
.subheading {
  font: 400 1.86rem/1.1 var(--serif);
  margin-bottom: 14px;
}
.qtop,
.row,
.actions,
.statline,
.source,
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.qtop,
.statline,
.section-head {
  justify-content: space-between;
}
.qtop {
  font-size: 0.87rem;
  color: var(--muted);
}
.pill {
  font-size: 0.8rem;
  background: var(--blush);
  color: var(--dark);
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 600;
}
.qtitle {
  font: 400 clamp(1.65rem, 3vw, 2.3rem) / 1.17 var(--serif);
  letter-spacing: -0.012em;
  margin: 21px 0;
}
.question-figure {
  margin: 0 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: white;
}
.question-figure img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 32rem;
  margin: 0.65rem auto;
}
.question-figure figcaption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  padding: 0.5rem 0.8rem;
  border-top: 1px solid var(--line);
  background: var(--pale);
  color: var(--muted);
  font-size: 0.87rem;
}
.choices {
  display: grid;
  gap: 9px;
}
.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  min-height: 49px;
  border: 1px solid #e9dbe2;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  cursor: pointer;
}
.option:hover {
  border-color: #c988a6;
}
.option input {
  position: absolute;
  opacity: 0;
}
.option:has(input:focus-visible) {
  outline: 3px solid #b9497c;
}
.option.chosen,
.option:has(input:checked) {
  background: #fff4f8;
  border-color: var(--rose);
}
.option.right {
  background: #eff7f0;
  border-color: #81a88a;
}
.option.wrong {
  border-color: #ba6880;
  background: #fff1f3;
}
.option:has(input:disabled) {
  cursor: default;
}
.letter {
  display: inline-grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border: 1px solid #e0c9d5;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--muted);
}
.chosen .letter,
.option:has(input:checked) .letter {
  color: white;
  background: var(--rose);
  border-color: var(--rose);
}
.actions {
  margin-top: 20px;
}
.btn,
.quiet,
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  min-height: 42px;
  border-radius: 9px;
  padding: 8px 16px;
  font-size: 0.94rem;
  font-weight: 600;
}
.btn {
  background: var(--rose);
  border: 1px solid var(--rose);
  color: white;
}
.btn:hover {
  background: var(--dark);
}
.quiet,
.btn-link {
  background: white;
  color: var(--dark);
  border: 1px solid #ddc4d0;
}
.text-button {
  border: 0;
  padding: 2px;
  background: transparent;
  color: var(--dark);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  font-size: 0.9rem;
}
.small,
.hint,
.meta {
  color: var(--muted);
  font-size: 0.89rem;
}
.hint {
  margin: 9px 0;
}
.qtail {
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.qtail .text-button {
  color: var(--muted);
}
.panel label,
.filter label {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  margin-top: 12px;
}
.panel select,
.filter select,
.search,
.code,
.written {
  display: block;
  width: 100%;
  margin-top: 5px;
  border: 1px solid #d9c2ce;
  border-radius: 8px;
  color: var(--ink);
  background: white;
  padding: 9px 11px;
}
.written {
  min-height: 115px;
  resize: vertical;
}
.statline strong {
  font-size: 1.5rem;
  line-height: 1;
}
.track {
  height: 7px;
  background: #f4e9ef;
  border-radius: 12px;
  overflow: hidden;
  margin: 12px 0;
}
.track i {
  display: block;
  height: 100%;
  background: #bd5881;
}
.panel .text-button {
  margin-top: 10px;
}
.feedback {
  padding: 17px 18px;
  border-radius: 11px;
  background: var(--pale);
  border: 1px solid var(--line);
  margin-top: 17px;
}
.feedback h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.feedback p + p {
  margin-top: 7px;
}
.source {
  margin-top: 12px;
  font-size: 0.9rem;
}
.source a {
  font-weight: 600;
}
.view-title {
  font-size: 3.5rem;
  margin: 7px 0 10px;
}
.viewhead {
  margin: 9px 0 20px;
}
.filter {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 13px;
  margin-bottom: 17px;
}
.filter input {
  min-height: 43px;
}
.bank-row {
  padding: 16px 18px;
  margin: 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.bank-row .meta {
  margin-bottom: 4px;
}
.bank-row .row {
  flex-shrink: 0;
}
.deckgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.deck {
  padding: 20px;
}
.deck h2 {
  font: 400 1.85rem/1.12 var(--serif);
  margin: 7px 0;
}
.deck .row {
  margin-top: 14px;
}
.deck .meta {
  min-height: 1.3em;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.metric {
  background: #faeaf1;
  border: 1px solid #efd3df;
  border-radius: 12px;
  padding: 16px;
}
.metric strong {
  display: block;
  font: 400 2.8rem/1 var(--serif);
}
.metric span {
  font-size: 0.9rem;
}
.history {
  list-style: none;
  padding: 0;
  margin: 0;
}
.history li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.history strong {
  display: block;
}
.twocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.twocol .panel {
  margin: 0;
}
.empty {
  padding: 35px 22px;
}
.empty h2 {
  font: 400 2.2rem var(--serif);
  margin-bottom: 6px;
}
footer {
  padding: 17px 0 27px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
}
dialog {
  width: min(440px, calc(100% - 28px));
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 16px 70px #3d162d33;
}
dialog::backdrop {
  background: #31162655;
}
dialog h2 {
  font: 400 2.2rem var(--serif);
  margin: 2px 0 8px;
}
.close {
  float: right;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 1.6rem;
}
.code {
  font-size: 1rem;
}
.skip {
  position: absolute;
  left: -400px;
}
.skip:focus {
  left: 5px;
  top: 5px;
  background: white;
  z-index: 10;
}
#notice:not(:empty) {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #3f2434;
  color: white;
  padding: 10px 16px;
  border-radius: 9px;
  z-index: 5;
  max-width: 94%;
  font-size: 0.91rem;
}
.error {
  color: #9d294a;
}
.syncstate {
  font-weight: 600;
}
.sep {
  margin-inline: 4px;
}
@media (max-width: 850px) {
  .bar,
  main,
  footer {
    width: calc(100% - 36px);
  }
  .layout {
    grid-template-columns: minmax(0, 1fr) 235px;
    gap: 14px;
  }
  .card {
    padding: 21px;
  }
  .bar {
    gap: 13px;
  }
  nav {
    gap: 15px;
  }
  .wordmark {
    font-size: 24px;
  }
  .intro {
    padding: 24px;
  }
}
@media (max-width: 670px) {
  .bar {
    display: block;
    padding-top: 12px;
  }
  .wordmark {
    font-size: 25px;
  }
  .bar nav {
    margin-top: 6px;
    gap: 0;
    justify-content: space-between;
  }
  .bar nav a {
    min-height: 40px;
    font-size: 0.87rem;
  }
  .bar,
  main,
  footer {
    width: calc(100% - 26px);
  }
  main {
    padding-top: 14px;
  }
  .hero {
    min-height: 124px;
    grid-template-columns: 1fr 27%;
    border-radius: 13px;
  }
  .intro {
    padding: 15px;
  }
  .hero h1 {
    font-size: 2.75rem;
  }
  .hero .eyebrow {
    font-size: 0.69rem;
  }
  .hero p {
    font-size: 0.83rem;
  }
  .micro figcaption {
    display: none;
  }
  .layout {
    grid-template-columns: 1fr;
    margin-top: 13px;
  }
  .card,
  .panel {
    padding: 17px;
  }
  .qtitle {
    margin: 15px 0;
    font-size: 1.8rem;
  }
  .qtop {
    font-size: 0.78rem;
  }
  .option {
    padding: 10px;
    gap: 9px;
  }
  .deckgrid,
  .twocol {
    grid-template-columns: 1fr;
  }
  .filter {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .filter label:first-child {
    grid-column: 1/-1;
  }
  .bank-row {
    display: block;
  }
  .bank-row .row {
    margin-top: 10px;
  }
  .metrics {
    gap: 6px;
  }
  .metric {
    padding: 11px;
  }
  .metric span {
    font-size: 0.76rem;
  }
  .metric strong {
    font-size: 2.2rem;
  }
  .view-title {
    font-size: 2.8rem;
  }
  .qtail {
    align-items: flex-start;
  }
  .hero p {
    max-width: 240px;
  }
  .source {
    gap: 7px;
  }
  footer {
    align-items: flex-start;
  }
}
