:root {
  color-scheme:dark;
  --bg:#111311;
  --sidebar:#151815;
  --panel:#191c19;
  --raised:#202420;
  --line:#30372f;
  --text:#f1f1e9;
  --muted:#939d91;
  --accent:#d9f58b;
  --ink:#202815;
  --error:#ffaaaa;
  --shadow:0 16px 48px #00000012;
  font-family:Inter,"Segoe UI",Arial,sans-serif
}

* {
  box-sizing:border-box
}

body {
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-size:14px
}

body.light {
  color-scheme:light;
  --bg:#f7f8f3;
  --sidebar:#eff1e9;
  --panel:#fff;
  --raised:#f1f4eb;
  --line:#dce1d4;
  --text:#242b22;
  --muted:#657060;
  --accent:#badc6a;
  --error:#a32525
}

button,input,select {
  font:inherit
}

button,a,input,select {
  -webkit-tap-highlight-color:transparent
}

button {
  cursor:pointer
}

button:disabled {
  cursor:not-allowed;
  opacity:.42
}

a {
  color:inherit;
  text-decoration:none
}

button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,.drop-area:focus-within {
  outline:2px solid var(--accent);
  outline-offset:4px
}

.sidebar {
  width:238px;
  position:fixed;
  inset:0 auto 0 0;
  background:var(--sidebar);
  border-right:1px solid var(--line);
  padding:34px 20px;
  display:flex;
  flex-direction:column
}

.brand {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:20px;
  font-weight:750;
  letter-spacing:-1px
}

.brand-mark {
  background:var(--accent);
  color:var(--ink);
  font-size:25px;
  border-radius:9px;
  padding:0 7px 4px;
  letter-spacing:-2px
}

.brand-dot {
  font-size:10px;
  align-self:flex-start;
  margin-top:3px;
  letter-spacing:0
}

.workspace-label {
  font-size:10px;
  font-weight:650;
  letter-spacing:1.8px;
  color:var(--muted);
  margin:58px 12px 17px
}

.nav-item {
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 12px;
  border-radius:8px;
  font-size:13px
}

.nav-item.active {
  background:#c9ed8212;
  color:var(--accent)
}

.nav-arrow {
  margin-left:auto
}

.sidebar-note {
  margin-top:auto;
  display:flex;
  gap:10px;
  padding:18px 10px 28px;
  font-size:11px
}

.small-orb {
  display:inline-block;
  width:6px;
  height:6px;
  flex-shrink:0;
  border-radius:100%;
  background:var(--accent);
  margin-top:4px
}

.sidebar-note strong {
  font-size:12px;
  font-weight:500
}

.sidebar-note p {
  line-height:1.7;
  color:var(--muted);
  margin-bottom:0
}

.sidebar-bottom {
  display:flex;
  align-items:center;
  gap:10px;
  border-top:1px solid var(--line);
  padding-top:24px
}

.sidebar-bottom strong {
  font-size:11px;
  font-weight:500
}

.sidebar-bottom small {
  display:block;
  color:var(--muted);
  font-size:10px;
  margin-top:5px
}

.sidebar-bottom>span:last-child {
  margin-left:auto;
  color:var(--accent)
}

.avatar {
  width:31px;
  height:31px;
  display:grid;
  place-items:center;
  background:var(--raised);
  border:1px solid var(--line);
  border-radius:50%;
  font-size:12px
}

main {
  margin-left:238px
}

.topbar {
  height:78px;
  border-bottom:1px solid var(--line);
  padding:0 5%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:var(--muted);
  font-size:12px
}

.topbar strong {
  color:var(--text);
  font-weight:450
}

.slash {
  padding:0 15px;
  color:var(--line)
}

.icon-button {
  background:var(--panel);
  color:var(--text);
  border:1px solid var(--line);
  border-radius:50%;
  width:33px;
  height:33px;
  font-size:19px
}

.page {
  max-width:1320px;
  padding:49px 5% 0;
  margin:auto
}

.eyebrow {
  font-size:9px;
  letter-spacing:2px;
  font-weight:650;
  color:var(--accent);
  display:flex;
  gap:8px;
  align-items:center
}

.eyebrow>span {
  width:5px;
  height:5px;
  border-radius:50%;
  background:currentColor
}

.title-row {
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:25px;
  margin-top:19px
}

h1 {
  font-size:clamp(32px,3.5vw,54px);
  font-weight:520;
  line-height:1.12;
  letter-spacing:-2px;
  margin:0
}

h1 em {
  font-style:normal;
  color:var(--accent)
}

.subtitle {
  font-size:13px;
  color:var(--muted);
  margin:21px 0 0;
  line-height:1.7
}

.edition {
  font-size:9px;
  letter-spacing:2px;
  text-align:right;
  color:var(--muted);
  padding-bottom:7px
}

