/* Pigment Lens: a gallery interior seen through macOS Golden Gate glass.
   Warm plaster walls under track lighting, frosted panels with a darker edge
   and a bright top highlight, wall-label serif type, and Golden Gate's
   International Orange used sparingly as the one accent. */
:root {
  --wall: #ebe6de;
  --spot: #faf8f4;
  --card: rgba(253, 252, 249, 0.74);
  --glass: rgba(250, 248, 244, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.92);
  --field: rgba(255, 255, 255, 0.78);
  --ink: #1c1b19;
  --muted: #6d675f;
  --line: rgba(28, 27, 25, 0.1);
  --edge: rgba(28, 27, 25, 0.16);
  --spec: rgba(255, 255, 255, 0.95);
  --accent: #c0362c;
  --accent-2: #a52a21;
  --accent-ink: #ffffff;
  --soft: rgba(28, 27, 25, 0.045);
  --good: #3a7a4b;
  --warn: #a8720d;
  --bad: #a83a32;
  --radius: 12px;
  --r-sm: 8px;
  --shadow: 0 0 0 0.5px var(--edge), inset 0 1px 0 var(--spec), 0 1px 2px rgba(40, 30, 20, 0.05), 0 14px 34px -18px rgba(40, 30, 20, 0.35);
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --wall: #191817;
    --spot: #2c2a27;
    --card: rgba(44, 42, 39, 0.66);
    --glass: rgba(36, 34, 32, 0.7);
    --glass-strong: rgba(78, 75, 71, 0.85);
    --field: rgba(0, 0, 0, 0.22);
    --ink: #f3f0ea;
    --muted: #a39d94;
    --line: rgba(255, 255, 255, 0.09);
    --edge: rgba(0, 0, 0, 0.6);
    --spec: rgba(255, 255, 255, 0.11);
    --accent: #ec5a43;
    --accent-2: #d84a34;
    --accent-ink: #ffffff;
    --soft: rgba(255, 255, 255, 0.055);
    --good: #7cc08d;
    --warn: #e0b04f;
    --bad: #ec8379;
    --shadow: 0 0 0 0.5px var(--edge), inset 0 1px 0 var(--spec), 0 18px 40px -20px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  /* track lighting washing down a plaster wall */
  background:
    radial-gradient(ellipse 38% 42% at 18% -6%, var(--spot), transparent 72%),
    radial-gradient(ellipse 38% 42% at 50% -8%, var(--spot), transparent 72%),
    radial-gradient(ellipse 38% 42% at 82% -6%, var(--spot), transparent 72%),
    var(--wall);
  background-attachment: fixed;
}
h2, h3 { margin: 0; line-height: 1.25; }
h2 {
  font-family: var(--serif); font-size: 1.18rem; font-weight: 600; letter-spacing: 0.005em;
  display: flex; align-items: center; gap: 0.7rem;
}
h3 { font-size: 0.72rem; color: var(--muted); font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; margin-bottom: 0.5rem; }
.muted { color: var(--muted); }
.small { font-size: 0.84rem; }

