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

/* Index */
.ghead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 20px; }
.ghead h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; line-height: 1.05; font-weight: 650; }
.ghead p { margin: 0; color: var(--fg2); font-size: 14px; max-width: 46em; flex: 1 1 320px; }
.ghead .btn { margin-left: auto; }
@media (max-width: 560px) { .ghead .btn { margin-left: 0; } }
.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding: 12px 0 24px; }
@media (max-width: 420px) { .ggrid { grid-template-columns: 1fr; } }
.gcard { display: flex; flex-direction: column; gap: 9px; padding: 10px 10px 13px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; transition: border-color .15s, box-shadow .15s; }
.gcard:hover { border-color: var(--line2); box-shadow: var(--shadow); }
.gcard__art { display: block; aspect-ratio: 16 / 10; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.gcard > a:last-child { display: block; padding: 0 2px; }
.gcard__dots { display: flex; gap: 4px; padding: 0 2px; }
.gcard__name { font-weight: 600; font-size: 15px; line-height: 1.2; }
.gcard__meta { font-size: 12px; color: var(--fg3); display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 3px; }
.gcard__mood { font-size: 12.5px; color: var(--fg2); line-height: 1.35; margin-top: 3px; }
.sw.sw--dot { display: inline-block; width: 16px; height: 16px; min-height: 0; border-radius: 5px; flex: none; }
.sw--dot .sw__hex { display: none; }

/* Gradient 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); }
.h3sub { font-weight: 400; color: var(--fg3); }
.dim { color: var(--fg3); }
.gprev { margin-top: 22px; height: clamp(200px, 34vw, 380px); border-radius: var(--radius); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }

/* Builder */
.gb { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .gb { grid-template-columns: 1fr; } }
.stops { list-style: none; margin: 0; padding: 0; }
.stop { display: grid; grid-template-columns: 38px 108px minmax(60px, 1fr) auto auto; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.stop:last-child { border-bottom: 0; }
.stop .sw { width: 38px; height: 38px; min-height: 0; border-radius: 8px; grid-row: 1 / 3; }
.stop .sw__hex { display: none; }
.stop__hex { width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: 13px var(--mono); }
.stop__hex[aria-invalid="true"] { border-color: var(--fg); border-style: dashed; }
.stop__range { width: 100%; min-width: 0; accent-color: var(--fg); margin: 0; }
.stop__pos { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; color: var(--fg3); }
.stop__btns { display: inline-flex; gap: 2px; }
.stop__name { grid-column: 2 / -1; font-size: 12px; color: var(--fg2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stop__name a { text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.num-in { width: 62px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--fg); font: 13px var(--ui); font-variant-numeric: tabular-nums; }
.ib { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--fg2); cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.ib:hover:not(:disabled) { border-color: var(--line2); color: var(--fg); }
.ib:disabled { opacity: 0.35; cursor: default; }
@media (max-width: 520px) {
  .stop { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .stop .sw { grid-row: 1 / 4; }
  .stop__range { grid-column: 2 / 4; grid-row: 2; }
  .stop__pos { grid-column: 3; grid-row: 1; }
  .stop__btns { grid-column: 2 / 4; grid-row: 3; justify-content: flex-end; }
  .stop__hex { grid-column: 2; grid-row: 1; }
  .stop__name { grid-column: 2 / 4; grid-row: 4; }
  .stop { grid-template-rows: auto auto auto auto; }
}
.fld { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 10px; padding: 7px 0; font-size: 13.5px; }
.fld > span:first-child { color: var(--fg3); }
.fld[hidden] { display: none; }
.fld input:not(.num-in) { width: 100%; min-width: 0; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: 13.5px var(--ui); }
.fld .sel { width: 100%; max-width: 240px; }
.fld .sel:disabled { opacity: 0.5; }
.dialrow { display: flex; align-items: center; gap: 10px; }
.dial { width: 76px; height: 76px; flex: none; cursor: grab; touch-action: none; border-radius: 50%; }
.dial:active { cursor: grabbing; }
.dial__ring { fill: var(--panel2); stroke: var(--line2); stroke-width: 1.5; }
.dial__ticks line { stroke: var(--fg3); stroke-width: 1.5; }
.dial__hand { stroke: var(--fg); stroke-width: 2; stroke-linecap: round; }
.dial__knob { fill: var(--fg); stroke: var(--panel); stroke-width: 2; }

/* Banding check */
.gstrip { height: 44px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.gstrip--grey { margin-top: 6px; height: 30px; }
.gstrip--tall { height: 72px; }
.lc { display: block; width: 100%; height: auto; max-height: 240px; margin-top: 14px; }
.lc__grid { stroke: var(--line); stroke-width: 1; }
.lc__lab { font: 10.5px var(--ui); fill: var(--fg3); font-variant-numeric: tabular-nums; }
.lc__line { fill: none; stroke: var(--fg); stroke-width: 2; stroke-linejoin: round; }
.lc__stop { stroke: var(--fg); stroke-width: 1.5; }
.lc__dip { stroke: var(--fg2); stroke-width: 1; stroke-dasharray: 3 3; }
.checks { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; color: var(--fg2); }
.checks .mark { flex: none; }
.mark--info { border: 1px solid var(--line2); color: var(--fg2); }
.mark--info::before { content: "i"; font-style: italic; font-family: Georgia, serif; margin-right: 1px; }

/* sRGB against OKLCH */
.cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .cmp { grid-template-columns: 1fr; } }
.cmp__note { grid-column: 1 / -1; margin: 0; }
.kv--small { font-size: 13px; margin-top: 12px; }
.kv--small dd { font-variant-numeric: tabular-nums; }

/* 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: 340px; white-space: pre-wrap; overflow-wrap: anywhere; }
