/* Colors: palette index and palette page. Loaded after site.css. Neutral chrome; colour only in content. */

/* Index cards */
.pcard__mood { font-size: 12.5px; color: var(--fg2); line-height: 1.35; margin-top: 3px; }
.pcard a { display: block; }

/* Palette page: site.css's .detail padding shorthand zeroes the .wrap gutter; restore it here. */
main.wrap.detail { padding-left: var(--gutter); padding-right: var(--gutter); }

/* Palette page: head */
.pnav { margin-left: auto; }
@media (max-width: 640px) { .pnav { margin-left: 0; } }
.moods { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.moods .chip { text-decoration: none; }

/* The big strip */
.bigstrip { display: flex; height: clamp(180px, 24vw, 260px); margin-top: 22px; border-radius: var(--radius); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.bigstrip .bs { border-radius: 0; box-shadow: none; min-width: 0; padding: 12px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.bs__top { display: flex; gap: 8px; align-items: baseline; font: 600 10.5px/1 var(--ui); letter-spacing: 0.08em; text-transform: uppercase; min-height: 11px; }
.bs__role { opacity: 0.8; }
.bs__share { opacity: 0.65; margin-left: auto; font-variant-numeric: tabular-nums; }
.bs__name { font-weight: 600; font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; }
.bigstrip .sw__hex { opacity: 1; left: 12px; bottom: 12px; transform: none; background: transparent; color: inherit; padding: 0; font-size: 12px; }
.bigstrip .sw--ink .sw__hex { background: transparent; color: inherit; }
.bigstrip .sw__hex:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) {
  .bigstrip { flex-direction: column; height: auto; }
  .bigstrip .bs { flex: none !important; min-height: 64px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px; align-items: end; }
  .bs__top { grid-column: 1 / -1; }
  .bs__name { grid-column: 1; }
  .bigstrip .sw__hex { position: static; grid-column: 2; grid-row: 2; }
}
.surrounds { display: grid; grid-template-columns: 1fr 1fr; margin-top: 12px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.surround { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.surround > span { font: 600 10px/1 var(--ui); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; }
.surround--light { background: var(--light); color: var(--dark); }
.surround--dark { background: var(--dark); color: var(--light); }
.surround .strip { box-shadow: none; }
@media (max-width: 520px) { .surrounds { grid-template-columns: 1fr; } }

/* Small helpers */
.h3sub { font-weight: 400; color: var(--fg3); }
.dim { color: var(--fg3); }
.sw.sw--dot { display: inline-block; width: 14px; height: 14px; min-height: 0; border-radius: 4px; vertical-align: -2px; flex: none; }
.sw--dot .sw__hex { display: none; }
.pairname { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pairname b { font-weight: 600; }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.plist li:last-child { border-bottom: 0; }
.plist .num { font-size: 12.5px; color: var(--fg2); }

/* In use: mocks */
.mocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.mocks figure { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mocks figcaption { font-size: 12.5px; color: var(--fg3); }
.mock__frame { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel2); height: 100%; min-height: 260px; display: flex; }
.mock__frame--paper { padding: 18px; align-items: center; justify-content: center; }
.mock { flex: 1; min-width: 0; font-family: var(--ui); color: var(--m-text); background: var(--m-bg); line-height: 1.35; }
.mbtn { display: inline-flex; align-items: center; padding: 8px 13px; border-radius: 8px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.mbtn--solid { background: var(--m-accent); color: var(--m-on-accent); }
.mbtn--line { box-shadow: inset 0 0 0 1.5px var(--m-border); color: var(--m-text); }
.mbtn--s { padding: 5px 10px; font-size: 11.5px; }

.mock--web { display: flex; flex-direction: column; }
.mw__nav { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--m-border); font-size: 12px; }
.mw__logo { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.mw__logo i { width: 14px; height: 14px; border-radius: 4px; background: var(--m-accent); }
.mw__links { display: flex; gap: 12px; margin-left: auto; color: var(--m-muted); }
.mw__hero { flex: 1; display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; padding: 22px 16px; align-items: center; }
.mw__eyebrow { margin: 0 0 6px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--m-accent); }
.mw__h { margin: 0 0 8px; font-size: 21px; line-height: 1.1; letter-spacing: -0.015em; font-weight: 700; color: var(--m-text); }
.mw__p { margin: 0 0 14px; font-size: 12px; color: var(--m-muted); }
.mw__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.mw__art { position: relative; aspect-ratio: 1; border-radius: 12px; background: var(--m-surface); box-shadow: inset 0 0 0 1px var(--m-border); overflow: hidden; }
.mw__art i { position: absolute; display: block; }
.mw__art .a1 { width: 56%; height: 56%; left: 12%; top: 14%; border-radius: 50%; background: var(--m-accent); }
.mw__art .a2 { width: 44%; height: 44%; right: 10%; bottom: 10%; border-radius: 10px; background: var(--m-accent2); }
.mw__art .a3 { width: 30%; height: 6px; left: 12%; bottom: 14%; border-radius: 3px; background: var(--m-text); }
@media (max-width: 420px) { .mw__links span:nth-child(n+2) { display: none; } .mw__h { font-size: 18px; } }

.mock--app { display: grid; grid-template-columns: 112px 1fr; font-size: 12px; }
.ma__side { background: var(--m-surface); border-right: 1px solid var(--m-border); padding: 14px 8px; display: flex; flex-direction: column; gap: 2px; }
.ma__brand { display: flex; align-items: center; gap: 6px; padding: 0 6px 12px; font-size: 12.5px; }
.ma__brand i { width: 12px; height: 12px; border-radius: 50%; background: var(--m-accent); }
.ma__item { padding: 6px; border-radius: 6px; color: var(--m-muted); }
.ma__item--on { background: color-mix(in oklab, var(--m-accent) 16%, transparent); color: var(--m-text); font-weight: 600; box-shadow: inset 2px 0 0 var(--m-accent); }
.ma__main { padding: 14px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ma__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.ma__search { padding: 6px 9px; border-radius: 7px; box-shadow: inset 0 0 0 1px var(--m-border); color: var(--m-muted); font-size: 11.5px; }
.ma__list { list-style: none; margin: 0; padding: 0; }
.ma__list li { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--m-border); }
.ma__list li:last-child { border-bottom: 0; }
.ma__list b { display: block; font-weight: 600; font-size: 12px; }
.ma__list small { color: var(--m-muted); font-size: 11px; }
.ma__sq { width: 22px; height: 22px; border-radius: 6px; flex: none; background: var(--m-surface); box-shadow: inset 0 0 0 1px var(--m-border); }
.ma__sq--0 { background: var(--m-accent); box-shadow: none; }
.ma__sq--1 { background: var(--m-accent2); box-shadow: none; }
.ma__badge { margin-left: auto; padding: 3px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; background: var(--m-accent2); color: var(--m-on-accent2); }

.mock--cards { background: transparent; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.bc { width: min(300px, 100%); aspect-ratio: 3.5 / 2; border-radius: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 6px 18px rgba(0, 0, 0, 0.12); padding: 16px 18px; display: flex; flex-direction: column; container-type: inline-size; }
.bc--front { background: var(--m-bg); color: var(--m-text); justify-content: space-between; }
.bc__name { display: block; font-size: max(13px, 6.2cqi); letter-spacing: -0.01em; line-height: 1.1; }
.bc__role { display: block; font-size: max(10px, 3.8cqi); color: var(--m-muted); margin-top: 2px; }
.bc__rule { display: block; width: 26%; height: 3px; background: var(--m-accent); border-radius: 2px; }
.bc__lines { display: flex; flex-direction: column; font-size: max(9.5px, 3.4cqi); color: var(--m-text); gap: 1px; }
.bc--back { background: var(--m-accent); color: var(--m-on-accent); align-items: center; justify-content: center; gap: 10px; text-align: center; }
.bc--back b { font-size: max(12px, 5cqi); letter-spacing: 0.02em; }
.bc__mark { display: flex; width: 34%; height: 12%; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1.5px var(--m-on-accent); }
.bc__mark i { flex: 1; }
.rolekey { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--fg2); }
.rolekey span { display: inline-flex; align-items: center; gap: 6px; }
.rolekey i { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }

/* Greyscale */
.greys { display: flex; flex-direction: column; gap: 6px; }
.ladder { list-style: none; margin: 0; padding: 0; }
.ladder li { display: grid; grid-template-columns: 28px 28px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ladder li:last-child { border-bottom: 0; }
.ladder .sw { width: 28px; height: 28px; min-height: 0; border-radius: 6px; }
.ladder .sw__hex { display: none; }
.ladder b { font-weight: 600; }
.ladder small { color: var(--fg3); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.ladder .num { color: var(--fg2); font-size: 12.5px; }

/* Contrast matrix */
.cm { border-collapse: separate; border-spacing: 4px; font-size: 12px; min-width: 100%; }
.cm th { font-weight: 500; color: var(--fg2); text-align: left; vertical-align: bottom; padding: 2px 4px; }
.cm thead th { max-width: 120px; }
.cm tbody th { white-space: nowrap; vertical-align: middle; }
.cm__h { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.cm__h > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }
.cm__corner { color: var(--fg3) !important; font-size: 11px; }
.cm td { padding: 0; vertical-align: top; }
.cm__cell { display: grid; grid-template-columns: 38px auto; grid-template-rows: auto auto; gap: 4px 8px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; min-width: 104px; }
.cm__s { grid-row: 1 / 3; display: flex; align-items: center; justify-content: center; border-radius: 6px; font-weight: 700; font-size: 16px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.cm__n { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; line-height: 1.2; }
.cm__n b { font-weight: 600; font-size: 13px; }
.cm__n small { color: var(--fg3); font-size: 11px; }
.cm__cell .mark { justify-self: start; }
.cm__self { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--line) 6px 7px); border-radius: 8px; }

/* Vision */
.vrows { display: flex; flex-direction: column; gap: 14px; }
.vrow { display: grid; grid-template-columns: 120px 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center; }
.vrow b { font-size: 13px; font-weight: 600; grid-column: 1; grid-row: 1; }
.vrow > span { grid-column: 1; grid-row: 2; font-size: 11.5px; color: var(--fg3); line-height: 1.3; align-self: start; }
.vrow .strip { grid-column: 2; grid-row: 1 / 3; }
@media (max-width: 560px) {
  .vrow { grid-template-columns: 1fr; }
  .vrow .strip { grid-column: 1; grid-row: 3; margin-top: 6px; }
}

/* Structure */
.struct { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; }
@media (max-width: 720px) { .struct { grid-template-columns: 1fr; } }
.wheel { width: 100%; max-width: 300px; display: block; margin: 0 auto; }
.w__grid { stroke: var(--line2); stroke-width: 1; stroke-dasharray: 2 3; fill: none; }
.w__ticks text { font: 10px var(--ui); fill: var(--fg3); text-anchor: middle; }
.w__spoke { stroke: var(--fg3); stroke-width: 1; opacity: 0.5; }
.w__dot { stroke: var(--fg); stroke-width: 1.5; }
.struct .kv { grid-template-columns: max-content minmax(0, 1fr); row-gap: 14px; }
.spread { margin-top: 8px; max-width: 420px; }
.spread__track { position: relative; height: 18px; border-radius: 9px; background: var(--panel2); box-shadow: inset 0 0 0 1px var(--line); }
.spread__band { position: absolute; top: 5px; height: 8px; border-radius: 4px; background: var(--line2); }
.spread__dot { position: absolute; top: 2px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--panel), 0 0 0 2.5px var(--fg3); }
.spread__ax { display: flex; justify-content: space-between; font-size: 11px; color: var(--fg3); margin-top: 3px; }

/* Export */
.xgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.xh { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.xh__btns { margin-left: auto; display: inline-flex; gap: 6px; }
.xgrid pre.snippet { max-height: 360px; }

/* Palette page: Use block (SPEC-COLLECTIONS.md 5.3) */
.use { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 0 20px; margin: 0; font-size: 14.5px; line-height: 1.55; }
.use dt { font-weight: 600; color: var(--fg2); padding: 12px 0; border-top: 1px solid var(--line); }
.use dd { margin: 0; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.use dt:first-of-type, .use dt:first-of-type + dd { border-top: 0; padding-top: 0; }
.use dd p { margin: 0; max-width: 68ch; }
.use__list { margin: 0; padding-left: 18px; max-width: 68ch; }
.use__list li + li { margin-top: 4px; }
.use__list--measured { list-style: none; padding-left: 0; }
.use__list--measured li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; }
.use__sub { margin: 0 0 6px; font: 600 10.5px/1 var(--ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg3); }
.use__list + .use__sub { margin-top: 14px; }
.use__verdict { font-weight: 600; font-size: 15.5px; }
.use__none { margin: 0 0 14px; }
.use__h { margin: 22px 0 10px; font-size: 13px; font-weight: 600; color: var(--fg2); }
@media (max-width: 640px) {
  .use { grid-template-columns: 1fr; }
  .use dd { border-top: 0; padding-top: 2px; }
  .use dt:first-of-type + dd { padding-top: 2px; }
}
.swaps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.swap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.swap__label { font: 600 10.5px/1 var(--ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg3); }
.swap .pcard { padding: 10px 10px 12px; gap: 8px; flex: 1; }
.swap .pcard .strip { height: 56px; }
.swap .pcard__name { font-size: 13.5px; }
.swap .pcard__meta span:nth-child(n+3) { display: none; }

/* Collections index (collections.html) */
.cl-group + .cl-group { margin-top: 36px; }
.cgrid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.ccoll { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; transition: border-color .15s, box-shadow .15s; }
.ccoll:hover { border-color: var(--line2); box-shadow: var(--shadow); }
.ccoll .strip { height: 64px; }
.ccoll__name { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.25; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ccoll__tag { margin: 0; font-size: 13.5px; color: var(--fg2); line-height: 1.45; }
.ccoll__meta { margin-top: auto; display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--fg3); font-variant-numeric: tabular-nums; }
.ccoll--draft .ccoll__tag { color: var(--fg3); }

/* Collection page (collection.html) */
.co-head { padding: 4px 0 0; }
.co-head h1 { margin: 6px 0 0; font-size: clamp(32px, 5vw, 52px); line-height: 1.02; letter-spacing: -0.025em; font-weight: 650; }
.co-tag { margin: 10px 0 0; font-size: 18px; color: var(--fg2); max-width: 44em; line-height: 1.45; }
.co-hero { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.co-hero .strip { height: clamp(96px, 14vw, 150px); }
.co-hero__cap { font-size: 13px; color: var(--fg3); }
.co-essay { font-size: 16.5px; line-height: 1.65; max-width: 66ch; }
.co-essay p { margin: 0 0 14px; }
.rubric { margin: 0; padding-left: 24px; font-size: 15px; line-height: 1.5; max-width: 70ch; }
.rubric li + li { margin-top: 12px; }
.rubric li > b { font-weight: 600; }
.rubric li > span { display: block; font-size: 13px; color: var(--fg2); margin-top: 2px; }
.featgrid .pcard .strip { height: 104px; }
.feat__verdict { margin: 2px 2px 0; font-size: 13px; color: var(--fg2); line-height: 1.45; }
.feat__verdict b { font-weight: 600; color: var(--fg); }
.featgrid .feat { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.co-draft { margin-top: 14px; }

/* palette page, working palettes: block 1b Light and dark */
.wdials { margin: 0 0 12px; color: var(--fg2); font-size: 14px; }
.wdials b { color: var(--fg); font-weight: 600; }
.wprevbox { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.seg { display: inline-flex; gap: 6px; }
.wprev { background: var(--w-bg); color: var(--w-text); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 13px; transition: background .2s, color .2s; }
.wprev__bar { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--w-border); color: var(--w-muted); flex-wrap: wrap; }
.wprev__bar b { color: var(--w-text); display: inline-flex; align-items: center; gap: 7px; margin-right: auto; }
.wprev__bar b i { width: 12px; height: 12px; border-radius: 50%; background: var(--w-accent); }
.wprev__body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; padding: 16px; }
.wprev__card { background: var(--w-surface); border: 1px solid var(--w-border); border-radius: 10px; padding: 14px 16px; min-width: 0; }
.wprev__card h3 { margin: 0 0 6px; font-size: 17px; color: var(--w-text); }
.wprev__eyebrow { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--w-muted); }
.wprev__muted { margin: 0 0 12px; color: var(--w-muted); line-height: 1.45; }
.wprev__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wprev__btn { padding: 7px 13px; border-radius: 8px; background: var(--w-accent); color: var(--w-on-accent); font-weight: 600; font-size: 12.5px; }
.wprev__btn--line { background: transparent; color: var(--w-text); box-shadow: inset 0 0 0 1.5px var(--w-border); }
.wprev__link { color: var(--w-accent2); text-decoration: underline; text-underline-offset: 2px; }
.wprev__st { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wprev__st li { display: flex; align-items: center; gap: 9px; }
.wprev__st i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.wprev__st .s-success { background: var(--w-success); } .wprev__st .s-warning { background: var(--w-warning); }
.wprev__st .s-danger { background: var(--w-danger); } .wprev__st .s-info { background: var(--w-info); }
.wmodes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; margin-bottom: 16px; }
.wroles { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 0; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.wrole { min-height: 76px; border-radius: 0; box-shadow: none; display: flex; flex-direction: column; justify-content: space-between; padding: 7px 8px; text-decoration: none; }
.wrole__r { font: 600 10px/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.wrole__n { font-size: 11.5px; line-height: 1.2; font-weight: 500; }
.wsc__h { margin: 0 0 8px; font-size: 15px; }
