/* Graftwright — app layout on top of Pinpoint. Colour, glass and motion live in vision.css. */
/* SF Pro (the visionOS system font) everywhere; the type scale lives in type.css. Code and logs stay monospace. */
:root{ --font:-apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; --muted:#6C6C70; --placeholder:#8A8A8E; --side:260px; }

.skip{position:absolute; left:-999px; top:8px; z-index:300; background:var(--surface); padding:8px 12px; border-radius:var(--r);}
.skip:focus{left:8px;}
.app{display:grid; grid-template-columns:var(--side) minmax(0,1fr); min-height:100dvh;
  background:linear-gradient(to right, color-mix(in srgb, var(--surface) 55%, var(--bg)) calc(var(--side) - 1px), var(--line-soft) calc(var(--side) - 1px) var(--side), transparent var(--side));}
.sidebar{position:sticky; top:0; height:100dvh; display:flex; flex-direction:column; gap:var(--space-5); padding:var(--space-5) var(--space-3);
  border-right:1px solid var(--line-soft); background:color-mix(in srgb, var(--surface) 55%, var(--bg));}
.brand{display:flex; align-items:center; gap:10px; font-weight:700; font-size:16px; letter-spacing:-.01em; padding:0 var(--space-2);}
.mark{width:26px; height:26px; flex:none; display:block;}
.lockup{height:28px; width:auto; flex:none; display:block; color:var(--text);}   /* the real logo lockup: icon and wordmark in their designed proportions */
#nav{display:flex; flex-direction:column; gap:2px;}
#nav a{position:relative; display:flex; align-items:stretch; min-height:40px; padding:0; border-radius:var(--r); color:var(--text-2); text-decoration:none; font-weight:500; perspective:600px; isolation:isolate;}
/* glow menu: the label flips forward over a soft glow in the section's colour */
#nav{position:relative;}
#nav::before{content:""; position:absolute; inset:-12px; z-index:-1; border-radius:24px; pointer-events:none; opacity:0;
  background:radial-gradient(70% 60% at 50% 50%, rgba(59,130,246,.10), rgba(168,85,247,.08) 45%, rgba(239,68,68,.06) 75%, transparent 100%);
  transition:opacity .5s cubic-bezier(.4,0,.2,1);}
#nav:hover::before{opacity:1;}
:root[data-theme=dark] #nav::before{background:radial-gradient(70% 60% at 50% 50%, rgba(96,165,250,.16), rgba(192,132,252,.13) 45%, rgba(248,113,113,.10) 75%, transparent 100%);}
@media (prefers-color-scheme:dark){ :root:not([data-theme=light]) #nav::before{background:radial-gradient(70% 60% at 50% 50%, rgba(96,165,250,.16), rgba(192,132,252,.13) 45%, rgba(248,113,113,.10) 75%, transparent 100%);} }
.nv-glow{position:absolute; inset:0; z-index:-1; border-radius:16px; pointer-events:none; opacity:0; transform:scale(.8);
  background:radial-gradient(circle, rgba(var(--glow),.18) 0%, rgba(var(--glow),.07) 50%, rgba(var(--glow),0) 100%);
  transition:opacity .5s cubic-bezier(.4,0,.2,1), transform .5s cubic-bezier(.34,1.56,.64,1);}
.nv-face{display:flex; align-items:center; gap:10px; width:100%; padding:0 var(--space-3); transform-origin:50% 100%; backface-visibility:hidden;
  transition:transform .5s cubic-bezier(.34,1.3,.64,1), opacity .4s cubic-bezier(.4,0,.2,1);}
.nv-back{position:absolute; inset:0; transform-origin:50% 0%; transform:rotateX(90deg); opacity:0;}
#nav a:hover .nv-glow, #nav a:focus-visible .nv-glow{opacity:1; transform:scale(1.25, 1.6);}
#nav a:hover .nv-face:not(.nv-back){transform:rotateX(-90deg); opacity:0;}
#nav a:hover .nv-back{transform:rotateX(0deg); opacity:1;}
#nav a:hover, #nav a:focus-visible{color:var(--text);}
#nav a:hover svg, #nav a:focus-visible svg{color:rgb(var(--glow));}
@media (prefers-reduced-motion:reduce){ .nv-face{transition:none;} #nav a:hover .nv-face:not(.nv-back){transform:none; opacity:1;} #nav a:hover .nv-back{opacity:0;} }
/* sun, switch, moon */
.theme-toggle{display:flex; align-items:center; justify-content:center; gap:var(--space-2); margin-top:auto; margin-bottom:var(--space-3); padding:var(--space-2) 0;}
.theme-toggle svg{transition:transform .7s cubic-bezier(.34,1.56,.64,1), color .7s cubic-bezier(.34,1.56,.64,1);}
.theme-toggle .switch{transition:background-color var(--dur-ui), transform .7s cubic-bezier(.34,1.56,.64,1);}
.theme-toggle .switch:hover{transform:scale(1.06);}
.theme-toggle .switch[aria-checked=true]{background:var(--accent-strong);}
.theme-toggle .switch:focus-visible{outline:0; box-shadow:var(--focus);}
.theme-toggle[data-dark=true] .tt-sun, .theme-toggle[data-dark=false] .tt-moon{color:var(--muted); transform:scale(.75) rotate(12deg);}
.theme-toggle[data-dark=true] .tt-moon, .theme-toggle[data-dark=false] .tt-sun{color:var(--text); transform:none;}
#nav a svg{flex:none; color:var(--muted);}
#nav a:hover{background:var(--fill);}
#nav a[aria-current=page]{background:var(--accent-tint); color:var(--accent-text);}
#nav a[aria-current=page] svg{color:var(--accent-text);}
#nav a:focus-visible{outline:0; box-shadow:var(--focus);}
.key-state{padding:var(--space-3); border-radius:var(--r); background:var(--fill); font-size:var(--fs-caption); color:var(--text-2);}
.key-state b{display:block; color:var(--text); font-size:var(--fs-sub);}
.dot{display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; background:var(--warning); vertical-align:1px;}
.dot.ok{background:var(--positive);}
.dot.bad{background:var(--negative);}
.tools .value.bad{color:var(--negative); font-weight:600;}
.mobile-only{display:none;}
main{min-width:0; outline:0;}

.page-head{display:flex; align-items:flex-end; justify-content:space-between; gap:var(--space-4); flex-wrap:wrap; margin-bottom:var(--space-6);}
.page-head .sub{max-width:62ch;}
.page-actions{display:flex; gap:var(--btn-gap); flex-wrap:wrap;}
a.btn{text-decoration:none;}
.back{display:inline-flex; align-items:center; gap:4px; color:var(--accent-text); text-decoration:none; font-weight:600; font-size:var(--fs-sub); margin-bottom:var(--space-3); min-height:32px;}

/* style cards */
.styles{display:grid; gap:var(--gap); grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));}
.style-card{padding:0; overflow:hidden; text-decoration:none; color:inherit; transition:transform var(--dur-press) var(--ease-out), box-shadow var(--dur-ui);}
.style-card:hover{box-shadow:var(--shadow-pop);}
.style-card:active{transform:scale(.99);}
.style-card:focus-visible{outline:0; box-shadow:var(--focus), var(--shadow-card);}
.thumb{aspect-ratio:16/9; width:100%; display:block; object-fit:cover; background:var(--fill); border-bottom:1px solid var(--line-soft);}
.style-card .body{padding:var(--space-4); display:flex; flex-direction:column; gap:var(--space-2);}
.style-card .meta{display:flex; align-items:center; justify-content:space-between; gap:var(--space-3);}
.swatches{display:flex; gap:4px;}
.swatches i{width:18px; height:18px; border-radius:5px; box-shadow:inset 0 0 0 1px rgba(0,0,0,.12);}
.badge{font-size:var(--fs-label); font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); background:var(--fill); padding:3px 8px; border-radius:var(--r-pill);}
.new-card{align-items:center; justify-content:center; text-align:center; gap:var(--space-2); min-height:260px; border:1.5px dashed var(--line); box-shadow:none; background:transparent; text-decoration:none; color:var(--text-2);}
.new-card:hover{background:var(--surface);}
.new-card .plus{width:44px; height:44px; border-radius:50%; display:grid; place-items:center; background:var(--accent-tint); color:var(--accent-text); font-size:24px;}

