/* BDC Vault V5 — Prompt Search Simple.
   Immediate search, readable 17–20px text, large controls, one-column results.
   No editorial imagery or decorative content on the primary journey. */
:root{
  color-scheme:light;
  --bg:#fafbfc;--panel:#fff;--text:#1e2329;--muted:#53606c;
  --line:#dce1e6;--soft:#f3f5f7;--accent:#20252a;--accentText:#fff;
  --focus:#2067d5;--shadow:0 12px 38px rgb(12 22 32 / 10%);
  --radius:12px;
}
body[data-theme="dark"]{
  color-scheme:dark;--bg:#13161a;--panel:#1e2227;--text:#f4f6f8;
  --muted:#b8c1c9;--line:#444d55;--soft:#252c33;--accent:#f3f5f7;--accentText:#17191c;
  --focus:#81b5ff;--shadow:0 12px 38px rgb(0 0 0 / 35%);
}
*{box-sizing:border-box}
html{font-size:17px;scroll-behavior:smooth}
body{margin:0;min-height:100vh;background:var(--bg);color:var(--text);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;line-height:1.5;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit}
button,summary{cursor:pointer}
button:disabled{opacity:.5;cursor:not-allowed}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{
  outline:3px solid var(--focus);outline-offset:3px;
}
a{color:inherit}
[hidden],.hidden{display:none!important}
.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}
.skip-link{position:absolute;top:-100px;left:15px;background:var(--accent);color:var(--accentText);padding:12px 20px;z-index:200}
.skip-link:focus{top:5px}
button.primary,.primary{background:var(--accent);color:var(--accentText);border:2px solid var(--accent);border-radius:11px;padding:10px 19px;font-weight:750;min-height:50px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
button.secondary,.secondary{background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:11px;padding:10px 18px;font-weight:650;min-height:48px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
button.primary:hover{filter:brightness(.85)}
button.secondary:hover,.secondary:hover{background:var(--soft)}
button{touch-action:manipulation}
.appheader{
  max-width:1100px;margin:auto;min-height:91px;
  padding:17px 24px;display:flex;align-items:center;gap:20px;
  border-bottom:1px solid var(--line);position:relative;z-index:10;
}
.brandbutton{display:flex;align-items:center;gap:12px;padding:4px 0;border:0;background:transparent;color:var(--text);text-align:left;flex-shrink:0}
.brandmark{display:flex;align-items:center;justify-content:center;width:43px;height:43px;flex:0 0 43px;border-radius:12px;background:var(--accent);color:var(--accentText);font-size:17px;font-weight:900;letter-spacing:-.05em}
.brand-text{display:flex;flex-direction:column;gap:1px}
.brand-text strong{font-size:19px;line-height:1.13;font-weight:850;letter-spacing:-.035em}
.brand-text small{color:var(--muted);font-size:14px;line-height:1.2}
.topnav{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-left:auto}
.navbtn,.top-more>summary{
  min-height:46px;display:inline-flex;align-items:center;justify-content:center;
  border:0;background:transparent;color:var(--text);
  padding:9px 13px;border-radius:10px;text-decoration:none;font-size:16px;font-weight:680;
}
.navbtn:hover,.navbtn.active,.top-more>summary:hover{background:var(--soft)}
.top-more{position:relative}
.top-more>summary{list-style:none}
.top-more>summary::-webkit-details-marker{display:none}
.top-more>summary:after{content:"⌄";margin-left:8px;color:var(--muted)}
.more-menu{position:absolute;right:0;top:100%;z-index:50;min-width:195px;background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:12px;padding:8px;display:flex;flex-direction:column;gap:2px}
.more-menu .navbtn{width:100%;justify-content:flex-start;text-align:left;min-height:47px}
.privatebadge{background:var(--soft);border:1px solid var(--line);color:var(--muted);font-weight:750;font-size:12px;letter-spacing:.03em;border-radius:20px;padding:6px 10px;white-space:nowrap}
.content{max-width:1100px;margin:auto;padding:0 24px 55px}
.hero,.pagehero{
  background:transparent!important;min-height:0!important;border:0!important;
  border-radius:0!important;box-shadow:none!important;padding:39px 0 19px!important;
  text-align:left!important;color:var(--text)!important;
}
.hero:before,.pagehero:before,.hero:after,.pagehero:after{display:none!important}
.hero-inner{max-width:none!important;padding:0!important;position:relative;z-index:1}
.hero h1,.pagehero h1{font-size:clamp(34px,4vw,49px);line-height:1.12;font-weight:850;letter-spacing:-.045em;color:var(--text)!important;margin:0 0 8px}
.eyebrow{color:var(--muted)!important;font-size:13px;letter-spacing:.06em;font-weight:760}
.hero .eyebrow{display:none}
.hero p,.pagehero p{font-size:17px!important;color:var(--muted)!important;margin:0 0 18px!important}
.bigsearch{
  display:flex;align-items:center;gap:8px;padding:7px;max-width:900px!important;
  border:2px solid var(--text)!important;background:var(--panel)!important;
  border-radius:14px!important;box-shadow:none!important;
}
.bigsearch input{flex:1;min-width:0;min-height:54px;border:0!important;background:transparent!important;color:var(--text)!important;font-size:20px;line-height:1.4;padding:10px 16px!important;outline:none!important}
.bigsearch input::placeholder{color:#78828c}
.bigsearch button{min-height:53px;padding:11px 24px;font-size:17px;white-space:nowrap}
.helperline{display:block;color:var(--muted)!important;font-size:15px;margin-top:11px}
.quicklinks{display:none!important} /* All essentials are directly visible. */
#categories-section{margin:18px 0 18px}
.sectionhead{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:24px 0 15px}
.sectionhead h2{font-size:23px;letter-spacing:-.03em;font-weight:820;margin:0}
.textbtn{background:transparent;border:0;border-bottom:1px solid var(--muted);color:var(--text);font-weight:740;padding:9px 1px;font-size:15px;min-height:45px}
.categorygrid{display:flex;gap:9px;flex-wrap:wrap;grid-template-columns:unset!important}
.categorycard{
  display:flex;align-items:center;min-height:52px!important;width:auto!important;
  background:var(--panel)!important;border:1px solid var(--line)!important;border-radius:11px!important;
  padding:10px 16px!important;color:var(--text)!important;box-shadow:none!important;
  text-align:left;max-width:100%;flex:0 1 auto;
}
.categorycard:before,.categorycard:after{display:none!important}
.categorycard:hover{background:var(--soft)!important;border-color:var(--muted)!important}
.categorycard span{position:relative!important;display:flex;gap:10px;align-items:center;flex-wrap:wrap;z-index:1}
.categorycard strong{font-size:16px!important;line-height:1.3;color:var(--text)!important;letter-spacing:0;font-weight:720}
.categorycard em{font-style:normal;font-size:14px!important;color:var(--muted)!important;white-space:nowrap}
.results-head{margin-top:26px;border-bottom:1px solid var(--line);padding-bottom:12px}
.results-head h2{margin-right:auto}
.sectioncount{font-size:15px;color:var(--muted);font-weight:600}
.cardgrid{display:grid;grid-template-columns:1fr!important;gap:10px}
.itemcard{display:block;min-height:0!important;border:1px solid var(--line);border-radius:13px!important;box-shadow:none!important;background:var(--panel);overflow:hidden}
.cardmedia{display:none!important}
.cardbody{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title actions" "meta actions";
  column-gap:20px;row-gap:7px;align-items:center;padding:17px 19px!important;min-height:92px;
}
.cardbody h3{grid-area:title;font-size:18px!important;font-weight:780!important;line-height:1.38!important;margin:0!important;max-width:100%;min-width:0;display:block!important;white-space:normal;overflow-wrap:anywhere}
.card-title{display:block;border:0;background:transparent;color:var(--text);font-weight:780;text-align:left;padding:0;line-height:1.4;width:100%;font-size:18px}
.card-title:hover{text-decoration:underline;text-underline-offset:3px}
.cardbody p{display:none!important}
.cardmeta{grid-area:meta;font-size:14px!important;color:var(--muted)!important;margin:0!important;padding:0!important;border:0!important;line-height:1.4;min-width:0}
.cardactions{grid-area:actions;display:flex!important;gap:8px!important;margin:0!important;align-items:center;flex-wrap:nowrap}
.cardactions .primary,.cardactions .secondary,.cardactions .favbtn{min-height:47px!important;font-size:15px!important;padding:10px 15px!important;border-radius:10px!important;width:auto!important;flex:auto!important;white-space:nowrap;font-weight:750!important}
.cardactions .favbtn{border:1px solid var(--line);background:var(--panel);color:var(--text);font-size:15px!important;min-width:80px}
.cardactions .favbtn:hover{background:var(--soft)}
#more-button{margin:22px auto 0;min-height:53px;display:flex;padding:10px 26px;font-size:17px}
.empty{padding:30px 18px;text-align:center;color:var(--muted)}
.empty h3{color:var(--text);font-size:22px}
.empty p{font-size:17px}
.compact-tools{margin:0 0 14px;display:block}
.filters-details>summary,.reader-advanced>summary{display:inline-flex;align-items:center;min-height:48px;gap:7px;background:var(--panel);border:1px solid var(--line);border-radius:11px;padding:10px 15px;font-size:16px;font-weight:700;color:var(--text);list-style:none}
.filters-details>summary:after,.reader-advanced>summary:after{content:"⌄";font-size:18px;color:var(--muted);padding-left:7px}
.filters-details[open]>summary:after,.reader-advanced[open]>summary:after{content:"⌃"}
.filters-details>summary::-webkit-details-marker,.reader-advanced>summary::-webkit-details-marker{display:none}
.filter-panel{padding:17px;margin-top:11px;border:1px solid var(--line);border-radius:12px;background:var(--panel);display:grid;gap:13px}
.filter-panel>input{width:100%;min-height:52px;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:9px;padding:12px 15px}
.vault-filters{display:flex;flex-wrap:wrap;gap:12px}
.vault-filters label{display:flex;flex-direction:column;gap:6px;font-size:15px;font-weight:650;flex:1;min-width:160px;color:var(--muted)}
.vault-filters select{min-height:51px;background:var(--panel);color:var(--text);border:1px solid var(--line);padding:8px 12px;border-radius:10px;width:100%;font-size:16px}
.category-breadcrumbs{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 14px}
.breadcrumb-link{border:0;background:transparent;color:var(--text);font-weight:730;padding:7px 5px;min-height:44px}
.breadcrumb-sep{color:var(--muted)}
.statusbar{display:flex;flex-wrap:wrap;align-items:center;gap:20px;color:var(--muted);font-size:14px;margin:24px 0 0}
.publicfooter{display:flex;max-width:1100px;margin:auto;gap:18px;justify-content:space-between;padding:17px 24px 35px;border-top:1px solid var(--line);color:var(--muted);font-size:14px}
.publicfooter>span:last-child{display:flex;gap:22px}
.publicfooter a:hover{text-decoration:underline}
.overlay,.peekbackdrop{position:fixed;inset:0;z-index:80;background:rgb(17 22 28 / 62%);display:flex;overflow:auto}
.drawer{background:var(--panel);width:min(465px,100vw);height:100dvh;overflow-y:auto;overflow-x:hidden;box-shadow:var(--shadow)}
.drawerhead{position:sticky;top:0;background:var(--panel);z-index:2;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:22px 20px;border-bottom:1px solid var(--line)}
.drawerhead h2{font-size:27px;letter-spacing:-.035em;margin:0}
.closebtn{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:10px;color:var(--text);background:var(--panel);min-height:49px;padding:10px 15px;font-size:16px;font-weight:740}
.closebtn:hover{background:var(--soft)}
.drawer-search{display:block;width:calc(100% - 36px);margin:20px 18px 10px;padding:12px 14px;min-height:55px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--text);font-size:17px}
#drawer-category-summary{font-size:14px;color:var(--muted);margin:0 18px 8px}
.drawernav{padding:0 12px 16px}
.drawernav button{color:var(--text)}
.drawer-cat-group{border-bottom:1px solid var(--line)}
.drawer-cat-row{display:flex;align-items:stretch;min-height:60px;gap:3px}
.drawernav .drawer-cat-button{min-width:0;flex:1;text-align:left;display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:58px;font-size:17px;font-weight:740;border:0;background:transparent;border-radius:10px;padding:10px 12px}
.drawernav .drawer-cat-toggle{min-width:47px;min-height:58px;border:0;background:transparent;border-radius:10px;font-size:19px}
.drawer-cat-count{font-size:14px;color:var(--muted);font-weight:680;border-radius:8px;padding:4px 6px;background:var(--soft)}
.drawernav .drawer-cat-button:hover,.drawernav .drawer-cat-toggle:hover,.drawernav .drawer-subcat:hover{background:var(--soft)}
.drawer-cat-children{display:none;margin-left:14px;padding:2px 0 9px;border-left:2px solid var(--line)}
.drawer-cat-group.expanded .drawer-cat-children{display:block}
.drawernav .drawer-subcat{width:100%;display:flex;align-items:center;justify-content:space-between;min-height:53px;padding:10px 12px;border:0;border-radius:10px;background:transparent;text-align:left;font-size:16px}
.secondary-nav{display:flex;flex-direction:column;gap:5px;padding:18px}
.secondary-nav button{min-height:50px;border:1px solid var(--line);background:var(--panel);border-radius:9px;text-align:left;padding:10px 14px}
.searchoverlay{z-index:100;align-items:flex-start;justify-content:center;padding:7vh 14px}
.searchpanel{background:var(--panel);border-radius:16px;width:min(710px,100%);max-height:86vh;overflow:hidden;box-shadow:var(--shadow);border:1px solid var(--line)}
.searchpanel-top{display:flex;gap:10px;align-items:center;padding:16px;border-bottom:1px solid var(--line)}
.searchpanel-top input{flex:1;min-width:0;min-height:54px;border:1px solid var(--line);border-radius:10px;color:var(--text);background:var(--panel);padding:12px;font-size:19px}
.searchresults{max-height:60vh;overflow-y:auto;padding:10px}
.searchresult{background:transparent;color:var(--text);display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;border:0;border-bottom:1px solid var(--line);min-height:70px;padding:12px;border-radius:9px;gap:15px}
.searchresult:hover{background:var(--soft)}
.searchresult span{display:flex;flex-direction:column;gap:5px;min-width:0}
.searchresult strong{font-size:17px;line-height:1.3}
.searchresult small,.searchresult em{font-size:14px;color:var(--muted);font-style:normal}
.searchfoot{padding:13px 18px;color:var(--muted);font-size:14px}
.peekbackdrop{z-index:110;justify-content:flex-end}
.promptpeek{background:var(--panel);width:min(760px,100vw);height:100dvh;overflow-y:auto;overflow-x:hidden;box-shadow:var(--shadow)}
.peekclosebar{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;z-index:4;background:var(--panel);border-bottom:1px solid var(--line);padding:12px 24px;min-height:83px}
.peekclosebar>.primary{white-space:nowrap;min-height:49px;font-size:17px}
.peekcover{display:none!important}
.peekbody{padding:24px 27px 70px}
.peekbody .eyebrow{font-size:14px;color:var(--muted);letter-spacing:0;line-height:1.5;font-weight:650}
.peekbody h2{font-size:clamp(27px,3.1vw,35px);font-weight:850;letter-spacing:-.035em;line-height:1.23;margin:10px 0}
.peekdesc{font-size:17px;line-height:1.48;color:var(--muted);margin:0 0 10px}
.peek-meta-pills{display:none} /* Metadata remain accessible under the GitHub file and category context. */
.peekactions{display:flex;align-items:center;gap:8px;margin:18px 0;flex-wrap:wrap}
.peekactions button{min-height:50px;padding:10px 16px;border-radius:11px;font-size:16px}
.peekactions .favbtn{border:1px solid var(--line);background:var(--panel);color:var(--text)}
.peeksection{margin-top:16px}
.peeksection-title{font-size:17px;font-weight:760;margin:0 0 12px}
.promptbox{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--soft);border:1px solid var(--line);border-radius:13px;padding:23px;color:var(--text);font-size:17px;line-height:1.75;font-family:inherit;max-height:none;min-height:220px;overflow-x:hidden;user-select:text}
.reader-advanced{margin-top:24px}
.reader-advanced[open]{padding-bottom:22px}
.reader-advanced>summary{font-size:16px}
.file-actions{display:flex;flex-wrap:wrap;gap:9px;margin:18px 0}
.file-actions .secondary{min-height:48px}
.vault-editor{background:var(--panel);border:1px solid var(--line);border-radius:13px;padding:15px;margin:16px 0}
.editor-heading h3,.vault-sheet-notes h3,.vault-related h3{font-size:19px;margin:0 0 14px}
.editor-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.editor-columns>div{min-width:0}
.editor-columns label{display:block;font-weight:740;font-size:15px;margin:0 0 6px}
.editor-reference,.editor-columns textarea{display:block;width:100%;min-height:280px;max-height:60vh;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;padding:14px;font:15px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--text);background:var(--soft);border:1px solid var(--line);border-radius:10px}
.editor-columns textarea{resize:vertical}
.editor-footer{margin-top:16px}
.editor-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:10px}
.editor-actions button{min-height:47px;font-size:15px}
.editor-warning,.smallnotice{color:var(--muted);font-size:14px}
.vault-sheet-notes{border-top:1px solid var(--line);margin:18px 0;padding-top:20px}
.vault-sheet-notes textarea{width:100%;min-height:100px;resize:vertical;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:9px;font-size:16px;padding:12px}
.notes-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}
.notes-footer button{min-height:48px}
.vault-related{border-top:1px solid var(--line);margin-top:19px;padding-top:20px}
.related-grid{display:grid;gap:8px;grid-template-columns:1fr 1fr}
.related-item{display:block;text-align:left;padding:13px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--text);min-height:83px;overflow-wrap:anywhere}
.related-item strong{display:block;font-size:15px}
.related-item small{display:block;font-size:14px;color:var(--muted);margin-top:4px}
#reader-notice{margin:17px 0}
.peeknav{display:flex;gap:8px;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding-top:17px;margin-top:19px}
.peeknav button{min-height:48px;padding:10px 15px}
.navcounter{font-size:14px;color:var(--muted)}
.toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:var(--text);color:var(--bg);border-radius:12px;padding:13px 21px;z-index:200;box-shadow:var(--shadow);font-weight:700;font-size:16px;max-width:90vw;text-align:center}
body.reader-open{overflow:hidden}
@media(max-width:900px){
  .appheader{padding:16px 20px;gap:11px}
  .topnav{gap:2px}
  .navbtn,.top-more>summary{padding:10px;font-size:15px}
  .content{padding:0 20px 42px}
  .cardbody{grid-template-columns:minmax(0,1fr) auto}
}
@media(max-width:680px){
  html{font-size:17px}
  .appheader{gap:10px;padding:15px 16px;flex-wrap:wrap;min-height:0}
  .brandbutton{margin-right:auto}
  .brand-text strong{font-size:18px}
  .privatebadge{display:none}
  .topnav{order:3;margin:0;display:grid;grid-template-columns:repeat(4,auto);justify-content:space-between;width:100%;gap:1px}
  .navbtn,.top-more>summary{font-size:15px;min-height:48px;padding:8px 11px}
  .more-menu{right:0}
  .content{padding:0 15px 38px}
  .hero,.pagehero{padding:29px 0 14px!important}
  .hero h1,.pagehero h1{font-size:37px}
  .bigsearch{gap:5px;padding:6px}
  .bigsearch input{min-height:53px;font-size:18px;padding:8px 10px!important}
  .bigsearch button{padding:9px 17px;min-width:86px}
  .helperline{font-size:14px}
  .sectionhead{margin:19px 0 11px}
  .sectionhead h2{font-size:22px}
  .categorycard{min-height:51px!important;padding:9px 13px!important}
  .categorycard strong{font-size:15px!important}
  .categorycard em{font-size:13px!important}
  .cardbody{display:grid!important;grid-template-columns:1fr!important;grid-template-areas:"title" "meta" "actions";padding:16px!important;row-gap:8px}
  .cardbody h3{font-size:18px!important}
  .cardactions{display:flex!important;justify-content:flex-start;margin-top:7px!important;width:100%;gap:8px!important}
  .cardactions .primary,.cardactions .secondary,.cardactions .favbtn{min-height:49px!important;flex:1!important}
  .peekclosebar{padding:10px 13px;min-height:75px}
  .peekclosebar .closebtn{min-height:49px;font-size:15px}
  .peekclosebar>.primary{font-size:15px;padding:10px 13px}
  .peekbody{padding:22px 15px 55px}
  .peekbody h2{font-size:29px}
  .promptbox{font-size:17px;padding:18px;line-height:1.7}
  .peekactions{gap:7px}
  .peekactions button{flex:1}
  .editor-columns{grid-template-columns:1fr}
  .related-grid{grid-template-columns:1fr}
  .statusbar{gap:13px}
  .publicfooter{padding:18px 15px 28px;display:flex;flex-wrap:wrap}
}
@media(max-width:400px){
  .topnav{gap:0}
  .navbtn,.top-more>summary{font-size:14px;padding:8px 9px}
  .brandmark{width:39px;height:39px}
  .hero h1{font-size:35px}
  .bigsearch button{padding:9px 12px;min-width:77px}
  .cardactions{flex-wrap:wrap}
  .cardactions .favbtn{flex:0 0 auto!important}
  .peekactions{display:grid;grid-template-columns:1fr 1fr}
  .peekactions button:last-child{grid-column:1 / -1}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}
