* { box-sizing: border-box; }

:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #171c2b;
  background: #f4f3ef;
  --ink: #161b2c;
  --accent: #293dc2;
  --accent-hover: #1c2c9b;
  --muted: #545b70;
  --line: #dbdde6;
  --paper: #fff;
  --radius: 1.25rem;
}

body { margin: 0; min-width: 0; line-height: 1.5; }
a { color: var(--accent); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid #5b72ee; outline-offset: 4px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: 1rem; top: -4rem; padding: .6rem; background: white; z-index: 5; }
.skip:focus { top: 1rem; }

.site-header { color: var(--ink); border-bottom: 1px solid #dddedf; }
.header-inner {
  max-width: 90rem;
  min-height: 4.7rem;
  margin: auto;
  padding: .7rem clamp(1rem, 4vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: inherit;
  font-size: .95rem;
  line-height: 1.13;
  font-weight: 760;
  white-space: nowrap;
}
.brand-mark {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: .78rem;
  background: var(--accent);
}
.brand-mark i, .status-bars i {
  width: 3px;
  height: 9px;
  border-radius: 10px;
  background: currentColor;
}
.brand-mark i { color: white; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(4) { height: 15px; }
.brand-mark i:nth-child(3) { height: 21px; }
.brand-mark i:last-child { color: #fda58c; }
.brand small { display: block; margin-top: .22rem; font-size: .78rem; font-weight: 530; color: var(--muted); }
.identity { display: flex; align-items: center; gap: .9rem; font-size: .88rem; text-align: right; }
.identity span { overflow-wrap: anywhere; }
button.quiet { background: transparent; color: var(--ink); border-color: #bfc2cd; font-weight: 650; white-space: nowrap; }
button.quiet:hover { background: #e7e8ee; }

.shell { max-width: 83rem; margin: auto; padding: clamp(1.9rem, 6vw, 5rem) clamp(1rem, 4vw, 3.5rem); }
.narrow { max-width: 37rem; }
.detail-shell { max-width: 63rem; }
h1, h2, p { margin: 0 0 .7rem; }
h1, h2 { line-height: 1.04; letter-spacing: -.05em; }
h1 { font-size: clamp(2.35rem, 5vw, 4.7rem); font-weight: 790; }
h2 { font-size: clamp(1.4rem, 2.7vw, 1.85rem); }
.muted, .hint, .reference { color: var(--muted); }
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3.2vw, 2.1rem);
  box-shadow: 0 16px 45px -30px #23306236;
}
.stack { display: grid; gap: 1rem; margin-top: 1.2rem; }
label { display: grid; gap: .4rem; font-weight: 690; font-size: .88rem; }
input, select {
  width: 100%;
  min-width: 0;
  border: 1px solid #b9becf;
  padding: .72rem .85rem;
  color: inherit;
  font: inherit;
  font-weight: 450;
  background: #fff;
  border-radius: .68rem;
}
input:focus, select:focus { border-color: var(--accent); }
.hint { font-size: .84rem; font-weight: 500; }
button, .button {
  font: inherit;
  font-weight: 730;
  color: white;
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: .72rem;
  padding: .7rem 1rem;
  cursor: pointer;
  text-decoration: none;
}
button:disabled { opacity: .7; cursor: wait; }
button:hover, .button:hover { background: var(--accent-hover); }
button.secondary { background: #e8ebff; color: var(--accent); }
button.secondary:hover { background: #dadfff; }
.notice {
  margin: .65rem 0;
  color: #852b22;
  background: #fff1ee;
  padding: .7rem .85rem;
  border-radius: .68rem;
  font-size: .9rem;
}

.login-shell {
  max-width: 90rem;
  padding-top: clamp(1.1rem, 3.3vw, 3.5rem);
  padding-bottom: clamp(1.1rem, 3.3vw, 3.5rem);
}
.login-layout {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  align-items: stretch;
  min-height: min(43rem, calc(100svh - 9rem));
  gap: clamp(1rem, 2vw, 2rem);
}
.login-panel {
  display: grid;
  align-items: center;
  justify-items: center;
  padding: clamp(1.6rem, 5vw, 4.5rem) clamp(1.4rem, 4.8vw, 4.2rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: clamp(1.25rem, 2vw, 2rem);
}
.login-inner { width: 100%; max-width: 26.5rem; }
.login-inner h1 { font-size: clamp(2.65rem, 4.55vw, 4.7rem); }
.login-description { color: var(--muted); max-width: 26rem; margin: 1rem 0 1.7rem; }
.login-form button { display: flex; justify-content: space-between; align-items: center; text-align: left; margin-top: .25rem; }
.login-form button span { font-size: 1.15em; line-height: 1; }
.google-login { display: grid; gap: .45rem; }
.google-button { min-height: 2.5rem; }
.google-button:empty { min-height: 0; }
.google-message { margin: 0; color: var(--muted); font-size: .87rem; }
.login-divider { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .82rem; margin: 1.35rem 0 0; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.studio {
  position: relative;
  isolation: isolate;
  min-height: 35rem;
  overflow: hidden;
  padding: clamp(1.6rem, 4.35vw, 4rem);
  border-radius: clamp(1.25rem, 2vw, 2rem);
  background-color: #080b1e;
  background-image:
    linear-gradient(165deg, #080b1ef2 3%, #080b1e8a 34%, #080b1e11 65%, #080b1ecd 100%),
    url("studio.webp");
  background-position: center, center 48%;
  background-size: cover;
  color: #fff;
}
.studio-copy { position: relative; z-index: 1; }
.studio-label {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: "Courier New", monospace;
  font-size: .76rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #dce2fc;
}
.studio-label span { width: .48rem; height: .48rem; border-radius: 100%; background: #fa9279; box-shadow: 0 0 0 4px #fa92792e; }
.studio-copy p {
  margin: 1.05rem 0 0;
  font-size: clamp(2.7rem, 5.2vw, 6rem);
  font-weight: 760;
  line-height: .99;
  letter-spacing: -.065em;
  text-wrap: balance;
}
.studio-wave {
  position: absolute;
  bottom: 4.5rem;
  left: 0;
  width: 100%;
  height: clamp(6rem, 14vw, 10rem);
  pointer-events: none;
}
.studio-formats { position: absolute; bottom: clamp(1.5rem, 3.6vw, 3rem); left: clamp(1.6rem, 4.35vw, 4rem); display: flex; gap: .45rem; }
.studio-formats span { padding: .28rem .55rem; border: 1px solid #bbcbff65; border-radius: .4rem; background: #0a1033bf; color: #e1e8ff; font: 650 .78rem/1.2 "Courier New", monospace; }

.workspace-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.workspace-intro p { margin-bottom: 0; }
.dashboard { display: grid; grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr); gap: clamp(.85rem, 2.1vw, 1.65rem); align-items: start; }
.upload-panel { border-top: .28rem solid var(--accent); }
.connection {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  flex: 0 1 auto;
  color: #1e5541;
  background: #e2f3ea;
  padding: .46rem .65rem;
  border-radius: .6rem;
  font-size: .83rem;
  font-weight: 610;
}
.connection::before { content: ""; width: .48rem; height: .48rem; flex: 0 0 .48rem; border-radius: 50%; background: currentColor; }
.connection[data-unavailable] { color: #784811; background: #fff0d9; }
.file-drop {
  position: relative;
  min-height: 10rem;
  padding: 1rem;
  justify-items: center;
  align-content: center;
  text-align: center;
  border: 1px dashed #919cce;
  border-radius: .9rem;
  background: #f3f5ff;
  overflow: hidden;
  cursor: pointer;
}
.file-drop:focus-within { outline: 3px solid #5b72ee; outline-offset: 3px; }
.file-drop:hover, .file-drop[data-dragging] { background: #e8ecff; border-color: var(--accent); }
.file-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-label { overflow-wrap: anywhere; }
.file-icon, .empty-icon {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: .2rem;
  border-radius: .75rem;
  background: #dfe5ff;
  color: var(--accent);
  font-size: 1.45rem;
}
.jobs { padding: 0; list-style: none; margin: 1.1rem 0 0; }
.jobs li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem .85rem; align-items: center; border-top: 1px solid var(--line); padding: .8rem 0; }
.jobs li:last-child { padding-bottom: 0; }
.jobs a { color: var(--ink); font-weight: 700; }
.jobs a:hover { color: var(--accent); }
.history-file { display: block; overflow-wrap: anywhere; }
.jobs time { display: block; color: var(--muted); font-weight: 500; font-size: .82rem; }
.empty { display: grid; min-height: 12rem; place-content: center; justify-items: center; gap: .45rem; padding: .85rem; margin: 1rem 0 0; border-radius: .85rem; background: #f4f5f9; color: var(--muted); }
.empty p { margin: 0; }
.empty-icon { background: #e4e7f0; color: #485472; }
.back { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1rem; font-weight: 650; }
.back span { text-decoration: none; }
.job-title { overflow-wrap: anywhere; font-size: clamp(2rem, 5vw, 3.9rem); }
.current-status { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem .8rem; margin: 1.3rem 0; border: 1px solid var(--line); border-radius: .9rem; padding: .9rem; background: #f7f8fc; }
.current-status p { margin: 0; }
.current-status .muted { flex-basis: 100%; }
.status-bars { display: flex; gap: 3px; height: 1.75rem; align-items: center; color: var(--accent); }
.status-bars i:nth-child(2), .status-bars i:nth-child(4) { height: 15px; }
.status-bars i:nth-child(3) { height: 21px; }
[data-watching] .status-bars i { animation: levels 1.15s ease-in-out 4 alternate; }
[data-watching] .status-bars i:nth-child(2n) { animation-delay: -.7s; }
[data-watching] .status-bars i:nth-child(3) { animation-delay: -.3s; }
@keyframes levels { from { transform: scaleY(.5); } to { transform: scaleY(1.15); } }
.pill {
  display: inline-block;
  max-width: 13rem;
  margin: 0;
  padding: .28rem .56rem;
  border-radius: .48rem;
  background: #e9edff;
  color: #293d93;
  font-size: .79rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.pill[data-state="terminado"] { background: #dff3e8; color: #22543d; }
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .65rem; }
.download-link { display: flex; align-items: center; gap: .7rem; padding: .8rem; border: 1px solid var(--line); border-radius: .75rem; background: #f8f9ff; color: var(--ink); font-size: .9rem; font-weight: 700; text-decoration: none; }
.download-link:hover { background: #ebefff; color: var(--accent); }
.download-link::before { content: attr(data-format); border-radius: .4rem; padding: .46rem; color: var(--accent); background: #e4e8ff; font: 750 .76rem/1.2 "Courier New", monospace; }
.download-link::after { content: "↓"; margin-left: auto; color: var(--accent); font-size: 1.35rem; line-height: 1; }
.reference { margin: 1.5rem 0 0; padding-top: .85rem; border-top: 1px solid var(--line); font-size: .83rem; overflow-wrap: anywhere; }
.reference code { display: block; }

@media (max-width: 60rem) {
  .desktop-break { display: none; }
  .login-panel { padding-inline: clamp(1.3rem, 3vw, 2.1rem); }
  .studio { padding-inline: clamp(1.3rem, 3vw, 2.1rem); }
  .studio-formats { left: clamp(1.3rem, 3vw, 2.1rem); }
}
@media (max-width: 47rem) {
  .login-layout, .dashboard { grid-template-columns: minmax(0, 1fr); }
  .studio { min-height: 19rem; background-position: center, center 55%; }
  .studio-wave { bottom: 2.9rem; height: 5.7rem; }
  .workspace-intro { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 30rem) {
  .identity span { display: none; }
  .jobs li { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .login-inner h1 { font-size: clamp(2.05rem, 11vw, 3.15rem); }
}
@media (prefers-reduced-motion: reduce) {
  [data-watching] .status-bars i { animation: none; }
}