/* ---------- toolbar: edge to edge, frosted, darker lower edge ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 0.6rem max(16px, env(safe-area-inset-left));
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  box-shadow: inset 0 1px 0 var(--spec), 0 0.5px 0 var(--edge), 0 6px 20px -14px rgba(0, 0, 0, 0.35);
}
.brand { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.brand > span:not(.logo) { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; letter-spacing: 0.01em; white-space: nowrap; }
.suite { font-weight: 500; color: var(--muted); font-size: 0.75rem; border-left: 1px solid var(--line); padding-left: 0.6rem; text-decoration: none; }
.logo {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: conic-gradient(#c42430, #fbb800, #4b6a24, #2b3593, #a82168, #c42430);
  box-shadow: inset 0 0 0 4px var(--glass-strong), 0 0 0 0.5px var(--edge);
}

main { max-width: 820px; margin: 0 auto; padding: 18px 16px 40px; display: grid; gap: 18px; }

/* ---------- panels ---------- */
.card {
  background: var(--card);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px; min-width: 0;
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
/* catalogue number, like a wall label */
.step {
  display: inline-block; min-width: 0; height: auto; border-radius: 0; background: none;
  color: var(--accent); font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.15rem;
  padding-right: 0.7rem; border-right: 1px solid var(--line); line-height: 1.1;
}

/* ---------- controls: macOS push buttons ---------- */
.btn, .chip, select {
  font: inherit; color: var(--ink);
  background: linear-gradient(var(--glass-strong), var(--field));
  border: 0; border-radius: var(--r-sm); cursor: pointer;
  box-shadow: 0 0 0 0.5px var(--edge), inset 0 1px 0 var(--spec), 0 1px 1.5px rgba(0, 0, 0, 0.08);
}
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1rem; font-weight: 550; min-height: 42px; }
.btn:hover, .chip:hover { filter: brightness(1.03); }
.btn:active, .chip:active { filter: brightness(0.96); }
.btn.primary {
  background: linear-gradient(#d0463a, var(--accent));
  color: var(--accent-ink);
  box-shadow: 0 0 0 0.5px rgba(120, 20, 10, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 2px 6px -2px rgba(192, 54, 44, 0.55);
}
.btn.subtle { background: transparent; box-shadow: none; font-weight: 500; }
.chip { padding: 0.35rem 0.85rem; font-size: 0.84rem; font-weight: 550; min-height: 34px; }
.chip.ghost { background: transparent; box-shadow: 0 0 0 0.5px var(--edge); }
.chip:disabled { opacity: 0.45; cursor: default; }
.btn:focus-visible, .chip:focus-visible, select:focus-visible, .swatch:focus-visible, .seg-btn:focus-visible, .tool-tabs a:focus-visible, input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px;
}
select { padding: 0.45rem 0.6rem; min-height: 38px; width: 100%; }

.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.9rem; }
.hex-entry input[type="color"] { width: 32px; height: 26px; padding: 0; border: none; background: none; cursor: pointer; border-radius: 5px; }

/* ---------- photo stage: an image under gallery light ---------- */
.stage {
  position: relative; border-radius: 10px; overflow: hidden; background: var(--soft);
  touch-action: manipulation; line-height: 0;
  box-shadow: inset 0 0 0 0.5px var(--line);
}
.stage canvas { width: 100%; height: auto; display: block; cursor: crosshair; }
.stage.empty canvas { display: none; }
.stage .placeholder { display: none; }
.stage.empty .placeholder {
  display: block; line-height: 1.5; padding: 3.2rem 1rem; text-align: center; color: var(--muted); margin: 0;
  font-family: var(--serif); font-style: italic;
  background: repeating-linear-gradient(135deg, transparent 0 11px, var(--soft) 11px 12px);
}
.marker {
  position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4); pointer-events: none;
}

.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.9rem; }
/* macOS segmented control */
.seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 9px; background: var(--soft); box-shadow: inset 0 0 0 0.5px var(--line); }
.seg-btn {
  font: inherit; font-size: 0.84rem; font-weight: 550; padding: 0.4rem 0.85rem; border: 0; border-radius: 7px;
  background: transparent; color: var(--ink); cursor: pointer; min-height: 34px;
}
.seg-btn.on { background: var(--glass-strong); box-shadow: 0 0 0 0.5px var(--edge), 0 1px 3px rgba(0, 0, 0, 0.12); }
.inline { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.84rem; color: var(--muted); }
.inline select { width: auto; min-height: 34px; padding: 0.3rem 0.5rem; }
.hint { font-size: 0.84rem; background: var(--soft); border-radius: var(--r-sm); padding: 0.6rem 0.8rem; margin: 0.75rem 0 0; }

.auto { margin-top: 1rem; }
.swatch-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.swatch {
  width: 44px; height: 44px; border-radius: 6px; border: 0;
  cursor: pointer; padding: 0;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 5px -2px rgba(0, 0, 0, 0.3);
}

