:root {
  color-scheme: light;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  color: #202632;
  background: #f2f2ed;
  --rule: #d9dbd2;
  --hint: #535e57;
  --accent: #2b4270;
}
* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); text-underline-offset: .2em; }
header { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .92rem max(1rem,calc((100vw - 1160px)/2)); border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; gap: .58rem; align-items: center; font-weight: 730; text-decoration: none; }
.brand img { border-radius: .44rem; }
main, footer { width: min(1160px,calc(100% - 2rem)); margin-inline: auto; }
.intro { padding: 2.65rem 0 1.3rem; }
h1 { font-size: clamp(2.15rem,5.5vw,3.62rem); letter-spacing: -.052em; line-height: 1.03; }
.intro p { color: var(--hint); margin-top: .5rem; }
.toolbar, .preview-panel, .checks-panel { background: #fff; border: 1px solid var(--rule); border-radius: .72rem; padding: 1rem; }
.toolbar { display: grid; grid-template-columns: 1.25fr 1fr 1.3fr auto; align-items: end; gap: .72rem; }
label { display: block; font-size: .84rem; font-weight: 680; margin-bottom: .38rem; }
input, select, button { background: #fff; color: inherit; border: 1px solid var(--rule); border-radius: .4rem; font: inherit; }
input,select,button { min-height: 43px; padding: .55rem .68rem; }
button { cursor: pointer; font-size: .87rem; font-weight: 670; }
button:disabled { opacity: .55; cursor: default; }
button:hover:not(:disabled) { background: #f3f5f4; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.primary:hover:not(:disabled) { background: #3a5586; }
select, #seed { width: 100%; }
#seed { font-family: ui-monospace,monospace; min-width: 0; }
#picker { width: 50px; flex: 0 0 50px; padding: .26rem; cursor: pointer; }
.color-control, .downloads { display: flex; gap: .4rem; }
:focus-visible { outline: 2px solid #3d69a8; outline-offset: 2px; }
#status { color: var(--hint); font-size: .84rem; min-height: 1.2rem; margin: .5rem .15rem; }
#status.error { color: #8b242e; }
.panels { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,.9fr); gap: .9rem; align-items: start; }
h2 { font-size: 1.12rem; margin-bottom: .7rem; }
#preview { background: var(--color-background); color: var(--color-text); border: 1px solid var(--color-border); border-radius: .58rem; padding: clamp(.7rem,3vw,1.5rem); margin-bottom: 1rem; }
.preview-surface { background: var(--color-surface); border: 1px solid var(--color-border); padding: 1rem; border-radius: .6rem; }
.preview-surface p { color: var(--color-muted-text); margin-top: .4rem; font-size: .9rem; }
.preview-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.preview-buttons span { padding: .62rem .72rem; border-radius: .42rem; font-weight: 650; font-size: .88rem; }
.preview-primary { background: var(--color-primary); color: var(--color-on-primary); }
.preview-accent { background: var(--color-accent); color: var(--color-on-accent); }
.preview-surface p.preview-focus { display: inline-block; margin-top: .9rem; color: var(--color-text); border: 2px solid var(--color-focus); border-radius: .3rem; padding: .35rem .55rem; }
#swatches { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: .4rem; }
.swatch { min-width: 0; display: block; text-align: start; padding: .31rem; }
.swatch-chip { display: block; height: 35px; border: 1px solid #0002; border-radius: .25rem; margin-bottom: .32rem; }
.swatch-label,.swatch-code { display:block; overflow-wrap: anywhere; font-size: .72rem; }
.swatch-code { color: var(--hint); font-family: ui-monospace,monospace; font-weight: 450; }
#checks-summary,.note { color: var(--hint); font-size: .85rem; line-height: 1.5; }
table { border-collapse: collapse; width: 100%; font-size: .84rem; margin: .55rem 0 .6rem; font-variant-numeric: tabular-nums; }
td,th { text-align: end; padding: .5rem .12rem; border-bottom: 1px solid var(--rule); }
td:first-child,th:first-child { text-align: start; }
footer { display: flex; gap: 1rem; margin-block: 1.3rem; font-size: .84rem; }
.info { max-width: 690px; line-height: 1.65; }
.info section { padding: .8rem 0; border-bottom: 1px solid var(--rule); }
.info p { margin-top: .55rem; }
@media (max-width: 840px) { .panels { grid-template-columns: 1fr; } .intro { padding-top: 1.7rem; } }
@media (max-width: 610px) { .toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); } #swatches { grid-template-columns: repeat(3,minmax(0,1fr)); } }
