@font-face {
  font-family: "Raleway Local";
  src: url("raleway-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Local";
  src: url("cormorant-garamond-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --black: #050505;
  --ivory: #f0ede6;
  --muted: #85827f;
  --line: #2a2a2a;
  --acid: #e7df19;
  --danger: #d56b62;
  --success: #b8c989;
  --font-ui: "Raleway Local", "Helvetica Neue", Arial, sans-serif;
  --font-editorial: "Cormorant Local", Georgia, serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; height: 100%; background: var(--black); }
body {
  min-width: 320px;
  height: 100dvh;
  margin: 0;
  display: grid;
  grid-template-rows: clamp(96px, 15vh, 132px) minmax(0, 1fr);
  overflow: hidden;
  background: var(--black);
  color: var(--ivory);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.site-header {
  min-height: 0;
  padding: 20px clamp(30px, 3.6vw, 58px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 38px;
  text-decoration: none;
}
.brand-mark {
  font-size: clamp(4.2rem, 6vw, 5.8rem);
  font-weight: 300;
  letter-spacing: -.08em;
  line-height: .76;
}
.brand-name {
  color: #a3a09c;
  font-size: .96rem;
  letter-spacing: .08em;
  line-height: 1.55;
}
.header-actions { display: flex; align-items: center; gap: clamp(28px, 5vw, 72px); }
.header-actions form { margin: 0; }
.header-link {
  min-height: 44px;
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: .92rem;
  letter-spacing: .11em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}
.header-link:hover, .header-link:focus-visible { color: var(--ivory); border-bottom-color: var(--acid); outline: 0; }

main {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(360px, 42%) minmax(0, 58%);
}

.tool-dashboard {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tool-card {
  min-width: 0;
  padding: clamp(36px, 6vw, 92px);
  display: grid;
  grid-template-columns: clamp(74px, 9vw, 150px) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  border-right: 1px solid var(--line);
  color: var(--ivory);
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease;
}
.tool-card:last-child { border-right: 0; }
.tool-card:hover, .tool-card:focus-visible { background: var(--acid); color: var(--black); outline: 0; }
.tool-letter {
  font-family: var(--font-editorial);
  font-size: clamp(6rem, 11vw, 11rem);
  font-weight: 300;
  letter-spacing: -.07em;
  line-height: .7;
}
.tool-copy { min-width: 0; display: grid; gap: 12px; }
.tool-copy strong {
  font-size: clamp(1.55rem, 2.5vw, 3rem);
  font-weight: 300;
  letter-spacing: .02em;
  line-height: 1;
  text-transform: uppercase;
}
.tool-copy small { color: var(--muted); font-size: .8rem; line-height: 1.5; }
.tool-card:hover .tool-copy small, .tool-card:focus-visible .tool-copy small { color: #4b490d; }
.tool-arrow { font-size: clamp(1.8rem, 3vw, 3.2rem); font-weight: 200; }

.private-note {
  min-height: 0;
  padding: clamp(34px, 5vh, 60px) clamp(30px, 5vw, 78px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line);
}
.eyebrow, .quiz-meta {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}
h1, h2 { margin-top: 0; font-weight: 300; }
h1 {
  max-width: 1180px;
  margin-bottom: 0;
  font-size: clamp(3.8rem, 5.6vw, 5.6rem);
  letter-spacing: -.055em;
  line-height: .9;
}
.private-question {
  max-width: 650px;
  margin: clamp(22px, 4vh, 34px) 0 0;
  color: var(--muted);
  font-size: clamp(.96rem, 1.3vw, 1.12rem);
  font-weight: 300;
}

.quiz {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(120px, 22%) minmax(0, 1fr);
}
.quiz-index {
  min-height: 0;
  padding: clamp(38px, 6vh, 62px) clamp(24px, 3vw, 46px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  border-right: 1px solid var(--line);
  color: var(--acid);
  font-family: var(--font-editorial);
  font-size: clamp(7rem, 12vw, 11rem);
  font-weight: 300;
  letter-spacing: -.08em;
  line-height: .68;
}
.quiz-content {
  min-width: 0;
  min-height: 0;
  padding: clamp(34px, 5vh, 54px) clamp(30px, 4vw, 68px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.quiz-content h2 {
  max-width: 980px;
  margin-bottom: clamp(22px, 3.5vh, 34px);
  font-size: clamp(2.3rem, 3.5vw, 3.6rem);
  letter-spacing: -.035em;
  line-height: 1.02;
}
.answer-list { border-top: 1px solid var(--line); }
.answer {
  width: 100%;
  min-height: clamp(56px, 8vh, 70px);
  padding: 13px 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ivory);
  text-align: left;
  cursor: pointer;
}
.answer span { color: var(--muted); font-size: .76rem; letter-spacing: .16em; }
.answer strong { font-size: clamp(1rem, 1.5vw, 1.2rem); font-weight: 400; }
.answer:hover, .answer:focus-visible { background: var(--acid); color: var(--black); outline: 0; }
.answer:hover span, .answer:focus-visible span { color: #4b490d; }

.quiz-result {
  max-width: 820px;
  padding: clamp(20px, 3vh, 30px) 0 0;
  border-top: 1px solid var(--line);
  color: #c8c4bd;
  font-size: 1.04rem;
}
.quiz-result p { max-width: 720px; margin: 0 0 12px; }
.quiz-result .result-label {
  color: var(--success);
  font-family: var(--font-editorial);
  font-size: clamp(2.7rem, 4vw, 4rem);
  line-height: 1;
}
.quiz-result.is-wrong .result-label { color: var(--danger); }
.quiz-result .correct-answer { color: var(--ivory); }

.site-footer {
  min-height: 0;
  padding: 10px clamp(30px, 3.6vw, 58px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: #575553;
  font-size: .68rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.site-footer p { margin: 0; }

.login-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid #464646;
  background: #090909;
  color: var(--ivory);
}
.login-dialog::backdrop { background: rgba(0, 0, 0, .78); }
.login-form { padding: clamp(28px, 5vw, 54px); }
.dialog-heading {
  margin-bottom: 36px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.dialog-heading h2 { margin: 0; font-size: clamp(2.7rem, 5vw, 4rem); line-height: 1; }
.dialog-close {
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.login-form label {
  margin-top: 22px;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: .73rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.login-form input {
  min-height: 56px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid #464646;
  border-radius: 0;
  background: transparent;
  color: var(--ivory);
  font-size: 1rem;
  letter-spacing: normal;
  outline: 0;
}
.login-form input:focus { border-bottom-color: var(--acid); }
.login-submit {
  width: 100%;
  min-height: 58px;
  margin-top: 34px;
  border: 1px solid var(--acid);
  background: var(--acid);
  color: var(--black);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.login-submit:hover, .login-submit:focus-visible { background: var(--ivory); border-color: var(--ivory); outline: 0; }
.form-error { margin: 18px 0 0; color: var(--danger); }
.twofactor-copy {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.65;
}
.totp-setup {
  margin: 4px 0 26px;
  padding: 22px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  border: 1px solid var(--line);
}
.totp-qr {
  width: 220px;
  min-height: 220px;
  display: grid;
  place-items: center;
  background: #fff;
}
.totp-qr canvas { display: block; width: 220px; height: 220px; }
.totp-manual { min-width: 0; display: grid; gap: 10px; }
.totp-manual span {
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.totp-manual code {
  color: var(--ivory);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.totp-manual a {
  width: max-content;
  padding: 6px 0;
  border-bottom: 1px solid var(--acid);
  color: var(--ivory);
  font-size: .76rem;
  text-decoration: none;
}
.twofactor-form { width: min(720px, 100%); }
.twofactor-form .login-submit { margin-top: 26px; }
.dialog-back {
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.dialog-back:hover, .dialog-back:focus-visible { color: var(--ivory); outline: 0; }

@media (max-width: 760px) {
  body { grid-template-rows: 88px minmax(0, 1fr); }
  .site-header { min-height: 0; padding: 15px 20px; gap: 20px; }
  .brand { gap: 0; }
  .brand-mark { font-size: 3.6rem; }
  .brand-name { display: none; }
  .header-actions { gap: 14px; }
  .header-link { font-size: .68rem; }
  main { display: grid; grid-template-columns: 1fr; grid-template-rows: minmax(220px, 40%) minmax(0, 60%); }
  .private-note { padding: 24px 22px; border-right: 0; border-bottom: 1px solid var(--line); }
  h1 { font-size: clamp(2.75rem, 12vw, 4.3rem); line-height: .92; }
  .private-question { margin-top: 18px; font-size: .86rem; line-height: 1.45; }
  .quiz { min-height: 0; display: block; overflow: hidden; }
  .quiz-index { display: none; }
  .quiz-content { height: 100%; padding: 20px 22px 22px; }
  .quiz-meta { margin-bottom: 10px; font-size: .62rem; }
  .quiz-content h2 { margin-bottom: 14px; font-size: clamp(1.75rem, 8vw, 2.6rem); line-height: .98; }
  .answer { min-height: 52px; grid-template-columns: 32px minmax(0, 1fr); gap: 8px; }
  .answer strong { font-size: .9rem; }
  .quiz-result { padding-top: 16px; font-size: .9rem; }
  .quiz-result .result-label { font-size: 2.4rem; }
  .site-footer { padding: 8px 22px; justify-content: flex-start; font-size: .58rem; }
  .tool-dashboard { grid-template-columns: 1fr; grid-template-rows: repeat(3, minmax(0, 1fr)); overflow: auto; }
  .tool-card {
    padding: 26px 22px;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    gap: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .tool-card:last-child { border-bottom: 0; }
  .tool-letter { font-size: 5.2rem; }
  .tool-copy strong { font-size: clamp(1.3rem, 6vw, 2rem); }
  .tool-copy small { font-size: .7rem; }
  .totp-setup { grid-template-columns: 1fr; justify-items: center; padding: 18px; }
  .totp-manual { width: 100%; text-align: center; }
  .totp-manual a { margin-inline: auto; }
}

@media (max-height: 680px) and (min-width: 761px) {
  body { grid-template-rows: 88px minmax(0, 1fr); }
  .brand-mark { font-size: 3.8rem; }
  .private-note { padding-block: 28px; }
  .private-question { margin-top: 18px; }
  .quiz-content { padding-block: 26px; }
  .quiz-meta { margin-bottom: 10px; }
  .quiz-content h2 { margin-bottom: 16px; font-size: 2.25rem; }
  .answer { min-height: 50px; }
}
