/* Hallmark · macrostructure: Catalogue · tone: utilitarian · anchor hue: existing YueXin green */
/* Pre-emit critique: philosophy 4 · hierarchy 4 · execution 4 · specificity 5 · restraint 5 · variety 4 */
:root{--md-ink:var(--ink,oklch(29% .015 165));--md-muted:oklch(43% .015 165);--md-line:var(--line,oklch(90% .018 150));--md-surface:var(--surface,oklch(100% 0 0));--md-soft:oklch(96% .018 145);--md-accent:oklch(39% .095 158)}
.md-controls{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin-block:12px 20px}.md-controls label:not(.search-field){display:grid;gap:4px;min-width:0;font-size:13px}.md-controls select,.md-controls label:not(.search-field) input{max-width:100%;min-height:36px;padding:6px 10px;border:1px solid var(--md-line);border-radius:8px;background:var(--md-surface);color:var(--md-ink)}
.md-group{min-width:0;margin-block:20px 28px}.md-group-title,.md-brand{display:flex;align-items:center;gap:8px;min-width:0;color:var(--md-ink)}.md-group-title{margin:0 0 12px;font-size:16px;font-weight:650}.md-group-title small{color:var(--md-muted);font-weight:400}.md-brand{font-size:12px;font-weight:600}.md-logo{display:inline-block;width:24px;height:24px;object-fit:contain;flex:none;vertical-align:middle}.md-logo-placeholder{border-radius:6px;background:var(--md-soft);text-align:center;line-height:24px}
/* Compact catalogue grid: 3 columns wide, 2 medium, 1 phone. A lone model keeps its column width (never stretches). */
.md-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:stretch}
.md-card{min-width:0;display:flex;flex-direction:column;gap:8px;overflow-wrap:anywhere;padding:14px}
.md-card h2,.md-card h3{margin:0}.md-card p{margin:0}
.md-head{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:4px 8px;min-width:0}
.md-name{display:flex;align-items:center;gap:6px;flex:1 1 auto;min-width:0;font-size:15px;font-weight:650;line-height:1.3}
.md-name .md-logo{width:20px;height:20px}
.md-tags{display:flex;flex-wrap:wrap;gap:4px;justify-content:flex-end;flex:0 1 auto;min-width:0;max-width:100%}
.md-kicker{font-size:12px;color:var(--md-muted)}
/* Price sits right after the name; never pinned to the card bottom. */
.md-pricebox{margin:0;background:var(--md-soft);border:1px solid var(--md-line);border-radius:10px;padding:8px 10px;min-width:0}
.md-price-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 8px;font-size:12px;font-weight:650;color:var(--md-accent)}
.md-price-inline{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:4px}
.md-price-item{display:inline-flex;flex-wrap:wrap;align-items:baseline;gap:2px 6px;font-size:12px}
.md-label{color:var(--md-muted)}
.md-price-item del{margin-inline-end:4px;color:var(--md-muted)}
.md-price-item strong{font-variant-numeric:tabular-nums;font-weight:650}
.md-unit{color:var(--md-muted);font-size:12px}
.md-discount{display:inline-block;border:1px solid var(--md-line);background:var(--md-surface);border-radius:999px;padding:1px 7px;color:var(--md-accent);white-space:nowrap;font-size:12px}
/* Long description clamps to two lines; the full text stays in the DOM for screen readers and the detail view. */
.md-desc{font-size:12px;color:var(--md-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.md-picker-group{display:grid;gap:4px}.md-picker-group>h3{margin:8px 0 4px}.md-picker-group[hidden],.model-option[hidden]{display:none!important}.md-desktop-brand{display:inline-flex;align-items:center;gap:5px;font-size:12px}.md-desktop-brand .md-logo{width:18px;height:18px}.md-controls :focus-visible{outline:2px solid var(--md-accent);outline-offset:2px}
/* Public catalogue card: the pearl layer pads large; tighten to the compact spec without changing the light/green theme. */
#app .model-card{padding:14px;gap:8px}
#app .model-card h3{font-size:15px;margin:0}
#app .model-card footer{display:none}
@media(max-width:1263px){.md-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767px){.md-grid{grid-template-columns:minmax(0,1fr)}.md-controls>*{max-width:100%}}
/* Workspace search boxes (model page and picker): the box shows the one focus ring; the input inside draws none. */
.md-controls .search-field input:focus-visible{outline:none}.md-controls .search-field:focus-within{outline:2px solid var(--md-accent);outline-offset:2px}
/* Public catalogue toolbar: the count reads at 4.5:1 or more on the grey bar; the search glyph is a little larger. */
body:not(.site-overseas) #app .catalog-count{color:#5f6957}
#app .catalog-search>span[aria-hidden="true"]{font-size:22px;line-height:1}