/* Mobile PWA install affordance, safe-area support and offline guidance */
.install-guide{color:var(--text);background:var(--panel);border:1px solid var(--line);border-radius:16px;width:min(440px,calc(100vw - 24px));max-height:90dvh;overflow:auto;padding:24px;box-shadow:var(--shadow)}
.install-guide::backdrop{background:rgba(10,16,23,.62)}
.install-guide h2{font-size:24px;letter-spacing:-.035em;line-height:1.2;margin:0 0 15px}
.install-guide p{font-size:17px;line-height:1.55;margin:12px 0}
.install-guide .primary{min-width:135px;margin-top:12px}
@media(max-width:680px){
 .appheader{padding-top:calc(15px + env(safe-area-inset-top, 0px))}
 .publicfooter{padding-bottom:calc(28px + env(safe-area-inset-bottom, 0px))}
 .peekclosebar{padding-top:calc(10px + env(safe-area-inset-top, 0px))}
 .peekbody{padding-bottom:calc(55px + env(safe-area-inset-bottom, 0px))}
 .drawerhead{padding-top:calc(22px + env(safe-area-inset-top, 0px))}
}


/* V7 — Mini-graphics, seven categories, quality indicator, one-tap copy */
:root{--blueink:#173656;--teal:#126c77;--amber:#a75d16}
body:not([data-theme="dark"]){--accent:var(--blueink)}
.brandmark{background:linear-gradient(140deg,#204c74,#0f263e);box-shadow:3px 3px 0 #c6e6ee}
.hero,.pagehero{position:relative;background:radial-gradient(ellipse at 87% 18%,rgba(25,132,157,.095) 0,transparent 32%),linear-gradient(135deg,rgba(224,240,249,.38),transparent 65%)!important;border-radius:16px!important;padding-left:18px!important;padding-right:18px!important;border-top:4px solid #173656!important}
.hero h1{letter-spacing:-.045em}
.bigsearch{box-shadow:0 6px 18px rgba(16,44,72,.06)!important}
#categories-section .sectionhead{margin-top:17px}
.categorygrid{gap:11px}
.categorycard{gap:10px;min-height:66px!important;padding:9px 15px!important;border-left:3px solid #176783!important}
.categorycard:hover{box-shadow:0 5px 15px rgba(12,37,58,.08)!important;transform:translateY(-1px)}
.categorycard .category-icon{display:flex;align-items:center;justify-content:center;flex:0 0 37px;width:37px;height:37px;border-radius:10px;background:#e6f2fa;color:#173d60;font-size:24px;font-weight:800}
.categorycard .category-info{display:flex;gap:5px;flex-direction:column;align-items:flex-start}
.categorycard .category-info strong{font-size:16px!important;white-space:nowrap}
.categorycard .category-info em{color:var(--muted);font-size:13px}
.categorycard:nth-child(2){border-left-color:#bf6a3b!important}
.categorycard:nth-child(2) .category-icon{color:#873f22;background:#faede2}
.categorycard:nth-child(3){border-left-color:#477d46!important}
.categorycard:nth-child(3) .category-icon{color:#2e642e;background:#e9f3e8}
.categorycard:nth-child(4){border-left-color:#7663b2!important}
.categorycard:nth-child(4) .category-icon{color:#554090;background:#eeebfa}
.categorycard:nth-child(5){border-left-color:#126c77!important}
.categorycard:nth-child(5) .category-icon{color:#126c77;background:#e3f5f6}
.categorycard:nth-child(6){border-left-color:#ad7722!important}
.categorycard:nth-child(6) .category-icon{color:#815a15;background:#fbf2d9}
.categorycard:nth-child(7){border-left-color:#526070!important}
.categorycard:nth-child(7) .category-icon{color:#38434d;background:#e9edf1}
.clickable-card{cursor:copy;transition:border-color .13s ease,box-shadow .13s ease}
.clickable-card:hover{border-color:#709db6!important;box-shadow:0 4px 13px rgba(29,68,93,.07)!important}
.clickable-card:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.clickable-card h3{pointer-events:none}
.cardmeta{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.category-small{font-weight:580}
.type-small{background:#edf0f7;color:#35415e;border-radius:7px;padding:3px 7px;font-weight:720}
.quality-pill{display:inline-flex;align-items:center;gap:7px;min-height:28px;padding:2px 8px;border:1px solid #b7ced5;background:#ecf5f8;color:#245065;border-radius:9px;font-size:14px;font-weight:760;white-space:nowrap}
.quality-meter{display:block;width:35px;height:6px;border-radius:6px;background:linear-gradient(to right,#15748b var(--q),#c7dce1 var(--q));border:1px solid #c7dce1}
.cardactions .remove-prompt{min-width:48px!important;min-height:48px!important;flex:0 0 48px!important;border:1px solid #dfcacb;background:#fff8f8;color:#8b2735;border-radius:10px;font-size:26px;line-height:1;font-weight:600;padding:6px;cursor:pointer}
.cardactions .remove-prompt:hover,.cardactions .remove-prompt:focus-visible{background:#fae9e9;border-color:#b75a63}
.reader-quality{display:inline-flex;color:#245065;border:1px solid #b7ced5;background:#e9f3f7;border-radius:9px;padding:6px 10px;font-size:15px;font-weight:720;margin:9px 0}
.reader-supporting{border-top:1px solid var(--line);padding-top:20px;margin:16px 0}
.reader-supporting h3{margin:0 0 12px;font-size:18px}
#reader-support-links{display:flex;flex-wrap:wrap;gap:9px}
#reader-source-link{margin:12px 0;display:inline-flex}
body[data-theme="dark"] .type-small,body[data-theme="dark"] .quality-pill,body[data-theme="dark"] .reader-quality{background:#243d4a;color:#e4f3f7;border-color:#4e7b8c}
body[data-theme="dark"] .categorycard .category-icon{background:#304450;color:#e7f5fa}
body[data-theme="dark"] .cardactions .remove-prompt{background:#3c292c;color:#ffb4c2;border-color:#875661}
@media(max-width:680px){
  .hero,.pagehero{padding-left:12px!important;padding-right:12px!important}
  .categorycard{min-height:61px!important}
  .categorycard .category-info strong{white-space:normal;font-size:15px!important}
  .categorycard .category-icon{width:33px;height:33px;flex-basis:33px;font-size:22px}
  .cardactions{flex-wrap:wrap!important}
  .cardactions .primary,.cardactions .secondary{flex:1!important}
  .cardactions .remove-prompt{flex:0 0 48px!important}
  .quality-pill{font-size:13px}
}
@media(prefers-reduced-motion:reduce){.clickable-card,.categorycard{transition:none!important;transform:none!important}}


/* =====================================================================
   V8 / THE DANNATO ARCHIVIO — INK / PAPER / SELECTIVE ACCENT
   Large type, readable at 70+, zero external font/image requests.
   ===================================================================== */
:root{
  --ink:#101010;--paper:#f9f9f7;--surface:#fff;--edge:#d9d9d6;
  --accent-ui:#285bff;--accent-soft:#eaf0ff;--accent-ink:#285bff;
  --soft-shadow:0 7px 24px rgba(0,0,0,.055);--motion:160ms;
}
body[data-accent="vermillion"]{--accent-ui:#ef482f;--accent-soft:#fff0ed;--accent-ink:#c53622}
body[data-accent="lime"]{--accent-ui:#9ed22e;--accent-soft:#eff7d8;--accent-ink:#526e12}
body[data-theme="dark"]{
  --ink:#f4f4f1;--paper:#111;--surface:#1a1a1a;--edge:#393939;
  --accent-soft:#22283c;--accent-ink:#a5bcff;
}
body[data-theme="dark"][data-accent="vermillion"]{--accent-soft:#331f1f;--accent-ink:#ff9b87}
body[data-theme="dark"][data-accent="lime"]{--accent-soft:#29321f;--accent-ink:#d3f080}
body{background:var(--paper)!important;color:var(--ink)!important}
.appheader,.content,.publicfooter{max-width:1220px}
.appheader{min-height:86px;border-bottom:2px solid var(--ink);padding-top:13px;padding-bottom:13px}
.brandbutton{gap:12px}
.brandmark{width:48px;height:48px;flex-basis:48px;border-radius:10px;box-shadow:none!important;
  color:white;background:var(--ink)!important;font-size:31px;font-weight:1000;letter-spacing:-.12em}
.brand-dot,.headline-dot{color:var(--accent-ui)}
.brand-text strong{font-size:clamp(17px,1.55vw,23px);font-weight:950;line-height:1.08;letter-spacing:-.055em;color:var(--ink)}
.brand-text small{font-size:12px;font-weight:750;letter-spacing:.12em;color:var(--muted);margin-top:4px}
.privatebadge{border-radius:6px;background:var(--ink);color:var(--paper);font-size:11px;font-weight:800}
.topnav .navbtn,.top-more>summary{font-size:15px;font-weight:800;letter-spacing:-.012em}
.topnav .navbtn.active{background:var(--ink);color:var(--paper)}
.more-menu{border:2px solid var(--ink);border-radius:12px;min-width:240px}
.accent-options{padding:10px 9px;display:flex;gap:10px;align-items:center;border-top:1px solid var(--edge);font-size:14px;font-weight:850}
.accent-option{border-radius:50%;width:40px;height:40px;min-height:40px;padding:0!important;border:2px solid transparent!important;font-size:27px;background:transparent!important;line-height:1}
.accent-option[data-accent="cobalt"]{color:#285bff}
.accent-option[data-accent="vermillion"]{color:#ef482f}
.accent-option[data-accent="lime"]{color:#9ed22e}
.accent-option[aria-pressed="true"]{outline:2px solid var(--ink);outline-offset:1px}
.hero,.pagehero{
  padding:44px 0 24px!important;
  border:0!important;border-radius:0!important;
  background:transparent!important;text-align:left!important;
}
.hero h1,.pagehero h1{
  max-width:860px;font-size:clamp(52px,7.1vw,96px)!important;
  line-height:.99!important;letter-spacing:-.079em!important;
  font-weight:1000!important;margin:7px 0 18px!important;color:var(--ink)!important;
  word-break:normal;overflow-wrap:normal;
}
.hero p,.pagehero p{color:var(--muted)!important;font-size:clamp(17px,2vw,22px)!important;font-weight:660;margin:0 0 29px!important}
.bigsearch{max-width:100%!important;min-height:80px;gap:7px;border:2px solid var(--ink)!important;
 background:var(--surface)!important;border-radius:12px!important;padding:8px 9px!important;box-shadow:none!important}
.bigsearch input{font-size:clamp(18px,2vw,23px)!important;font-weight:570;min-height:57px!important}
.bigsearch button{min-height:59px!important;background:var(--ink)!important;border-color:var(--ink)!important;color:var(--paper)!important;font-size:18px;font-weight:850}
.helperline{font-size:14px;letter-spacing:.025em}
.ui-icon{display:inline-block;flex:0 0 auto;width:22px;height:22px}
.overview{margin:4px 0 34px}
.overview-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:2px solid var(--ink);border-radius:12px;overflow:hidden;background:var(--surface)}
.overview-stat{min-width:0;min-height:125px;display:flex;flex-direction:column;justify-content:space-between;gap:3px;padding:16px 19px;border-right:1px solid var(--edge)}
.overview-stat:last-child{border-right:0}
.stat-caption,.section-kicker{display:block;font-size:12px;font-weight:900;letter-spacing:.15em;text-transform:uppercase;color:var(--muted)}
.overview-stat strong{font-size:clamp(29px,3.3vw,45px);line-height:1;font-weight:1000;letter-spacing:-.07em;color:var(--ink);font-variant-numeric:tabular-nums}
.stat-desc{font-size:13px;font-weight:650;color:var(--muted)}
.discover{margin:27px 0 37px}
.discover-head{display:flex;justify-content:space-between;align-items:end;gap:15px;margin:0 0 18px}
.discover h2,.discover h3{color:var(--ink);font-weight:950;letter-spacing:-.055em;line-height:1.02;margin:7px 0 0}
.discover h2{font-size:clamp(33px,3.6vw,46px)}
.discover h3{font-size:clamp(23px,2.5vw,31px)}
.discover .textbtn{font-size:15px;font-weight:850;white-space:nowrap}
.feature-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.smart-card{
  display:flex;flex-direction:column;gap:0;min-height:245px;padding:18px 16px 16px;
  background:var(--surface);border:1.5px solid var(--ink);border-radius:11px;
  transition:transform var(--motion) ease, box-shadow var(--motion) ease;
}
.smart-card:hover{transform:translateY(-3px);box-shadow:6px 6px 0 var(--accent-ui)}
.smart-top,.smart-kind,.smart-foot{display:flex;align-items:center;gap:8px}
.smart-top{justify-content:space-between}
.smart-kind{font-size:12px;text-transform:uppercase;font-weight:880;letter-spacing:.03em}
.smart-kind .ui-icon{width:23px;height:23px}
.smart-q{display:inline-flex;align-items:center;white-space:nowrap;font-weight:950;font-size:13px;
  background:var(--accent-soft);color:var(--accent-ink);border-radius:5px;padding:6px 8px}
.smart-card h3{font-size:clamp(17px,1.6vw,21px);line-height:1.17;font-weight:920;letter-spacing:-.035em;
  margin:19px 0 8px;overflow-wrap:anywhere;max-height:6.5em;overflow:hidden}
.smart-card p{font-size:14px;color:var(--muted);font-weight:600;line-height:1.3;margin:0 0 17px}
.smart-foot{gap:7px;margin-top:auto;flex-wrap:wrap}
.smart-foot .primary,.smart-foot .secondary{min-height:44px;font-size:14px;font-weight:820;padding:7px 10px;flex:1}
.smart-foot .primary{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.discover-bottom{display:grid;grid-template-columns:1.15fr 1fr;gap:13px;margin-top:14px}
.relevant-panel,.random-panel{border:1px solid var(--edge);border-radius:11px;padding:19px;background:var(--surface);min-width:0}
.relevant-panel h3,.random-panel h3{margin-bottom:14px}
.relevant-grid{display:grid;gap:0}
.relevant-item{display:flex;justify-content:space-between;align-items:center;gap:9px;padding:13px 0;border-bottom:1px solid var(--edge)}
.relevant-item:last-child{border:0}
.relevant-title{background:transparent;color:var(--ink);border:0;text-align:left;font-size:17px;font-weight:780;line-height:1.27;min-height:45px;flex:1;padding:6px 2px}
.relevant-title:hover{text-decoration:underline;text-underline-offset:3px}
.random-panel{background:var(--ink);color:var(--paper);border-color:var(--ink);overflow:hidden}
.random-panel .section-kicker,.random-panel h3{color:var(--paper)}
.random-panel .section-kicker{opacity:.6}
.random-card{min-height:117px}
.random-kind{font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;opacity:.68}
.random-card h4{font-size:clamp(22px,2.7vw,34px);line-height:1.08;letter-spacing:-.055em;margin:8px 0 12px;font-weight:940}
.random-card .smart-q{background:var(--paper);color:var(--ink)}
.random-card .smart-foot{margin-top:18px}
.random-card .primary{background:var(--paper);color:var(--ink);border-color:var(--paper)}
.random-card .secondary{background:transparent;color:var(--paper);border-color:rgba(255,255,255,.45)}
.random-button{min-height:47px;color:var(--paper);border:0;border-top:1px solid rgba(255,255,255,.35);
  background:transparent;font-size:16px;font-weight:800;text-align:left;padding:12px 0 0;margin-top:18px;width:100%}
.random-button:hover{text-decoration:underline}
.sectionhead h2{font-size:clamp(21px,2.2vw,29px);letter-spacing:-.045em;font-weight:930}
#categories-section{margin-bottom:31px}
.categorycard{border:1.5px solid var(--edge)!important;border-left:1.5px solid var(--edge)!important;border-radius:10px!important}
.categorycard:nth-child(n){border-left-color:var(--edge)!important}
.categorycard .category-icon{color:var(--ink)!important;background:var(--paper)!important}
.categorycard:hover{border-color:var(--accent-ui)!important;transform:translateY(-2px)}
.cardgrid{gap:11px!important}
.itemcard{border:1.5px solid var(--edge)!important;border-radius:10px!important;transition:transform var(--motion),border-color var(--motion),box-shadow var(--motion)}
.itemcard:hover,.itemcard:focus-within{border-color:var(--ink)!important;box-shadow:4px 4px 0 var(--accent-ui)!important;transform:translateY(-1px)}
.cardbody{padding:19px 21px!important}
.card-identity{grid-area:title;display:flex;align-items:center;min-width:0;gap:14px}
.item-icon{display:inline-flex;justify-content:center;align-items:center;width:48px;height:48px;flex:0 0 48px;
 background:var(--paper);border:1px solid var(--edge);border-radius:10px;color:var(--ink)}
.item-icon .ui-icon{width:26px;height:26px}
.cardbody h3{grid-area:auto!important;min-width:0;font-size:clamp(17px,1.65vw,21px)!important;font-weight:850!important}
.cardmeta{padding-left:62px!important;gap:9px}
.quality-pill{border:1px solid var(--edge);background:var(--paper);color:var(--ink);font-weight:880;border-radius:5px}
.quality-meter{background:linear-gradient(to right,var(--accent-ui) var(--q),var(--edge) var(--q));border:0}
.local-use{font-size:13px;color:var(--muted);font-weight:650}
.cardactions .primary{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.cardactions .remove-prompt{background:var(--surface);color:var(--muted);border-color:var(--edge);font-size:23px}
.cardactions .remove-prompt:hover{background:var(--ink);color:var(--paper)}
.itemcard.just-copied{border-color:var(--accent-ui)!important;background:var(--accent-soft)!important}
.peekclosebar{min-height:77px!important;border-bottom:2px solid var(--ink)}
.peekclosebar .primary{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.promptpeek{width:min(860px,100vw)!important}
.peekbody{padding:27px clamp(18px,3.7vw,41px) 70px!important}
.peekbody h2{font-size:clamp(33px,4.2vw,49px)!important;line-height:1.04!important;font-weight:970;letter-spacing:-.065em}
.reader-ident{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.reader-kind-icon{width:48px;height:48px;flex:0 0 48px;background:var(--ink);color:var(--paper);
 display:flex;align-items:center;justify-content:center;border-radius:10px}
.reader-kind-icon .ui-icon{height:27px;width:27px}
.reader-quality{border:1px solid var(--edge);background:var(--paper);color:var(--ink);font-weight:850;margin:0}
.pin-featured{min-height:45px;border:1px solid var(--edge);border-radius:8px;padding:9px 12px;
 background:var(--surface);color:var(--ink);font-size:15px;font-weight:830}
.pin-featured[aria-pressed="true"]{background:var(--accent-soft);border-color:var(--accent-ui)}
.prompt-workbench,.prompt-insights,.protocol-check{margin-top:26px;padding-top:24px;border-top:2px solid var(--ink)}
.workbench-header h3{font-size:clamp(23px,3vw,34px);font-weight:970;letter-spacing:-.055em;margin:3px 0 16px}
.mode-tabs{display:flex;gap:6px;flex-wrap:wrap;background:var(--paper);padding:6px;border-radius:10px;border:1px solid var(--edge)}
.mode-tab{min-height:49px;flex:1;border:1px solid transparent;background:transparent;color:var(--muted);
 border-radius:7px;padding:10px 12px;font-weight:830;font-size:15px;white-space:nowrap}
.mode-tab.active{background:var(--ink);color:var(--paper)}
.mode-explanation{color:var(--muted);font-size:15px;font-weight:600;margin:14px 0}
.peeksection-title{font-size:16px;font-weight:850;letter-spacing:.035em}
.promptbox{font:19px/1.76 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
 padding:clamp(20px,3vw,28px);white-space:pre-wrap;overflow-wrap:anywhere;user-select:text;
 background:var(--surface);color:var(--ink)!important;border:2px solid var(--edge);border-radius:16px;
 max-height:none;overflow:visible;box-shadow:0 8px 24px rgba(0,0,0,.04)}
.workbench-actions{display:flex;gap:9px;flex-wrap:wrap;margin:17px 0}
.workbench-actions button{min-height:49px;font-size:15px}
.workbench-actions .primary{background:var(--ink);border-color:var(--ink);color:var(--paper)}
.prompt-workbench>.smallnotice,.prompt-insights>.smallnotice,.protocol-check>.smallnotice{font-size:13px;line-height:1.55}
.insight-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.insight-tile{padding:17px 9px;background:var(--paper);border:1px solid var(--edge);border-radius:9px;
 display:flex;flex-direction:column;gap:8px;text-align:center}
.insight-tile strong{font-size:clamp(26px,4vw,43px);font-weight:1000;letter-spacing:-.07em;font-variant-numeric:tabular-nums;line-height:1}
.insight-tile span{color:var(--muted);font-size:14px;font-weight:730}
.usage-header{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:23px 0 11px}
.usage-header strong{font-size:13px;letter-spacing:.12em}
.usage-header span{font-size:13px;color:var(--muted)}
.usage-chart{height:126px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;
 padding:14px 12px 3px;background:var(--paper);border:1px solid var(--edge);border-radius:10px}
.usage-day{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0}
.usage-column{width:100%;height:85px;display:flex;align-items:flex-end;justify-content:center}
.usage-bar{display:block;width:min(33px,80%);min-height:3px;background:var(--accent-ui);border-radius:4px 4px 0 0}
.usage-bar.empty-bar{background:var(--edge)}
.usage-day-label{font-size:12px;font-weight:750;color:var(--muted);white-space:nowrap}
.content-metrics{display:flex;gap:8px;flex-wrap:wrap;margin:13px 0}
.content-metrics span{font-size:13px;color:var(--muted);font-weight:700;padding:7px 8px;border:1px solid var(--edge);border-radius:7px}
.protocol-summary{font-size:16px;font-weight:760}
.protocol-checks{display:flex;gap:8px;flex-wrap:wrap;margin:13px 0}
.protocol-chip{display:inline-flex;gap:7px;align-items:center;font-size:14px;font-weight:750;padding:9px 12px;border:1px solid var(--edge);border-radius:7px}
.protocol-chip.present{background:var(--accent-soft);color:var(--ink)}
.protocol-chip.missing{background:var(--paper);color:var(--muted)}
.reader-advanced{margin:27px 0}
.reader-advanced>summary{font-size:16px;min-height:50px;border:1px solid var(--edge)}
.toast{animation:vault-toast-in var(--motion) cubic-bezier(.2,.9,.3,1.1) both}
@keyframes vault-toast-in{from{opacity:0;transform:translate(-50%,10px) scale(.98)}to{opacity:1;transform:translate(-50%,0) scale(1)}}
@media(max-width:1080px){
 .feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .overview-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .overview-stat:nth-child(2){border-right:0}
 .overview-stat:nth-child(-n+2){border-bottom:1px solid var(--edge)}
 .smart-card{min-height:200px}
 .discover-bottom{grid-template-columns:1fr 1fr}
}
@media(max-width:680px){
 .appheader{min-height:73px;padding-top:calc(12px + env(safe-area-inset-top,0px))}
 .brandmark{width:43px;height:43px;flex-basis:43px;font-size:28px}
 .brand-text strong{font-size:15px;font-weight:950;letter-spacing:-.055em}
 .brand-text small{font-size:10px}
 .hero,.pagehero{padding:29px 0 14px!important}
 .hero h1,.pagehero h1{font-size:clamp(43px,10.5vw,70px)!important;line-height:1!important;max-width:100%}
 .hero p,.pagehero p{font-size:18px!important;margin-bottom:19px!important}
 .bigsearch{min-height:68px;padding:5px!important}
 .bigsearch input{font-size:18px!important;min-height:54px!important}
 .bigsearch button{min-height:54px!important;padding:8px 15px}
 .overview{margin:7px 0 23px}
 .overview-stats{gap:0}
 .overview-stat{min-height:107px;padding:12px}
 .overview-stat strong{font-size:34px}
 .stat-caption{font-size:10px;letter-spacing:.09em}
 .stat-desc{font-size:12px}
 .discover{margin:23px 0}
 .discover h2{font-size:31px}
 .discover-head{gap:6px}
 .discover .textbtn{font-size:13px;min-height:45px}
 .feature-grid{grid-template-columns:1fr 1fr;gap:9px}
 .smart-card{min-height:221px;padding:13px 11px}
 .smart-card h3{font-size:17px;margin:14px 0 9px}
 .smart-top{gap:4px}
 .smart-kind{font-size:11px}
 .smart-kind .ui-icon{width:20px;height:20px}
 .smart-q{font-size:12px;padding:5px}
 .smart-foot .primary,.smart-foot .secondary{min-height:45px;font-size:13px;padding:7px 8px}
 .discover-bottom{grid-template-columns:1fr}
 .relevant-panel,.random-panel{padding:16px}
 .cardbody{padding:14px!important}
 .card-identity{gap:10px}
 .item-icon{width:42px;height:42px;flex-basis:42px}
 .cardmeta{padding-left:52px!important}
 .cardbody h3{font-size:18px!important}
 .cardactions{justify-content:stretch}
 .cardactions .primary,.cardactions .secondary{min-height:50px!important}
 .peekbody h2{font-size:32px!important}
 .mode-tabs{gap:3px;padding:4px}
 .mode-tab{padding:10px 8px;font-size:16px;white-space:normal}
 .workbench-header h3{font-size:24px}
 .workbench-actions button{flex:1}
 .workbench-actions .primary{flex-basis:100%}
 .insight-tile{padding:12px 4px}
 .insight-tile strong{font-size:28px}
 .insight-tile span{font-size:12px}
 .usage-chart{gap:6px;padding:10px 6px 3px}
 .usage-header{align-items:flex-start}
 .promptbox{font-size:18px!important;line-height:1.7;padding:19px}
}
@media(max-width:370px){
 .feature-grid{grid-template-columns:1fr}
 .smart-card{min-height:175px}
 .overview-stat strong{font-size:30px}
 .mode-tab{font-size:12px}
}
@media(prefers-reduced-motion:reduce){
 :root{--motion:0ms}
 .smart-card:hover,.itemcard:hover,.categorycard:hover{transform:none!important}
 .toast{animation:none}
}


body[data-page="home"] .hero h1 .hero-bottom{display:block}
body[data-page="search"] .hero h1,.hero h1 .hero-bottom{display:inline}
body[data-page="search"] .hero h1{font-size:clamp(31px,4.8vw,52px)!important;margin-bottom:8px!important}
body[data-page="search"] .hero,.body[data-page="all"] .hero{padding-top:23px!important}
body[data-page="search"] .overview,body[data-page="search"] .discover{display:none!important}
body[data-theme="dark"] .brandmark{background:#f4f4f1!important;color:#111}


/* V9 — Product-first visual catalog / AppSumo-inspired presentation.
   The interface never displays the full source prompt. */
#quicklinks,#overview,#discover,#nav-favorites,.top-more,
#compact-tools,#reader-cover,#promptOverlay .peekclosebar #copy,
#promptOverlay .peekbody > :not(#product-detail){
  display:none!important;
}
#results.cardgrid{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:22px!important;align-items:stretch!important;
}
#results .product-card{
  display:flex!important;flex-direction:column!important;
  padding:0!important;min-height:0!important;
  background:var(--surface)!important;color:var(--ink)!important;
  border:1.5px solid var(--edge)!important;border-radius:17px!important;
  box-shadow:0 12px 30px rgba(0,0,0,.045)!important;overflow:hidden!important;
  cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
#results .product-card:hover,
#results .product-card:focus-visible{
  border-color:var(--accent-ui)!important;transform:translateY(-3px)!important;
  box-shadow:0 18px 32px rgba(0,0,0,.09)!important;
}
.product-media{aspect-ratio:800/460;overflow:hidden;background:var(--paper);width:100%}
.product-cover-image{display:block;width:100%;height:100%;object-fit:cover}
#results .product-body{
  display:flex!important;flex-direction:column!important;align-items:stretch!important;
  gap:11px!important;min-width:0;padding:21px 20px 20px!important;
  flex:1;background:transparent;
}
.product-kicker{
  font-size:13px;font-weight:850;letter-spacing:.035em;text-transform:uppercase;
  color:var(--accent-ink);line-height:1.45;overflow-wrap:anywhere;
}
#results .product-body h3.product-title{
  color:var(--ink)!important;font-size:clamp(22px,2vw,27px)!important;
  font-weight:900!important;letter-spacing:-.04em;line-height:1.13!important;
  margin:0!important;display:-webkit-box!important;-webkit-line-clamp:3;
  -webkit-box-orient:vertical;overflow:hidden!important;
}
#results .product-body p.product-summary{
  color:var(--ink)!important;opacity:.78;font-size:17px!important;line-height:1.46!important;
  font-weight:450;margin:0 0 5px!important;display:-webkit-box!important;
  -webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden!important;
}
.product-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;
  margin-top:auto;padding-top:12px}
.product-actions button{
  min-width:0;min-height:50px!important;padding:10px 6px!important;
  border-radius:9px!important;font-size:15px!important;font-weight:800!important;
  white-space:normal;line-height:1.2;
}
.product-actions .primary{color:var(--paper)!important;background:var(--ink)!important;
  border:1px solid var(--ink)!important}
.product-actions .secondary{color:var(--ink)!important;background:transparent!important;
  border:1px solid var(--edge)!important}
.product-actions button:hover,.product-actions button:focus-visible{outline:2px solid var(--accent-ui);
  outline-offset:1px}
#promptOverlay .promptpeek{width:min(740px,100vw)!important;background:var(--surface)!important}
#promptOverlay .peekclosebar{background:var(--surface)!important}
#promptOverlay .peekbody{padding:0 0 55px!important}
.product-detail{display:block!important;color:var(--ink);background:var(--surface)}
.product-detail-media{width:100%;aspect-ratio:800/460;overflow:hidden;background:var(--paper)}
.product-detail-copy{display:flex;flex-direction:column;gap:16px;padding:30px clamp(20px,5vw,46px)}
.product-detail-title{
  font-size:clamp(32px,4vw,47px)!important;color:var(--ink)!important;
  line-height:1.08!important;letter-spacing:-.055em;font-weight:950;margin:0!important;
}
.product-detail-summary{font-size:clamp(19px,2.3vw,23px);line-height:1.5;color:var(--ink);
  margin:0}
.product-detail-note{font-size:16px;line-height:1.55;color:var(--ink);opacity:.7;
  margin:1px 0 9px}
.product-detail .product-actions{gap:12px;padding-top:8px}
.product-detail .product-actions button{min-height:60px!important;font-size:17px!important}
#results-view{margin-top:30px}
#results-title{font-size:clamp(30px,4vw,50px);letter-spacing:-.06em}
#category-grid .categorycard{min-height:90px}
@media(max-width:980px){
 #results.cardgrid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important}
}
@media(max-width:600px){
 #results.cardgrid{grid-template-columns:minmax(0,1fr)!important;gap:18px!important}
 #results .product-body{padding:20px!important}
 #results .product-body h3.product-title{font-size:26px!important}
 #results .product-body p.product-summary{font-size:18px!important}
 .product-actions button{font-size:16px!important}
 .product-detail-copy{padding:24px 20px 38px}
 #promptOverlay .peekclosebar{min-height:65px!important;padding:10px 18px!important}
 #promptOverlay .peekclosebar #close-reader{font-size:17px!important}
}


/* V9.1 — Editorial cover + action hierarchy. Clear at mobile sizes. */
#results .product-card{
  border:1px solid var(--edge)!important;
  border-radius:14px!important;
  box-shadow:0 5px 22px rgba(18,22,28,.045)!important;
  transition:transform 170ms ease,box-shadow 170ms ease,border-color 170ms ease;
}
#results .product-card:hover,
#results .product-card:focus-within{
  border-color:var(--accent-ui)!important;
  box-shadow:0 13px 32px rgba(18,22,28,.095)!important;
}
.product-media{aspect-ratio:800/460;position:relative}
.product-cover-image{object-fit:cover;image-rendering:auto}
#results .product-body{
  gap:13px!important;
  padding:24px 22px 22px!important;
}
.product-kicker{
  font-size:15px!important;line-height:1.35!important;
  letter-spacing:.025em!important;
}
#results .product-body h3.product-title{
  font-size:clamp(25px,2.2vw,29px)!important;
  line-height:1.12!important;
  letter-spacing:-.045em!important;
}
#results .product-body p.product-summary{
  font-size:18px!important;line-height:1.5!important;
  opacity:.84!important;
}
.product-actions{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  column-gap:10px!important;row-gap:9px!important;
  padding-top:14px!important;
}
.product-actions .primary{
  grid-column:1 / -1;
  min-height:58px!important;
  font-size:19px!important;
}
.product-actions .secondary{
  min-height:52px!important;
  font-size:16px!important;
}
.product-actions button{
  border-radius:8px!important;
  transition:background 140ms ease,color 140ms ease;
}
.product-actions .primary:hover{
  background:var(--accent-ui)!important;
  border-color:var(--accent-ui)!important;
  color:#fff!important;
}
.product-actions .secondary:hover{
  background:var(--paper)!important;
}
.product-detail-copy{
  gap:20px!important;
}
.product-detail .product-actions{
  grid-template-columns:repeat(2,minmax(0,1fr));
  margin-top:8px;
}
.product-detail .product-actions .primary{min-height:66px!important;font-size:21px!important}
.product-detail .product-actions .secondary{min-height:58px!important;font-size:18px!important}
@media(max-width:680px){
  #results .product-body{padding:22px 20px 23px!important}
  #results .product-body h3.product-title{font-size:27px!important}
  #results .product-body p.product-summary{font-size:19px!important}
  .product-kicker{font-size:15px!important}
  .product-actions .primary{min-height:62px!important;font-size:20px!important}
  .product-actions .secondary{min-height:54px!important;font-size:17px!important}
}
@media(prefers-reduced-motion:reduce){
  #results .product-card,.product-actions button{transition:none!important}
}


/* Keep discovery visual and immediate: category chips scroll horizontally on phones. */
@media(max-width:680px){
  #categories-section{margin:18px 0 12px!important}
  #categories-section .sectionhead{gap:12px!important;align-items:center!important;margin-bottom:12px!important}
  #categories-section .sectionhead h2{font-size:22px!important;line-height:1.1!important;letter-spacing:-.045em!important}
  #categories-section .sectionhead .textbtn{font-size:15px!important;min-height:44px!important}
  #category-grid{
    display:flex!important;flex-wrap:nowrap!important;gap:10px!important;
    overflow-x:auto!important;overscroll-behavior-x:contain;scroll-snap-type:x proximity;
    padding:1px 2px 13px!important;scrollbar-width:thin;
  }
  #category-grid .categorycard{
    flex:0 0 212px!important;width:212px!important;min-width:212px!important;
    min-height:80px!important;scroll-snap-align:start;
    padding:12px!important;
  }
  #results-view{margin-top:12px!important}
}


/* V10 VISUAL ASSET RELEASE — MILANO EDITORIAL */
:root{--bdc-red:#D40E20;--bdc-black:#121212;--bdc-paper:#F8F7F5}
body[data-theme="light"]{--accent-ui:#D40E20;--accent-ink:#B30919;--accent-soft:#FFF0F1}
body[data-theme="dark"]{--accent-ui:#FF6471;--accent-ink:#FF8E98;--accent-soft:#302024}
#hero .hero-art{display:none}
@media(min-width:901px){
  body[data-page="home"] #hero.hero{min-height:390px!important;position:relative!important;display:flex!important;align-items:center}
  body[data-page="home"] #hero .hero-inner{width:56%!important;max-width:56%!important;position:relative;z-index:1}
  body[data-page="home"] #hero .hero-art{display:block;position:absolute;right:0;top:12px;bottom:16px;
    width:40%;height:calc(100% - 28px);object-fit:cover;object-position:49% 28%;
    border-radius:14px;filter:contrast(1.04);pointer-events:none}
  body[data-page="home"] #hero #hero-title{font-size:clamp(58px,5.2vw,84px)!important;line-height:.95!important}
}
#results .product-media,.product-detail-media{background:var(--bdc-black)!important}
#results .product-cover-image,.product-detail .product-cover-image{display:block;width:100%;height:100%;object-fit:cover}
#results .product-card{border-radius:14px!important;box-shadow:none!important;border:1px solid var(--edge)!important}
#results .product-card:hover,#results .product-card:focus-within{
  box-shadow:0 10px 28px rgba(0,0,0,.11)!important;border-color:var(--accent-ui)!important}
#results .product-body{gap:13px!important;padding:23px!important}
#results .product-body h3.product-title{font-size:clamp(24px,2.15vw,30px)!important;letter-spacing:-.046em!important}
#results .product-body p.product-summary{font-size:18px!important;line-height:1.48!important;color:var(--ink)!important;opacity:.82!important}
.product-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
.product-actions .primary{grid-column:1/-1!important;min-height:59px!important;font-size:20px!important;
  background:var(--bdc-black)!important;color:#fff!important;border-color:var(--bdc-black)!important}
.product-actions .primary:hover{background:var(--bdc-red)!important;border-color:var(--bdc-red)!important}
.product-actions .secondary{min-height:54px!important;font-size:17px!important}
.product-actions button{border-radius:9px!important}
.product-detail-title{font-size:clamp(36px,4.2vw,54px)!important;line-height:1.06!important}
.product-detail-summary{font-size:clamp(20px,2.3vw,24px)!important;line-height:1.5!important}
@media(max-width:900px){
  body[data-page="home"] #hero .hero-inner{width:100%!important;max-width:100%!important}
  #hero .hero-art{display:none!important}}
@media(max-width:680px){
  #results.cardgrid{grid-template-columns:minmax(0,1fr)!important}
  #results .product-body{padding:21px!important}
  #results .product-body h3.product-title{font-size:27px!important}
  #results .product-body p.product-summary{font-size:19px!important}
  .product-actions .primary{min-height:62px!important;font-size:20px!important}
  .product-actions .secondary{min-height:56px!important;font-size:17px!important}}
@media(prefers-reduced-motion:reduce){#results .product-card,.product-actions button{transition:none!important}}
