/* Asset Workbench: a local engineering instrument, designed by EoC. */
:root {
  color-scheme: light;
  --paper: #f8fafc;
  --ink: #111d35;
  --muted: #53647b;
  --blue: #1846ed;
  --line: #cbd5e4;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background-color: var(--paper);
  background-image: linear-gradient(#2451a808 1px, transparent 1px),
    linear-gradient(90deg, #2451a808 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font:
    14px Arial,
    Helvetica,
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--blue);
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
a {
  color: inherit;
  text-decoration: none;
}
header {
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 42px;
  border-bottom: 1px solid var(--line);
  background: #ffffffee;
}
.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  font: 700 11px var(--mono);
  letter-spacing: 0.07em;
}
.brand b {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font: 700 16px var(--mono);
  background: var(--blue);
  color: white;
  box-shadow: 4px 4px 0 #dbe4ff;
}
.brand span {
  color: var(--muted);
  margin-left: 12px;
  font-weight: 400;
}
.local {
  font: 9px var(--mono);
  letter-spacing: 0.08em;
  color: var(--muted);
}
.local i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--blue);
  margin-right: 8px;
}
main {
  max-width: 1324px;
  margin: auto;
  padding: 40px 34px 26px;
}
.heading {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-end;
  margin-bottom: 32px;
}
.eyebrow {
  font: 10px var(--mono);
  letter-spacing: 0.12em;
  color: var(--blue);
}
.heading h1 {
  font-size: 50px;
  letter-spacing: -0.055em;
  font-weight: 700;
  line-height: 1;
  margin: 18px 0;
}
.heading em {
  font-style: normal;
  color: var(--blue);
}
.heading p:not(.eyebrow) {
  line-height: 1.8;
  color: var(--muted);
  font-size: 12px;
}
.intro-note {
  padding: 16px 20px;
  border-left: 3px solid var(--blue);
  background: #edf2ff;
}
.intro-note b {
  font: 700 9px var(--mono);
  letter-spacing: 0.08em;
  color: var(--blue);
}
.intro-note p {
  margin-bottom: 0;
}
.tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--blue);
  margin-bottom: 20px;
  background: white;
}
.tabs button {
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 16px 22px;
  font: 11px var(--mono);
}
.tabs button[aria-selected="true"] {
  color: white;
  background: var(--blue);
}
.tabs a {
  font: 10px var(--mono);
  margin-left: auto;
  padding: 12px 16px;
  color: var(--blue);
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 20px;
  align-items: start;
}
.canvas-panel {
  border: 1px solid var(--line);
  overflow: hidden;
  background: white;
  box-shadow: 4px 4px 0 #e5ebf4;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font: 9px var(--mono);
  letter-spacing: 0.12em;
  color: var(--blue);
  background: #f0f4fc;
}
.panel-heading span:first-child::before {
  content: "+";
  margin-right: 9px;
}
.panel-heading span:last-child {
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.wave-wrap,
#model-view {
  height: 286px;
  position: relative;
  background-color: #f9fbff;
  background-image: linear-gradient(#1846ed09 1px, transparent 1px),
    linear-gradient(90deg, #1846ed09 1px, transparent 1px);
  background-size: 20px 20px;
}
.wave-wrap::after {
  content: "01  /  SIGNAL MONITOR";
  position: absolute;
  top: 12px;
  right: 16px;
  font: 8px var(--mono);
  letter-spacing: 0.12em;
  color: #64799c;
  pointer-events: none;
}
#waveform {
  width: 100%;
  height: 100%;
  display: block;
  filter: brightness(0.5) sepia(1) saturate(12) hue-rotate(188deg);
}
#model-view canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.empty-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 25px;
  pointer-events: none;
}
.empty-overlay[hidden] {
  display: none;
}
.empty-overlay > span {
  border: 1px solid #b2c3f4;
  color: var(--blue);
  background: #eff4ff;
  font: 11px var(--mono);
  padding: 10px 14px;
  margin-bottom: 8px;
}
.empty-overlay h2 {
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.empty-overlay p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  max-width: 330px;
  line-height: 1.7;
}
.canvas-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.file-button,
.secondary {
  font: 10px var(--mono);
  padding: 11px 13px;
  border: 1px solid #aab9d1;
  border-radius: 2px;
  background: #eef3ff;
  color: var(--blue);
  cursor: pointer;
}
.file-button {
  border-color: var(--blue);
  font-weight: 700;
}
.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.file-button:focus-within {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}
.secondary {
  background: white;
  color: var(--ink);
}
.secondary:hover:not(:disabled),
.file-button:hover {
  border-color: var(--blue);
  background: #e7eeff;
}
.canvas-actions audio {
  height: 32px;
  max-width: 230px;
  flex: 1;
  min-width: 140px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 20px;
  border-top: 1px solid var(--line);
  gap: 16px;
}
.stats > div + div {
  border-left: 1px solid var(--line);
  padding-left: 16px;
}
.stats dt {
  font: 8px var(--mono);
  letter-spacing: 0.06em;
  color: var(--muted);
}
.stats dd {
  margin: 10px 0 0;
  font: 500 18px var(--mono);
  color: var(--blue);
  white-space: nowrap;
}
.section-note {
  padding: 17px 20px;
  background: #f5f7fb;
  border-top: 1px solid var(--line);
}
.section-note b {
  font: 700 10px var(--mono);
}
.section-note p {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 610px;
  margin: 8px 0 0;
}
.settings {
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  background: white;
  box-shadow: 4px 4px 0 #e5ebf4;
}
.settings .eyebrow {
  color: var(--blue);
  font-size: 9px;
  margin-top: 0;
}
.settings h2 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 12px 0 22px;
}
.settings label {
  display: block;
  font: 10px var(--mono);
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.settings input[type="number"],
.settings select {
  display: block;
  width: 100%;
  padding: 9px 10px;
  background: #f8faff;
  border: 1px solid #b8c5da;
  border-radius: 2px;
  color: var(--ink);
  margin-top: 7px;
  font: 12px var(--mono);
}
.two-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.settings label.check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 10px;
}
.check input {
  accent-color: var(--blue);
  width: 14px;
  height: 14px;
  margin: 0;
  flex-shrink: 0;
}
.primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--blue);
  border-radius: 2px;
  background: var(--blue);
  color: white;
  padding: 13px 14px;
  font: 700 11px var(--mono);
  margin: 21px 0 12px;
}
.primary:hover:not(:disabled) {
  background: #0d31bc;
}
.status {
  font: 10px/1.7 var(--mono);
  color: var(--muted);
  min-height: 34px;
  margin: 10px 0;
}
.status.error {
  color: #a82626;
  background: #fff0ef;
  border-left: 2px solid #b52d2d;
  padding: 8px;
}
.download {
  display: block;
  border: 1px solid var(--blue);
  color: var(--blue);
  background: #eff3ff;
  border-radius: 2px;
  padding: 12px;
  text-align: center;
  font: 10px var(--mono);
  margin: 12px 0 0;
}
.settings audio {
  max-width: 100%;
  height: 32px;
}
.settings [id$="export-info"] {
  color: var(--muted);
  font: 9px/1.8 var(--mono);
  margin-top: 12px;
}
.help {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}
.detail-stats {
  font: 10px var(--mono);
  margin: 20px 0;
}
.detail-stats > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.detail-stats dt {
  color: var(--muted);
}
.detail-stats dd {
  margin: 0;
  text-align: right;
  color: var(--blue);
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
footer span {
  font: 8px var(--mono);
  letter-spacing: 0.07em;
}
footer p,
footer a {
  font-size: 10px;
}
footer a {
  color: var(--blue);
}
[hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  header {
    padding: 14px 22px;
  }
  .brand span {
    display: none;
  }
  .heading h1 {
    font-size: 44px;
  }
  .intro-note {
    display: none;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 16px;
  }
  main {
    padding: 30px 20px;
  }
  .canvas-actions audio {
    flex-basis: 100%;
    max-width: 100%;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .stats > div:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }
  footer {
    flex-wrap: wrap;
  }
}
@media (max-width: 650px) {
  header {
    padding: 12px 16px;
    min-height: 72px;
  }
  main {
    padding: 25px 16px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .heading h1 {
    font-size: 42px;
  }
  .heading {
    margin-bottom: 24px;
  }
  .local {
    font-size: 8px;
    max-width: 90px;
    line-height: 1.7;
  }
  .tabs {
    flex-wrap: wrap;
    gap: 0;
  }
  .tabs button {
    padding: 14px 12px;
    font-size: 10px;
    flex-grow: 1;
  }
  .tabs a {
    padding: 10px 12px;
    margin-left: 0;
    width: 100%;
    border-top: 1px solid var(--line);
  }
  .settings {
    padding: 20px;
  }
  .wave-wrap,
  #model-view {
    height: 240px;
  }
  .panel-heading {
    padding: 14px;
    font-size: 8px;
    gap: 10px;
  }
  .canvas-actions {
    padding: 14px;
  }
  .file-button,
  .secondary {
    padding: 11px;
    font-size: 10px;
  }
  .stats {
    grid-template-columns: repeat(4, 1fr);
    padding: 17px 14px;
    gap: 6px;
  }
  .stats > div + div {
    padding-left: 6px;
    border-left: 1px solid var(--line);
  }
  .stats dt {
    font-size: 6px;
    letter-spacing: 0;
  }
  .stats dd {
    font-size: 12px;
  }
  .brand {
    font-size: 9px;
    gap: 10px;
  }
  .brand b {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }
  .heading p:not(.eyebrow) {
    font-size: 12px;
  }
  footer {
    gap: 6px;
  }
}
@media (max-width: 350px) {
  .brand {
    font-size: 8px;
  }
  .local {
    max-width: 75px;
    font-size: 7px;
  }
  .heading h1 {
    font-size: 36px;
  }
  .stats dd {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }
}
