/* The four pigment colors and tile paper come directly from the approved 4B marks. */
html[data-edition=butter]{
 --s:#438465;--c:#df8055;--t:#bf9e35;--p:#788bc0;--stock:#f2e7c6;--deep:#233e30;--action:#315f44;--action-text:#fffdf1;
 --paper:#faf6e9;--surface:#fffdf5;--tint:#f1ead6;--ink:#293c2f;--mute:#596451;--line:#d4cfb6;--orange:#a14d30;--hero-paper:var(--stock);
 --sample-a:#f6e7bf;--sample-b:#efc6ae;--sample-c:#cfdfcd;--sample-d:#d5dbed;--sample-e:#e9ddb1;--panel-radius:16px;
}
html[data-edition=newsprint]{
 --s:#466bd1;--c:#e85942;--t:#edb52f;--p:#29876b;--stock:#f0ece0;--deep:#172039;--action:#304fac;--action-text:#fffdf6;
 --paper:#f8f6ef;--surface:#fffef9;--tint:#eeeae0;--ink:#192338;--mute:#565c63;--line:#dcd8cc;--orange:#344fa7;--hero-paper:var(--stock);
 --sample-a:#f9f5e8;--sample-b:#f2d8c9;--sample-c:#dbe3ed;--sample-d:#d3e4d8;--sample-e:#f3e3ae;--panel-radius:24px;
}
html[data-edition=butter][data-theme=dark]{--paper:#1c2820;--surface:#26372a;--tint:#304333;--ink:#f5edcf;--mute:#c1c6ad;--line:#495948;--orange:#ecac83;--hero-paper:#26392a;--action:#e7d8a3;--action-text:#26382b}
html[data-edition=newsprint][data-theme=dark]{--paper:#192131;--surface:#232c3f;--tint:#2c364c;--ink:#f3ecdc;--mute:#c4c7cc;--line:#4a5261;--orange:#adbffe;--hero-paper:#202b43;--action:#b7c6fa;--action-text:#18213b}
html[data-edition]{--forest:var(--deep);--pear:var(--sample-e);--apricot:var(--sample-b)}
.edition-picker{position:relative;display:inline-flex;align-items:center;flex:none}
.edition-picker select{appearance:none;background:var(--surface);border:1px solid var(--line);color:var(--ink);border-radius:20px;padding:7px 21px 7px 23px;font:600 11px/1.35 Arial,sans-serif;cursor:pointer;width:95px}
.edition-swatch{width:8px;height:8px;background:var(--s);border-radius:50%;position:absolute;left:10px;pointer-events:none}
.edition-picker:after{content:'';position:absolute;right:10px;width:4px;height:4px;border:solid currentColor;border-width:0 1px 1px 0;transform:translateY(-1px) rotate(45deg);pointer-events:none}
.header-inner{gap:clamp(10px,2.6vw,42px)}.header-inner .brand-mark{width:45px;height:45px}.footer-inner .brand-mark{width:33px;height:33px}
#site-header{background:var(--hero-paper)}.primary,.featured-price .primary{background:var(--action);color:var(--action-text)}
:is(a,button,input,select,summary):focus-visible{outline-color:var(--s)}
.hero{position:relative;isolation:isolate;padding-block:clamp(46px,6.5vw,94px)}
.hero:before{content:'';position:absolute;inset:0 calc((100% - 100vw)/2);z-index:-1;background:var(--hero-paper);border-bottom:1px solid var(--line);pointer-events:none}
body{overflow-x:clip}.brand-dots{width:6px;height:6px;background:var(--s);border-radius:0;box-shadow:9px 0 var(--c),0 9px var(--t),9px 9px var(--p);margin:0 12px 7px 0}
.hero .eyebrow{color:var(--mute)}.hero-copy>p{color:var(--ink)}.hero-search{background:var(--surface)}
.specimen{background:var(--deep);border-color:var(--deep);border-radius:var(--panel-radius);box-shadow:0 6px 0 -2px var(--sample-c),0 8px 0 -2px var(--deep)}
.specimen-head{color:var(--stock)}.specimen-head i{background:var(--c)}.showcase-bar .segmented button{color:var(--stock)}
.showcase-bar .segmented button[aria-pressed=true]{background:var(--stock);color:var(--deep)}.showcase-bar .icon-button{color:var(--stock);border-color:color-mix(in srgb,var(--stock) 50%,var(--deep))}
.hero-icon-cell,.hero-icon-cell.tone-0{background:var(--sample-a);color:var(--deep)}.hero-icon-cell:is(.tone-1,.tone-5){background:var(--sample-b)}.hero-icon-cell.tone-2{background:var(--sample-c)}.hero-icon-cell:is(.tone-3,.tone-6){background:var(--sample-e)}.hero-icon-cell.tone-4{background:var(--sample-d)}
.collection-art,.bag-art{background:var(--sample-b);color:var(--deep)}.grid .collection-art,.bag-art.grid{background:var(--sample-c)}.warmfolk .collection-art,.bag-art.warmfolk{background:var(--sample-e)}
.collection-art-link{border-color:color-mix(in srgb,var(--deep) 22%,transparent)}.collection-art{border-radius:var(--panel-radius)}
.example-stage,.preview-stage{color:var(--deep);background-color:var(--sample-c);background-image:radial-gradient(color-mix(in srgb,var(--deep) 27%,transparent) .8px,transparent .8px);border-color:var(--line)}
.demo-window{background:#fffdf4;border-color:var(--deep);box-shadow:5px 6px 0 color-mix(in srgb,var(--deep) 20%,transparent)}.demo-window-bar{border-color:var(--stock);color:var(--deep)}
.demo-window-bar i{background:var(--c)}.demo-window-bar i:nth-child(2){background:var(--t)}.demo-window-bar i:nth-child(3){background:var(--p)}
.demo-nav,.demo-message-detail{background:var(--sample-a)}.demo-message.active,.demo-file[aria-pressed=true]{background:var(--sample-c)}.demo-stats>div{background:var(--sample-e)}.demo-stats>div:nth-child(2){background:var(--sample-d)}.demo-stats>div:nth-child(3){background:var(--sample-c)}
.demo-badge,.demo-message time,.demo-tasks small{color:var(--deep)}.family-dot{background:var(--c)}.family-dot.grid{background:var(--s)}.family-dot.warmfolk{background:var(--t)}
.featured-price{background:var(--stock);border-color:var(--deep);color:var(--deep)}.featured-price .pill{border-color:color-mix(in srgb,var(--deep) 40%,var(--stock))}
.featured-price .primary{background:var(--deep);color:var(--stock)}#site-footer{background:var(--hero-paper)}
.library-toolbar{background:var(--hero-paper);border:1px solid var(--line);border-radius:var(--panel-radius);padding:clamp(16px,2.5vw,35px)}.library-title .pill{background:var(--surface)}
.icon-cell:hover,.category-sidebar button[aria-pressed=true]{border-color:var(--s)}.free-indicator{background:var(--sample-c);color:var(--deep)}
.icon-grid.is-dark .icon-cell,.preview-stage.is-dark{background-color:var(--deep);border-color:color-mix(in srgb,var(--p) 50%,var(--deep));color:#f7f3e6}
.preview-stage>span{color:var(--deep);background:var(--stock)}dialog::backdrop{background:color-mix(in srgb,var(--deep) 75%,transparent)}
@media(max-width:820px) and (min-width:741px){.header-inner{gap:8px}.main-nav{gap:12px}.header-actions{gap:3px}.edition-picker select{width:88px}}
@media(max-width:740px){.hero{padding:36px 0}.header-inner{gap:6px}.header-inner .brand-mark{width:34px;height:34px}.hero:before{inset-inline:-16px}.library-toolbar{padding:14px}.header-actions{gap:2px}.edition-picker select{font-size:10px;width:82px;padding-left:17px;padding-right:10px}.edition-swatch{left:6px;width:6px;height:6px}.edition-picker:after{right:6px}.specimen{transform:none}}
@media(max-width:400px){.header-inner{width:calc(100% - 16px)}.header-inner .wordmark{font-size:16px;gap:3px}.header-inner .brand-mark{width:30px;height:30px}.header-actions .icon-button{width:30px;min-height:33px}.bag-trigger{gap:3px;padding-inline:6px}}
.in-comparison .edition-picker{display:none}

/* Newsprint pairs warm stock with cobalt ink and a raised paper specimen. */
html[data-edition="newsprint"] {
  --soft-line: color-mix(in srgb, var(--ink) 10%, transparent);
  --lift: 0 12px 38px -20px #332b1e35, 0 2px 6px -3px #332b1e1c;
  --hero-paper: var(--paper);
}
[data-edition="newsprint"] #site-header { border: 0; }
[data-edition="newsprint"] .header-inner { height: 84px; }
[data-edition="newsprint"] .main-nav a { font-size: 14px; }
[data-edition="newsprint"] .hero {
  padding-block: clamp(34px, 5vw, 80px) clamp(48px, 6vw, 92px);
  gap: clamp(32px, 5vw, 84px);
}
[data-edition="newsprint"] .hero::before { display: none; }
[data-edition="newsprint"] .hero h1 {
  margin: 0 0 30px;
  font: 650 clamp(64px, 6.6vw, 98px)/.97 -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: -.054em;
  word-spacing: .015em;
}
[data-edition="newsprint"] .hero h1 em { font: inherit; letter-spacing: inherit; color: var(--orange); }
[data-edition="newsprint"] .hero-search { margin: 0; max-width: 365px; padding-right: 7px; }
[data-edition="newsprint"] .hero-links { margin-top: 16px; gap: 16px; }
[data-edition="newsprint"] :is(.button,.bag-trigger,.quiet-button,.compact-select,.result-options select) { border-radius: 100px; }
[data-edition="newsprint"] .button { padding-inline: 18px; }
[data-edition="newsprint"] :is(.search-field,.segmented) { border-radius: 18px; border-color: var(--soft-line); }
[data-edition="newsprint"] .search-field { box-shadow: 0 2px 5px #2f281504; }
[data-edition="newsprint"] :is(.hero-search button,.icon-button,.segmented button) { border-radius: 12px; }
[data-edition="newsprint"] .specimen {
  padding: clamp(12px, 1.4vw, 20px);
  border: 0;
  border-radius: clamp(24px, 2.5vw, 36px);
  background: var(--surface);
  box-shadow: var(--lift), inset 0 0 0 1px var(--soft-line);
  color: var(--ink);
  transform: none;
}
[data-edition="newsprint"] .hero-gallery {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: clamp(56px, 5.5vw, 88px);
  gap: clamp(4px, .6vw, 9px);
}
[data-edition="newsprint"] .hero-icon-cell {
  height: auto;
  background: transparent;
  border-radius: 17px;
  color: var(--ink);
}
[data-edition="newsprint"] .hero-icon-cell .icon-art { width: 62%; height: 66%; max-width: 66px; }
[data-edition="newsprint"] .hero-icon-cell:first-child {
  grid-area: 1 / 1 / span 2 / span 2;
  background: #dce5f3;
  color: var(--deep);
  border-radius: 22px;
}
[data-edition="newsprint"] .hero-icon-cell:first-child .icon-art { width: 77%; height: 86%; max-width: 150px; }
[data-edition="newsprint"] .hero-icon-cell:nth-child(5) { background: #f9e5ce; color: var(--deep); }
[data-edition="newsprint"] .hero-icon-cell:nth-child(10) { background: #dfebe2; color: var(--deep); }
[data-edition="newsprint"] .hero-icon-cell:hover { background: var(--tint); color: var(--ink); }
[data-edition="newsprint"] .showcase-bar { margin-top: 14px; }
[data-edition="newsprint"] .showcase-bar .segmented { border-radius: 99px; background: var(--tint); padding: 3px; }
[data-edition="newsprint"] .showcase-bar .segmented button { color: var(--mute); border-radius: 99px; }
[data-edition="newsprint"] .showcase-bar .segmented button[aria-pressed="true"] { color: var(--ink); background: var(--surface); }
[data-edition="newsprint"] .showcase-bar .icon-button { color: var(--ink); border-color: var(--soft-line); border-radius: 50%; }
[data-edition="newsprint"] .section { border: 0; padding-block: clamp(25px, 3.3vw, 54px); }
[data-edition="newsprint"] .section-head { margin-bottom: 20px; }
[data-edition="newsprint"] .collection-grid { gap: clamp(14px, 2vw, 28px); }
[data-edition="newsprint"] .collection-art {
  background: #e2e8f2; color: var(--deep); border: 0;
  padding: clamp(15px, 2.2vw, 34px) clamp(8px, 1.6vw, 24px);
}
[data-edition="newsprint"] .grid .collection-art { background: #f3e7be; }
[data-edition="newsprint"] .warmfolk .collection-art { background: #dce9df; }
[data-edition="newsprint"] .collection-art-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; gap: 14px 6px; }
[data-edition="newsprint"] .collection-caption { align-items: baseline; padding: 14px 3px 4px; }
[data-edition="newsprint"] .collection-caption h3 { font-size: clamp(21px, 2vw, 27px); letter-spacing: -.052em; }
[data-edition="newsprint"] .collection-card a { display: block; border-radius: var(--panel-radius); }
[data-edition="newsprint"] .example-layout { background: var(--tint); border: 0; border-radius: var(--panel-radius); grid-template-columns: minmax(190px,.55fr) 1.5fr; }
[data-edition="newsprint"] .example-copy { padding: clamp(16px, 3vw, 40px); }
[data-edition="newsprint"] .example-families { margin: 0; }
[data-edition="newsprint"] .example-families button { border: 0; border-radius: 13px; padding: 12px; }
[data-edition="newsprint"] .example-families button[aria-pressed="true"] { background: var(--surface); }
[data-edition="newsprint"] .example-stage { border-radius: 20px; background: #e0e7ec; }
[data-edition="newsprint"] .demo-window { border: 0; border-radius: 14px; box-shadow: 0 10px 30px #293a4b19; }
[data-edition="newsprint"] .price-card { border: 0; border-radius: 22px; padding: clamp(14px, 1.6vw, 24px); background: var(--surface); }
[data-edition="newsprint"] .price-description { margin-bottom: 20px; }
[data-edition="newsprint"] .featured-price { background: var(--stock); box-shadow: inset 0 0 0 1px #494b5e15; }
[data-edition="newsprint"] .faq-list details { border-color: var(--soft-line); }
[data-edition="newsprint"] #site-footer { background: var(--paper); }
[data-edition="newsprint"] .footer-inner { border-color: var(--soft-line); }
[data-edition="newsprint"] .library-toolbar { border: 0; padding: 12px 0 24px; }
[data-edition="newsprint"] .category-sidebar { border: 0; }
[data-edition="newsprint"] .category-sidebar button { border-radius: 12px; }
[data-edition="newsprint"] .icon-grid { gap: 9px; }
[data-edition="newsprint"] .icon-cell { border: 1px solid transparent; border-radius: 17px; }
[data-edition="newsprint"] .icon-cell:is(:hover,:focus-visible,.is-selected) { border-color: var(--s); }
[data-edition="newsprint"] :is(dialog,.preview-stage,.selection-tray,.brand-card,.cell-pair,.mix-editor,.study-card) { border-radius: 22px; border-color: var(--soft-line); }
[data-edition="newsprint"] :is(.code-preview,.bag-art,.demo-stats>div,.demo-file,.inspector-families button) { border-radius: 10px; }
[data-edition="newsprint"] :is(.inspector-settings select,.price-card .button) { border-radius: 12px; }
@media(max-width:740px){
  [data-edition="newsprint"] .header-inner { height: 64px; width: calc(100% - 32px); }
  [data-edition="newsprint"] .hero { padding-block: 28px 34px; gap: 28px; }
  [data-edition="newsprint"] .hero h1 { font-size: clamp(53px, 10vw, 72px); margin-bottom: 21px; }
  [data-edition="newsprint"] .hero h1 br { display:block; }
  [data-edition="newsprint"] .hero h1 em::before { content:none; }
  [data-edition="newsprint"] .hero-search { max-width: 100%; }
  [data-edition="newsprint"] .hero-gallery { grid-auto-rows: clamp(52px, 11vw, 70px); }
  [data-edition="newsprint"] .example-layout { grid-template-columns: 1fr; }
  [data-edition="newsprint"] .example-copy { padding: 8px; }
  [data-edition="newsprint"] .example-families button { justify-content: center; }
  [data-edition="newsprint"] .collection-art { padding: 18px; }
  [data-edition="newsprint"] .section-head { margin-bottom: 14px; }
}
@media(prefers-reduced-motion:reduce){
  [data-edition="newsprint"] .hero-icon-cell:hover, [data-edition="newsprint"] .collection-art:hover { transform:none; }
}

/* One set of controls serves both the desktop toolbar and mobile disclosure. */
#filters-toggle, #library-options .option-name, #library-options .mobile-category { display: none; }
#library-options { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.option-select { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mute); }
.option-select select { min-width: 0; min-height: 36px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; }
#library-options button[aria-pressed="true"] { background: var(--stock); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.free-switch { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; cursor: pointer; font-size: 13px; font-weight: 600; }
.free-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch-track { display: inline-flex; align-items: center; width: 31px; height: 19px; padding: 2px; border-radius: 99px; background: var(--tint); box-shadow: inset 0 0 0 1px var(--line); }
.switch-track::before { content: ''; width: 15px; height: 15px; border-radius: 50%; background: var(--mute); }
.free-switch input:checked + .switch-track { background: var(--ink); }
.free-switch input:checked + .switch-track::before { transform: translateX(12px); background: var(--paper); }
.free-switch input:focus-visible + .switch-track { outline: 2px solid var(--ink); outline-offset: 3px; }
.icon-tile { position: relative; min-width: 0; display: grid; }
.icon-cell-caption small svg { width: 10px; height: 10px; vertical-align: -1px; }
.tile-copy { position: absolute; right: 3px; top: 3px; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; color: var(--mute); background: var(--surface); }
.tile-copy svg { width: 14px; height: 14px; }
.tile-copy:is(:hover,:focus-visible) { color: var(--ink); background: var(--tint); }
@media (hover: hover) and (pointer: fine) {
  .tile-copy { opacity: 0; }
  .icon-tile:hover .tile-copy, .icon-tile:focus-within .tile-copy { opacity: 1; }
}
@media (max-width: 740px) {
  .library-shell { padding-top: 12px; }
  [data-edition="newsprint"] .library-toolbar { padding-block: 4px 0; }
  .library-search-row { margin: 12px 0 9px; }
  .library-search-row .search-field { min-width: 0; }
  .library-search-row kbd { display: none; }
  #filters-toggle { display: inline-flex; min-height: 44px; height: auto; gap: 7px; }
  #filters-toggle[aria-expanded="true"] { background: var(--tint); }
  .filter-toolbar { gap: 8px; }
  #library-options { display: none; }
  #library-options.is-open { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; border-radius: 17px; background: var(--tint); }
  #library-options .option-select { flex-direction: column; align-items: stretch; gap: 4px; }
  #library-options .mobile-category { display: flex; grid-column: 1 / -1; }
  #library-options :is(select,button) { min-height: 42px; }
  #library-options button { justify-content: flex-start; display: flex; gap: 6px; align-items: center; width: auto; padding-inline: 10px; border: 0; border-radius: 12px; font-size: 12px; }
  #library-options .option-name { display: inline; }
  .library-layout { margin-top: 12px; }
  .library-content .results-bar { align-items: center; margin-bottom: 7px; }
  .library-content .results-bar > div:first-child { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 6px; }
  .tile-copy { width: 32px; height: 32px; }
}

.price-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.price-actions .button { flex: 1 0 auto; }
.price-card { min-width: 0; }
.price-actions .button { flex: 1 1 auto; min-width: 0; white-space: normal; }
@media (max-width: 440px) {
  .pricing-grid { grid-template-columns: minmax(0,1fr); }
  .price-card-heading { min-height: 0; }
}
