/* makina.fun components (DESIGN.md §8): Home, Directory and Market share the app's look — one floating header,
   orange as the single accent, 11px controls (no pills), graphite secondary buttons, orange-metal primaries,
   quiet hairline cards. Loaded by the marketing layout and injected into the Market presentation pages. */

/* Single accent: Market's teal becomes Makina orange text. */
:root{--green:#fb866a}

/* Header: the same compact floating bar on every page (the :not(#_) lifts it over page-level header rules). */
html body header.site-header:not(#_){position:sticky;top:12px;z-index:60;min-height:64px;height:auto;margin-top:12px;padding:8px 10px 8px 20px;border:1px solid #2a2724;border-radius:16px;background:rgba(18,16,14,.82);-webkit-backdrop-filter:blur(16px) saturate(140%);backdrop-filter:blur(16px) saturate(140%);box-shadow:0 12px 32px rgba(0,0,0,.35)}
html body header.market-site-header:not(#_){width:calc(100% - 2 * var(--market-gutter, 32px));max-width:1376px;margin-left:auto;margin-right:auto}
html body header.site-header:not(#_) .site-brand{width:139px;min-height:0}
@media(max-width:900px){html body header.site-header:not(#_){top:8px;margin-top:8px;padding:8px 8px 6px 14px}html body header.site-header:not(#_) .site-brand{width:116px}}
@media(max-width:430px){html body header.site-header:not(#_) .site-brand{width:110px}}
@media(max-width:360px){html body header.site-header:not(#_) .site-brand{width:100px}}

/* Primary buttons: orange metal, dark text. */
main a.btn.primary,main .btn.primary,main a.primary-button{display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:0 18px;border:1px solid #ff8a63;border-radius:11px;background:linear-gradient(180deg,#ff7d55 0%,#f2643d 52%,#dc532e 100%);box-shadow:inset 0 1px 0 rgba(255,236,224,.55),inset 0 -1px 0 rgba(120,34,10,.45),0 8px 20px -10px rgba(242,100,61,.7);color:#140f0b;font-weight:600;text-decoration:none;transition:transform .16s cubic-bezier(.2,.8,.2,1),box-shadow .16s,background .16s}
main a.btn.primary:hover,main .btn.primary:hover{background:linear-gradient(180deg,#ff8a66 0%,#f86e47 52%,#e45a33 100%);color:#140f0b;transform:translateY(-1px);text-decoration:none}

/* Secondary buttons: graphite, 11px. */
main .saved-button,main button[type=reset],main .application-filter button,main .panel-top button,main button[data-action],main .landscape-expand,main .btn:not(.primary):not(.save){min-height:40px;padding:0 14px;border:1px solid #2e2a27;border-radius:11px;background:linear-gradient(180deg,#1d1a17,#141210);box-shadow:inset 0 1px 0 rgba(255,255,255,.05);color:#f2efea;font-weight:600;transition:border-color .16s,background .16s,color .16s}
main .saved-button:hover,main button[type=reset]:hover,main .application-filter button:hover,main .panel-top button:hover,main button[data-action]:hover,main .landscape-expand:hover,main .btn:not(.primary):not(.save):hover{border-color:#47413b;background:linear-gradient(180deg,#24201c,#181512);color:#fff}

/* Inputs and selects: 12px fields, graphite, orange focus. */
main input.search,main input.directory-search,main input[type=search],main .filters input,main form input[type=text]{height:44px;border:1px solid #2e2a27;border-radius:12px;background:#121010;color:#f2efea}
main select,main select.sort,main select.directory-sort{min-height:40px;border:1px solid #2e2a27;border-radius:11px;background-color:#141210;color:#e4dfd8;font-weight:600}
main input:focus-visible,main select:focus-visible{outline:none;border-color:rgba(242,100,61,.7);box-shadow:0 0 0 3px rgba(242,100,61,.16)}

/* View toggle (grid / list): a segmented control with a tinted active pill. */
main .view{display:inline-flex;gap:2px;padding:3px;border:1px solid #2e2a27;border-radius:11px;background:#131110}
main .view button{width:38px;height:32px;border:0;border-radius:8px;background:transparent;color:#9a958e}
main .view button.active,main .view button[aria-pressed=true]{background:rgba(242,100,61,.14);color:#fb866a;box-shadow:inset 0 0 0 1px rgba(242,100,61,.35)}
main .view button:hover:not(.active){background:#1d1a17;color:#f2efea}

/* Cards: one radius, hairline, gentle lift on hover. */
main article.card,main article.paper-card,main article.panel{border:1px solid #26231f;border-radius:16px;background:#121010;transition:border-color .2s,transform .2s cubic-bezier(.2,.8,.2,1),box-shadow .2s}
main article.card:hover,main article.paper-card:hover{border-color:rgba(242,100,61,.38);transform:translateY(-2px);box-shadow:0 18px 40px -22px rgba(0,0,0,.8)}
main .macro{border-color:#26231f;border-radius:16px}

/* Category / filter tabs: orange underline for the active one. */
main button.filter.active,main button.category.active,main button.directory-filter.active{color:#f2efea;box-shadow:inset 0 -2px 0 #f2643d}

@media(prefers-reduced-motion:reduce){main article.card,main article.paper-card,main a.btn.primary{transition:none}main article.card:hover,main article.paper-card:hover,main a.btn.primary:hover{transform:none}}

/* Stronger hooks: page-level Directory and Market rules are more specific, so these carry an id-level lift. */
html body main input.search:not(#_),html body main input.directory-search:not(#_),html body main input[type=search]:not(#_),html body main .filters input:not(#_){height:44px;border:1px solid #2e2a27;border-radius:12px;background:#121010}
html body main select:not(#_){min-height:40px;padding-right:34px;border:1px solid #2e2a27;border-radius:11px;background-color:#141210;color:#e4dfd8;font-weight:600}
html body main .view:not(#_){display:inline-flex;gap:2px;padding:3px;border:1px solid #2e2a27;border-radius:11px;background:#131110}
html body main .view:not(#_) button{width:38px;height:32px;border:0;border-radius:8px;background:transparent;color:#9a958e}
html body main .view:not(#_) button.active,html body main .view:not(#_) button[aria-pressed=true]{background:rgba(242,100,61,.14);color:#fb866a;box-shadow:inset 0 0 0 1px rgba(242,100,61,.35)}
html body main .saved-button:not(#_),html body main a.directory-link:not(#_),html body main .application-filter a:not(#_),html body main a[href="/directory"]:not(#_){border-radius:11px}
/* Market header: same height as every other page (links were 52px tall). */
html body header.market-site-header:not(#_) .site-nav a,html body header.market-site-header:not(#_) .category-menu summary{min-height:40px}
html body header.market-site-header:not(#_){min-height:64px;padding-top:8px;padding-bottom:8px}
/* Market's generic `header nav` rules (wide gaps, tall rows) must not reach the shared header. */
html body header.market-site-header:not(#_) .site-nav{display:flex;align-items:center;align-self:center;height:auto;min-height:0;margin:0;padding:0;gap:4px}
html body header.market-site-header:not(#_) .category-menu summary,html body header.market-site-header:not(#_) .site-nav>a{white-space:nowrap;overflow-wrap:normal}
@media(max-width:900px){html body header.market-site-header:not(#_) .site-nav{gap:2px;justify-content:space-between}}
/* Market styles every <details> with 16px margins; the header dropdowns are <details>. */
html body header.site-header:not(#_) details{margin:0}
/* Menu labels never break mid-word on phones; the row spreads evenly instead. */
html body header.site-header:not(#_) .category-menu summary,html body header.site-header:not(#_) .site-nav>a{white-space:nowrap;overflow-wrap:normal;word-break:keep-all}
@media(max-width:900px){html body header.site-header:not(#_) .site-nav{flex-wrap:nowrap;justify-content:space-between;gap:2px}}
@media(max-width:380px){html body header.site-header:not(#_) .site-nav>a,html body header.site-header:not(#_) .category-menu summary{padding:0 5px;font-size:12.5px;gap:3px}}
/* Directory phone controls: selects keep their label readable. */
@media(max-width:700px){html body main select:not(#_){min-width:0;flex:1 1 0;text-overflow:ellipsis}}

/* Consistency pass: page titles, labels, card corners and the Home frame match the app. */
html body:not(:has(.home-hero)) main h1:not(#_){font:600 40px/1.1 'Space Grotesk',sans-serif;letter-spacing:-.02em}
@media(max-width:700px){html body:not(:has(.home-hero)) main h1:not(#_){font-size:30px}}
html body main .eyebrow:not(#_),html body main .home-eyebrow:not(#_){color:#fb866a;font-size:11px;font-weight:600;letter-spacing:.12em;text-transform:uppercase}
html body main article.card:not(#_),html body main article.paper-card:not(#_),html body main article.panel:not(#_),html body main .panel:not(#_){border-radius:16px}
/* Home uses the app's standard 1216px frame (header and content). */
html body .site-container:not(#_){max-width:calc(1216px + 64px);padding-inline:32px}
@media(max-width:700px){html body .site-container:not(#_){padding-inline:16px}}