/* style detail */
.detail{display:grid; gap:var(--gap); grid-template-columns:minmax(0,1.7fr) minmax(280px,1fr); align-items:start;}
.viewer{padding:var(--space-3);}
.viewer img.big{width:100%; aspect-ratio:16/9; object-fit:contain; border-radius:var(--r); background:var(--fill); display:block;}
.strip{display:flex; gap:8px; overflow-x:auto; padding:var(--space-3) 2px 2px; scrollbar-width:thin;}
.strip button{flex:none; width:104px; padding:0; border:2px solid transparent; border-radius:8px; background:none; cursor:pointer; line-height:0;}
.strip button img{width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:6px;}
.strip button[aria-current=true]{border-color:var(--accent);}
.strip button:focus-visible{outline:0; box-shadow:var(--focus);}
.palette{display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:10px;}
.chip-c{display:flex; flex-direction:column; gap:4px; font-size:var(--fs-caption); color:var(--text-2); min-width:0;}
.chip-c i{height:40px; border-radius:8px; box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);}
.chip-c b{color:var(--text); font-weight:600; font-size:var(--fs-caption);}
.kv{display:grid; grid-template-columns:auto 1fr; gap:6px 16px; margin:0;}
.kv dt{color:var(--muted);} .kv dd{margin:0; text-align:right; font-weight:500;}
.downloads .list-row{text-decoration:none; color:inherit;}
.downloads .list-row:hover{background:var(--fill);}
.downloads .list-row:focus-visible{outline:0; box-shadow:inset var(--focus);}
.prose p{margin:0 0 10px; color:var(--text-2);}
.notes{margin:0; padding-left:18px; color:var(--text-2); font-size:var(--fs-sub);}
.notes li + li{margin-top:4px;}
.sources{display:flex; gap:8px; flex-wrap:wrap;}
.sources img{width:120px; aspect-ratio:4/3; object-fit:cover; border-radius:8px; border:1px solid var(--line-soft);}

/* forms */
.form{max-width:720px;}
.drop{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; min-height:150px; padding:var(--space-5); text-align:center;
  border:1.5px dashed var(--line); border-radius:var(--r-lg); background:var(--surface); color:var(--text-2); cursor:pointer; transition:border-color var(--dur-press), background-color var(--dur-press);}
.drop.over, .drop:hover{border-color:var(--accent); background:var(--accent-tint);}
.drop:focus-within{box-shadow:var(--focus); border-color:var(--accent);}
.drop input{position:absolute; width:1px; height:1px; opacity:0;}
.drop b{color:var(--text);} .drop .hint{color:var(--text-2);}
.drop .picked{color:var(--accent-text); font-weight:600;}
textarea{width:100%; min-height:96px; padding:12px 14px; border:1px solid var(--line); border-radius:var(--r); background:var(--surface); color:var(--text); font:inherit; resize:vertical;}
textarea:focus-visible{outline:0; border-color:var(--accent); box-shadow:var(--focus);}
.field > small, .hint{color:var(--muted); font-size:var(--fs-caption);}
.choice{display:grid; gap:10px; grid-template-columns:repeat(2, minmax(0,1fr));}
.choice label{display:flex; gap:12px; align-items:flex-start; padding:14px; border:1px solid var(--line); border-radius:var(--r-lg); background:var(--surface); cursor:pointer;}
.choice label:has(input:checked){border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); background:var(--accent-tint);}
.choice label:has(input:focus-visible){box-shadow:var(--focus);}
.choice input{margin:3px 0 0; accent-color:var(--accent);}
.choice b{display:block;} .choice span{color:var(--text-2); font-size:var(--fs-sub);}
.color-row{display:flex; gap:8px; align-items:center;}
.color-row input[type=color]{width:44px; height:44px; padding:2px; border:1px solid var(--line); border-radius:var(--r); background:var(--surface); flex:none; cursor:pointer;}
.color-row input[type=text]{flex:1 1 auto; min-width:0; height:var(--field-h); padding:0 12px; border:1px solid var(--line); border-radius:var(--r); background:var(--surface); color:var(--text); font:inherit; font-variant-numeric:tabular-nums;}
details.more:not([open]) > :not(summary){display:none;}
details.more{border-top:1px solid var(--line-soft); padding-top:var(--space-4);}
details.more summary{cursor:pointer; font-weight:600; min-height:32px; display:flex; align-items:center;}
.switch-row{display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:44px;}
.alert{padding:12px 14px; border-radius:var(--r); background:color-mix(in srgb, var(--warning) 12%, transparent); color:var(--text); font-size:var(--fs-sub);}
.alert.bad{background:color-mix(in srgb, var(--negative) 12%, transparent);}
.alert a{color:var(--accent-text); font-weight:600;}
.tools{box-shadow:none;}
.tools .list-row{align-items:flex-start; line-height:20px;}
.tools .dot{margin:6px 0 0; flex:none;}
.tools .tool{flex:1 1 auto; min-width:0;}
.tools .value{flex:none; line-height:20px;}
.alert code, .hint code{font:12px ui-monospace, "SF Mono", Menlo, monospace; overflow-wrap:anywhere;}