.selected { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.sel {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.4rem 0.3rem 0.3rem;
  border: 0; border-radius: 10px; background: var(--glass-strong); cursor: pointer; font: inherit; color: var(--ink);
  box-shadow: 0 0 0 0.5px var(--edge), inset 0 1px 0 var(--spec);
}
.sel.on { box-shadow: 0 0 0 2px var(--accent), inset 0 1px 0 var(--spec); }
.sel .swatch { width: 36px; height: 36px; cursor: inherit; }
.sel .meta { text-align: left; line-height: 1.2; font-size: 0.8rem; }
.sel .meta b { display: block; font-size: 0.86rem; text-transform: capitalize; font-family: var(--serif); font-weight: 600; }
.sel .x { border: 0; background: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 0.25rem 0.4rem; }

.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 0.8rem; }
.settings label { display: grid; gap: 0.3rem; font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.settings select { color: var(--ink); }
#paints-summary { margin: 0.75rem 0 0; }

/* ---------- recipe ---------- */
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 0.7rem; margin-bottom: 1rem; }
.cmp { display: grid; gap: 0.35rem; font-size: 0.76rem; color: var(--muted); }
.cmp .chipcolor {
  height: 68px; border-radius: 4px; border: 0;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.25), 0 6px 14px -8px rgba(0, 0, 0, 0.45);
}
.cmp b { color: var(--ink); font-size: 0.84rem; font-family: var(--serif); font-weight: 600; }
.quality { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.badge { font-size: 0.74rem; font-weight: 650; letter-spacing: 0.03em; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--soft); box-shadow: inset 0 0 0 0.5px var(--line); }
.badge.l4, .badge.l3 { color: var(--good); }
.badge.l2 { color: var(--warn); }
.badge.l1, .badge.l0 { color: var(--bad); }

