@font-face {
  font-family: Poppins;
  src: url("assets/poppins-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url("assets/poppins-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url("assets/poppins-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url("assets/poppins-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #23221f;
  --charcoal: #181817;
  --gold: #cca876;
  --cream: #f6f3ed;
  --paper: #fffefa;
  --muted: #625b51;
  --line: #ded7cb;
  --red: #c8645e;
  --yellow: #e3b85b;
  --green: #789775;
  --blue: #6586aa;
  font-family: Poppins, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 15px; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.04em; }
:focus-visible { outline: 2px solid #8d622c; outline-offset: 4px; }
.header :focus-visible, .hero :focus-visible { outline-color: var(--gold); }
.shell { width: min(1120px, calc(100% - 88px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 2; top: 10px; left: 10px; padding: 10px 15px; background: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.header, .hero { color: #f8f5ee; background: var(--charcoal); }
.header { border-bottom: 1px solid #35312b; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 73px; gap: 14px; }
.brand { display: inline-flex; margin-left: -13px; padding: 4px 0; }
.brand img { width: 184px; }
.header-link { font-size: 12px; font-weight: 500; color: #f4eee3; display: inline-flex; align-items: center; gap: 12px; }
.header-link span { color: var(--gold); font-size: 16px; }
.header-link:hover { color: var(--gold); }

.hero { background: radial-gradient(ellipse at 77% 51%, #2d251b 0%, var(--charcoal) 60%); }
.hero-inner { min-height: 482px; display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(0, .84fr); align-items: center; gap: clamp(30px, 7vw, 100px); padding-block: 56px 60px; }
.eyebrow { font-size: 11px; font-weight: 700; line-height: 1.45; letter-spacing: .14em; display: flex; align-items: center; gap: 9px; color: #71552e; }
.eyebrow > span { display: inline-block; width: 19px; height: 1px; background: currentColor; flex: none; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { font-weight: 700; font-size: clamp(45px, 6.2vw, 83px); margin-block: 18px 20px; letter-spacing: -.073em; line-height: 1.015; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-lead { color: #ddd5c8; font-size: clamp(14px, 1.25vw, 16px); line-height: 1.75; max-width: 515px; }
.button { border-radius: 8px; min-height: 48px; padding: 11px 17px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; border: 1px solid transparent; cursor: pointer; font-size: 13px; font-weight: 600; line-height: 1.35; transition: background-color .15s, border-color .15s; }
.button span { font-size: 18px; line-height: 1; flex: none; }
.button-gold { background: var(--gold); color: #201b14; margin-top: 24px; padding-inline: 18px; }
.button-gold:hover { background: #e5c698; }
.button-dark { background: #22211e; color: #fffaf1; }
.button-dark:hover { background: #443522; }
.button-quiet { background: transparent; border-color: #d2c9bb; }
.button-quiet:hover { background: #f1ebe1; border-color: #a98a61; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; color: #d0c5b5; font-size: 11px; margin-top: 19px; gap: 5px 12px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 12px; }
.hero-meta span + span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }

.hero-figure { width: min(100%, 374px); justify-self: end; }
.figure-frame { background: #201e1a; border: 1px solid #594c39; border-radius: 16px; padding: 16px; }
.figure-caption { display: flex; justify-content: space-between; color: #d8c9b6; font-size: 9px; font-weight: 600; letter-spacing: .12em; margin: 1px 2px 12px; gap: 8px; }
.figure-caption span:first-child { display: flex; align-items: center; gap: 7px; }
.figure-caption i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.disg-mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; position: relative; }
.tile { position: relative; overflow: hidden; isolation: isolate; height: clamp(95px, 11vw, 132px); display: grid; place-items: center; color: #201e18; }
.tile::before, .tile::after { position: absolute; z-index: -1; content: ""; border: 1px solid #27201930; border-radius: 50%; width: 118%; aspect-ratio: 1; }
.tile::before { top: 28%; left: 32%; }
.tile::after { top: 37%; left: 41%; }
.tile strong { font-size: clamp(48px, 6.7vw, 87px); font-weight: 700; letter-spacing: -.08em; line-height: .9; transform: translateX(-.035em); }
.tile small { position: absolute; top: 9px; left: 10px; font-size: 9px; font-weight: 600; }
.tile-d { background: var(--red); border-radius: 9px 1px 1px 1px; }
.tile-i { background: var(--yellow); border-radius: 1px 9px 1px 1px; }
.tile-s { background: var(--green); border-radius: 1px 1px 1px 9px; }
.tile-g { background: var(--blue); border-radius: 1px 1px 9px 1px; }
.tile-cross { position: absolute; color: var(--gold); background: #211c15; border: 1px solid #f6dfaf; border-radius: 50%; display: grid; place-items: center; width: 33px; height: 33px; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 16px; line-height: 1; }
.figure-key { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; margin: 13px 2px 0; padding: 0; color: #eee5d8; font-size: 10px; }
.figure-key li { display: flex; gap: 6px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--type); display: inline-block; flex: none; }
.type-D { --type: var(--red); }
.type-I { --type: var(--yellow); }
.type-S { --type: var(--green); }
.type-G { --type: var(--blue); }

.test-area { background: var(--cream); padding-block: 56px 66px; }
.test-layout { display: grid; grid-template-columns: minmax(0, .77fr) minmax(0, 1.58fr); align-items: start; gap: clamp(26px, 5.5vw, 78px); }
.guide { padding: 8px 0 0; scroll-margin-top: 24px; }
.guide h2, .info h2 { font-size: clamp(28px, 3.45vw, 43px); margin-block: 12px 14px; }
.guide p:not(.eyebrow) { color: var(--muted); font-size: 14px; }
.guide-scale { list-style: none; padding: 0; margin: 17px 0; display: grid; gap: 7px; font-size: 13px; }
.guide-scale li { display: flex; align-items: center; gap: 10px; }
.guide-scale strong { display: grid; place-items: center; background: #ede4d3; border: 1px solid #e1d2b8; border-radius: 5px; width: 26px; height: 26px; color: #59401e; font-size: 12px; }
.guide .guide-note { padding-top: 13px; border-top: 1px solid var(--line); font-size: 12px !important; }

.quiz-card { padding: clamp(20px, 3.1vw, 34px); background: var(--paper); border: 1px solid #e5ded2; box-shadow: 0 12px 35px #3326160b; border-radius: 16px; scroll-margin-top: 20px; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.quiz-step { color: #6f522d; font-size: 11px; font-weight: 700; letter-spacing: .12em; white-space: nowrap; }
progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 6px; border: 0; border-radius: 20px; background: #eae4d9; color: var(--bar, #a7793a); overflow: hidden; }
progress::-webkit-progress-bar { background: #eae4d9; border-radius: 20px; }
progress::-webkit-progress-value { background: var(--bar, #a7793a); border-radius: 20px; }
progress::-moz-progress-bar { background: var(--bar, #a7793a); border-radius: 20px; }
.quiz-top progress { width: min(42%, 180px); }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
legend { padding: 0; font-weight: 700; font-size: clamp(21px, 2.6vw, 31px); letter-spacing: -.05em; line-height: 1.2; }
legend:focus, #result-title:focus { outline: none; }
.quiz-help { font-size: 13px; color: var(--muted); margin-top: 8px; }
.score-table { margin-top: 16px; border-top: 1px solid #e9e3d8; }
.score-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; padding: 7px 0; border-bottom: 1px solid #e9e3d8; }
.term { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.point-options { display: flex; gap: 6px; }
.point { position: relative; display: grid; cursor: pointer; }
.point input { position: absolute; width: 100%; height: 100%; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.point span { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid #dcd2c3; border-radius: 7px; color: #5a4730; background: #fbf8f1; font-size: 14px; font-weight: 600; }
.point:hover span { border-color: #a5814f; }
.point input:checked + span { background: var(--gold); border-color: #8c6838; color: #1f1a14; box-shadow: inset 0 0 0 1px #8c6838; }
.point input:focus-visible + span { outline: 2px solid #8d622c; outline-offset: 3px; }
.status { margin-top: 11px; min-height: 21px; font-size: 12px; color: var(--muted); }
.status.is-error { color: #8e3026; font-weight: 600; }
.quiz-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 15px; }
.quiz-actions .button-dark { margin-left: auto; }

.result-shell { scroll-margin-top: 22px; }
.result-heading { margin-bottom: 27px; }
.result-heading h2 { font-size: clamp(39px, 6vw, 70px); margin-block: 8px 6px; }
.result-heading > p:last-child { color: var(--muted); }
.result-layout { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.75fr); align-items: start; gap: clamp(20px, 4vw, 52px); }
.score-card, .profile-card, .tie-note { background: var(--paper); border: 1px solid #e5ded2; border-radius: 16px; }
.score-card { padding: clamp(17px, 2.5vw, 26px); }
.score-card h3 { margin-block: 9px 23px; font-size: 24px; }
.result-score { margin-top: 15px; --bar: var(--type); }
.result-score-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; gap: 8px; margin-bottom: 6px; }
.result-score-label > span { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 600; }
.result-score-label strong { white-space: nowrap; }
.result-score-label small { color: var(--muted); font-weight: 400; font-size: 10px; }
.result-score progress { height: 8px; }
.score-note { border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: 11px; margin-top: 21px; }
.profile-card { overflow: hidden; }
.profile-hero { background: #24211b; color: #fcf6ed; padding: clamp(22px, 4vw, 42px); border-bottom: 3px solid var(--gold); }
.pairing { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: #eee4d4; font-size: 12px; }
.pair-divider { margin-inline: 4px; color: var(--gold); }
.profile-hero h3 { font-size: clamp(32px, 5.4vw, 62px); margin-block: 8px 7px; overflow-wrap: anywhere; }
.tagline { color: #e8dac5; font-size: clamp(14px, 1.9vw, 17px); }
.trait-list { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; padding: 0; margin: 17px 0 0; }
.trait-list li { border: 1px solid #695840; color: #f2e7d4; padding: 4px 9px; border-radius: 5px; font-size: 11px; }
.profile-copy { padding: clamp(20px, 4vw, 42px); }
.profile-intro { font-size: 16px; font-weight: 500; }
.profile-section { margin-top: 21px; padding-top: 18px; border-top: 1px solid #e9e3d8; }
.profile-section h4, .reflection h4 { font-size: 19px; margin-bottom: 7px; }
.profile-section p, .profile-section ul { color: #4d483e; font-size: 14px; }
.profile-section ul { padding-left: 20px; margin: 8px 0 0; }
.reflection { background: #f2e9da; border-left: 3px solid var(--gold); border-radius: 0 9px 9px 0; padding: 16px; margin-top: 22px; }
.reflection p { font-size: 14px; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 9px; margin-top: 19px; }
.tie-note { padding: clamp(16px, 2.7vw, 24px); margin-bottom: 14px; }
.tie-note p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.profile-switch { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.profile-choice { display: inline-flex; align-items: center; gap: 4px; min-height: 37px; padding: 6px 9px; font-size: 12px; border: 1px solid #dcd2c3; background: #fbf8f1; border-radius: 7px; cursor: pointer; }
.profile-choice .dot:nth-child(2) { margin-right: 4px; }
.profile-choice:hover { border-color: #a5814f; }
.profile-choice[aria-pressed="true"] { border-color: #8c6838; background: #ebd9ba; }

.info { background: #ede7dc; padding-block: 49px 54px; border-top: 1px solid #e2d9ca; }
.info-inner { display: grid; grid-template-columns: minmax(0, .77fr) minmax(0, 1.58fr); align-items: start; gap: clamp(15px, 5.5vw, 78px); }
.info h2 { font-size: clamp(25px, 3.15vw, 36px); }
.info details { border-bottom: 1px solid #d6cdbf; }
.info details:first-child { border-top: 1px solid #d6cdbf; }
.info summary { font-size: 14px; font-weight: 600; cursor: pointer; padding: 12px 26px 12px 0; list-style: none; position: relative; }
.info summary::-webkit-details-marker { display: none; }
.info summary::after { content: "+"; position: absolute; top: 10px; right: 3px; color: #785729; font-size: 18px; }
.info details[open] summary::after { content: "−"; }
.info details p { color: var(--muted); font-size: 13px; padding: 0 0 13px; }
.footer { background: var(--charcoal); color: #e2d8c9; font-size: 11px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; min-height: 72px; gap: 10px 20px; padding-block: 18px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 850px) {
  .shell { width: min(100% - 52px, 1120px); }
  .hero-inner { gap: 26px; }
  .hero h1 { font-size: clamp(42px, 7vw, 64px); }
  .test-layout, .info-inner { gap: 25px; }
  .guide h2 { font-size: 28px; }
  .point span { width: 38px; height: 42px; }
}

@media (max-width: 680px) {
  .shell { width: calc(100% - 34px); }
  .header-inner { min-height: 62px; }
  .brand { margin-left: -9px; }
  .brand img { width: 144px; }
  .header-link { gap: 6px; font-size: 10px; }
  .hero-inner { grid-template-columns: 1fr; min-height: auto; gap: 26px; padding-block: 37px 32px; }
  .hero h1 { font-size: clamp(40px, 10.1vw, 64px); margin-block: 13px 14px; }
  .hero-lead { max-width: 460px; }
  .button-gold { margin-top: 19px; }
  .hero-meta { margin-top: 13px; gap: 5px 8px; }
  .hero-meta span { gap: 8px; }
  .hero-figure { justify-self: start; width: min(100%, 320px); }
  .figure-frame { padding: 12px; }
  .tile { height: clamp(66px, 17vw, 94px); }
  .tile strong { font-size: 45px; }
  .figure-caption { margin-bottom: 8px; }
  .figure-key { margin-top: 9px; }
  .test-area { padding-block: 31px 40px; }
  .test-layout, .result-layout, .info-inner { grid-template-columns: 1fr; gap: 18px; }
  .guide { padding-top: 0; }
  .guide h2 br { display: none; }
  .guide-scale { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px; margin-block: 11px; font-size: 11px; }
  .guide-scale li { gap: 5px; }
  .guide-scale strong { width: 22px; height: 22px; flex: none; }
  .quiz-card { padding: 17px; }
  .quiz-top { margin-bottom: 14px; }
  .term { font-size: 12px; }
  .point-options { gap: 4px; }
  .point span { width: 37px; height: 43px; }
  .score-row { gap: 7px; }
  .info { padding-block: 32px 37px; }
  .info h2 { margin-bottom: 0; }
}

@media (max-width: 360px) {
  .shell { width: calc(100% - 24px); }
  .quiz-card { padding-inline: 13px; }
  .point span { width: 32px; }
  .hero h1 { font-size: clamp(32px, 10.5vw, 40px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