/* jobs */
.log{margin:0; max-height:360px; overflow:auto; padding:14px; border-radius:var(--r); background:var(--fill); font:12.5px/1.55 ui-monospace, "SF Mono", Menlo, monospace; white-space:pre-wrap; overflow-wrap:anywhere; color:var(--text-2);}
.status{display:inline-flex; align-items:center; gap:6px; font-weight:600; font-size:var(--fs-sub);}
.status::before{content:""; width:8px; height:8px; border-radius:50%; background:var(--muted);}
.status.running::before{background:var(--accent); animation:pulse 1.2s ease-in-out infinite;}
.status.done::before{background:var(--positive);} .status.failed::before{background:var(--negative);} .status.cancelled::before{background:var(--warning);}
@keyframes pulse{50%{opacity:.35;}}
.result-img{width:100%; border-radius:var(--r); display:block; background:var(--fill);}
.jobs .list-row{text-decoration:none; color:inherit;}
.jobs .list-row:hover{background:var(--fill);}
.jobs .list-row .t{min-width:0; flex:1 1 auto;}
.jobs .list-row .t b{display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.jobs .list-row .t span{color:var(--muted); font-size:var(--fs-caption);}
.empty{padding:var(--space-8) var(--space-5); text-align:center; color:var(--text-2);}
.empty h3{color:var(--text); margin-bottom:6px;}
.figs{display:grid; grid-template-columns:repeat(auto-fit, minmax(140px,1fr)); gap:var(--gap);}
.skeleton{background:linear-gradient(90deg, var(--fill), color-mix(in srgb, var(--fill) 40%, transparent), var(--fill)); background-size:200% 100%; animation:sk 1.2s linear infinite; border-radius:var(--r-lg); min-height:260px;}
@keyframes sk{to{background-position:-200% 0;}}

#toast{position:fixed; left:50%; bottom:24px; transform:translate(-50%, 20px); opacity:0; pointer-events:none; z-index:400; background:var(--text); color:var(--bg); padding:10px 16px; border-radius:var(--r-pill); font-weight:600; font-size:var(--fs-sub); transition:opacity var(--dur-ui), transform var(--dur-ui) var(--ease-out);}
#toast.on{opacity:1; transform:translate(-50%, 0);}

@media (max-width:1000px){ .detail{grid-template-columns:minmax(0,1fr);} }
@media (max-width:900px){
  .app{grid-template-columns:minmax(0,1fr); background:none;}
  .mobile-only{display:flex;}
  .sidebar{position:fixed; inset:0 auto 0 0; width:min(300px, 84vw); z-index:250; transform:translateX(-102%); transition:transform var(--dur-panel) var(--ease-drawer); background:var(--surface); box-shadow:var(--shadow-pop);}
  .sidebar.open{transform:none;}
  .scrim{position:fixed; inset:0; z-index:240; background:rgba(0,0,0,.32);}
  #nav a{min-height:48px;}
}
@media (max-width:600px){
  .back, details.more summary{min-height:44px;}
  .color-row input, .drop input, .field input[type=file]{font-size:16px;}
  .palette{grid-template-columns:repeat(2, minmax(0,1fr));}
  .choice{grid-template-columns:minmax(0,1fr);}
  .figs{grid-template-columns:minmax(0,1fr);}
  .page-actions{width:100%;}
  .page-head{margin-bottom:var(--space-5);}
}

/* styles gallery: a Framer-like canvas for the glass folders */
.visually-hidden{position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}
.gallery{position:relative; max-width:1180px; padding-top:var(--space-6);}
.gallery::before{content:""; position:absolute; inset:0 0 auto; height:min(1400px, 100%); z-index:-1; pointer-events:none;
  background-image:radial-gradient(currentColor 1.1px, transparent 1.4px); background-size:24px 24px; color:var(--text); opacity:.09;
  -webkit-mask-image:radial-gradient(120% 70% at 50% 0%, #000 30%, transparent 85%); mask-image:radial-gradient(120% 70% at 50% 0%, #000 30%, transparent 85%);}
.g-hero{display:flex; flex-direction:column; align-items:center; text-align:center; gap:var(--space-4); padding:var(--space-4) 0 var(--space-6);}
.g-eyebrow{display:inline-flex; align-items:center; gap:var(--space-2); margin:0; padding:6px 12px; border-radius:var(--r-pill);
  font:600 12px/1.3 var(--font); letter-spacing:.08em; text-transform:uppercase; color:var(--text-2);
  background:color-mix(in srgb, var(--surface) 80%, transparent); box-shadow:inset 0 0 0 1px var(--line-soft); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px);}
.g-dot{width:8px; height:8px; border-radius:50%; background:var(--positive); box-shadow:0 0 0 4px color-mix(in srgb, var(--positive) 18%, transparent);}
.g-title{font-size:clamp(40px, 5.6vw, 68px); line-height:.98; letter-spacing:-.045em; font-weight:650; max-width:14ch; text-wrap:balance;}
.g-title span{display:block; color:var(--muted);}
.g-lede{margin:0; max-width:52ch; font-size:17px; line-height:1.5; color:var(--text-2); text-wrap:pretty;}
.g-actions{display:flex; gap:var(--btn-gap); flex-wrap:wrap; justify-content:center; margin-top:var(--space-2);}
.g-pill{border-radius:var(--r-pill); padding-inline:var(--space-6);}
.g-bar{display:flex; justify-content:center; padding-bottom:0;}
.g-seg{display:inline-flex; gap:4px; padding:4px; border-radius:var(--r-pill); background:var(--fill);}
.g-seg button{all:unset; box-sizing:border-box; min-height:44px; padding:10px 18px; text-align:center; border-radius:var(--r-pill); font-size:14px; font-weight:500;
  color:var(--text-2); cursor:pointer; transition:background var(--dur-ui) var(--ease-out), color var(--dur-ui);}
.g-seg button[aria-pressed="true"]{background:var(--surface); color:var(--text); box-shadow:var(--shadow-xs);}
.g-seg button:focus-visible{box-shadow:var(--focus);}
.shelf{display:grid; padding-top:var(--space-5); gap:var(--space-8) var(--space-7); grid-template-columns:repeat(auto-fill, minmax(min(100%, 300px), 1fr)); align-items:start;}
.shelf-item{display:flex; flex-direction:column; gap:var(--space-4); min-width:0;}
.shelf-folder{display:flex; justify-content:center; width:100%; max-width:340px; margin-inline:auto;}
.g-cap{display:flex; flex-direction:column; gap:var(--space-2); width:100%; max-width:340px; margin-inline:auto; padding-inline:var(--space-1);}
.g-cap-row{display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); min-width:0;}
.g-tag{font:500 13px/1.4 var(--font); letter-spacing:0; color:var(--text-2);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.g-sum{margin:0; font-size:14px; line-height:1.5; color:var(--text-2); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;}
.g-link{align-self:flex-start; display:inline-flex; align-items:center; gap:var(--space-2); min-height:44px; font-size:14px; font-weight:600;
  color:var(--text); text-decoration:none;}
.g-link span[aria-hidden]{transition:transform var(--dur-ui) var(--ease-out);}
.g-link:hover span[aria-hidden]{transform:translateX(4px);}
.g-link:focus-visible{outline:0; box-shadow:var(--focus); border-radius:var(--r-sm);}
.g-new{position:relative; display:grid; place-items:center; width:100%; max-width:340px; aspect-ratio:340/326; margin-inline:auto;
  color:var(--text-2); text-decoration:none; border-radius:var(--r-xl);}
.g-new-shape{position:absolute; left:0; right:0; bottom:0; width:100%; height:auto; overflow:visible;}
.g-new-shape path{fill:color-mix(in srgb, var(--surface) 55%, transparent); stroke:var(--line); stroke-width:1.5; stroke-dasharray:6 6; vector-effect:non-scaling-stroke;
  transition:fill var(--dur-ui), stroke var(--dur-ui);}
.g-new:hover .g-new-shape path{fill:var(--surface); stroke:var(--text-2);}
.g-new:focus-visible{outline:0; box-shadow:var(--focus);}
.g-new-in{position:relative; display:flex; flex-direction:column; align-items:center; gap:var(--space-2); text-align:center; padding-top:15%; font-size:14px;}
.g-new-in b{font-size:16px; color:var(--text);}
.g-new .plus{width:44px; height:44px; border-radius:50%; display:grid; place-items:center; background:var(--surface); box-shadow:var(--shadow-card); color:var(--text); font-size:24px;}
.g-hint{margin:var(--space-8) 0 var(--space-4); text-align:center; font:600 12px/1.4 var(--font);
  letter-spacing:.18em; text-transform:uppercase; color:var(--muted);}
@media (max-width:640px){ .g-hero{padding-top:var(--space-4);} .g-lede{font-size:15px;} .gallery{padding-top:var(--space-4);} }

.field .g-seg{display:flex; width:100%;} .field .g-seg button{flex:1;}   /* Settings: Appearance fills its row */

/* Job progress: overall percentage, figures and stages above the raw log (all values read from the log). */
.jp #jp{display:flex; flex-direction:column; gap:var(--space-4);}
.jp-top{display:flex; align-items:flex-end; justify-content:space-between; gap:var(--space-4);}
.jp-headline{display:flex; flex-direction:column; gap:2px; min-width:0;}
.jp-title{font-size:var(--fs-h3); font-weight:600; color:var(--text);}
.jp-step{font-size:var(--fs-caption); color:var(--text-2);}
.jp-percent{font-size:var(--fs-figure); font-weight:600; line-height:1; letter-spacing:-.02em; font-variant-numeric:tabular-nums; color:var(--accent-text);}
.jp-percent.ok{color:var(--positive);} .jp-percent.bad{color:var(--negative);}
.jp-track{position:relative; height:8px; border-radius:var(--r-pill); background:var(--fill); overflow:hidden;}
.jp-fill{height:100%; inline-size:0; border-radius:inherit; background:var(--accent); transition:inline-size var(--dur-panel, .32s) var(--ease-out);}
.jp-track.ok .jp-fill{background:var(--positive);} .jp-track.bad .jp-fill{background:var(--negative);}
.jp-track.indeterminate .jp-fill{inline-size:40%; animation:jp-slide 1.4s var(--ease-out) infinite;}
@keyframes jp-slide{ from{transform:translateX(-100%);} to{transform:translateX(250%);} }
.jp-figs{display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:var(--space-3); margin:0;}
.jp-figs div{padding:var(--space-3) var(--space-4); border-radius:var(--r); background:var(--fill);}
.jp-figs dt{font-size:var(--fs-label); font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--text-2);}
.jp-figs dd{margin:4px 0 0; font-size:var(--fs-body); font-weight:600; color:var(--text); font-variant-numeric:tabular-nums;}
.jp-stages{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:var(--space-2) var(--space-5);}
.jp-stage{display:grid; grid-template-columns:24px minmax(0,1fr) auto; align-items:center; column-gap:var(--space-3); row-gap:6px; min-height:44px;
  padding:var(--space-2) 0; border-bottom:1px solid var(--line-soft);}
.jp-mark{width:24px; height:24px; border-radius:50%; display:grid; place-items:center; font-size:12px; font-weight:700;
  border:1.5px solid var(--line); color:var(--text-2);}
.jp-name{display:flex; flex-direction:column; min-width:0; font-weight:500; color:var(--text);}
.jp-name small{font-size:var(--fs-caption); font-weight:400; color:var(--text-2);}
.jp-state{font-size:var(--fs-caption); color:var(--text-2); white-space:nowrap;}
.jp-mini{grid-column:2 / -1; height:4px; border-radius:var(--r-pill); background:var(--fill); overflow:hidden;}
.jp-mini i{display:block; height:100%; border-radius:inherit; background:var(--accent); transition:inline-size var(--dur-ui) var(--ease-out);}
.jp-stage.done .jp-mark{border-color:var(--positive); background:var(--positive); color:#fff;}
.jp-stage.active .jp-mark{border-color:var(--accent);}
.jp-stage.active .jp-state{color:var(--accent-text); font-weight:600;}
.jp-stage.failed .jp-mark, .jp-stage.stopped .jp-mark{border-color:var(--negative); background:var(--negative); color:#fff;}
.jp-stage.failed .jp-state, .jp-stage.stopped .jp-state{color:var(--negative); font-weight:600;}
.jp-stage.pending .jp-name, .jp-stage.skipped .jp-name{color:var(--text-2);}
/* Skipped is yellow: a filled yellow mark, and amber text dark enough to read on light glass (5:1+). */
:root{--skip:#FFCC00; --skip-text:#8A5A00;}
:root[data-theme=dark]{--skip-text:#FFD60A;}
@media (prefers-color-scheme:dark){ :root:not([data-theme=light]){--skip-text:#FFD60A;} }
.jp-stage.skipped .jp-mark{border-color:var(--skip); background:var(--skip); color:#3D2E00;}
.jp-stage.skipped .jp-state{color:var(--skip-text); font-weight:600;}
.alert.warn{border-color:color-mix(in srgb, var(--warning) 55%, transparent); background:color-mix(in srgb, var(--warning) 12%, transparent);}
.alert.warn .notes{margin-top:8px;}
.ill-row > span{display:flex; flex-direction:column; gap:2px;} .ill-row small{color:var(--text-2); font-size:var(--fs-caption);}
.jp-spin{width:12px; height:12px; border-radius:50%; border:2px solid var(--accent-tint); border-top-color:var(--accent); animation:jp-spin .8s linear infinite;}
@keyframes jp-spin{ to{transform:rotate(360deg);} }
.jp-log{margin-top:var(--space-4);}
.jp-log > summary{cursor:pointer; min-height:44px; display:flex; align-items:center; font-weight:600; color:var(--accent-text); width:max-content;}
.jp-log > summary::-webkit-details-marker{display:none;}
.jp-log > summary::before{content:""; width:7px; height:7px; margin-right:10px; border:solid currentColor; border-width:0 2px 2px 0; transform:rotate(-45deg); transition:transform var(--dur-ui) var(--ease-out);}
.jp-log[open] > summary::before{transform:rotate(45deg);}
.jp-log > summary{list-style:none;}
.jp-log > summary:focus-visible{outline:0; box-shadow:var(--focus); border-radius:var(--r-sm);}
@media (max-width:600px){ .jp-percent{font-size:var(--fs-h2);} .jp-figs{grid-template-columns:1fr 1fr;} }
@media (prefers-reduced-motion:reduce){ .jp-spin, .jp-track.indeterminate .jp-fill{animation:none;} .jp-fill, .jp-mini i{transition:none;} }
[hidden]{display:none !important;}

/* ---- page size (New style, Publish) ---- */
.size .size-own{margin:0; font-size:15px; font-weight:500; color:var(--text); min-height:1.4em;}
.size-chips{display:flex; flex-wrap:wrap; gap:var(--space-2);}
.size-chips button{all:unset; box-sizing:border-box; min-height:44px; padding:10px 16px; border-radius:var(--r-pill); font:500 14px var(--font); color:var(--text-2);
  background:var(--fill); cursor:pointer; transition:background-color var(--dur-press), color var(--dur-press), box-shadow var(--dur-press);}
.size-chips button:hover{color:var(--text);}
.size-chips button[aria-checked="true"]{background:var(--accent-strong); color:var(--on-accent);}
.size-chips button:focus-visible{box-shadow:var(--focus);}
.size-chips button:disabled, .size .g-seg button:disabled{opacity:.45; cursor:not-allowed;}
.size-more select{max-width:100%;}
.size-custom{display:grid; grid-template-columns:1fr auto 1fr 7.5rem; align-items:end; gap:var(--space-3);}
.size-custom[hidden]{display:none;}
.size-x{padding-bottom:12px; color:var(--text-2);}
.size .size-orient{width:max-content; max-width:100%;}
.size .size-out{margin:0; font:500 14px/1.5 var(--font); color:var(--text-2); font-variant-numeric:tabular-nums;}
.size .size-out.bad{color:var(--negative);}
@media (max-width:640px){
  .size-custom{grid-template-columns:1fr 1fr;} .size-x{display:none;} .size-custom .field:last-child{grid-column:1 / -1;}
  .size .size-orient{width:100%;} .size .size-orient button{flex:1;}
}

/* ---- formats library ---- */
.fm-bar{display:flex; flex-direction:column; align-items:center; gap:var(--space-4); margin-bottom:var(--space-6);}
.fm-cats{flex-wrap:wrap; justify-content:center; max-width:100%;}
.fm-search{position:relative; display:flex; align-items:center; width:min(100%, 440px);}
.fm-search svg{position:absolute; left:16px; color:var(--text-2); pointer-events:none;}
.fm-search input{width:100%; min-height:48px; padding:0 18px 0 44px; border-radius:var(--r-pill); font:16px var(--font);}
.fm-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:var(--space-5);}
.fm-card{display:flex; flex-direction:column; border-radius:var(--r-lg); overflow:hidden;
  background:var(--surface); -webkit-backdrop-filter:blur(28px) saturate(170%); backdrop-filter:blur(28px) saturate(170%);
  border:1px solid var(--glass-line); box-shadow:var(--glass-shadow); transition:transform .45s var(--spring), box-shadow .25s;}
@media (hover:hover){ .fm-card:hover{transform:translateY(-3px);} }
.fm-art{position:relative; display:grid; place-items:center; aspect-ratio:4 / 3; background:color-mix(in srgb, var(--surface-2) 70%, transparent); border-bottom:1px solid var(--line-soft);}
.fm-sheet{width:62%; height:auto; overflow:visible;}
.fm-sheet rect{fill:var(--surface-2); stroke:var(--text-2); stroke-width:1; filter:drop-shadow(0 6px 10px rgba(20,22,40,.12));}
.fm-sheet path{stroke:var(--text-2); stroke-width:2.2; stroke-linecap:round; opacity:.55;}
.fm-dashed rect{stroke-dasharray:5 4; fill:transparent; filter:none;}
.fm-ratio{position:absolute; right:12px; bottom:10px; padding:3px 10px; border-radius:var(--r-pill); background:var(--surface-2);
  font:600 12px var(--font); color:var(--text); font-variant-numeric:tabular-nums;}
.fm-body{display:flex; flex-direction:column; gap:4px; padding:var(--space-4) var(--space-4) var(--space-2); flex:1;}
.fm-cat{margin:0; font-size:12px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--text-2);}
.fm-name{margin:0; font-size:18px; font-weight:600; letter-spacing:-.01em; color:var(--text);}
.fm-size{margin:0; font-size:14px; color:var(--text); font-variant-numeric:tabular-nums;}
.fm-use{margin:0; font-size:14px; line-height:1.45; color:var(--text-2);}
.fm-src{margin:auto 0 0; padding-top:var(--space-2); font-size:12px; color:var(--text-2);}
.fm-acts{display:flex; gap:var(--space-2); padding:var(--space-3) var(--space-4) var(--space-4);}
.fm-acts .btn{flex:1; min-height:44px; padding-inline:var(--space-3);}
@media (max-width:640px){ .fm-grid{grid-template-columns:1fr;} .fm-cats{display:flex; overflow-x:auto; flex-wrap:nowrap; justify-content:flex-start; width:100%;} }
@media (prefers-reduced-motion:reduce){ .fm-card{transition:none;} }
.size-more{display:block; width:max-content; max-width:100%;}
.size-more select{min-height:44px; padding:0 40px 0 16px; border-radius:var(--r-pill); font:500 14px var(--font);}

/* ---- review fixes (ui-reviews/formats-library): AA contrast, 44 px targets, phone layout ---- */
.sub, .page-head .sub, .field > small, .hint, .size-help{color:var(--text-2);}
input::placeholder, textarea::placeholder, .field > input::placeholder{color:var(--text-2); opacity:1;}
/* selected segments are filled, as the selected size chip is, so the state reads in both themes */
.g-seg button[aria-pressed="true"], .seg > [aria-pressed="true"]{background:var(--accent-strong); color:var(--on-accent); box-shadow:none;}
.seg > button{min-height:44px;}
/* search: our own 44 px clear button instead of the browser's small one */
.fm-search input::-webkit-search-cancel-button{-webkit-appearance:none; display:none;}
.fm-clear{all:unset; position:absolute; right:2px; display:grid; place-items:center; width:44px; height:44px; border-radius:50%; color:var(--text-2); cursor:pointer;}
.fm-clear:hover{color:var(--text);} .fm-clear:focus-visible{box-shadow:var(--focus);} .fm-clear[hidden]{display:none;}
.fm-search input{padding-right:48px;}
.fm-grid > .empty{grid-column:1 / -1; justify-self:center; width:min(100%, 480px); text-align:center;}
.fm-grid > .empty .fm-empty-acts{display:flex; gap:var(--space-2); justify-content:center; flex-wrap:wrap; margin-top:var(--space-3);}
.fm-size, .fm-ratio{white-space:nowrap;}
.fm-sheet{width:54%;}
.fm-ratio{top:10px; bottom:auto;}
@media (max-width:640px){
  .fm-cats{flex-wrap:wrap; justify-content:center; overflow:visible; width:auto;}
  .formats .g-hero{gap:var(--space-3); padding-bottom:var(--space-4);}
  .formats .g-title{font-size:36px;}
  /* row cards: preview beside the text, about 200 px each instead of 490 */
  .fm-card{display:grid; grid-template-columns:88px 1fr; grid-template-areas:"art body" "acts acts";}
  .fm-art{grid-area:art; aspect-ratio:1; margin:var(--space-4) 0 0 var(--space-4); border:1px solid var(--line-soft); border-radius:var(--r);}
  .fm-sheet{width:72%;}
  .fm-ratio{display:none;}
  .fm-body{grid-area:body; padding:var(--space-4) var(--space-4) 0;}
  .fm-src{display:none;}
  .fm-acts{grid-area:acts;}
  .size-more, .size-more select{width:100%;}
}
.fm-search svg{z-index:1;}

/* ---- style categories ---- */
.category .g-hero{position:relative;}
.category .g-dot{background:var(--cat-accent); box-shadow:0 0 0 4px color-mix(in srgb, var(--cat-accent) 30%, transparent), 0 0 12px var(--cat-accent);}
.cat-formats{display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:var(--space-2); margin-top:var(--space-2);}
.cat-formats-label{font-size:13px; font-weight:600; color:var(--text-2); margin-right:var(--space-1);}
.cat-format{display:inline-flex; align-items:baseline; gap:8px; min-height:44px; padding:0 16px; border-radius:var(--r-pill); background:var(--fill);
  color:var(--text); font:500 14px/44px var(--font); text-decoration:none; transition:background-color var(--dur-press);}
.cat-format span{color:var(--text-2); font-size:13px; font-variant-numeric:tabular-nums; white-space:nowrap;}
.cat-format:hover{background:color-mix(in srgb, var(--text) 10%, transparent);}
.cat-format:focus-visible{outline:0; box-shadow:var(--focus);}
.cat-note{margin:0; font-size:14px; color:var(--text-2); max-width:52ch;}
.toggle-list{display:flex; flex-direction:column; max-height:min(60vh, 520px); overflow:auto; margin:0 calc(var(--space-2) * -1); padding:0 var(--space-2);}
.toggle-row{display:flex; align-items:center; justify-content:space-between; gap:var(--space-4); min-height:60px; padding:var(--space-2) 0;
  border-bottom:1px solid var(--line-soft);}
.toggle-row:last-child{border-bottom:0;}
.toggle-row > span{display:flex; flex-direction:column; gap:2px; min-width:0;}
.toggle-row b{font-weight:500; color:var(--text);}
.toggle-row small{font-size:13px; color:var(--text-2);}
.toggle-row .switch{flex:none;}
@media (max-width:640px){ .cat-format{flex:1 1 100%; justify-content:space-between;} }
.toggle-row small{color:var(--text); opacity:.82;}   /* AA on the translucent phone sheet (4.0:1 at --text-2) */

/* ---- Library (home): visionOS glass, large radii, generous rhythm ---- */
.library{display:flex; flex-direction:column; gap:var(--space-8); max-width:1240px; padding-top:var(--space-5);}
/* hero: a compact Liquid Glass panel. A deep tinted base, a lime glow behind the folders, a specular rim that is
   bright where light falls (top left) and fades round the sides, and a soft sheen across the top. */
.lb-hero{position:relative; display:grid; grid-template-columns:minmax(0, 1fr) minmax(220px, 300px); align-items:center; gap:var(--space-6);
  padding:36px 40px; border-radius:28px; overflow:hidden; color:#F5F5F7; isolation:isolate;
  background:
    radial-gradient(55% 120% at 88% 60%, rgba(215,242,90,.20), transparent 65%),
    radial-gradient(70% 90% at 0% 0%, rgba(120,170,130,.22), transparent 60%),
    linear-gradient(150deg, #24432F 0%, #17301F 52%, #0F2118 100%);
  box-shadow:0 1px 0 rgba(255,255,255,.06), 0 24px 48px -28px rgba(10,30,20,.6), 0 2px 6px -2px rgba(10,30,20,.25);}
.lb-hero::before{content:""; position:absolute; inset:0; border-radius:inherit; padding:1px; pointer-events:none; z-index:2;
  background:linear-gradient(140deg, rgba(255,255,255,.62), rgba(255,255,255,.10) 32%, rgba(255,255,255,.04) 60%, rgba(215,242,90,.38));
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask-composite:exclude;}
.lb-hero::after{content:""; position:absolute; inset:0 0 auto 0; height:55%; z-index:-1; pointer-events:none;
  background:linear-gradient(180deg, rgba(255,255,255,.09), transparent);}
.lb-hero-copy{display:flex; flex-direction:column; gap:12px; min-width:0;}
.lb-eyebrow, .lb-kicker{margin:0; font:600 12px/1.3 var(--font); letter-spacing:.12em; text-transform:uppercase;}
.lb-eyebrow{color:#D7F25A;}
.lb-kicker{color:var(--text-2);}
.lb-title{margin:0; font:var(--t-xl1); font-size:clamp(32px, 3.4vw, 44px); line-height:1.05; letter-spacing:var(--tr-xl1); color:#F5F5F7; text-wrap:balance;}
.lb-dot{color:#D7F25A;}
.lb-lede{margin:0; max-width:42ch; font:var(--t-callout); letter-spacing:var(--tr-15); color:rgba(245,245,247,.84);}
.lb-actions{display:flex; flex-wrap:wrap; gap:10px; margin-top:6px;}
.lb-pill{min-height:44px; padding:0 20px; border-radius:var(--r-pill); font-size:15px;}
.lb-hero .btn.primary{background:#D7F25A; color:#132016; border-color:transparent; box-shadow:inset 0 1px 0 rgba(255,255,255,.55), 0 6px 16px -8px rgba(215,242,90,.7);}
.lb-hero .btn.primary:hover{background:#E2F77C;}
.lb-hero .lb-ghost{background:rgba(255,255,255,.10); color:#F5F5F7; border:1px solid rgba(255,255,255,.20);
  -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); box-shadow:inset 0 1px 0 rgba(255,255,255,.18);}
.lb-hero .lb-ghost:hover{background:rgba(255,255,255,.18);}
.lb-hero .btn:focus-visible{box-shadow:0 0 0 3px rgba(215,242,90,.6);}
.lb-hero-art{position:relative; height:190px;}
.lb-hero-folder{position:absolute; width:min(210px, 74%); filter:drop-shadow(0 14px 18px rgba(0,0,0,.28));}
.lb-hf-1{left:0; top:4px; transform:rotate(-6deg);}
.lb-hf-2{right:0; bottom:0; transform:rotate(4deg);}

.lb-make{display:flex; flex-direction:column; gap:var(--space-5); scroll-margin-top:var(--space-5);}
.lb-make:focus{outline:0;}
.lb-head{display:flex; align-items:flex-end; justify-content:space-between; gap:var(--space-5); flex-wrap:wrap;}
.lb-head > div{display:flex; flex-direction:column; gap:var(--space-2);}
.lb-h2{margin:0; font:var(--t-xl2); font-size:clamp(30px, 3.4vw, 40px); letter-spacing:var(--tr-xl2); color:var(--text); text-wrap:balance;}
.lb-search{position:relative; display:flex; align-items:center; width:min(100%, 340px);}
.lb-search svg{position:absolute; left:16px; z-index:1; color:var(--text-2); pointer-events:none;}
.lb-search input{width:100%; min-height:48px; padding:0 18px 0 44px; border-radius:var(--r-pill); font:var(--t-body); letter-spacing:var(--tr-17);}
.lb-search input::-webkit-search-cancel-button{-webkit-appearance:none;}
.lb-tabs{align-self:flex-start; flex-wrap:wrap; max-width:100%;}
.lb-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:var(--space-6);}
.lb-card{display:flex; flex-direction:column; border-radius:28px; overflow:hidden;
  background:var(--surface); -webkit-backdrop-filter:blur(28px) saturate(170%); backdrop-filter:blur(28px) saturate(170%);
  border:1px solid var(--glass-line); box-shadow:var(--glass-shadow); transition:transform .45s var(--spring), box-shadow .25s;}
@media (hover:hover){ .lb-card:hover{transform:translateY(-4px); box-shadow:var(--glass-shadow), 0 30px 60px -30px rgba(20,22,40,.35);} }
.lb-well{display:flex; justify-content:center; align-items:center; padding:28px 22px 20px; margin:10px 10px 0; border-radius:20px;
  background:color-mix(in srgb, var(--cat-paper) 78%, transparent);}
:root[data-theme=dark] .lb-well{background:color-mix(in srgb, var(--cat-ink) 55%, transparent);}
@media (prefers-color-scheme:dark){ :root:not([data-theme=light]) .lb-well{background:color-mix(in srgb, var(--cat-ink) 55%, transparent);} }
.lb-card-body{display:flex; flex-direction:column; gap:4px; padding:var(--space-4) var(--space-5) var(--space-5);}
.lb-cat{margin:0; font:600 12px/1.3 var(--font); letter-spacing:.1em; text-transform:uppercase; color:var(--text-2);}
.lb-name{display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); margin:0; font:var(--t-title3); letter-spacing:var(--tr-title3);}
.lb-name a{color:var(--text); text-decoration:none; min-height:44px; display:inline-flex; align-items:center;}
.lb-name a::after{content:""; position:absolute; inset:0;}          /* the whole card body opens the category */
.lb-card-body{position:relative;}
.lb-name a:focus-visible{outline:0;} .lb-card:has(.lb-name a:focus-visible){box-shadow:var(--focus), var(--glass-shadow);}
.lb-arrow{color:var(--text-2); transition:transform var(--dur-ui) var(--ease-out);}
.lb-card:hover .lb-arrow{transform:translate(2px, -2px); color:var(--text);}
.lb-use{margin:0; font:var(--t-callout); letter-spacing:var(--tr-15); color:var(--text-2);}
.lb-count{margin:var(--space-2) 0 0; font:var(--t-footnote); letter-spacing:var(--tr-13); color:var(--text-2);}
.lb-count a{position:relative; z-index:1; color:var(--text); font-weight:600;}
.lb-empty{grid-column:1 / -1; justify-self:center; width:min(100%, 480px); text-align:center;}

.lb-yours{display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:var(--space-7); align-items:center;
  padding-top:var(--space-7); border-top:1px solid var(--line-soft);}
.lb-yours-copy{display:flex; flex-direction:column; gap:var(--space-3); align-items:flex-start;}
.lb-body{margin:0; max-width:46ch; font:var(--t-body); letter-spacing:var(--tr-17); color:var(--text-2);}
.lb-specimen{position:relative; display:flex; flex-direction:column; gap:var(--space-3); padding:32px; border-radius:28px; text-decoration:none; color:var(--text);
  background:var(--surface); -webkit-backdrop-filter:blur(28px) saturate(170%); backdrop-filter:blur(28px) saturate(170%);
  border:1px solid var(--glass-line); box-shadow:var(--glass-shadow); transition:transform .45s var(--spring);}
@media (hover:hover){ .lb-specimen:hover{transform:translateY(-3px);} }
.lb-specimen:focus-visible{outline:0; box-shadow:var(--focus), var(--glass-shadow);}
.lb-aa{font-size:96px; line-height:1; font-weight:600; letter-spacing:-.01em;}
.lb-swatches{display:flex; gap:8px;} .lb-swatches i{width:40px; height:18px; border-radius:6px; box-shadow:inset 0 0 0 1px rgba(0,0,0,.08);}
.lb-tags{font:600 12px/1.3 var(--font); letter-spacing:.12em; text-transform:uppercase; color:var(--text-2);}
.lb-corner{position:absolute; right:28px; top:28px; color:var(--text-2);} .lb-corner svg{width:32px; height:32px;}
.lb-foot{display:flex; justify-content:space-between; gap:var(--space-4); flex-wrap:wrap; padding:var(--space-5) 0 var(--space-6);
  border-top:1px solid var(--line-soft); font:var(--t-footnote); letter-spacing:var(--tr-13); color:var(--text-2);}

@media (max-width:900px){
  .lb-hero{grid-template-columns:minmax(0, 1fr) 200px; padding:28px 28px;}
  .lb-hero-art{height:150px;} .lb-hero-folder{width:150px;}
  .lb-yours{grid-template-columns:1fr;}
}
@media (max-width:640px){
  .library{gap:var(--space-7);}
  .lb-hero{grid-template-columns:1fr; border-radius:24px; padding:24px 20px 20px;}
  .lb-hero-art{display:none;}                /* on a phone the hero is words and two buttons; the folders follow below */
  .lb-title{font-size:32px;}
  .lb-actions .btn{flex:1 1 100%;}
  .lb-search{width:100%;}
  .lb-tabs{display:flex; flex-wrap:wrap; justify-content:flex-start;}
  .lb-grid{grid-template-columns:1fr;}
}
@media (prefers-reduced-motion:reduce){ .lb-card, .lb-specimen, .lb-arrow{transition:none;} }
@media (max-width:640px){
  .lb-tabs{background:none; padding:0; gap:8px;}
  .lb-tabs button{background:var(--fill);}
  .lb-tabs button[aria-pressed="true"]{background:var(--accent-strong);}
  .lb-well{padding:20px 28px 14px;}
}
.lb-specimen > .lb-kicker{padding-right:48px;}   /* clear of the corner arrow */

/* ---- visionOS touches: hover light, ornament, zoom, ⌘K ---- */
/* 1. a soft light under the pointer, brightest at the glass edge it is nearest */
.sheen{position:relative;}
@media (hover:hover){
  .sheen::before{content:""; position:absolute; inset:0; z-index:3; border-radius:inherit; pointer-events:none; opacity:0;
    background:radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.26), rgba(255,255,255,.06) 45%, transparent 70%);
    transition:opacity .3s var(--glide);}
  .sheen::after{content:""; position:absolute; inset:0; z-index:3; border-radius:inherit; pointer-events:none; opacity:0; padding:1px;
    background:radial-gradient(200px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.9), transparent 70%);
    -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask-composite:exclude;
    transition:opacity .3s var(--glide);}
  .sheen:hover::before, .sheen:hover::after{opacity:1;}
  :root[data-theme=dark] .sheen::before{background:radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.12), rgba(255,255,255,.03) 45%, transparent 70%);}
}
@media (hover:hover) and (prefers-color-scheme:dark){
  :root:not([data-theme=light]) .sheen::before{background:radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.12), rgba(255,255,255,.03) 45%, transparent 70%);}
}

/* 2. the ornament: a glass toolbar floating at the bottom of the window, centred on the content column */
.library{padding-bottom:112px;}
.lb-ornament{position:fixed; bottom:var(--space-5); left:calc(50% + var(--side) / 2); transform:translateX(-50%); z-index:20;
  display:flex; gap:var(--space-2); padding:var(--space-2); border-radius:var(--r-pill);
  background:var(--surface-2); -webkit-backdrop-filter:blur(30px) saturate(180%); backdrop-filter:blur(30px) saturate(180%);
  border:1px solid var(--glass-line); box-shadow:var(--glass-shadow), 0 24px 48px -20px rgba(0,0,0,.35);
  animation:orn-in .5s var(--spring) both .2s;}
.lb-ornament .btn{min-height:44px; padding:0 18px; border-radius:var(--r-pill); font-size:15px; white-space:nowrap;}
.lb-orn-search{display:inline-flex; align-items:center; gap:8px;}
.lb-orn-search svg{color:var(--text-2);}
kbd{font:600 12px/1 var(--font); padding:4px 6px; border-radius:6px; background:var(--fill); color:var(--text-2); letter-spacing:0;}
@keyframes orn-in{from{opacity:0; transform:translate(-50%, 16px) scale(.96);} to{opacity:1; transform:translate(-50%, 0);}}
@media (max-width:900px){ .lb-ornament{left:50%;} }
@media (max-width:640px){
  .lb-ornament{left:var(--space-4); right:var(--space-4); transform:none; animation:none; justify-content:space-between;}
  .lb-ornament .btn{flex:1; padding:0 10px;} .lb-orn-search kbd{display:none;}
}

/* 3. zoom: the card grows into the category's header */
::view-transition-group(zoom){animation-duration:.5s; animation-timing-function:cubic-bezier(.2,.8,.2,1);}
::view-transition-old(zoom), ::view-transition-new(zoom){animation-duration:.5s; height:100%; object-fit:cover; overflow:clip;}
::view-transition-old(root), ::view-transition-new(root){animation-duration:.32s;}
.zoom-target{border-radius:28px;}

/* 4. ⌘K search: a glass panel near the top of the window */
.side-search{display:flex; align-items:center; gap:10px; width:100%; min-height:44px; padding:0 var(--space-3); margin:0 0 var(--space-2);
  border:1px solid var(--glass-line); border-radius:var(--r-pill); background:var(--fill); color:var(--text-2); font:var(--t-callout); letter-spacing:var(--tr-15); cursor:pointer;}
.side-search span{flex:1; text-align:left;}
.side-search:hover{color:var(--text);} .side-search:focus-visible{outline:0; box-shadow:var(--focus);}
.cmdk-layer{position:fixed; inset:0; z-index:200; display:flex; justify-content:center; align-items:flex-start; padding:12vh var(--space-4) var(--space-4);}
.cmdk-scrim{position:absolute; inset:0; background:rgba(10,12,20,.28); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); animation:cmdk-fade .18s both;}
.cmdk{position:relative; width:min(640px, 100%); max-height:70vh; display:flex; flex-direction:column; overflow:hidden; border-radius:24px;
  background:var(--surface-2); -webkit-backdrop-filter:blur(40px) saturate(190%); backdrop-filter:blur(40px) saturate(190%);
  border:1px solid var(--glass-line); box-shadow:var(--glass-shadow), 0 40px 80px -30px rgba(0,0,0,.5); animation:cmdk-pop .26s var(--spring) both;}
.cmdk-layer.out .cmdk{animation:cmdk-out .16s both;} .cmdk-layer.out .cmdk-scrim{animation:cmdk-fade .16s reverse both;}
.cmdk-field{display:flex; align-items:center; gap:12px; padding:0 18px; border-bottom:1px solid var(--line-soft);}
.cmdk-field svg{color:var(--text-2); flex:none;}
.cmdk-field input{flex:1; min-width:0; min-height:60px; border:0 !important; background:transparent !important; box-shadow:none !important; outline:0;
  font:var(--t-title3); letter-spacing:var(--tr-title3); color:var(--text); padding:0; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;}
.cmdk-list{list-style:none; margin:0; padding:8px; overflow:auto;}
.cmdk-list li[role=option]{display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:52px; padding:8px 12px; border-radius:14px; cursor:pointer;}
.cmdk-list li[aria-selected=true]{background:var(--accent-strong); color:var(--on-accent);}
.cmdk-list li[aria-selected=true] small, .cmdk-list li[aria-selected=true] .cmdk-k{color:var(--on-accent); opacity:.82;}
.cmdk-t{display:flex; flex-direction:column; min-width:0;}
.cmdk-t b{font:var(--t-headline); letter-spacing:var(--tr-17); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.cmdk-t small{font:var(--t-footnote); letter-spacing:var(--tr-13); color:var(--text-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.cmdk-k{flex:none; font:600 12px/1 var(--font); letter-spacing:.06em; text-transform:uppercase; color:var(--text-2);}
.cmdk-none{padding:24px 12px; text-align:center; color:var(--text-2); font:var(--t-callout);}
.cmdk-foot{display:flex; gap:18px; margin:0; padding:10px 18px; border-top:1px solid var(--line-soft); font:var(--t-footnote); color:var(--text-2);}
.cmdk-foot kbd{margin-right:3px;}
@keyframes cmdk-pop{from{opacity:0; transform:translateY(-8px) scale(.97);} to{opacity:1; transform:none;}}
@keyframes cmdk-out{to{opacity:0; transform:scale(.98);}}
@keyframes cmdk-fade{from{opacity:0;}}
@media (max-width:640px){ .cmdk-layer{padding-top:var(--space-4);} .cmdk-foot{display:none;} }
@media (prefers-reduced-motion:reduce){ .lb-ornament, .cmdk, .cmdk-scrim{animation:none;} }