.steps { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.55rem; }
.steps li { display: grid; grid-template-columns: 40px 1fr auto; gap: 0.75rem; align-items: center; }
.steps .swatch { width: 40px; height: 40px; cursor: default; }
.steps .name { font-weight: 600; line-height: 1.25; }
.steps .name small { font-weight: 400; color: var(--muted); }
.steps .amt { text-align: right; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.steps .amt small { display: block; font-weight: 400; color: var(--muted); font-size: 0.74rem; }
.bar-track { grid-column: 2 / 4; height: 5px; border-radius: 3px; background: var(--soft); overflow: hidden; margin-top: -0.25rem; }
.bar-fill { height: 100%; border-radius: 3px; }
.paint-note { grid-column: 2 / 4; font-size: 0.8rem; color: var(--warn); margin-top: -0.2rem; }

.tip { background: var(--soft); border-radius: var(--r-sm); padding: 0.7rem 0.9rem; font-size: 0.88rem; margin: 0 0 1rem; box-shadow: inset 0 0 0 0.5px var(--line); }
.notes { display: grid; gap: 0.8rem; }
.note { border-left: 2px solid var(--accent); padding: 0.1rem 0 0.1rem 0.85rem; }
.note h4 { margin: 0 0 0.25rem; font-size: 0.95rem; font-family: var(--serif); font-weight: 600; }
.note p, .note ul { margin: 0.2rem 0; font-size: 0.87rem; }
.note ul { padding-left: 1.1rem; }
.alts { margin: 0 0 1rem; display: grid; gap: 0.4rem; }
.alt { text-align: left; font: inherit; font-size: 0.84rem; padding: 0.55rem 0.75rem; border-radius: var(--r-sm); border: 0; box-shadow: inset 0 0 0 0.5px var(--edge); background: transparent; color: var(--ink); cursor: pointer; }
.alt:hover { background: var(--soft); }
.alt b { color: var(--muted); font-weight: 600; }
.working { padding: 2rem 0; text-align: center; color: var(--muted); font-family: var(--serif); font-style: italic; }

.saved-item { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.55rem 0; border-top: 1px solid var(--line); }
.saved-item:first-child { border-top: 0; }
.saved-item .swatch-row .swatch { width: 24px; height: 24px; border-radius: 4px; }
.saved-item .left { display: grid; gap: 0.3rem; min-width: 0; }
.saved-item .row { display: flex; gap: 0.4rem; }

.foot { text-align: center; padding: 0 8px 28px; margin: 0; font-size: 0.8rem; }

dialog {
  border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100% - 32px)); max-height: 85vh;
  background: var(--glass-strong); color: var(--ink);
  -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%);
  box-shadow: 0 0 0 0.5px var(--edge), inset 0 1px 0 var(--spec), 0 30px 80px -20px rgba(0, 0, 0, 0.55);
}
@media (prefers-color-scheme: dark) { dialog { background: rgba(44, 42, 39, 0.92); } }
dialog::backdrop { background: rgba(20, 16, 12, 0.35); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dlg { padding: 18px; display: grid; gap: 0.8rem; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; }
.paint-list { display: grid; gap: 0.25rem; max-height: 50vh; overflow: auto; }
.paint-row { display: grid; grid-template-columns: auto 34px 1fr auto; gap: 0.6rem; align-items: center; padding: 0.3rem 0; font-size: 0.9rem; border-bottom: 1px solid var(--line); }
.paint-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.paint-row input[type="color"] { width: 34px; height: 34px; border: 0; border-radius: 6px; padding: 0; background: none; cursor: pointer; }
.paint-row small { color: var(--muted); }
.paint-row .rm { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; }
.dlg-foot { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: rgba(28, 27, 25, 0.88); color: #f6f3ee; padding: 0.6rem 1rem; border-radius: 10px; font-size: 0.88rem;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%); }

/* Toolkit Your Life's shared sign-in (/tyl-auth.js): keep its sign-in window,
   hide its floating account pill. The header button does that job here. */
.tyl-account { display: none !important; }
[hidden] { display: none !important; }

/* ---------- tool tabs: a segmented control, centered like a toolbar ---------- */
.tool-tabs {
  display: flex; gap: 2px; width: fit-content; max-width: calc(100% - 32px); margin: 18px auto 0; padding: 3px;
  border-radius: 10px; overflow-x: auto;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 0 0 0.5px var(--edge), inset 0 1px 0 var(--spec);
}
.tool-tabs a {
  padding: 0.42rem 1.05rem; border-radius: 7px; color: var(--muted); text-decoration: none; font-weight: 550; font-size: 0.88rem; white-space: nowrap;
}
.tool-tabs a:hover { color: var(--ink); }
.tool-tabs a[aria-current="page"] { background: var(--glass-strong); color: var(--ink); box-shadow: 0 0 0 0.5px var(--edge), 0 1px 3px rgba(0, 0, 0, 0.14); }

/* ---------- palette ideas ---------- */
.src { margin-top: 0.75rem; }
.url-form { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; align-items: end; }
.url-form p { grid-column: 1 / -1; margin: 0; }
.url-field { display: grid; gap: 0.25rem; }
input[type="url"], input[type="number"] {
  font: inherit; color: var(--ink); background: var(--field); border: 0; border-radius: 7px;
  box-shadow: inset 0 0 0 0.5px var(--edge), inset 0 1px 2px rgba(0, 0, 0, 0.06);
  padding: 0.45rem 0.6rem; min-height: 38px; width: 100%;
}
#pal-preview { margin-top: 0.75rem; max-height: 320px; }
#pal-preview canvas { max-height: 320px; object-fit: contain; cursor: default; }
.palette-strip { display: flex; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.25), 0 10px 22px -14px rgba(0, 0, 0, 0.5); }
.palette-strip .chipc {
  flex: 1 1 0; min-width: 0; min-height: 56px; border: 0; padding: 0.4rem; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; text-align: left;
  font-size: 0.68rem; line-height: 1.2;
}
.palette-strip.big .chipc { min-height: 116px; font-size: 0.75rem; }
.palette-strip .chipc b { font-size: 0.78rem; }
.palette-strip .chipc.key { box-shadow: inset 0 0 0 3px currentColor; }
.ideas { display: grid; gap: 1.1rem; }
.idea h3 { color: var(--ink); font-size: 1rem; margin: 0 0 0.2rem; font-family: var(--serif); font-weight: 600; letter-spacing: 0; text-transform: none; }
.idea p { margin: 0 0 0.5rem; font-size: 0.85rem; color: var(--muted); }
.idea .row { display: flex; gap: 0.4rem; margin-top: 0.5rem; flex-wrap: wrap; }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.plan-list li { display: grid; grid-template-columns: 36px 1fr; gap: 0.6rem; align-items: center; }
.plan-list .swatch { width: 36px; height: 36px; cursor: default; }
.plan-list small { color: var(--muted); display: block; }
.minis { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: 0.3rem; }
.minis i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid rgba(0,0,0,.15); }

