:root{--paper:#f5f3ed;--white:#fffefb;--ink:#253d37;--muted:#66736c;--line:#d9dfd6;--accent:#385e4f;--soft:#e4ebe2;--red:#a34e43;--shadow:0 16px 40px #243d3710;font-family:Inter,Segoe UI,Arial,sans-serif;color:var(--ink);background:var(--paper);font-size:16px}
:root:not([data-page="tipi"]):not([data-page="study-information"]):not([data-page="research-context"]) {
  color-scheme: dark;
  --paper: #222;
  --white: #2e2e2e;
  --ink: #fff;
  --muted: #fff;
  --line: #626262;
  --accent: #3f6757;
  --soft: #444;
  --shadow: 0 16px 40px #0004;
}
:root[data-page="tipi"], :root[data-page="study-information"], :root[data-page="research-context"] { color-scheme: light; }
:root[data-page="study-information"], :root[data-page="research-context"] {
  --paper: #fff;
  --ink: #202020;
  --muted: #545454;
  --line: #b6b6b6;
}
*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button,a,input,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}a{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #b7864a;outline-offset:4px}button{touch-action:manipulation}[hidden]{display:none!important}
#demo-banner{padding:10px 24px;text-align:center;background:#e9dec6;color:#574522;font-size:11px;font-weight:750;letter-spacing:1.2px}#demo-banner span{font-size:12px;font-weight:400;letter-spacing:0;margin-left:14px}.site-header{max-width:1280px;margin:auto;padding:27px 40px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}.wordmark{text-decoration:none;font-size:17px;font-weight:650;letter-spacing:-.5px;display:flex;align-items:center;gap:10px}.brand-icon{font-size:28px;color:#6b8061}#header-status{font-size:12px;color:var(--muted)}main{max-width:1190px;margin:auto;padding:50px 36px 28px;min-height:72vh;outline:none}.eyebrow{font-size:11px;letter-spacing:2px;text-transform:uppercase;color:var(--muted);font-weight:650;margin:0 0 16px}h1{font-family:Georgia,Times New Roman,serif;font-weight:400;font-size:clamp(32px,4.2vw,52px);line-height:1.12;letter-spacing:-1.6px;margin:0 0 17px}h2{font-family:Georgia,Times New Roman,serif;font-weight:400;font-size:28px;margin:0 0 20px}.subtitle{color:var(--muted);line-height:1.7;max-width:640px;font-size:15px;margin:0}.round-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:30px}.round-heading>div:first-child{flex:1}.round-meta{font-size:12px;color:var(--muted);white-space:nowrap;align-self:flex-start;padding-top:5px}.selection-progress{display:flex;align-items:center;gap:16px;margin-top:23px;font-size:12px;color:var(--muted)}.circles{display:flex;gap:8px}.circle{width:22px;height:22px;border:1.5px solid #b8c3b5;border-radius:50%;display:grid;place-items:center;color:transparent;background:transparent;transition:background .15s}.circle.filled{background:var(--accent);border-color:var(--accent);color:white;font-size:12px}.card-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px}.card-tile{position:relative;min-width:0}.card-button{width:100%;padding:0;border:1px solid #d9ded5;border-radius:12px;overflow:hidden;aspect-ratio:4/5;background:#e8e9e1;display:block;box-shadow:0 3px 10px #1f322a07;position:relative;transition:transform .16s,border-color .16s,box-shadow .16s}.card-button:hover{transform:translateY(-3px);box-shadow:var(--shadow)}.card-button.selected{border:3px solid var(--accent)}.card-button img{width:100%;height:100%;object-fit:contain;display:block}.card-label{display:flex;justify-content:space-between;font-size:10px;letter-spacing:1px;text-transform:uppercase;color:var(--muted);padding:9px 3px 0}.card-symbol{position:absolute;right:9px;top:9px;width:29px;height:29px;display:grid;place-items:center;background:var(--accent);color:white;border-radius:50%;box-shadow:0 2px 9px #1e36242b;font-size:16px}.card-symbol.no{background:var(--white);color:var(--red);border:1px solid #d9c7c0}.error-image{position:absolute;inset:0;padding:15px;display:grid;place-items:center;text-align:center;background:#eee8df;color:var(--red);font-size:13px}.action-bar{margin-top:31px;padding-top:23px;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:20px}.save-state{font-size:12px;color:var(--muted);line-height:1.6}.button{border:1px solid var(--accent);background:var(--accent);color:white;padding:15px 26px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;gap:12px;font-size:14px;font-weight:550;min-height:48px;text-decoration:none}.button.secondary{background:var(--white);color:var(--ink);border-color:var(--line)}.button:hover:enabled{filter:brightness(.94)}.text-button{background:none;border:0;color:var(--muted);text-decoration:underline;text-underline-offset:4px;padding:12px 0;font-size:12px}.back-button{border:0;background:none;color:var(--muted);font-size:12px;padding:0;margin-bottom:22px}.back-button:hover{text-decoration:underline}.followup-grid{max-width:900px}.followup-grid .card-button{aspect-ratio:4/5}.why-field{max-width:740px;margin:32px 0 0}.why-field label{display:block;font-weight:600;font-size:15px;margin-bottom:9px}.why-field textarea{display:block;width:100%;resize:vertical;border:1px solid #cbd5c9;border-radius:10px;padding:16px;background:var(--white);min-height:110px;line-height:1.6;color:var(--ink);font-size:15px}.field-meta{display:flex;justify-content:space-between;gap:20px;font-size:11px;color:var(--muted);margin-top:8px}.intro{max-width:650px;margin:12px auto;display:block}.intro h1{font-size:clamp(42px,5vw,64px);max-width:500px}.intro .subtitle{font-size:16px}.intro-art{position:relative;min-height:380px;display:flex;align-items:center;justify-content:center}.intro-art img{width:215px;aspect-ratio:4/5;border-radius:14px;box-shadow:0 20px 40px #253d3720;position:absolute;border:7px solid var(--white)}.intro-art img:first-child{transform:translate(-45px,-14px) rotate(-13deg)}.intro-art img:last-child{transform:translate(40px,15px) rotate(9deg)}.intro-details{display:flex;gap:28px;border-top:1px solid var(--line);padding-top:21px;margin-top:27px;color:var(--muted);font-size:12px}.intro-details strong{display:block;color:var(--ink);font-size:20px;font-family:Georgia,serif;font-weight:400;margin-bottom:5px}.information{margin-top:28px;font-size:13px;line-height:1.7;white-space:pre-wrap;max-height:260px;overflow:auto}.agreement{display:flex;gap:11px;margin:22px 0;font-size:13px;line-height:1.6;align-items:flex-start}.agreement input{width:18px;height:18px;accent-color:var(--accent);flex-shrink:0;margin-top:2px}.intro-actions{margin-top:25px}.tipi-intro{max-width:790px}.scale-key{display:flex;flex-wrap:wrap;gap:7px 19px;margin:24px 0 16px;font-size:11px;color:var(--muted);max-width:900px}.scale-key span{white-space:nowrap}.tipi-list{margin:25px 0 0;max-width:1020px}.tipi-item{display:grid;grid-template-columns:minmax(230px,1.1fr) 1fr;gap:25px;padding:18px 0;border-bottom:1px solid var(--line);margin:0;border-top:0;border-left:0;border-right:0;min-width:0}.tipi-item legend{float:left;width:100%;font-size:14px;line-height:1.5;padding:0}.item-num{color:var(--muted);font-size:11px;display:inline-block;min-width:25px}.rating{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:9px}.rating label{cursor:pointer;position:relative}.rating input{position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0;cursor:pointer}.rating span{height:39px;width:100%;display:grid;place-items:center;border:1px solid #cbd4c7;border-radius:7px;font-size:13px;background:var(--white)}.rating input:checked+span{background:var(--accent);color:white;border-color:var(--accent)}.rating input:focus-visible+span{outline:3px solid #b7864a;outline-offset:3px}.source-note{font-size:11px;color:var(--muted);margin-top:23px;line-height:1.7}.complete{max-width:650px;margin:65px auto 70px;text-align:center}.complete-icon{display:grid;place-items:center;width:70px;height:70px;margin:0 auto 29px;border-radius:50%;background:var(--soft);font-size:30px}.complete .subtitle{margin:auto}.response-id{display:inline-block;background:var(--white);padding:13px 19px;border:1px solid var(--line);border-radius:8px;font-size:12px;color:var(--muted);margin-top:28px}.site-footer{max-width:1200px;margin:20px auto 0;padding:22px 36px 30px;display:flex;justify-content:space-between;gap:20px;color:#7c857d;font-size:10px;letter-spacing:.3px}.notice{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:20;padding:14px 20px;max-width:min(90vw,650px);border:1px solid #d1b6a6;border-radius:9px;background:#fff8ee;color:#6d402c;box-shadow:var(--shadow);font-size:13px;line-height:1.6}.loading{display:grid;place-items:center;padding:100px 0;color:var(--muted);font-size:14px}.spinner{width:26px;height:26px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
dialog{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;border:0;margin:0;padding:20px 28px 16px;background:var(--paper);color:var(--ink);overscroll-behavior:contain}dialog[open]{display:flex;flex-direction:column;align-items:center}dialog::backdrop{background:#24332be0}.dialog-top{width:100%;display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--muted);flex-shrink:0}.icon-button{border:1px solid var(--line);background:var(--white);border-radius:50%;width:40px;height:40px;font-size:26px;color:var(--ink)}.dialog-image{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;width:100%;padding:14px 0}.dialog-image img{max-width:100%;max-height:100%;width:auto;height:100%;object-fit:contain;border-radius:8px}#dialog-help{margin:6px 0 13px;font-size:13px;text-align:center}.dialog-actions{display:flex;gap:13px;flex-shrink:0}.dialog-actions .button{min-width:170px}
@media(min-width:1500px){.card-button{max-height:250px}.card-grid{gap:22px}}@media(max-width:760px){.site-header{padding:19px 20px}#header-status{font-size:10px}.wordmark{font-size:14px;gap:7px}.brand-icon{font-size:23px}main{padding:31px 20px 20px}h1{letter-spacing:-.9px}.subtitle{font-size:13px;line-height:1.65}.round-heading{gap:10px;align-items:flex-start;margin-bottom:24px}.round-meta{font-size:10px}.eyebrow{font-size:9px;letter-spacing:1.6px;margin-bottom:12px}.selection-progress{margin-top:20px;gap:12px;font-size:11px}.circle{width:21px;height:21px}.card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 12px}.card-button{border-radius:9px}.card-label{font-size:9px;padding-top:7px}.card-symbol{width:26px;height:26px;font-size:14px;right:7px;top:7px}.action-bar{position:sticky;bottom:0;background:var(--paper);padding:16px 0 12px;margin-top:22px;z-index:2;gap:12px}.save-state{font-size:10px}.button{padding:13px 20px;font-size:13px}.intro{display:flex;flex-direction:column;gap:5px;margin-top:4px;align-items:stretch}.intro h1{font-size:44px}.intro-art{min-height:260px;order:-1;display:none}.intro-art img{width:155px}.intro .subtitle{font-size:14px}.intro-details{gap:23px;font-size:10px;margin-top:22px}.intro-details strong{font-size:19px}.information{font-size:12px}.agreement{font-size:12px}.why-field{margin-top:24px}.why-field textarea{font-size:16px}.field-meta{font-size:10px;gap:8px}.followup-grid .card-tile:last-child{grid-column:auto}.tipi-item{display:block;padding:21px 0}.tipi-item legend{float:none;margin-bottom:14px;font-size:14px}.rating{gap:8px}.rating span{height:42px}.scale-key{font-size:10px;gap:8px 14px}.site-footer{padding:17px 20px 22px;font-size:9px;gap:15px}.complete{margin:50px auto}.complete h1{font-size:37px}#demo-banner{font-size:9px;padding:8px 10px}#demo-banner span{display:block;font-size:10px;margin:4px 0 0}dialog{padding:13px 16px 10px}.dialog-image{padding:12px 0}.dialog-actions{width:100%;gap:9px}.dialog-actions .button{flex:1;min-width:0;padding:13px 9px;font-size:12px}.dialog-top{font-size:11px}.icon-button{width:35px;height:35px}.source-note{font-size:10px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* Full-screen gallery: fixed-size controls and equal action buttons. */
.gallery-caption{display:flex;align-items:center;gap:18px;min-width:0}
#gallery-position{font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--muted)}
.icon-button,.gallery-arrow{display:grid;place-items:center;padding:0;line-height:1;flex-shrink:0}
.icon-button{width:44px;height:44px}
.icon-button svg,.gallery-arrow svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;display:block}
.dialog-image{position:relative;padding:14px 76px;touch-action:pan-y pinch-zoom;user-select:none;overscroll-behavior-x:contain}
.dialog-image img{-webkit-user-drag:none}
.gallery-arrow{position:absolute;top:50%;transform:translateY(-50%);width:48px;height:48px;border:1px solid var(--line);border-radius:50%;background:var(--white);color:var(--ink)}
#gallery-prev{left:4px}#gallery-next{right:4px}
.gallery-arrow:hover:enabled{background:var(--soft)}
.gallery-image-frame{position:relative;flex:0 0 auto;min-width:0;min-height:0;max-width:100%;max-height:100%}
.gallery-image-frame #preview-image{width:100%;height:100%;max-width:100%;max-height:100%;display:block;object-fit:contain}
#preview-mark{pointer-events:none}
.dialog-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:max-content;max-width:100%;gap:10px}
.dialog-actions .button{width:100%;min-width:0;min-height:44px;padding:9px 12px;gap:8px;line-height:1.35}
.dialog-actions .button>span:first-child{flex:0 0 16px;text-align:center}
.preview-link{border:0;background:none;padding:0 0 2px;color:inherit;font:inherit;letter-spacing:inherit;text-transform:uppercase;text-decoration:underline;text-underline-offset:3px;min-height:24px}
@media(max-width:760px){.dialog-image{padding:12px 52px}.gallery-arrow{width:40px;height:40px}.dialog-actions .button{min-height:44px;padding:9px 12px;gap:7px;font-size:12px}.icon-button{width:44px;height:44px}}
@media(max-width:760px) and (orientation:portrait){.dialog-image{padding:12px 0}.gallery-arrow{display:none}}

/* Keep the images and primary controls free of secondary labels. */
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.dialog-top{justify-content:flex-end}
.card-button,.followup-grid .card-button{aspect-ratio:2/3;background:transparent;border:0;box-shadow:none;max-height:none}
.card-button:hover{transform:none;box-shadow:none}
.card-button img,.card-button .error-image{border-radius:inherit}
.card-button.selected{border:0;outline:2px solid #fff;outline-offset:3px}
.action-bar{flex-wrap:wrap}
.action-bar .selection-progress{margin:0}
.action-bar .save-state{order:3;flex-basis:100%}
#next{margin-left:auto;text-transform:uppercase}
.field-meta{justify-content:flex-end}

/* Direct selection stays in the grid; enlargement is a separate action. */
.enlarge-button{position:absolute;bottom:7px;left:7px;display:grid;place-items:center;width:44px;height:44px;padding:10px;border:1px solid #ffffff70;border-radius:50%;background:#0009;color:#fff;box-shadow:0 2px 7px #243d3712}
.enlarge-button:hover:enabled{background:#000b}
.enlarge-button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.dialog-bottom{display:flex;justify-content:center;flex:0 0 auto;width:100%;padding-top:8px}
.overall-step{text-align:right;font-size:12px;color:var(--muted);margin-left:auto}
button.gallery-image-frame{appearance:none;padding:0;border:0;background:transparent;line-height:0;border-radius:8px}
button.gallery-image-frame:focus,button.gallery-image-frame:focus-visible{outline:none;box-shadow:none}
@media(max-width:760px){.overall-step{font-size:11px}}

/* Equal edge controls with the card counter centered independently. */
.action-bar{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center}
.action-bar #back,.action-bar #next{width:112px;min-height:40px;height:40px;padding:8px 12px;font-size:12px;line-height:1.2;text-transform:uppercase;margin:0;white-space:nowrap}
.action-bar #back{justify-self:start}
.action-bar #next{justify-self:end}
:root:is([data-page="selection"],[data-page="most"],[data-page="remaining"],[data-page="research-context"],[data-page="reflection"]) .action-bar #next {
  background: #fff;
  color: #222;
  border-color: var(--line);
}
.action-progress{grid-column:2;justify-self:center}
.action-bar .save-state{grid-column:1/-1;order:initial}
@media(max-width:760px){.action-bar{gap:7px}.action-bar #back,.action-bar #next{width:94px}.action-progress .circles{gap:6px}.action-progress .circle{width:20px;height:20px}}
@media(max-width:360px){.action-bar #back,.action-bar #next{width:82px}.action-progress .circles{gap:4px}.action-progress .circle{width:18px;height:18px}}
dialog .notice{bottom:80px;width:max-content}
.notice{pointer-events:none}
.dialog-image,button.gallery-image-frame{touch-action:pinch-zoom}
.gallery-mobile-arrow{display:none}
.followup-grid{max-width:none}
.results{max-width:none;margin:8px auto 28px;text-align:center}
.results h1{margin-bottom:12px}
.result-section{margin-top:36px}
.result-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;max-width:560px;margin-inline:auto}
.questionnaire-results{max-width:820px;margin-inline:auto;text-align:left}
.questionnaire-results>h2{text-align:center}
.trait-results{max-width:820px}
.trait-result{padding:18px 0;border-bottom:1px solid var(--line)}
.trait-result>div{display:flex;align-items:baseline;justify-content:space-between;gap:20px}
.trait-result h3{font-size:16px;font-weight:600;margin:0}
.trait-result strong{font-size:19px;white-space:nowrap}
.trait-result strong span{font-size:12px;font-weight:400;color:var(--muted)}
.trait-result p{font-size:14px;line-height:1.6;color:var(--muted);margin:9px 0 0}
.result-note{font-size:11px;color:var(--muted);line-height:1.6;max-width:680px;margin-inline:0}
#card-dialog.writing-mode{padding:12px 16px;overflow:hidden;align-items:stretch}
.writing-mode>.gallery-caption,.writing-mode>.dialog-image,.writing-mode>.dialog-bottom{display:none}
#writing-panel{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:12px;align-items:stretch;flex:1;min-height:0;width:100%}
.writing-image-space{position:relative;min-width:0;min-height:0;overflow:hidden}
.writing-image-space img{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:block;max-width:100%;max-height:100%;object-fit:contain;border-radius:8px}
.writing-field{display:grid;gap:6px;flex:0 0 auto}
.writing-field label{font-size:13px;font-weight:600}
.writing-input-row{display:grid;grid-template-columns:minmax(0,1fr) 76px;gap:10px}
.writing-input-row #writing-done{width:76px;height:76px;min-height:0;padding:0;border-radius:8px;font-size:14px;background:#fff;color:#222;border-color:var(--line)}
.writing-field textarea{font-size:16px;line-height:1.4;border:1px solid var(--line);border-radius:8px;padding:10px 12px;resize:none;height:76px;width:100%;color:var(--ink);background:var(--white)}
@media(max-width:760px){.writing-field textarea:focus,.writing-field textarea:focus-visible,.why-field textarea:focus,.why-field textarea:focus-visible{outline:none;box-shadow:none}}
#writing-count{text-align:right;color:var(--muted);font-size:10px}
.writing-open .site-header,.writing-open .action-bar{visibility:hidden}

/* The opening and information screens follow the participant handout. */
:root { --content-width: 1118px; --content-gutter: 36px; }
:root[data-page="start"] { --content-width: 1052px; }
:root[data-page="study-information"] { --content-width: 960px; }
main {
  max-width: calc(var(--content-width) + 2 * var(--content-gutter));
  padding-inline: var(--content-gutter);
}
.site-header {
  width: min(var(--content-width), calc(100% - 2 * var(--content-gutter)));
  padding-inline: 0;
  gap: 16px;
}
:root[data-page="start"] .site-header,
:root[data-page="study-information"] .site-header { padding-block: 26px 16px; }
:root[data-page="start"] .wordmark,
:root[data-page="study-information"] .wordmark {
  font: 400 clamp(16px, 2.1vw, 23px)/1.25 Georgia, serif;
  letter-spacing: .12em;
}
#page-label { font-size: 11px; letter-spacing: .14em; text-align: right; }
.reference-intro { display: block; max-width: 1052px; margin: clamp(4px, 6vw, 64px) auto 60px; }
.reference-intro h1 {
  max-width: none;
  font-size: clamp(48px, 8.2vw, 102px);
  line-height: 1.08;
  letter-spacing: -.025em;
  margin: 0 0 clamp(30px, 4.7vw, 58px);
}
.intro-columns {
  border-top: 1px solid var(--line);
  padding-top: clamp(24px, 3vw, 36px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
  gap: clamp(24px, 7vw, 88px);
}
.intro-lead { font: 400 clamp(22px, 2.5vw, 30px)/1.3 Georgia, serif; margin: 0; }
.intro-participation > p { font-size: 17px; line-height: 1.5; margin: 0 0 42px; }
#study-information-link { font-size: 14px; text-underline-offset: 5px; }
.reference-intro .agreement { margin: 30px 0; }
.reference-intro .agreement input { margin-top: 0; }
.reference-intro #begin { background: #555; border-color: #555; border-radius: 4px; min-width: 120px; }
.reference-intro #begin:disabled { opacity: .65; }
.reference-intro #begin:enabled { background: #fff; border-color: #fff; color: #222; }
#intro-controls:not(:has(.agreement)) { margin-top: 24px; }

.study-information { max-width: 960px; margin: 0 auto 48px; line-height: 1.45; }
.study-columns {
  display: grid;
  grid-template-columns: minmax(0, .64fr) minmax(0, 1fr);
  grid-template-areas: "intro details" "contacts details";
  grid-template-rows: auto 1fr;
  gap: 48px clamp(28px, 4.7vw, 54px);
}
.study-introduction { grid-area: intro; }
.study-details { grid-area: details; }
.study-contacts { grid-area: contacts; }
.study-information h1 { max-width: 7em; font-size: clamp(42px, 5.6vw, 64px); line-height: 1.02; }
.study-information h2 { font-size: clamp(23px, 2.6vw, 28px); line-height: 1.15; margin: 0 0 8px; }
.study-information p { margin: 0 0 8px; }
.study-information .study-meta { font-size: 13px; color: var(--muted); margin: 18px 0 28px; }
.study-meta span { margin: 0 7px; }
.study-information .study-researcher { font-size: 18px; }
.study-description { color: var(--muted); }
.study-details section + section, .study-contacts { border-top: 1px solid var(--line); padding-top: 12px; }
.study-details section + section { margin-top: 22px; }
.study-contacts p { font-size: 14px; margin: 10px 0 18px; overflow-wrap: anywhere; }
.study-contacts small { color: var(--muted); }
.study-contacts a { color: #2e6556; text-underline-offset: 2px; }
.study-back { margin-top: 24px; }

:root:is([data-page="research-context"],[data-page="reflection"]) main {
  min-height: calc(100dvh - 84px);
  display: flex;
  flex-direction: column;
}
.research-context {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
  gap: clamp(28px, 7vw, 90px);
  padding: 24px 28px 48px;
  flex: 1;
  align-items: start;
}
.research-intro { padding-top: 30px; }
.research-intro h1 { font-size: clamp(42px, 5.1vw, 64px); max-width: 7em; line-height: 1.06; margin-bottom: 36px; }
.research-intro p { margin: 0 0 32px; font-size: 18px; line-height: 1.45; }
.research-intro p:first-of-type { font-size: clamp(19px, 2vw, 23px); }
.research-intro p:last-child { color: var(--muted); margin-bottom: 0; }
.research-traits { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.research-traits li { padding: 20px 0 24px; border-bottom: 1px solid var(--line); }
.research-traits h2 { font-size: clamp(23px, 2.5vw, 30px); margin: 0 0 5px; line-height: 1.1; }
.research-traits p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
:root[data-page="research-context"] .action-bar { padding-top: 14px; }

.site-header .wordmark {
  font: 400 clamp(15px, 2.1vw, 23px)/1.25 Georgia, serif;
  letter-spacing: .12em;
}
.why-field { max-width: none; }
:is(#why, #writing-why, #final-reflection)::placeholder { color: #a8a8a8; opacity: 1; }
@media (min-width: 761px) {
  #card-dialog :is(.gallery-arrow, .icon-button, #writing-done, textarea):focus-visible,
  .why-field textarea:focus-visible, .action-bar button:focus-visible {
    outline: 2px solid #ccc;
    outline-offset: 3px;
  }
}

:root[data-page="tipi"] {
  --paper: #fff;
  --ink: #222;
  --muted: #545454;
  --line: #c4c4c4;
}
:root[data-page="tipi"] main { padding-top: 28px; }
.tipi-intro { max-width: none; }
.tipi-intro h1 { margin: 10px 0 4px; }
.tipi-intro p { margin: 4px 0; line-height: 1.45; color: var(--muted); }
.tipi-list { max-width: none; margin-top: 12px; --question-width: 33%; --scale-edge: 32px; }
.tipi-scale,.tipi-options { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-right: var(--scale-edge); }
.tipi-scale { min-height: 44px; margin-left: var(--question-width); }
.tipi-scale span {
  max-width: 85px;
  justify-self: center;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.15;
}
.tipi-item {
  grid-template-columns: var(--question-width) minmax(0, 1fr);
  align-items: center;
  gap: 0;
  min-height: 44px;
  padding: 0;
}
.tipi-item:nth-child(2) { border-top: 1px solid var(--line); }
.tipi-statement { padding-right: 14px; line-height: 1.35; }
.tipi-options { position: relative; }
.tipi-options::before {
  content: '';
  position: absolute;
  inset: 50% calc(100% / 14) auto;
  height: 1px;
  background: #888;
  pointer-events: none;
}
.tipi-choice {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 44px;
  cursor: pointer;
}
.tipi-choice span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #68786e;
  border-radius: 50%;
  background: var(--paper);
  color: transparent;
  font-size: 13px;
}
.tipi-choice input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.tipi-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.tipi-choice:has(input:disabled) { cursor: default; }
.tipi-endpoints,.tipi-answer { display: none; }

.results { text-align: left; }
.result-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.result-pair { display: grid; grid-template-columns: minmax(0, 36%) minmax(0, 1fr); align-items: center; gap: 18px; }
.result-pair .card-button { border-radius: 5px; }
.result-pair blockquote { margin: 0; padding-left: 12px; border-left: 2px solid #568a71; font: 400 clamp(18px, 2vw, 24px)/1.3 Georgia, serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.result-least { margin-top: 28px; border-block: 1px solid var(--line); }
.result-least summary { cursor: pointer; padding: 16px 4px; display: flex; justify-content: space-between; align-items: center; list-style: none; }
.result-least summary::-webkit-details-marker { display: none; }
.result-least summary::after { content: ''; width: 8px; height: 8px; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg); margin: 0 4px 4px 12px; }
.result-least[open] summary::after { transform: rotate(225deg); margin-bottom: 0; }
.result-least .result-pairs { margin: 4px 0 22px; }
.reflection-field { flex: 1; display: flex; flex-direction: column; justify-content: center; width: min(100%, 650px); margin-inline: auto; padding-block: 24px; }
.reflection-field h1 { text-align: center; margin-bottom: 24px; }
.reflection-field label { font-size: clamp(18px, 2.1vw, 24px); line-height: 1.3; margin-bottom: 14px; }
.reflection-field textarea { display: block; width: 100%; resize: vertical; padding: 14px 16px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); color: var(--ink); }
.reflection-field textarea:focus-visible { outline: 2px solid #ccc; outline-offset: 2px; }
.questionnaire-subheading { text-align: center; margin: 0 0 16px; }
.results-footer { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 24px; text-align: center; }
.results-closing h2 { margin: 0 0 8px; }
.results-closing p { margin: 0; font-size: 14px; }
.results-share { margin-top: 26px; }
.results-share p { margin: 0 0 10px; }
.results-share #share-status { margin: 10px 0 0; font-size: 14px; }
.results-share #share-url { display: block; width: min(100%, 640px); margin: 10px auto 0; padding: 8px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 4px; }
@media (max-width: 760px) {
  :root { --content-gutter: 20px; }
  .intro-columns, .study-columns { grid-template-columns: minmax(0, 1fr); }
  .study-columns { grid-template-areas: "intro" "details" "contacts"; gap: 28px; }
  .reference-intro { margin-bottom: 40px; }
  .intro-participation > p { margin-bottom: 24px; }
  .reference-intro .agreement { margin: 24px 0; }
  .study-information h1 { max-width: none; }
  .research-context { grid-template-columns: minmax(0, 1fr); padding: 0 0 12px; gap: 28px; }
  .research-intro { padding-top: 0; }
  .research-intro h1, .research-intro p { margin-bottom: 20px; }
  .research-traits li { padding: 14px 0; }
  #page-label { font-size: 9px; }
  .tipi-scale { display: none; }
  .tipi-item { display: block; padding: 12px 0; }
  .tipi-options { margin-right: 0; }
  .tipi-endpoints { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
  .tipi-answer { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
  .result-pairs { grid-template-columns: minmax(0, 1fr); }
}
@media(max-width:760px){.results{margin-top:4px}.result-section{margin-top:28px}.result-cards{gap:12px}.trait-result h3{font-size:14px}.trait-result p{font-size:13px}}
@media(max-width:760px){
  main{padding-bottom:0}
  .action-bar{padding-top:12px;padding-bottom:12px}
  .dialog-image{margin-bottom:76px;padding:12px 0}
  .gallery-arrow{display:none}
  .dialog-bottom{position:absolute;top:var(--gallery-bottom,calc(100% - 76px));bottom:0;left:0;width:100%;padding:0;align-items:center;gap:24px}
  .gallery-mobile-arrow{display:grid}
  dialog .notice{top:calc((var(--gallery-bottom,100%) + 100%)/2 - 38px);bottom:auto;transform:translate(-50%,-100%)}
}
