/*
 * Design layer (docs/rapttor_interface_guidelines.md, section 4). Built on the theme tokens (--bg --surface --text --muted --line
 * --brand --brand-ink --link --elev*) so every theme works. Scale: 4px grid; type 15/16/20/28; radii 10 and 16; one soft shadow.
 */
:root {
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem;
  --radius-m: 10px; --radius-l: 16px;
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .08);
  --focus: var(--brand);
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
html { font-size: 16px; }
body { font-family: var(--font-ui); line-height: 1.6; letter-spacing: -.003em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "tnum" 0; }
main#main { padding: 5.75rem 0 var(--space-7); }
.container { max-width: 1140px; padding-inline: var(--space-5); }
h1, .h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; margin-bottom: var(--space-2); }
h2, .h2 { font-size: 1.375rem; line-height: 1.25; font-weight: 650; letter-spacing: -.015em; }
h3, .h3 { font-size: 1.125rem; font-weight: 640; }
.h3 { font-size: 1.75rem !important; } /* Bootstrap's .h3 is used as the page title in the Studio */
h4, h5, h6, .h4, .h5, .h6 { font-weight: 640; letter-spacing: -.01em; }
.h5 { font-size: 1.25rem; } .h6 { font-size: 1.0625rem; }
p { margin-bottom: var(--space-3); }
.small, small, .form-text { font-size: .875rem; }
.text-body-secondary, .form-text { color: var(--muted) !important; }
a { text-decoration: none; text-underline-offset: .18em; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

/* header */
.app-nav { min-height: 60px; padding-block: 0; backdrop-filter: saturate(1.4) blur(14px); background: color-mix(in srgb, var(--surface) 88%, transparent) !important; }
.app-nav .navbar-brand { font-weight: 750; letter-spacing: -.02em; font-size: 1.2rem; padding: var(--space-3) 0; }
.app-nav .nav-link { font-weight: 560; padding: .5rem .85rem; border-radius: var(--radius-m); color: var(--muted) !important; }
.app-nav .nav-link:hover, .app-nav .nav-link.active { color: var(--text) !important; background: color-mix(in srgb, var(--text) 7%, transparent); text-decoration: none; }
.app-nav .btn { --bs-btn-border-color: var(--line); color: var(--text) !important; }
.app-nav .btn-primary { color: var(--brand-ink) !important; }
.app-nav .btn.active { background: color-mix(in srgb, var(--text) 8%, transparent); }

/* cards and surfaces */
.card { border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-soft); background: var(--surface); }
.card-body { padding: var(--space-5); }
.card-header { background: transparent; border-bottom: 1px solid var(--line); padding: var(--space-4) var(--space-5); font-weight: 600; }
.card-header:first-child { border-radius: var(--radius-l) var(--radius-l) 0 0; }
.list-group-item { border-color: var(--line); padding: var(--space-4) var(--space-5); background: var(--surface); }
.list-group { border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.list-group-item + .list-group-item { border-top-width: 1px; }
a.card:hover, a.list-group-item-action:hover { text-decoration: none; background: color-mix(in srgb, var(--text) 4%, var(--surface)); }
a.card { color: var(--text); transition: transform .15s ease, box-shadow .15s ease; }
a.card:hover { transform: translateY(-2px); }
.table { --bs-table-bg: transparent; }
.table > :not(caption) > * > * { padding: .75rem .5rem; border-bottom-color: var(--line); }

/* buttons */
.btn { --bs-btn-border-radius: var(--radius-m); --bs-btn-padding-x: 1.1rem; --bs-btn-padding-y: .55rem; --bs-btn-font-weight: 560; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.btn-sm { --bs-btn-padding-x: .8rem; --bs-btn-padding-y: .3rem; --bs-btn-font-size: .875rem; min-height: 34px; }
.btn-lg { min-height: 50px; --bs-btn-padding-x: 1.5rem; }
.btn-primary { box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.btn-outline-secondary { --bs-btn-color: var(--text); --bs-btn-border-color: var(--line); --bs-btn-hover-bg: color-mix(in srgb, var(--text) 7%, transparent); --bs-btn-hover-color: var(--text); --bs-btn-hover-border-color: var(--line); --bs-btn-active-bg: color-mix(in srgb, var(--text) 10%, transparent); --bs-btn-active-color: var(--text); --bs-btn-disabled-color: var(--muted); --bs-btn-disabled-border-color: var(--line); }
.btn-link { --bs-btn-color: var(--link); min-height: 0; padding-inline: 0; font-weight: 520; }
.btn-group-sm > .btn { min-height: 34px; }

/* forms: labels above, generous controls, one rhythm */
.form-label { font-size: .875rem; font-weight: 600; color: var(--text); margin-bottom: var(--space-2); }
.form-control, .form-select { min-height: 44px; padding: .6rem .9rem; border-radius: var(--radius-m); border: 1px solid var(--line); font-size: 1rem; }
.form-control-lg { min-height: 52px; font-size: 1.0625rem; }
textarea.form-control { min-height: 5.5rem; }
.form-control::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 28%, transparent); background: var(--surface); color: var(--text); }
.form-text { margin-top: var(--space-2); }
.form-check-input { width: 1.15em; height: 1.15em; margin-top: .2em; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
fieldset { min-width: 0; }

/* badges, alerts */
.badge { font-weight: 600; letter-spacing: .01em; border-radius: 999px; padding: .35em .7em; }
.alert { border: 0; border-radius: var(--radius-m); padding: var(--space-4) var(--space-5); }
.alert-info { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--text); }
.alert-warning { background: color-mix(in srgb, #f59e0b 18%, var(--surface)); color: var(--text); }
.alert-danger { background: color-mix(in srgb, #ef4444 16%, var(--surface)); color: var(--text); }
.alert-success { background: color-mix(in srgb, #22c55e 16%, var(--surface)); color: var(--text); }
.alert-link { color: var(--link); font-weight: 600; }
details > summary { cursor: pointer; font-weight: 520; }

/* footer: brand block, then columns (the app, legal, help and language), then a thin bar */
.site-footer { border-top: 1px solid var(--line); background: transparent !important; padding: var(--space-7, 3rem) 0 var(--space-5); font-size: .875rem; color: var(--muted); }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--space-6) var(--space-7, 3rem); }
.site-footer__logo { display: inline-block; color: var(--text); text-decoration: none; }
.site-footer__tagline { margin: var(--space-3) 0 .25rem; color: var(--text); font-weight: 650; font-size: 1rem; }
.site-footer__about { margin: 0 0 var(--space-4); max-width: 26rem; }
.site-footer__col h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--text); margin: 0 0 var(--space-3); }
.site-footer ul:not(.dropdown-menu), .site-footer ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }   /* not the language menu: it must stay a closed dropdown until opened */
.site-footer li { margin: 0; padding: 0; }
.site-footer a, .site-footer .btn-link { color: var(--muted); font-weight: 500; text-decoration: none; }
.site-footer a:hover, .site-footer .btn-link:hover { color: var(--text); text-decoration: underline; }
.site-footer .legal-links { margin: 0 0 var(--space-2); }
.site-footer__social { flex-direction: row !important; flex-wrap: wrap; gap: .5rem !important; }
.site-footer__social a { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); }
.site-footer__social a:hover { color: var(--text); border-color: currentColor; text-decoration: none; }
.site-footer__social .icon { width: 1.1rem; height: 1.1rem; }
.site-footer__bar { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--line); font-size: .8rem; display: flex; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
@media (max-width: 991.98px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 575.98px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* cookie banner sits quietly at the bottom instead of covering content */
.legal-cookie-banner, [class*="cookie-banner"] { border-radius: var(--radius-l) var(--radius-l) 0 0; box-shadow: var(--shadow-soft); }

/* Studio specifics */
.studio-project nav ol .btn, .studio-project nav ol .btn.disabled { border-radius: 999px; }
.studio-project dl dt { font-weight: 600; color: var(--muted); }
.studio-project .card.border-primary { border-color: var(--brand) !important; }
@media (prefers-reduced-motion: reduce) { a.card { transition: none; } a.card:hover { transform: none; } }

/* beat the legacy template rules in site.css (main > .container: 70px top, 15px sides) with the ID in the selector */
main#main > .container { padding: 0 var(--space-5); }
.app-nav > .container { align-items: center; padding-inline: var(--space-5); }
.app-nav .navbar-toggler { border-color: var(--line); padding: .35rem .6rem; }

/* Profile */
.profile-tabs .nav-link { color: var(--muted); font-weight: 560; border-radius: 999px; padding: .5rem 1.1rem; }
.profile-tabs .nav-link:hover { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); text-decoration: none; }
.profile-tabs .nav-link.active { background: var(--brand); color: var(--brand-ink); }
.privacy-legal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.card.border-danger { border-color: color-mix(in srgb, #ef4444 60%, var(--line)) !important; }

/* Price step: format choices and the live preview */
.format-option { padding: var(--space-3) var(--space-4) var(--space-3) calc(var(--space-4) + 1.5em); border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--bg); }
.format-option:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); }
.format-option .form-check-input { margin-left: -1.5em; }
.format-shape { display: inline-block; border-radius: 6px; border: 2px solid color-mix(in srgb, var(--text) 45%, transparent); background: color-mix(in srgb, var(--text) 8%, transparent); flex: 0 0 auto; }
.preview-frame { position: relative; width: 100%; border-radius: var(--radius-l); overflow: hidden; background: #0b0b0e; box-shadow: var(--shadow-soft); border: 1px solid var(--line); }
.preview-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.preview-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .5rem; padding: var(--space-4); text-align: center; color: #cfd2dc; font-size: .9rem; }

/* cost line: the amount sits right above the button that spends it */
.cost-line { margin: 0 0 var(--space-3); font-size: .9375rem; }
.cost-line .badge { margin-right: var(--space-2); }
/* ideas as an accordion: title and subtitle visible, the reasoning folded away */
.idea { padding: 0; overflow: hidden; }
.idea-summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: .15rem; padding: var(--space-4) var(--space-5) var(--space-4) calc(var(--space-5) + 1.5rem); position: relative; }
.idea-summary::-webkit-details-marker { display: none; }
.idea-summary::before { content: "\25B8"; position: absolute; left: var(--space-5); top: var(--space-4); color: var(--muted); transition: transform .15s; }
.idea[open] .idea-summary::before { transform: rotate(90deg); }
.idea-sub { color: var(--muted); font-size: .9375rem; }
.idea-body { padding: 0 var(--space-5) var(--space-5) calc(var(--space-5) + 1.5rem); border-top: 1px solid var(--line); padding-top: var(--space-4); }
@media (prefers-reduced-motion: reduce) { .idea-summary::before { transition: none; } }