/* ---------- grid ---------- */
.settings input { color: var(--ink); }
.checks { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.9rem; font-size: 0.88rem; }
.checks input, .inline input[type="checkbox"] { accent-color: var(--accent); width: 17px; height: 17px; vertical-align: -3px; }
#grid-stage canvas { touch-action: none; cursor: grab; }
#grid-stage canvas:active { cursor: grabbing; }
.canvas-plan { background: var(--soft); border-radius: 10px; padding: 14px; margin: 0.75rem 0; display: grid; place-items: center; box-shadow: inset 0 0 0 0.5px var(--line); }
.canvas-plan canvas { max-width: 100%; height: auto; }
.big-num { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.7rem; }
.summary-grid div { background: var(--soft); border-radius: var(--r-sm); padding: 0.6rem 0.8rem; font-size: 0.76rem; color: var(--muted); box-shadow: inset 0 0 0 0.5px var(--line); }
.summary-grid b { display: block; color: var(--ink); font-size: 1.08rem; font-family: var(--serif); font-weight: 600; margin-top: 0.1rem; }
.marks { font-size: 0.88rem; }
.marks h4 { margin: 0.9rem 0 0.35rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.marks ol { margin: 0; padding-left: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.marks li { background: var(--soft); border-radius: 6px; padding: 0.2rem 0.5rem; font-variant-numeric: tabular-nums; box-shadow: inset 0 0 0 0.5px var(--line); }
.marks li small { color: var(--muted); }
.card { scroll-margin-top: 72px; } /* clear the sticky header when scrolled into view */
.palette-strip .chipc b, .palette-strip .chipc span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- wall view: the framed piece, to scale, on a wall ---------- */
.wall-stage {
  position: relative; border-radius: 10px; overflow: hidden; line-height: 0;
  background: #d9d3c9; display: grid; place-items: center;
  box-shadow: inset 0 0 0 0.5px var(--edge), 0 12px 30px -18px rgba(0, 0, 0, 0.5);
}
.wall-stage canvas { display: block; touch-action: none; cursor: grab; max-width: 100%; }
.wall-stage canvas:active { cursor: grabbing; }
.wall-stage.measure canvas { cursor: crosshair; }
.wall-tools { justify-content: space-between; }
.zoom { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.84rem; color: var(--muted); }
.zoom input[type="range"] { width: 130px; accent-color: var(--accent); }
.measure-row {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; margin-top: 0.8rem;
  background: var(--soft); border-radius: var(--r-sm); padding: 0.7rem 0.85rem; box-shadow: inset 0 0 0 0.5px var(--line);
}
.measure-row p { margin: 0; flex: 1 1 260px; font-size: 0.84rem; }
.measure-row .inline input { width: 90px; }
.frame-settings { margin-top: 1rem; }
.frame-settings input[disabled] { opacity: 0.45; }
.wall-readout { margin: 0.9rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-size: 0.82rem; color: var(--muted); }
.wall-readout b { color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 0.95rem; }
.wall-readout .est { color: var(--warn); }

@media (max-width: 560px) {
  .card { padding: 15px; }
  h2 { font-size: 1.08rem; }
  .wall-tools { justify-content: flex-start; }
}

/* ---------- collapsible sections (sections.js) ---------- */
.fold-btn {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.7rem;
  font: inherit; color: inherit; border-radius: 6px; padding: 2px 4px 2px 0;
}
.fold-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.fold-chev {
  width: 9px; height: 9px; margin-left: 0.1rem; flex: none;
  border-right: 1.75px solid var(--muted); border-bottom: 1.75px solid var(--muted);
  transform: translateY(-2px) rotate(45deg); transition: transform 0.2s ease;
}
.card-head { cursor: pointer; }
.card-head :is(button, a, input, select, label):not(.fold-btn) { cursor: pointer; }
.card.folded > :not(.card-head) { display: none !important; }
.card.folded .card-head { margin-bottom: 0; }
.card.folded { padding-top: 13px; padding-bottom: 13px; }
.card.folded .fold-chev { transform: translateY(1px) rotate(-45deg); }
.card.folded h2 { color: var(--muted); }
.card.folded h2 .step { opacity: 0.75; }
.card.has-update .fold-btn::after {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.fold-all {
  display: flex; justify-content: center; align-items: center; gap: 0.5rem;
  margin: 10px auto -6px; font-size: 0.78rem; color: var(--muted);
}
.fold-all button { all: unset; cursor: pointer; padding: 2px 4px; border-radius: 4px; color: var(--muted); }
.fold-all button:hover:not(:disabled) { color: var(--ink); }
.fold-all button:disabled { opacity: 0.4; cursor: default; }
.fold-all button:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); }
@media (prefers-reduced-motion: reduce) { .fold-chev { transition: none; } }

/* ---------- clearer labels: clean bold headings, italic examples ---------- */
h2 { font-family: var(--sans); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.01em; }
.brand > span:not(.logo) { font-family: var(--sans); font-weight: 750; letter-spacing: -0.01em; }
.card-head { margin-bottom: 0.35rem; }
.ex { margin: 0 0 0.9rem; font-size: 0.86rem; color: var(--muted); line-height: 1.45; }
.ex i { font-style: italic; color: var(--muted); }
.ex b { color: var(--ink); font-weight: 650; }
.settings label, .fld > span, .measure-row .inline, .zoom { color: var(--ink); font-weight: 650; font-size: 0.82rem; }
.settings label small, .fld small { display: block; font-weight: 400; font-style: italic; color: var(--muted); font-size: 0.76rem; }
h3 { font-size: 0.74rem; letter-spacing: 0.08em; color: var(--ink); font-weight: 700; }
.btn, .chip, .seg-btn, .tool-tabs a { font-weight: 650; }

/* ---------- suite switcher (the three artist apps) ---------- */
.tool-tabs a small { display: none; }

/* ---------- Project panel ---------- */
.project-card { border-left: 3px solid var(--accent); }
.proj-status { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.proj-status.ok { color: var(--good); }
.proj-status.warn { color: var(--bad); }
.proj-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.fld { display: grid; gap: 0.3rem; min-width: 180px; flex: 1 1 200px; }
.fld.grow { flex: 2 1 240px; }
.fld input[type="text"] {
  font: inherit; color: var(--ink); background: var(--field); border: 0; border-radius: 7px;
  box-shadow: inset 0 0 0 0.5px var(--edge), inset 0 1px 2px rgba(0, 0, 0, 0.06);
  padding: 0.45rem 0.6rem; min-height: 40px; width: 100%;
}
.proj-btns { display: flex; gap: 0.4rem; }
.proj-links { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.proj-links h3 { margin-bottom: 0.2rem; }
.link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.link-row:last-child { border-bottom: 0; }
.link-app { flex: 1 1 200px; display: grid; line-height: 1.25; }
.link-app b { font-size: 0.95rem; }
.link-app small { color: var(--muted); font-style: italic; font-size: 0.78rem; }
.link-row select { width: auto; min-width: 200px; flex: 0 1 260px; }
.link-row .works { font-size: 0.82rem; color: var(--muted); }
.link-row .works a { color: var(--ink); font-weight: 650; }
a.chip { text-decoration: none; display: inline-flex; align-items: center; }
.proj-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
.proj-actions:empty { display: none; }
.linked-swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 0.6rem; font-size: 0.8rem; color: var(--muted); }
.linked-swatches i { width: 22px; height: 22px; border-radius: 4px; display: inline-block; box-shadow: 0 0 0 0.5px rgba(0,0,0,.25); }
@media (max-width: 560px) {
  .proj-btns { width: 100%; }
  .proj-btns .btn { flex: 1; justify-content: center; }
  .link-row select { flex: 1 1 100%; }
}
