/* 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; }