/* words step: one tab per screen */
.screen-tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.screen-tab { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: .4rem 1rem; font-weight: 560; font-size: .9375rem; }
.screen-tab:hover { color: var(--text); }
.screen-tab.active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.js .screen-pane:not(.active) { display: none; }

/* the AI editor's notes: quiet, beside the screens, no card; each note folds open on demand */
.notes { border-top: 1px solid var(--line); }
.note { border-bottom: 1px solid var(--line); }
.note > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; padding: var(--space-3) var(--space-5) var(--space-3) 0; position: relative; font-weight: 400; }
.note > summary::-webkit-details-marker { display: none; }
.note > summary::after { content: "+"; position: absolute; right: .25rem; top: var(--space-3); color: var(--muted); font-weight: 600; }
.note[open] > summary::after { content: "\2212"; }
.note-where { font-size: .8125rem; color: var(--muted); }
.note-line { font-weight: 560; }
.note-body { padding: 0 0 var(--space-4); }
.approved-note { padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-l); background: color-mix(in srgb, #22c55e 9%, var(--surface)); }

/* hiding an idea */
.hide-idea > summary { cursor: pointer; font-size: .875rem; color: var(--muted); display: inline-block; }
.hide-idea > summary:hover { color: var(--text); text-decoration: underline; }
.hide-idea[open] > summary { margin-bottom: var(--space-1); }
.hidden-idea { background: transparent; box-shadow: none; border-style: dashed; }

/* icons: they take the colour and size of the text, and sit on the baseline of buttons and links */
.icon { width: 1.125em; height: 1.125em; flex: none; vertical-align: -.2em; }
.btn .icon { margin-inline-end: .1rem; }
.btn-lg .icon { width: 1.25em; height: 1.25em; }
.btn-sm .icon { width: 1.05em; height: 1.05em; }
.app-nav .nav-link { display: inline-flex; align-items: center; gap: .4rem; }

/* brands */
.brand-logo { width: 3rem; height: 3rem; border-radius: var(--radius-m, .75rem); display: grid; place-items: center; overflow: hidden; flex: none; color: #fff; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; padding: .35rem; }
.min-w-0 { min-width: 0; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: var(--space-3); }
.color-field { display: grid; grid-template-columns: 2.75rem 1fr; grid-template-areas: "sw name" "sw hex"; column-gap: .6rem; align-items: center; cursor: pointer; }
.color-field input[type=color] { grid-area: sw; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--line); border-radius: .6rem; background: none; cursor: pointer; }
.color-name { grid-area: name; font-size: .8125rem; line-height: 1.2; }
.color-field code { grid-area: hex; font-size: .75rem; color: var(--muted); }
.color-preview { display: grid; grid-template-columns: 2fr 1fr; border-radius: .75rem; overflow: hidden; border: 1px solid var(--line); min-height: 4.5rem; }
.color-preview .cp-dark { background: var(--p-dark); color: var(--p-textlight); display: flex; align-items: center; justify-content: space-between; padding: 0 1rem; font-weight: 700; }
.color-preview .cp-dark i { width: .9rem; height: .9rem; border-radius: 50%; background: var(--p-accent); }
.color-preview .cp-light { background: var(--p-light); color: var(--p-textdark); display: flex; align-items: center; justify-content: center; font-weight: 600; }
.tag-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--space-3); }
.tag-legend__item { display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; }
.tag-picker { display: flex; flex-wrap: wrap; gap: .4rem; border: 0; padding: 0; margin: 0; }
.tag-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .65rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.tag-chip input { accent-color: var(--brand); margin: 0; }
.tag-chip .icon { width: 1em; height: 1em; }
.tag-chip--logo { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.tag-chip--product { border-color: color-mix(in srgb, #f59e0b 60%, var(--line)); }
.tag-chip--screenshot { border-color: color-mix(in srgb, #06b6d4 60%, var(--line)); }
.tag-chip--own { border-color: color-mix(in srgb, #22c55e 55%, var(--line)); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: var(--space-2); }
.media-card { padding: 0; overflow: hidden; }
.media-card .card-body { padding: var(--space-2); }   /* the same gap around the text as around the picture */
.media-card .tag-picker { background: none; box-shadow: none; padding: 0; }
.media-card .btn { white-space: nowrap; }
.media-card--main { outline: 2px solid var(--brand); }
.media-thumb { aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; border-radius: 0;
  background: repeating-conic-gradient(#8882 0 25%, transparent 0 50%) 50% / 16px 16px; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }   /* the picture fills a fixed square, like a cover background */

.media-thumb { position: relative; }
.media-star { position: absolute; top: .4rem; right: .4rem; width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--muted); box-shadow: var(--shadow-soft); cursor: pointer; }
button.media-star:hover { color: var(--text); }
.media-star .icon { width: 1.2rem; height: 1.2rem; }
.media-star.is-main { color: #e0a800; cursor: default; }
.media-star.is-main .icon { fill: currentColor; }
.media-card .tag-chip { font-size: .75rem; padding: .1rem .5rem; }
.media-card .tag-picker { gap: .3rem; }

/* every <section> in the page content: 15px inside, 25px below, and room under its first heading (Bootstrap utilities such as mb-2 still win where a view sets one) */
main section { margin-bottom: 25px; }
main section:not(.card) { padding: 15px; }
main section:last-child { margin-bottom: 0; }
main section > :is(h1, h2, h3, h4):first-child { margin-top: 0; margin-bottom: var(--space-3); }

/* sharing (D14): initials of the people with access, and the Share dialog opened from a page header */
.people-stack { display: inline-flex; align-items: center; vertical-align: middle; }
.people-stack__dot { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; margin-inline-start: -.4rem; border-radius: 50%; border: 2px solid var(--surface); background: var(--line); color: var(--text); font-size: .75rem; font-weight: 600; }
.people-stack__dot:first-child { margin-inline-start: 0; }
.share-dialog { width: min(40rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-l, 12px); background: var(--surface); color: var(--text); }
.share-dialog::backdrop { background: rgb(0 0 0 / .45); }
.share-dialog > .card { border: 0; margin: 0; }
@media (max-width: 575.98px) { .share-dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: var(--radius-l, 12px) var(--radius-l, 12px) 0 0; } }

/* media gallery: small pictures, big one in a lightbox */
.media-grid { grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); }
.media-grid .media-thumb { cursor: zoom-in; }
.media-grid .media-thumb:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.lightbox { border: 0; padding: 0; background: transparent; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; color: #fff; }
.lightbox::backdrop { background: rgba(0, 0, 0, .86); }
.lightbox[open] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: 1fr auto; align-items: center; gap: .5rem; padding: 1rem; }
.lightbox img { grid-column: 2; grid-row: 1; justify-self: center; max-width: 100%; max-height: calc(100vh - 6rem); object-fit: contain; background: #fff2; border-radius: 6px; }
.lightbox .lb-cap { grid-column: 2; grid-row: 2; text-align: center; margin: 0; color: #e8e8ee; }
.lightbox .lb-prev { grid-column: 1; grid-row: 1; } .lightbox .lb-next { grid-column: 3; grid-row: 1; }
.lightbox .lb-close { position: absolute; top: .75rem; right: .75rem; }
.lb-btn { width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid #fff6; background: #0008; color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.lb-btn:hover, .lb-btn:focus-visible { background: #fff3; outline: 2px solid #fff; }
.brand-tabs .badge { margin-left: .25rem; }

/* tags: a legend of coloured labels, and toggles (dim = off, lit = on) instead of check boxes */
.tag-chip { --tc: #94a3b8; position: relative; display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 600; cursor: pointer; user-select: none;
  color: color-mix(in srgb, var(--tc) 62%, var(--text)); border: 1px solid color-mix(in srgb, var(--tc) 55%, var(--line)); background: color-mix(in srgb, var(--tc) 12%, transparent); }
.tag-chip--logo { --tc: #8b5cf6; } .tag-chip--product { --tc: #f59e0b; } .tag-chip--screenshot { --tc: #06b6d4; } .tag-chip--generic { --tc: #94a3b8; } .tag-chip--own { --tc: #22c55e; } .tag-chip--avoid { --tc: #ef4444; }
.media-card.is-avoid .media-thumb img { opacity: .4; filter: grayscale(1); }
.tag-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tag-picker .tag-chip { opacity: .42; filter: saturate(.45); }
.tag-picker .tag-chip:hover { opacity: .75; }
.tag-picker .tag-chip:has(input:checked) { opacity: 1; filter: none; background: color-mix(in srgb, var(--tc) 24%, transparent); box-shadow: 0 0 0 1px var(--tc); }
.tag-picker .tag-chip:has(input:focus-visible) { outline: 2px solid var(--tc); outline-offset: 2px; }
.tag-legend { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .5rem 1rem; align-items: center; margin: 0; }
.tag-legend dt, .tag-legend dd { margin: 0; } .tag-legend dd { font-size: .875rem; color: var(--muted); }
.tag-legend .tag-chip { cursor: default; }
.media-card:has(details[open]) .tag-picker { display: none; }   /* the replace/delete tools take the place of the tags, so the card does not grow */
.media-name { max-width: 100%; margin-bottom: .15rem; }

/* motion: one soft easing for everything that reacts, switched off for people who ask for less movement */
:root { --ease: cubic-bezier(.2, .7, .2, 1); --t: .18s; }
a, button, .btn, .form-control, .form-select, .card, .list-group-item, .badge, .tag-chip, .screen-tab, .format-chip__shape, .goal-card__body, summary, .nav-link, .dropdown-item {
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease), opacity var(--t) var(--ease), transform var(--t) var(--ease), filter var(--t) var(--ease);
}
.btn:active { transform: translateY(1px); }
.media-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft, 0 6px 18px rgba(0, 0, 0, .18)); }
.list-group-item-action:hover { transform: translateX(2px); }
html { transition: background-color .25s ease, color .25s ease; }
.screen-pane.active { animation: pane-in .24s var(--ease); }
.lightbox[open] { animation: pane-in .2s var(--ease); }
@keyframes pane-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; } }

/* Brands as a list */
.brand-list { border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); overflow: hidden; }
.brand-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 9rem auto; align-items: center; column-gap: 1rem; padding: .7rem 1rem; border-top: 1px solid var(--line); }
.brand-row:first-child { border-top: 0; }
.brand-row:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.brand-row__pal { display: inline-flex; gap: .2rem; }
.brand-row__pal i { width: 1.15rem; height: 1.15rem; border-radius: .35rem; border: 1px solid rgba(128, 128, 128, .4); }
.brand-row__count { text-align: right; white-space: nowrap; }
@media (max-width: 767.98px) {
  .brand-row { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: .4rem; }
  .brand-row__pal { grid-column: 2; grid-row: 2; }
  .brand-row__count { grid-column: 2; grid-row: 3; text-align: left; }
  .brand-row__share { grid-column: 3; grid-row: 1 / span 3; flex-direction: column; align-items: flex-end; }
}

/* Projects as a list */
.project-list { border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); overflow: hidden; }
.project-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; column-gap: 1.1rem; padding: .85rem 1rem; border-top: 1px solid var(--line); }
.project-row:first-child { border-top: 0; }
.project-row:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.project-row__videos { display: inline-flex; align-items: center; gap: .35rem; position: relative; z-index: 2; }
.project-thumb { display: block; height: 3.1rem; border-radius: .45rem; overflow: hidden; background: color-mix(in srgb, var(--text) 10%, transparent); border: 1px solid var(--line); }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 767.98px) {
  .project-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: .5rem; }
  .project-row__videos { grid-column: 1 / -1; grid-row: 2; }
  .project-row .badge { grid-row: 1; grid-column: 2; }
  .project-row__actions { grid-column: 1 / -1; grid-row: 3; }
}

