@font-face {
  font-family: "Desk Sans";
  src: url("/media/InterVariable.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f6f3;
  --paper: #fff;
  --ink: #242524;
  --muted: #62655f;
  --line: #dddfd8;
  --primary: #5842c5;
  --primary-hover: #42309b;
  --purple-light: #f0ecfb;
  --rail: #242526;
  --rail-width: 216px;
  --ui-font: "Desk Sans", "Segoe UI", Arial, sans-serif;
}

.studio {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--ui-font);
}
.studio button, .studio a, .studio input, .studio select, .studio textarea { font-family: inherit; }
.studio button:focus-visible, .studio a:focus-visible, .studio input:focus-visible,
.studio textarea:focus-visible, .studio select:focus-visible, .studio summary:focus-visible {
  outline: 3px solid #8874db; outline-offset: 3px;
}
.studio .skip-link:focus { z-index: 90; }
.studio-rail {
  position: sticky; top: 0; height: 100dvh; min-height: 0; z-index: 25;
  display: flex; flex-direction: column; background: var(--rail); color: #fff;
}
.rail-brand-row { padding: 27px 18px 26px; }
.studio-brand, .header-brand {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-weight: 675; font-size: 23px; letter-spacing: -1.2px; line-height: 1;
}
.studio-brand img { width: 35px; height: 35px; object-fit: contain; }
.rail-scroll { flex: 1; overflow-y: auto; padding: 14px 12px 24px; }
.rail-section h2 {
  margin: 0 12px 10px; color: #a6a9a6; font-size: 12px; font-weight: 520; line-height: 20px;
}
.rail-section + .rail-section { margin-top: 27px; }
.rail-links { display: grid; gap: 3px; }
.rail-links a, .rail-bottom button {
  display: flex; align-items: center; gap: 12px; min-height: 40px;
  padding: 8px 12px; border-radius: 7px; color: #dde0dc; font-size: 14px;
  font-weight: 450; line-height: 22px; text-decoration: none;
}
.rail-links a > svg, .rail-bottom button > svg {
  width: 17px; height: 17px; color: #b3b8b4; flex: 0 0 17px; stroke-width: 1.65;
}
.rail-links a:hover, .rail-bottom button:hover { background: #333536; color: #fff; }
.rail-links a.active { color: #fff; background: #414044; font-weight: 600; }
.rail-links a.active > svg { color: #ccbefa; }
.rail-links a.active::after { content: ""; margin-left: auto; width: 5px; height: 5px; background: #c6b7fb; border-radius: 50%; }
#project-count { margin-left: auto; font-size: 11px; font-variant-numeric: tabular-nums; color: #bdc0bc; }
#project-count:empty, .rail-links a.active:has(#project-count)::after { display: none; }
.rail-bottom { flex-shrink: 0; padding: 12px; }
.rail-bottom button { width: 100%; font-size: 13px; }
.rail-bottom kbd { margin-left: auto; color: #c2c4c0; border: 1px solid #56595a; border-radius: 4px; background: transparent; font-size: 11px; line-height: 16px; padding: 0 5px; }
.device-info { display: flex; align-items: center; gap: 10px; border-top: 1px solid #424446; margin: 14px 0 0; padding: 18px 6px 7px; font-size: 13px; font-weight: 550; }
.device-info small { display: block; margin-top: 2px; color: #b7bcb7; font-size: 11px; font-weight: 400; }
.device-icon { width: 33px; height: 33px; background: #3a3d3b; border: 1px solid #50554f; border-radius: 9px; display: grid; place-items: center; }
.device-icon svg { width: 16px; height: 16px; color: #cddaaf; }
.rail-icon, #menu-toggle, .header-brand, .drawer-backdrop { display: none; }

.studio-stage { min-width: 0; display: flex; flex-direction: column; }
.studio-header {
  display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 16px;
  padding: 8px clamp(24px,3vw,48px); border-bottom: 1px solid var(--line); background: #fbfbf9;
}
.studio-location, .header-actions, .find-tool, .sign-in { display: inline-flex; align-items: center; }
.studio-location { gap: 11px; font-size: 13px; color: #686b66; }
.studio-location svg { width: 16px; height: 16px; }
.studio-location strong { font-weight: 550; color: var(--ink); }
.location-divider { color: #afb2aa; }
.header-actions { gap: 18px; }
.find-tool { gap: 8px; padding: 6px 0; font-size: 13px; color: var(--muted); }
.find-tool svg, .sign-in svg { width: 15px; height: 15px; }
.find-tool kbd { background: #f2f2ee; border: 1px solid #dedfd8; color: #656760; padding: 1px 5px; border-radius: 4px; font-size: 10px; }
.sign-in { gap: 8px; padding: 7px 13px; min-height: 34px; color: #292b28; background: #fff; border: 1px solid #cdd0c8; border-radius: 6px; font-size: 13px; font-weight: 550; }
.sign-in { white-space: nowrap; }
.find-tool:hover, .sign-in:hover { color: var(--primary); }
.studio main {
  width: 100%; max-width: 1520px; min-width: 0; flex: 1; display: flex; flex-direction: column;
  margin: 0 auto; padding: 32px clamp(24px,3vw,48px) 0;
}
.studio main > * { min-width: 0; }
.studio .site-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin: auto 0 0; padding: 24px 0; color: #70736b; font-size: 12px;
}
.studio .site-footer div { display: flex; flex-wrap: wrap; gap: 20px; }
.studio .site-footer a:hover { color: var(--ink); text-decoration: underline; }
.studio .page-heading { align-items: center; margin: 0 0 24px; gap: 20px; }
.studio .page-heading h1 {
  margin: 0 0 7px; font: 550 clamp(32px,3.3vw,48px)/1.12 var(--ui-font);
  letter-spacing: -.05em;
}
.studio .page-heading p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.studio .heading-actions { display: flex; gap: 8px; flex-shrink: 0; }
.studio .panel { border-color: var(--line); border-radius: 12px; }
.studio .button, .studio .primary { border-radius: 7px; min-height: 38px; font-size: 13px; font-weight: 550; }
.studio .button { color: var(--ink); border-color: #d4d7d0; }
.studio .primary { color: white; background: var(--primary); }
.studio .primary:hover:not(:disabled) { background: var(--primary-hover); }
.studio .icon-button { width: 34px; height: 34px; color: #656861; }
.studio .link-button { font-size: 13px; font-weight: 550; }
.studio .file-row { border-radius: 7px; border-color: var(--line); }
.studio .file-row.selected { background: #f5f3fb; border-color: #c8c0df; }
.studio .file-row strong { font-size: 14px; color: var(--ink); font-weight: 600; }
.studio .file-row small { font: 12px/1.5 var(--ui-font); color: var(--muted); }
.studio .file-symbol { background: #edeaf5; color: #625092; }
.studio .add-files { font-size: 13px; color: var(--primary); border-color: #bcb5cc; }
.studio .batch-summary { font-size: 12px; color: var(--muted); }
.studio .checkbox-label { font-size: 13px; color: #51564f; }
.studio .checkbox-label input { width: 15px; height: 15px; }

.intake-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: 22px; align-items: stretch; }
.intake-panel { padding: 24px; }
.intake-panel h2, .tool-glance h2 { font-size: 20px; font-weight: 575; letter-spacing: -.035em; margin: 0; }
.intake-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.intake-zone { display: grid; place-items: center; align-content: center; gap: 12px; width: 100%; min-height: 200px; padding: 20px; background: #f7f7f3; border: 1.5px dashed #b5b9af; border-radius: 8px; }
.intake-zone:hover, .intake-zone.dragover { background: #eeebf6; border-color: var(--primary); }
.intake-zone > svg { width: 30px; height: 30px; color: #575b53; }
.intake-zone strong { font-size: 16px; font-weight: 560; }
.intake-zone span { color: var(--primary); font-size: 14px; }
.intake-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.intake-controls label { color: var(--muted); font-size: 13px; }
.intake-controls select { padding: 6px; font-size: 12px; }
.tool-glance { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.glance-frame { position: relative; min-height: 140px; flex: 1; background: #252d30 url('/media/harbor-frame.webp') center 48% / cover; display: flex; align-items: end; justify-content: center; padding: 18px; }
.glance-frame span { color: #fff; font-size: clamp(15px,1.4vw,22px); font-weight: 550; padding: 1px 8px; background: #101516c9; }
.glance-copy { padding: 20px 24px; }
.glance-copy h2 { font-size: 16px; }
.glance-copy p { margin: 7px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.studio .toast { font-size: 14px; color: var(--ink); padding: 12px 16px; border: 1px solid var(--line); }
.studio dialog { font: 14px/1.5 var(--ui-font); width: min(520px,calc(100vw - 32px)); border-radius: 12px; padding: 22px; }
.studio dialog::backdrop { background: #17191b66; backdrop-filter: blur(2px); }
.studio .modal-header h2 { font-size: 20px; font-weight: 600; }
.studio .shortcut-row { align-items: center; color: var(--ink); font-size: 14px; }
.studio-search { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 2px 12px; border: 1px solid #aca3c8; border-radius: 6px; }
.studio-search input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 15px; padding: 8px 2px; }
.studio-search:focus-within { outline: 2px solid #8b78c9; }
.studio-search svg { color: var(--muted); width: 16px; }
.tool-results { max-height: min(45vh,350px); overflow: auto; }
.tool-result { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 6px; text-align: left; font-size: 14px; }
.tool-result svg { width: 17px; height: 17px; color: var(--muted); }
.tool-result:is(:hover,:focus-visible) { background: #eeebf5; }
.tool-result kbd { margin-left: auto; }
.tool-results p { margin: 12px; color: var(--muted); }

@media (min-width: 1600px) { :root { --rail-width: 234px; } }
@media (max-width: 1150px) and (min-width: 861px) {
  :root { --rail-width: 190px; }
  .rail-brand-row { padding-left: 14px; padding-right: 12px; }
  .studio-brand { font-size: 21px; }
  .rail-links a { gap: 9px; }
  .studio main { padding: 26px 24px 0; }
  .studio-header { padding-inline: 24px; }
}
@media (max-width: 860px) {
  .studio { display: block; }
  .studio-stage { min-height: 100dvh; }
  .studio-rail { position: fixed; inset: 0 auto 0 0; z-index: 55; width: min(278px,85vw); visibility: hidden; transform: translateX(-100%); transition: transform .17s ease,visibility .17s; }
  .studio-rail.open { visibility: visible; transform: translateX(0); transition-property: transform; }
  .drawer-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 50; background: #20232973; border: 0; width: 100%; height: 100%; }
  body.drawer-open { overflow: hidden; }
  .rail-brand-row { display: flex; align-items: center; justify-content: space-between; }
  #drawer-close, #menu-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 5px; }
  #drawer-close { color: #dce0da; }
  #menu-toggle { margin-left: -9px; }
  .studio-header { min-height: 57px; padding: 7px 22px; gap: 5px; }
  .studio-location { display: none; }
  .header-brand { display: inline-flex; gap: 4px; font-size: 19px; letter-spacing: -.8px; }
  .header-brand img { width: 28px; height: 28px; object-fit: contain; }
  .header-actions { margin-left: auto; gap: 12px; }
  .studio main { padding: 24px 22px 0; }
  .rail-links a { min-height: 43px; }
}
@media (max-width: 600px) {
  .studio-header { padding-inline: 16px; }
  .find-tool { width: 32px; height: 36px; justify-content: center; }
  .find-tool span, .find-tool kbd { display: none; }
  .sign-in { min-height: 34px; padding: 5px 9px; }
  .studio main { padding: 22px 16px 0; }
  .studio .page-heading { margin-bottom: 18px; gap: 12px; }
  .studio .page-heading h1 { font-size: 33px; }
  .studio .page-heading p { font-size: 14px; max-width: none; }
  .intake-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .intake-panel { padding: 17px; }
  .intake-controls { gap: 8px; }
  .glance-frame { min-height: 146px; }
  .studio .site-footer { align-items: start; flex-wrap: wrap; gap: 9px; padding-block: 21px; font-size: 11px; }
  .studio .site-footer div { gap: 14px; }
}
@media (max-width: 355px) {
  .header-brand { font-size: 17px; }
  .header-brand img { width: 23px; height: 23px; }
  .header-actions { gap: 4px; }
}
