/* QUESTIONS FROM QUERENCIA — CONVERSATION FIRST
   Editorial design exploration. All question data and storage stay as they were.
   Loaded AFTER responsive-foundation.css to ensure one predictable visual layer.
*/
:root{
  --ink:#23362e;
  --ink-soft:#657166;
  --ink-quiet:#8d9486;
  --paper:#fbfaf6;
  --paper-soft:#f2f2ea;
  --paper-soft-2:#e8eadf;
  --line:rgba(39,65,50,.13);
  --line-strong:rgba(39,65,50,.24);
  --accent:#45664e;
  --accent-dark:#234734;
  --complete:#edf3eb;
  --shadow:0 22px 85px rgba(26,42,30,.1);
  --serif:Georgia,"Iowan Old Style","Baskerville",serif;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,ui-sans-serif,system-ui,sans-serif;
}
html,body{background:#e9ede6;color:var(--ink);font-family:var(--sans)}
button{transition:background-color .16s ease,color .16s ease,border-color .16s ease,transform .16s ease}
button:active{transform:scale(.99)}
.app-shell{min-height:100dvh;padding:0;display:flex;align-items:stretch;justify-content:center}
.phone{width:min(100%,560px);min-height:100dvh;border:0;border-radius:0;box-shadow:none;background:var(--paper);overflow:visible;display:flex;flex-direction:column}
.topbar{z-index:15;position:sticky;top:0;background:rgba(251,250,246,.97);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);padding:calc(14px + env(safe-area-inset-top)) 23px 13px;border-bottom:1px solid rgba(37,61,48,.08)}
.brand-wordmark{width:133px;filter:none}
.brand-slogan{font-size:9px;letter-spacing:.10em;color:#7c8679;font-weight:650}
.top-actions{gap:2px}
.icon-button{width:39px;height:39px;color:#45604a;background:transparent;border-radius:50%;padding:9px}
.icon-button svg{width:22px;height:22px}
.icon-button:hover{background:#edf1e8}
.main{overflow:visible;padding:0 23px 34px;min-width:0}
.screen{animation:fade .24s ease-out}
.screen:not(#screen-question){padding-top:25px}
.screen#screen-home{padding-top:0}
.screen#screen-onboarding{padding-top:0}
.kicker{color:#677c66;font-size:11px;line-height:1.25;letter-spacing:.19em;text-transform:uppercase;font-weight:800;margin:0 0 12px}
h1,h2{font-family:var(--serif);font-weight:400;letter-spacing:-.052em;line-height:1.10;color:var(--ink)}
h1{font-size:clamp(36px,10vw,48px)}
h2{font-size:clamp(29px,8vw,36px)}
.lead{font-size:15px;line-height:1.54;color:#6b746b;margin:11px 0 24px}
.primary,.secondary,.danger,.quiet{border-radius:14px;font-weight:730;font-size:14px;letter-spacing:.005em;min-height:47px}
.primary{background:#31573d;color:#fff;border:1px solid #31573d;box-shadow:none}
.primary:hover{background:#234730}
.secondary,.quiet{color:#365443;background:#eef1e9;border:1px solid #e1e7dc}
.secondary:hover,.quiet:hover{background:#e0e8dc}
.primary:disabled,.secondary:disabled{opacity:.38;cursor:not-allowed}
.footer{border-top:1px solid var(--line);background:var(--paper);padding:11px 23px calc(15px + env(safe-area-inset-bottom));margin-top:auto}
.footer button{background:transparent;border:1px solid var(--line);color:#5f7462;min-height:42px}

/* OPENING / HOME */
.home-intro{margin:0 -23px 10px;position:relative;min-height:257px;overflow:hidden;background:#334e3c;color:white;display:flex;align-items:flex-end}
.home-hero-scene{position:absolute;inset:0;background-image:linear-gradient(135deg,#e7eeea,#f3efe6);background-size:cover;background-position:center 48%;transform:scale(1.01)}
.home-hero-copy{position:relative;z-index:1;padding:72px 27px 24px;max-width:500px}
.home-intro .kicker{color:#ecedcf;font-size:10px;letter-spacing:.18em;margin:0 0 11px}
.home-intro h1{color:#fff;font-size:clamp(33px,9.4vw,45px);line-height:1.07;text-wrap:balance;text-shadow:0 2px 18px rgba(0,0,0,.22)}
.home-intro .lead{color:rgba(255,255,255,.92);font-size:14px;margin:12px 0 0;line-height:1.45;max-width:30em}
.global-filters{padding:0;margin:16px 0 24px;display:grid;gap:7px}
.filter-label{font-size:11px;letter-spacing:.06em;text-transform:none;color:#637463;font-weight:730;margin:8px 2px 2px}
.segment,.depth-segments{border:1px solid rgba(52,79,57,.07);border-radius:13px;padding:4px;background:#edf0e9;display:grid}
.audience-segment{margin-bottom:2px}
.segment button,.depth-segment{min-height:35px;font-size:12px;line-height:1.15;font-weight:650;border-radius:10px!important;padding:8px 4px;color:#697869}
.segment button.active,.segment button[aria-checked="true"],.depth-segment.active,.depth-segment[aria-checked="true"]{background:#fff;color:#284936;box-shadow:0 2px 7px rgba(38,59,41,.1);font-weight:790}
.home-set-section{margin-top:27px}
.home-set-section + .home-set-section{margin-top:29px}
.home-section-head{display:flex;gap:14px;justify-content:space-between;align-items:baseline;margin:0 0 13px}
.home-section-label{font-family:var(--serif);font-weight:400;font-size:25px;line-height:1.1;color:#293e30;margin:0;letter-spacing:-.038em}
.section-helper{font-size:10px;color:#788879;white-space:nowrap}
/* Quick Starts form a horizontal row; categories remain generous vertical rows. */
#quickStartList{display:flex;gap:12px;overflow-x:auto;padding:2px 23px 12px;margin:0 -23px;scroll-snap-type:x proximity;overscroll-behavior-inline:contain;scrollbar-width:thin;scrollbar-color:#bdc9b8 transparent}
#quickStartList .deck-card{flex:0 0 clamp(155px,45vw,190px);width:clamp(155px,45vw,190px);display:flex;flex-direction:column;gap:0;padding:0;overflow:hidden;scroll-snap-align:start;border:1px solid #e2e7dd;border-radius:18px;background:#fff;box-shadow:0 4px 15px rgba(22,46,27,.045)}
#quickStartList .deck-card-thumb{height:114px;min-height:114px;border-radius:0;box-shadow:none}
#quickStartList .deck-card-copy{padding:13px 13px 14px;display:block;min-height:107px}
#quickStartList .row{align-items:start;gap:6px}
#quickStartList .title{font-size:15px;line-height:1.2;font-weight:790;color:#304a38;max-width:140px}
#quickStartList .sub{font-size:11.5px;line-height:1.37;color:#7a8077;margin-top:7px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
#quickStartList .pill,#quickStartList .done{font-size:10px;font-weight:780;padding:4px 6px;line-height:1.1;background:#eef3e9;color:#5a705e;white-space:nowrap}
#browseSection{padding-bottom:7px}
#deckList{display:grid;gap:10px}
#deckList .deck-card,#categoryList .topic-card{display:grid;grid-template-columns:82px minmax(0,1fr);gap:14px;align-items:center;padding:9px 14px 9px 9px;border:1px solid #e1e7dc;background:#fff;border-radius:17px;box-shadow:0 3px 13px rgba(22,46,27,.035);min-height:99px;text-align:left}
#deckList .deck-card-thumb,#categoryList .topic-card-thumb{border-radius:11px;min-height:79px;height:79px;box-shadow:none;background-size:cover;background-position:center}
#deckList .deck-card-copy,#categoryList .topic-card-copy{padding:0;gap:6px}
#deckList .title,#categoryList .title{font-weight:770;font-size:16px;line-height:1.22;color:#2e4838}
#deckList .sub,#categoryList .sub{font-size:12px;line-height:1.35;color:#748075;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
#deckList .pill,#categoryList .pill,#deckList .done,#categoryList .done{background:#f0f4ed;color:#66806a;font-size:10px;padding:4px 7px;white-space:nowrap;border:0}
#deckList .done,#categoryList .done{background:#dce9d7;color:#355b3e}
#deckList .deck-card:hover,#categoryList .topic-card:hover,#quickStartList .deck-card:hover{box-shadow:0 9px 24px rgba(22,46,27,.095);transform:translateY(-2px)}
#deckList .deck-card.unavailable,#categoryList .topic-card.unavailable,#quickStartList .deck-card.unavailable{opacity:.44;box-shadow:none}
#categoryList .topic-card:before{display:none}
#categoryList .topic-card{background:#fff!important;border-color:#e1e7dc!important}
#categoryList .topic-card .title{color:#2e4838}
.continue-panel{margin:18px 0 18px}
.continue-card{border:1px solid #cbd9c9;border-left:4px solid #527859;background:#edf3eb;border-radius:16px;padding:17px 18px;box-shadow:none;gap:5px}
.continue-kicker{color:#4d7355;text-transform:uppercase;letter-spacing:.08em;font-size:10px}
.continue-title{color:#294634;font-size:15px;line-height:1.28}
.continue-sub{color:#788977;font-size:11px}
.continue-preview{font-family:var(--serif);font-size:22px;line-height:1.23;letter-spacing:-.035em;margin-top:5px;color:#304936}
.utility-panel{margin:23px 0 8px;padding:16px 14px;border:1px solid #e5e9e2;border-radius:15px;background:#f7f8f4}
.intro-row-title{font-size:14px;color:#3a5941}.intro-row-sub{font-size:12px;color:#758275}
.utility-actions .quiet{font-size:12px}
.learn-more-panel{margin-top:27px}

/* TOPIC SUBGROUPS */
#screen-categories .kicker{margin:0 0 11px}
#screen-categories .deck-banner{height:170px;border:0;border-radius:18px;margin:0 0 20px;box-shadow:none}
#screen-categories #deckTitle{font-size:clamp(37px,10vw,49px);margin:0 0 0}
#screen-categories #deckPurpose{font-size:15px;line-height:1.53;margin:9px 0 16px}
#screen-categories .global-filters{margin:16px 0 24px;padding:15px;background:#f4f6ef;border-radius:16px;gap:6px}
#screen-categories .filter-label:first-child{margin-top:0}
#categoryList{display:grid;gap:10px}

/* MAIN QUESTION: make the conversation the visual centre */
#screen-question.question-screen{overflow:visible;min-height:0;background:transparent!important;border-radius:0;padding:0;margin:0 -23px;color:var(--ink);box-shadow:none}
#screen-question.question-screen:before{display:none}
#screen-question.question-screen > *{position:relative;z-index:auto}
.question-photo{height:129px;background-color:#456b4b;background-position:center;background-size:cover;display:flex;align-items:flex-end;position:relative;overflow:hidden}
.question-photo-content{padding:24px 26px 17px;color:#fff;z-index:1}
#screen-question .question-photo .kicker{color:#e5f2db;font-size:11px;line-height:1.4;text-transform:none;letter-spacing:.06em;font-weight:720;margin:0;text-shadow:0 1px 5px rgba(0,0,0,.30)}
#screen-question #categoryTitle{display:none}
#screen-question #categoryDesc{display:none}
.question-progress-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 26px 8px;font-size:11px;letter-spacing:.10em;color:#5d765e;font-weight:800}
.q-progress-label{letter-spacing:.07em;color:#94a095;font-size:9px;white-space:nowrap}
.question-progress-track{height:3px;border-radius:6px;margin:0 26px 10px;background:#e8eee5;overflow:hidden}
.question-progress-track span{display:block;width:0;height:100%;border-radius:6px;background:#71936b;transition:width .20s ease}
#screen-question .question-card{background:transparent;border:0;box-shadow:none;backdrop-filter:none;border-radius:0;padding:20px 26px 0;margin:0;min-height:0}
#screen-question .question-card.complete{background:transparent}
#screen-question .question-card-top{margin:0 0 15px}
#screen-question .badges{display:flex;gap:7px}
#screen-question .badge{font-weight:760;font-size:10px;letter-spacing:.035em;text-transform:uppercase;border-radius:6px;border:1px solid #d8e5d6;background:#edf3eb;color:#4c7751;padding:6px 8px}
#screen-question .question-text{font-family:var(--serif);font-size:clamp(31px,8.45vw,43px);line-height:1.19;letter-spacing:-.046em;font-weight:400;color:#233a2a;margin:0 0 24px;text-wrap:pretty}
#screen-question .deeper{border-top:1px solid #dce4d9;margin:0;padding:20px 0 5px}
#screen-question .deeper h3{font-family:var(--sans);font-size:11px;letter-spacing:.13em;text-transform:uppercase;font-weight:850;color:#69836a;margin:0 0 16px}
#screen-question .deeper ol{padding:0;margin:0;list-style:none;counter-reset:follow}
#screen-question .deeper li{counter-increment:follow;display:grid;grid-template-columns:27px 1fr;align-items:start;gap:10px;padding:0 0 15px;color:#4c6050;font-size:16px;line-height:1.46;font-weight:410}
#screen-question .deeper li:before{content:counter(follow,decimal-leading-zero);font-family:var(--serif);font-size:18px;letter-spacing:-.02em;color:#90a48e;line-height:1.3}
#screen-question details.notes{border-top:1px solid #e0e7df;margin:2px 0 13px;padding:0;background:none}
#screen-question details.notes summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:52px;color:#547658;font-size:13px;font-weight:720;cursor:pointer}
#screen-question details.notes summary::-webkit-details-marker{display:none}
#screen-question .notes-summary-icon{font-size:21px;font-weight:400;color:#799a79;display:inline-block;transition:transform .16s ease}
#screen-question details.notes[open] .notes-summary-icon{transform:rotate(45deg)}
#screen-question .notes-body{padding:0 0 14px}
#screen-question .notes h3{font-size:12px;color:#617564;margin:0 0 9px;font-weight:720}
#screen-question .notes textarea{background:#fff;border:1px solid #dbe4d9;min-height:92px;border-radius:13px;resize:vertical;color:#304936;font-size:14px;line-height:1.52;padding:13px}
#screen-question .notes-privacy{margin:7px 2px 0;color:#839084;font-size:11px;line-height:1.3}
#screen-question .question-action-row{margin:0 26px 0;padding:13px 0 10px;border-top:1px solid #dce4d9;display:grid;grid-template-columns:1fr 1fr auto;gap:8px}
#screen-question .action-button{min-height:43px;border-radius:11px;padding:8px 9px;background:#f0f4ec;border:1px solid #e2e9de;color:#4d694f;font-size:11px;line-height:1.15;font-weight:770;text-align:center;gap:5px;white-space:nowrap}
#screen-question .complete-row{position:relative;cursor:pointer}
#screen-question .complete-row:before{content:'○';font-size:18px;color:#6f9272;line-height:1}
#screen-question .complete-row:has(input:checked):before{content:'✓';font-size:17px;font-weight:900;color:#3f714b}
#screen-question .question-action-row .save-question-btn.action-button{border-radius:11px;background:#f0f4ec;border:1px solid #e2e9de;min-height:43px;font-size:11px;padding:8px 9px;color:#4d694f;gap:5px}
#screen-question .question-action-row .save-question-btn.action-button.saved{background:#f5eee8;color:#8a5f47;border-color:#eadaca}
#screen-question .question-action-row .save-question-btn.action-button span:first-child{font-size:20px;line-height:1}
#screen-question .present-button{background:#f7f8f4;border-color:#e4e9e1;color:#5e7963}
#screen-question .question-nav{margin:7px 26px 0;padding:11px 0 8px;display:grid;grid-template-columns:1fr 1.25fr;gap:9px;background:var(--paper)}
#screen-question .question-nav .primary,#screen-question .question-nav .secondary{min-height:52px;border-radius:13px;font-size:14px}
#screen-question .question-return{display:block;border:0;background:transparent;color:#819183;font-size:12px;line-height:1.3;font-weight:640;min-height:40px;width:calc(100% - 52px);margin:4px 26px 17px;padding:7px 0 12px;text-align:center}
#screen-question .question-return:hover{color:#31573d}

/* REST: consistent editorial treatment */
.history-card,.saved-entry,.learn-card,.onboarding-card,.skill-card,.accordion-item,.summary-card{border-radius:16px;background:#fff;border-color:#e1e7dc;box-shadow:none}
.history-search,.note-search{border-radius:13px;background:#fff;border-color:#dbe4d9}
.history-card .history-question{font-size:23px;color:#2c4734}
#screen-history .lead,#screen-saved .lead,#screen-notes .lead{font-size:15px}
#screen-onboarding .hero{min-height:calc(100dvh - 12px);margin:0 -23px;background-position:center;align-items:flex-end;padding:30px 23px calc(45px + env(safe-area-inset-bottom))}
#screen-onboarding .hero-card{border:1px solid rgba(255,255,255,.48);background:rgba(23,42,29,.36);border-radius:19px;padding:24px 22px;box-shadow:none}
#screen-onboarding .hero-eyebrow{font-size:12px;letter-spacing:.16em;color:#f4f0e0}
#screen-onboarding .hero-sub{font-size:14px;font-weight:600;letter-spacing:.06em}
#screen-onboarding .onboarding-card{padding:19px;line-height:1.53}
#screen-onboarding h1{font-size:clamp(35px,10vw,46px)}
#screen-end{text-align:center;padding:55px 6px 20px!important}
#screen-end h1{font-size:45px}

/* Projection mode: retained for passing the phone around or reading aloud */
.focus-overlay{background-color:#203b2b;color:#fff}
.focus-overlay:before{background:linear-gradient(180deg,rgba(12,26,17,.78),rgba(13,31,20,.71),rgba(12,26,17,.84))}
.focus-question{font-family:var(--serif);font-size:clamp(36px,9.4vw,59px);font-weight:400;line-height:1.20;letter-spacing:-.045em;text-shadow:0 2px 22px rgba(0,0,0,.2)}
.focus-deeper{border-top:1px solid rgba(255,255,255,.4)}
.focus-deeper h3{font-size:12px;letter-spacing:.15em;text-transform:uppercase;color:#d0e1c9}
.focus-deeper ul{font-size:clamp(17px,4.3vw,21px);line-height:1.50}
.focus-exit,.focus-nav{border-radius:12px;border:1px solid rgba(255,255,255,.42);background:rgba(13,34,21,.45);font-size:13px}

@media (min-width:720px){
  .app-shell{padding:27px 0}
  .phone{min-height:790px;border-radius:25px;overflow:hidden;box-shadow:var(--shadow)}
  .home-intro{min-height:280px}
  .main{padding-bottom:38px}
}
@media (max-width:390px){
  .topbar{padding:calc(12px + env(safe-area-inset-top)) 16px 12px}
  .brand-wordmark{width:120px}.brand-slogan{font-size:8px}
  .main{padding:0 18px 25px}
  .home-intro{margin-left:-18px;margin-right:-18px;min-height:239px}
  .home-hero-copy{padding:66px 22px 22px}
  .home-intro h1{font-size:clamp(33px,9.5vw,43px)}
  #quickStartList{margin-left:-18px;margin-right:-18px;padding-left:18px;padding-right:18px}
  .home-section-label{font-size:24px}
  #deckList .deck-card,#categoryList .topic-card{grid-template-columns:75px minmax(0,1fr);gap:10px;min-height:93px}
  #deckList .deck-card-thumb,#categoryList .topic-card-thumb{min-height:73px;height:73px}
  #screen-question.question-screen{margin-left:-18px;margin-right:-18px}
  .question-photo{height:117px}
  .question-photo-content{padding:21px 21px 16px}
  .question-progress-head{margin:16px 21px 8px}.question-progress-track{margin:0 21px 8px}
  #screen-question .question-card{padding:18px 21px 0}
  #screen-question .question-text{font-size:clamp(31px,8.6vw,39px)}
  #screen-question .deeper li{font-size:15px;gap:8px;padding-bottom:14px}
  #screen-question .question-action-row{margin:0 21px}
  #screen-question .action-button,#screen-question .question-action-row .save-question-btn.action-button{font-size:10px;padding:7px 6px;gap:3px}
  #screen-question .question-nav{margin:7px 21px 0}
  #screen-question .question-return{margin-left:21px;margin-right:21px;width:calc(100% - 42px)}
  #screen-onboarding .hero{margin-left:-18px;margin-right:-18px}
}
@media (max-width:340px){
  .topbar{padding-left:12px;padding-right:9px}.brand-wordmark{width:110px}
  .icon-button{width:35px;height:35px;padding:7px}
  .segment button,.depth-segment{font-size:11px}
  #screen-question .question-action-row{grid-template-columns:1fr 1fr;gap:6px}
  #screen-question .present-button{grid-column:1/-1}
}
@media (prefers-reduced-motion:reduce){
  .question-progress-track span,.notes-summary-icon{transition:none}
}

/* Preview refinements: clear presentation access; comfortably sized action buttons. */
#screen-question .q-present{border:1px solid #dce7db;border-radius:8px;background:#eef3eb;color:#4c7553;min-height:32px;padding:6px 10px;font-size:11px;font-weight:760;white-space:nowrap;letter-spacing:.015em}
#screen-question .q-present:hover{background:#e3eee0}
#screen-question .question-action-row{grid-template-columns:1fr 1fr;gap:9px}
#screen-question .action-button,#screen-question .question-action-row .save-question-btn.action-button{font-size:12px;min-height:45px;gap:7px;padding:9px 10px}
#screen-question #categoryTitle{display:block!important;position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap}
@media(max-width:390px){#screen-question .action-button,#screen-question .question-action-row .save-question-btn.action-button{font-size:11.5px;padding:8px 9px;gap:6px}}
@media(max-width:340px){#screen-question .question-action-row{grid-template-columns:1fr 1fr}}

#screen-question .complete-row:has(input:checked)::before{content:"✓";}
#screen-question .complete-row input:checked + span::before{content:none!important;}