.edition span {
  display:block;
  margin-top:12px;
  font-size:8px;
  letter-spacing:1px
}

.workflow {
  display:flex;
  gap:16px;
  align-items:center;
  margin:37px 0 25px;
  color:var(--muted);
  font-size:11px
}

.step {
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap
}

.step b {
  border:1px solid var(--line);
  border-radius:50%;
  height:22px;
  width:22px;
  display:grid;
  place-items:center;
  font-size:10px;
  font-weight:450
}

.step.current {
  color:var(--text)
}

.step.current b {
  background:var(--accent);
  color:var(--ink);
  border-color:var(--accent)
}

.workflow i {
  width:46px;
  height:1px;
  background:var(--line)
}

.input-grid {
  display:grid;
  grid-template-columns:1.25fr 1fr;
  gap:19px
}

.upload-panel,.settings-panel {
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  padding:23px;
  box-shadow:var(--shadow)
}

.panel-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:20px
}

h2 {
  font-weight:500;
  font-size:14px;
  margin:0
}

.pill {
  font-size:9px;
  color:var(--muted);
  border:1px solid var(--line);
  border-radius:5px;
  padding:4px 6px
}

.drop-area {
  position:relative;
  min-height:204px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  border:1px dashed #76886365;
  border-radius:9px;
  background:linear-gradient(145deg,#a6ca4c07,transparent);
  cursor:pointer;
  text-align:center;
  padding:20px;
  gap:10px
}

.drop-area input {
  position:absolute;
  width:100%;
  height:100%;
  inset:0;
  opacity:0;
  cursor:pointer
}

.upload-icon {
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  background:var(--raised);
  border:1px solid var(--line);
  border-radius:12px;
  color:var(--accent);
  font-size:29px;
  margin-bottom:4px
}

.drop-area strong {
  font-size:14px;
  font-weight:500;
  overflow-wrap:anywhere;
  max-width:100%
}

.drop-area>span:not(.upload-icon) {
  font-size:11px;
  color:var(--muted)
}

.drop-area u {
  text-decoration:none;
  color:var(--accent)
}

.drop-area small {
  font-size:9px;
  color:var(--muted);
  margin-top:9px
}

.dragging .drop-area {
  border-color:var(--accent);
  background:#b4d97815
}

.upload-footer {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-size:10px;
  color:var(--muted);
  margin-top:16px
}

.upload-footer .small-orb {
  width:4px;
  height:4px;
  margin:0
}

.field-label {
  display:block;
  font-size:11px;
  color:var(--muted);
  margin-bottom:10px
}

select {
  color:var(--text);
  border:1px solid var(--line);
  background:var(--bg);
  border-radius:7px;
  padding:11px 12px;
  width:100%;
  font-size:11px
}

.field-help {
  color:var(--muted);
  font-size:10px;
  line-height:1.7;
  margin:10px 0 17px
}

.toggle-row {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  border-top:1px solid var(--line);
  padding:16px 0;
  cursor:pointer
}

.toggle-row strong {
  font-size:11px;
  font-weight:450
}

.toggle-row small {
  display:block;
  font-size:9px;
  color:var(--muted);
  margin-top:5px
}

.toggle-row input {
  appearance:none;
  width:30px;
  height:18px;
  background:var(--line);
  border-radius:12px;
  position:relative;
  flex-shrink:0;
  cursor:pointer
}

.toggle-row input:after {
  content:"";
  position:absolute;
  height:12px;
  width:12px;
  background:var(--muted);
  border-radius:50%;
  top:3px;
  left:3px;
  transition:transform .2s
}

.toggle-row input:checked {
  background:var(--accent)
}

.toggle-row input:checked:after {
  transform:translateX(12px);
  background:var(--ink)
}

.primary {
  width:100%;
  border:0;
  border-radius:7px;
  padding:13px 16px;
  display:flex;
  justify-content:space-between;
  background:var(--accent);
  color:var(--ink);
  font-size:12px;
  font-weight:600;
  transition:filter .2s
}

.primary:hover:enabled {
  filter:brightness(1.08)
}

.status {
  font-size:11px;
  color:var(--muted);
  margin:16px 0 39px;
  min-height:16px
}

.status.error {
  color:var(--error)
}

.status.working {
  color:var(--accent)
}

.status.working:before {
  content:"";
  width:8px;
  height:8px;
  display:inline-block;
  margin-right:9px;
  border:1px solid currentColor;
  border-right-color:transparent;
  border-radius:50%;
  animation:spin .8s linear infinite
}

@keyframes spin {
  to {
    transform:rotate(360deg)
  }
}

.results-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px
}

.muted {
  color:var(--muted);
  font-size:8px;
  letter-spacing:1.5px
}

.results-heading h2 {
  font-size:22px;
  letter-spacing:-.7px;
  margin-top:11px
}

