/* Shared reading sizes and flexible layouts. Font tokens live in styles.css. */
html{font-size:100%;text-size-adjust:100%;-webkit-text-size-adjust:100%}
body{font-size:var(--text-body);line-height:1.5}
button,input,select,textarea{line-height:1.5}
input,select,textarea{font-size:var(--text-body)}
.button{height:auto;min-height:40px;font-size:var(--text-ui);padding:8px 12px}
.sidebar-item{font-size:var(--text-ui);line-height:1.5;min-height:44px}
.sidebar-label,.eyebrow,.builder-label{line-height:1.5;letter-spacing:.07em}
.sidebar{overflow-y:auto}
.sidebar-bottom small,.workspace-storage{line-height:1.7}
.topnav{gap:20px;min-width:0}
.nav-directory,.nav-guides,.how-button,.request-nav{font-size:var(--text-ui)}
.how-button,.request-nav{min-height:40px}
.theme-toggle{width:40px;height:40px}
.hero{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}
.hero-copy>p{font-size:var(--text-body);line-height:1.75;max-width:46ch}
.build-preview{min-width:0}
.build-preview-top,.preview-bottom{flex-wrap:wrap}
.build-preview-top,.ready-badge,.preview-tool>div>span,.brief-lines span,.preview-bottom>span{font-size:var(--text-small);line-height:1.5}
.preview-tool strong,.brief-lines p{font-size:var(--text-ui);line-height:1.5}
.preview-bottom .button-primary{font-size:var(--text-ui);height:auto;min-height:40px;padding:8px 12px}
.featured-slides{display:grid}
.featured-slide{grid-area:1 / 1;min-width:0}
.featured-slide[hidden]{display:none}
.featured-slide .preview-tool{min-height:66px;align-items:flex-start}
.featured-slide .preview-tool>div{min-width:0}
.featured-slide .preview-tool strong{min-height:3em;line-height:1.5}
.featured-slide .preview-tool:hover strong{text-decoration:underline;text-underline-offset:3px}
.carousel-controls{display:flex;width:100%;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-top:16px;padding-top:12px;border-top:1px solid var(--line);color:var(--muted);font-size:var(--text-small)}
.carousel-navigation{display:flex;align-items:center;gap:4px;margin-left:auto}
.carousel-controls .icon-button{width:36px;height:36px;border-color:var(--line);background:transparent;color:var(--ink)}
.carousel-controls .icon-button:hover{background:var(--paper)}
.carousel-position{min-width:42px;text-align:center;font-variant-numeric:tabular-nums}
@media(min-width:761px){
  :root{--sidebar:16.5rem}
  .sidebar-item{white-space:nowrap;gap:10px}
  .sidebar-item svg,.sidebar-count{flex-shrink:0}
}
.library-heading{gap:16px;flex-wrap:wrap}
.library-heading p{font-size:var(--text-ui);line-height:1.6}
.search-field input{font-size:var(--text-body);min-height:44px}
.select-wrap select{font-size:var(--text-ui);min-height:44px}
.search-field kbd{line-height:1.2}
.results-bar{gap:10px 14px}
.results-filter{gap:6px;min-width:0}
.results-filter select{font-size:var(--text-ui);min-height:40px;max-width:none}
.results-filter label{font-size:var(--text-small)}
.tool-grid{gap:18px}
.tool-title h3{font-size:1.25rem;line-height:1.3;letter-spacing:-.025em}
.card-labels{margin:6px 0 14px;gap:4px 8px;align-items:baseline;line-height:1.5}
.card-identity .card-labels .category-label,.card-identity .card-labels .platform-label{display:inline-block;margin:0;font-size:var(--text-small);line-height:inherit}
.card-identity .card-labels .platform-label{padding-left:8px;border-left:1px solid var(--line)}
.card-identity .card-labels{margin-bottom:6px}
.card-usage{margin-bottom:14px;color:var(--muted);font-size:var(--text-small);line-height:1.5}
.clone-count{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;font-variant-numeric:tabular-nums}
.clone-count svg{width:13px;height:13px;flex-shrink:0}
.tool-list .card-usage{margin:6px 0 0}
.card-description{font-size:var(--text-ui);line-height:1.7;min-height:0}
.card-tags{flex-wrap:wrap;gap:6px}
.card-tags span{font-size:var(--text-small);line-height:1.5}
.card-meta{font-size:var(--text-small);line-height:1.5;gap:12px;flex-wrap:wrap}
.card-meta>span:first-child{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.card-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 36px;gap:8px;align-items:stretch}
.card-actions .button,.tool-list .card-actions .button{font-size:var(--text-ui);height:auto;min-height:40px;padding:8px;gap:6px;white-space:normal;line-height:1.4}
.card-actions .button svg{flex-shrink:0}
.card-download{width:36px;min-height:40px;height:auto}
.tool-list .tool-card{grid-template-columns:43px minmax(150px,.75fr) minmax(0,1.5fr) 310px;gap:18px}
.tool-list .card-labels{display:flex;margin-bottom:0}
.tool-list .card-identity .card-labels .platform-label{margin:0;padding-left:8px;border-left:1px solid var(--line)}
.tool-list .card-actions{width:310px}
.page-footer{font-size:var(--text-small);line-height:1.6;gap:16px 24px}
.page-footer nav{flex-wrap:wrap;gap:12px 20px}
.page-footer a{font-size:var(--text-ui);line-height:1.6;padding:4px 0}
.detail-heading p,.overview-intro,.feature-list li,.tool-guide-copy p,.reading-page section p,.reading-intro,.library-guide>p,.category-hero>p,.how-cards p,.faq p,.guide-card p,.advertise-hero>div>p,.inquiry-section>div>p,.request-intro>p{font-size:var(--text-body);line-height:1.75}
.feature-list li>svg,.original-note>svg{flex-shrink:0}
.detail-actions .button{font-size:var(--text-ui);height:auto;min-height:44px}
.detail-stats{font-size:var(--text-small);line-height:1.6;flex-wrap:wrap}
.detail-tab{font-size:var(--text-ui)}
.prompt-view-head{gap:12px;flex-wrap:wrap;overflow-wrap:anywhere}
.prompt-view-head span{min-width:0}
.prompt-markdown,.review-preview,.admin-dialog pre,.admin-request-copy{font-size:var(--text-ui);line-height:1.75}
.editor-dialog[open],.info-dialog[open]{display:flex;flex-direction:column;max-height:calc(100dvh - 28px);overflow:hidden}
.dialog-header{flex-shrink:0}
.dialog-header>div{flex:1;min-width:0}
.dialog-header .eyebrow{overflow-wrap:anywhere}
.dialog-close{flex-shrink:0;min-width:36px;min-height:36px}
.editor-body,.info-body{flex:1 1 auto;min-height:0;overflow:auto}
.section-choice strong,.field-label label,.dialog-header p,.how-step p{font-size:var(--text-ui)}
.section-choice p,.selection-hint,.field-help,.editor-footer>span,.steps,.review-count{font-size:var(--text-small);line-height:1.6}
.section-choice{height:auto}
.section-choice>span{min-width:0}
.editor-textarea{font-size:var(--text-body);line-height:1.65}
.editor-section-tabs button{font-size:var(--text-ui);min-height:40px}
.editor-footer{flex-wrap:wrap;flex-shrink:0}
.footer-buttons{flex-wrap:wrap;margin-left:auto;max-width:100%}
.editor-footer .button,.review-actions .button,.info-body .button{font-size:var(--text-ui);height:auto;min-height:40px}
.field-help,.review-actions,.review-header{flex-wrap:wrap}
.steps b{min-width:24px;height:24px;font-size:var(--text-small)}
.steps{flex-wrap:wrap}
.sponsor-form label,.clone-request-form label,.request-prompt summary{font-size:var(--text-ui)}
.sponsor-form input,.sponsor-form select,.sponsor-form textarea,.clone-request-form textarea,.admin-field input,.admin-field textarea,.admin-field select,.admin-filters input,.admin-filters select{font-size:var(--text-body);line-height:1.6}
.sponsor-form>.button,.request-review-actions .button,.sponsor-form #inquiry-result .button{font-size:var(--text-ui);height:auto;min-height:40px}
.request-prompt summary,.admin-section>summary{flex-wrap:wrap}
.ad-slot p,.ad-slot-directory p{font-size:var(--text-ui);line-height:1.7}
.ad-slot a,.ad-slot-directory a{font-size:var(--text-ui)}
.ad-slot-directory{grid-template-columns:minmax(0,1fr) auto}
.advertise-note p{font-size:var(--text-body)!important}
.admin-main{min-width:0}
.admin-row{flex-wrap:wrap}
.admin-row-info{min-width:160px}
.admin-row-info span{white-space:normal;overflow-wrap:anywhere}
.admin-header-actions{flex-wrap:wrap}
.admin-editor-footer{flex-wrap:wrap}
.admin-tabs button,.admin-actions .button,.admin-row .button,.admin-header-actions .button{font-size:var(--text-ui);height:auto;min-height:40px}
.admin-login p,.admin-titlebar p,.admin-account .admin-field-note{font-size:var(--text-body)}
html[data-theme="light"]{--muted:#5c6b55}
html[data-theme="light"] :is(p,.sidebar-label,.sidebar-count,.builder-label,.sidebar-bottom small,.workspace-storage,.nav-guides,.hero-cta>span,.build-preview-top,.ready-badge,.preview-tool>div>span,.brief-lines span,.preview-bottom>span,.library-note,.results-bar,.results-filter label,.card-meta,.breadcrumbs,.detail-stats,.included-list,.aside-note,.editorial-note,.feature-list li,.guide-card>span,.how-cards>div>span,.page-footer,.contents strong,.ad-label,.ad-slot small,.placement-terms,.request-field-help,.request-prompt summary span,.field-help,.selection-hint,.editor-footer>span,.review-count,.dialog-header p){color:var(--muted)}
html[data-theme="light"] :is(.page-footer a,.reference-link,.guide-card b,.contents a,.inline-tool-links a){color:var(--green)}
html[data-theme="light"] :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
html[data-theme="dark"] :is(.field-help,.editor-footer>span,.selection-hint,.steps,.reset-section,.review-count,.preview-tool>div>span,.brief-lines span,.preview-bottom>span,.library-note,.hero-cta>span,.admin-badge,.admin-help,.admin-toolbar-note){color:var(--muted)}

@media(max-width:1280px){
  .tool-grid:not(.tool-list){grid-template-columns:repeat(2,minmax(0,1fr))}
  .tool-list .tool-card{grid-template-columns:43px minmax(0,1fr) 310px}
  .tool-list .card-description{display:none}
  .topnav{gap:16px}
  .build-preview-top{padding:12px 14px}
  .preview-bottom{align-items:flex-start}
}
@media(max-width:1100px){
  .hero{grid-template-columns:1fr}
  .build-preview{display:none}
  .results-bar .platform-filter{margin-left:0}
}
@media(max-width:760px){
  .topbar{height:auto;min-height:69px;gap:10px;padding-top:12px;padding-bottom:12px;flex-wrap:wrap}
  .topbar .brand{flex-basis:calc(100% - 48px);min-height:40px}
  .topnav{gap:8px;flex:1 1 100%;justify-content:flex-start;flex-wrap:wrap;margin-left:0}
  .how-button{gap:0;margin:0;padding:8px}
  .how-button svg{display:none}
  .request-nav{margin:0;padding:8px 10px}
  .request-nav svg{display:none}
  .theme-toggle{width:40px;height:40px;margin:0}
  .mobile-menu{min-width:40px;min-height:40px;position:absolute;right:20px;top:12px}
  .sidebar{top:0}
  .tool-list .tool-card{grid-template-columns:42px minmax(0,1fr)}
  .tool-list .card-actions{grid-column:1/-1;width:100%;margin-top:8px}
  .tool-list .tool-title h3{font-size:1.25rem}
  .detail-heading h1{overflow-wrap:anywhere}
  .detail-hero{align-items:flex-start}
  .detail-hero>.tool-logo{flex-shrink:0}
  .detail-heading{min-width:0}
  .overview-aside .included-list{grid-template-columns:1fr}
  .editor-footer>span{max-width:none}
  .admin-header{padding:16px 18px}
  .admin-header .brand{width:auto}
  .admin-header-actions{gap:12px}
}
@media(max-width:600px){
  .tool-grid:not(.tool-list){grid-template-columns:1fr}
  .toolbar{flex-wrap:wrap}
  .search-field{flex-basis:100%;margin-bottom:2px}
  .select-wrap{flex:1;min-width:0}
  .select-wrap select{width:100%;min-width:0}
  .results-bar{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0 20px}
  .results-bar #results-count{flex-basis:calc(100% - 90px);font-size:var(--text-small)}
  .results-bar .results-description,.results-bar .divider{display:none}
  .results-bar .results-filter{flex:1 1 120px;margin:0;width:auto;display:flex;flex-direction:column;align-items:stretch;gap:4px}
  .results-bar .results-filter label{display:block;font-size:var(--text-small)}
  .results-bar .results-filter select{max-width:none;width:100%;font-size:var(--text-ui);padding:8px;border:1px solid var(--line);border-radius:5px;min-height:40px}
  .results-bar .filter-reset{font-size:var(--text-small)}
  .detail-actions .button{flex:1 1 160px;justify-content:center}
  .detail-stats{gap:8px 16px}
  .prompt-markdown{padding:18px;font-size:var(--text-ui)}
  .reading-page h1,.category-hero h1{overflow-wrap:anywhere}
  .editor-section-tabs button{padding:8px 10px}
  .field-label{align-items:flex-start;flex-wrap:wrap}
  .section-choice strong{font-size:var(--text-ui)}
  .editor-footer>span{width:100%}
  .footer-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;margin:0}
  .footer-buttons .button{padding:8px;white-space:normal}
  .steps>i{display:none}
  .request-prompt summary{align-items:flex-start}
  .request-prompt summary span{margin-left:0}
  .admin-filters select{min-width:0}
}
@media(max-width:380px){
  .topbar{padding-left:14px;padding-right:14px;gap:8px}
  .topbar .brand{flex-basis:calc(100% - 48px);font-size:1.3125rem}
  .topbar .mobile-menu{position:absolute;right:14px;top:12px}
  .topnav{flex-basis:100%;justify-content:flex-start;margin-left:0}
  .hero h1{font-size:2.375rem}
}