/* brand lockup and the public beta badge (header, hero, footer) */
.brand-lockup { display: inline-flex; align-items: center; gap: .55rem; }
.brand-mark { display: block; border-radius: 8px; }
.brand-word { font-weight: 760; letter-spacing: -.025em; }
.brand-word--stack { display: inline-flex; flex-direction: column; line-height: .95; }
.brand-word__first { font-size: 1.05rem; font-weight: 850; letter-spacing: -.01em; color: #f2b63d; text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 10px rgba(242, 182, 61, .25); }
.brand-word__second { font-size: .82rem; font-weight: 600; letter-spacing: .04em; margin-top: .12rem; }
.beta-badge { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1; padding: .3rem .5rem; border-radius: 999px; color: #0b1f3f; background: linear-gradient(100deg, #f6d365, #e3a626); vertical-align: middle; }
@media (max-width: 380px) { .app-nav .beta-badge { display: none; } }

/* Language button (header and footer) */
.lang-menu__btn { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid color-mix(in srgb, currentColor 28%, transparent); color: inherit; background: transparent; border-radius: 999px; padding: .25rem .7rem; font-weight: 600; }
.lang-menu__btn .icon { width: 1.05em; height: 1.05em; }
.lang-menu__btn:hover, .lang-menu__btn:focus-visible { background: color-mix(in srgb, currentColor 12%, transparent); color: inherit; }
.lang-menu__list { max-height: min(22rem, 70vh); overflow-y: auto; min-width: 11rem; }
.lang-menu__list form { margin: 0; }
.lang-menu__list .dropdown-item { cursor: pointer; }
.app-nav .lang-menu__btn { color: #fff; }
.site-footer .lang-menu__btn { color: var(--muted, inherit); font-weight: 500; }

/* Font picker */
.font-picker { position: relative; }
.font-picker__panel { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% - 1.6rem); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-soft, 0 8px 24px rgba(0,0,0,.18)); padding: .5rem; }
.font-picker__panel[hidden] { display: none; }
.font-picker__cats { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .4rem; }
.font-picker__cat { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 999px; padding: .1rem .6rem; font-size: .75rem; cursor: pointer; }
.font-picker__cat.is-on { background: var(--brand, #3b82f6); border-color: transparent; color: #fff; }
.font-picker__list { list-style: none; margin: 0; padding: 0; max-height: 16rem; overflow-y: auto; }
.font-picker__list li { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .35rem .5rem; border-radius: 8px; cursor: pointer; }
.font-picker__list li:hover, .font-picker__list li.is-active { background: color-mix(in srgb, var(--brand, #3b82f6) 16%, transparent); }
.font-picker__name { font-size: 1.1rem; }
.font-picker__kind { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.font-picker__more { padding: .35rem .5rem 0; }