.results-heading h2>span {
  font-size:11px;
  margin-left:9px;
  padding:3px 7px;
  border:1px solid var(--line);
  border-radius:5px;
  color:var(--muted);
  vertical-align:middle;
  letter-spacing:0
}

.secondary {
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:7px;
  color:var(--text);
  padding:10px 14px;
  font-size:10px;
  white-space:nowrap
}

.stats {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--panel);
  padding:19px 0;
  margin-top:23px
}

.stats>div {
  padding:0 23px;
  border-right:1px solid var(--line)
}

.stats>div:last-child {
  border:0
}

.stats span {
  font-size:8px;
  letter-spacing:1.3px;
  color:var(--muted);
  display:block
}

.stats strong {
  display:block;
  margin-top:10px;
  font-size:22px;
  font-weight:450
}

.result-toolbar {
  margin-top:22px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  gap:12px;
  padding-bottom:10px
}

.tabs {
  display:flex;
  gap:5px;
  margin-right:auto
}

.tab {
  background:none;
  border:0;
  border-radius:6px;
  padding:9px 13px;
  color:var(--muted);
  font-size:11px
}

.tab.active {
  color:var(--accent);
  background:#c9ed8210
}

.result-toolbar input {
  width:180px;
  min-width:0;
  background:var(--panel);
  border:1px solid var(--line);
  color:var(--text);
  padding:9px 12px;
  border-radius:6px;
  font-size:10px
}

.result-toolbar select {
  width:120px;
  font-size:10px;
  padding:9px
}

.empty-state {
  text-align:center;
  padding:43px 12px 36px
}

.empty-icon {
  color:var(--muted);
  font-size:30px;
  margin-bottom:15px
}

.empty-state h3 {
  font-size:14px;
  font-weight:450
}

.empty-state p {
  font-size:11px;
  line-height:1.9;
  color:var(--muted)
}

.empty-state>span {
  display:block;
  margin-top:27px;
  font-size:7px;
  letter-spacing:2px;
  color:var(--muted)
}

.element-card {
  padding:19px 4px;
  border-bottom:1px solid var(--line)
}

.element-meta {
  display:flex;
  gap:12px;
  align-items:center;
  color:var(--muted);
  font-size:10px
}

.element-type {
  border-radius:4px;
  background:var(--raised);
  padding:4px 7px;
  color:var(--accent)
}

.element-card p {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font-size:13px;
  line-height:1.8;
  max-height:500px;
  overflow:auto
}

.element-card details {
  font-size:10px;
  color:var(--muted)
}

pre {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  line-height:1.7;
  font-size:11px;
  color:var(--text);
  padding:16px;
  background:var(--panel);
  border-radius:8px;
  max-height:600px;
  overflow:auto
}

.load-more {
  display:block;
  margin:20px auto
}

footer {
  display:flex;
  justify-content:space-between;
  border-top:1px solid var(--line);
  padding:22px 0;
  color:var(--muted);
  font-size:9px;
  gap:20px
}

footer>span:first-child {
  font-size:12px;
  letter-spacing:-.4px
}

footer b {
  font-weight:400;
  color:var(--text)
}

footer>span:last-child {
  font-size:7px;
  letter-spacing:1px
}

@media(min-width:1600px) {
  .page {
    padding-top:65px
  }
}

@media(max-width:1100px) {
  .sidebar {
    width:200px;
    padding:28px 14px
  }
  main {
    margin-left:200px
  }
  .brand {
    font-size:17px
  }
  .edition {
    display:none
  }
  .input-grid {
    grid-template-columns:1fr 1fr
  }
  .upload-panel,.settings-panel {
    padding:18px
  }
  .result-toolbar input {
    width:145px
  }
}

@media(max-width:800px) {
  .sidebar {
    position:static;
    width:100%;
    padding:17px 5%;
    border-right:0;
    border-bottom:1px solid var(--line)
  }
  .brand {
    font-size:20px
  }
  .workspace-label,.nav-item,.sidebar-note,.sidebar-bottom {
    display:none
  }
  main {
    margin-left:0
  }
  .topbar {
    height:55px
  }
  .page {
    padding-top:30px
  }
  h1 {
    font-size:40px
  }
  .input-grid {
    grid-template-columns:1fr
  }
  .workflow {
    gap:9px;
    font-size:9px
  }
  .workflow i {
    width:20px
  }
  .stats>div {
    padding:0 12px
  }
  .stats span {
    font-size:7px
  }
  .stats strong {
    font-size:19px
  }
  .result-toolbar {
    flex-wrap:wrap
  }
  .tabs {
    width:100%
  }
  .result-toolbar input {
    flex:1
  }
  .results-heading h2 {
    font-size:19px
  }
  footer>span:nth-child(2) {
    display:none
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*:after {
    animation:none!important;
    transition:none!important
  }
}
