@font-face {
  font-family: Vyking;
  src: url('/brand/regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Vyking;
  src: url('/brand/semibold.woff2') format('woff2');
  font-weight: 600 800;
  font-display: swap;
}
:root {
  font: 16px/1.5 Vyking,Arial,sans-serif;
  color: #0e131b;
  background: #f9fafb;
  --ink: #0e131b;
  --slate: #313d4f;
  --muted: #546170;
  --line: #d8dde3;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none!important;
}
body,
figure,
h1,
h2,
p {
  margin: 0;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .55rem .95rem;
  cursor: pointer;
  font-weight: 600;
}
button:hover {
  background: #edf0f3;
  border-color: #a6afba;
}
button:disabled {
  opacity: .55;
  cursor: default;
}
.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.primary:hover {
  background: var(--slate);
  border-color: var(--slate);
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #427bb4;
  outline-offset: 3px;
}
input,
select {
  background: white;
  border: 1px solid #acb5bf;
  border-radius: 7px;
  padding: .65rem .8rem;
  max-width: 100%;
  min-width: 0;
}
label {
  display: grid;
  gap: .35rem;
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: 1.05rem;
}
label input,
label select {
  width: 100%;
  font-weight: 400;
}
h1,
h2 {
  letter-spacing: -.045em;
  line-height: 1.1;
}
h1 {
  font-size: clamp(2.4rem,4vw,3.8rem);
}
h2 {
  font-size: 1.45rem;
}
#login {
  min-height: 100vh;
  background: white;
}
.login-head,
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  min-height: 4.7rem;
  padding: .8rem clamp(1.25rem,5vw,5rem);
}
.login-head img {
  width: 110px;
}
.login-head span,
header span {
  font-weight: 600;
}
.login-layout {
  max-width: 88rem;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  align-items: stretch;
  padding: clamp(1rem,4vw,4rem);
  gap: clamp(2rem,7vw,7rem);
  min-height: min(46rem,calc(100vh - 5rem));
}
.login-form {
  align-self: center;
  max-width: 24rem;
  width: 100%;
  margin: auto;
}
.login-form > p {
  color: var(--muted);
  margin: 1rem 0 2rem;
}
.login-form .primary {
  width: 100%;
  margin-top: .4rem;
}
.product {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f7f7f7;
  border-radius: 16px;
}
.product img {
  width: 82%;
  position: relative;
}
#console {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 15rem minmax(0,1fr);
}
aside {
  background: var(--ink);
  color: white;
  padding: 2rem 1rem;
}
.sidebar-logo {
  width: 8rem;
  margin: .15rem 1rem 2.7rem;
  filter: brightness(0) invert(1);
}
nav {
  display: grid;
  gap: .35rem;
}
nav button {
  display: flex;
  align-items: center;
  gap: .8rem;
  text-align: left;
  background: transparent;
  border: 0;
  color: #d0d5df;
  padding: .8rem .95rem;
}
nav button:hover,
nav [aria-current=page] {
  background: var(--slate);
  color: white;
}
.icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}
.workspace {
  min-width: 0;
}
header {
  background: white;
  padding-inline: clamp(1rem,4vw,4rem);
}
header button {
  font-size: .9rem;
}
#view,
#status {
  max-width: 105rem;
  margin: auto;
  padding: clamp(1.25rem,4vw,4rem);
}
#status {
  padding-block: 0 1rem;
}
#status:empty,
#login-status:empty,
#feedback:empty {
  display: none;
}
.heading,
.tools,
.list-title,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.heading {
  margin-bottom: 2rem;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
  font-size: .96rem;
  color: var(--muted);
}
.metric b {
  font-size: clamp(2rem,4vw,3.4rem);
  font-weight: 600;
  letter-spacing: -.06em;
  line-height: 1;
  color: var(--ink);
}
.metric:first-child {
  background: var(--slate);
  border-color: var(--slate);
  color: #e0e5ec;
}
.metric:first-child b {
  color: white;
}
.list-title {
  margin-bottom: 1rem;
}
.tools {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.tools input {
  width: min(24rem,100%);
  flex: 1 1 13rem;
  max-width: 24rem;
}
.tools select {
  width: auto;
  max-width: 100%;
}
.count {
  margin-left: auto;
  color: var(--muted);
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
}
.panel {
  max-width: 100%;
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th,
td {
  padding: .95rem 1rem;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
th {
  background: #f1f3f5;
  color: #465363;
  font-size: .83rem;
  font-weight: 600;
}
td {
  font-size: .95rem;
}
td:first-child {
  font-weight: 600;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #f9fafb;
}
td button {
  font-size: .85rem;
  padding: .33rem .65rem;
  margin: .15rem .2rem .15rem 0;
}
td:last-child:has(button) {
  text-align: right;
}
.empty {
  padding: 2rem;
  color: var(--muted);
}
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  background: #eceef1;
  color: #4e5864;
  font-size: .82rem;
  padding: .22rem .63rem;
  font-weight: 600;
}
.pill.on {
  background: #e5f1eb;
  color: #236747;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.8rem;
  width: min(94vw,30rem);
  max-height: 90vh;
  color: var(--ink);
}
dialog::backdrop {
  background: #0e131b88;
}
dialog h2 {
  margin-bottom: 1.4rem;
}
footer {
  justify-content: flex-end;
  margin-top: 1.5rem;
}
.hint {
  color: var(--muted);
  margin-bottom: 1rem;
}
code {
  display: block;
  overflow-wrap: anywhere;
  user-select: all;
  padding: 1rem;
  background: #edf0f3;
  border-radius: 8px;
  margin: .8rem 0;
}
#feedback,
#login-status,
#status {
  color: #5d4850;
  overflow-wrap: anywhere;
}
progress {
  width: 100%;
  accent-color: var(--slate);
}
@media (max-width:980px) {
  #console {
    grid-template-columns: 12rem minmax(0,1fr);
  }
  th,
  td {
    padding: .75rem;
  }
  .metrics {
    gap: .65rem;
  }
}
@media (max-width:760px) {
  #console {
    display: block;
  }
  aside {
    padding: 1rem;
  }
  .sidebar-logo {
    width: 6.5rem;
    margin: 0 0 .65rem;
  }
  nav {
    display: flex;
    gap: .2rem;
    flex-wrap: wrap;
  }
  nav button {
    font-size: .9rem;
    padding: .5rem .65rem;
  }
  nav .icon {
    display: none;
  }
  header {
    min-height: 3.4rem;
  }
  .heading {
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
  }
  .metrics {
    gap: .4rem;
    margin-bottom: 1.5rem;
  }
  .metric {
    padding: .7rem;
    gap: .7rem;
    font-size: .83rem;
  }
  .count {
    margin-left: 0;
  }
  .login-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 2.5rem 1.25rem;
    gap: 2rem;
  }
  .product {
    height: 13rem;
    max-width: 24rem;
    width: 100%;
    justify-self: center;
  }
  .product img {
    width: auto;
    max-width: 72%;
    max-height: 80%;
  }
  .panel table,
  .panel tbody,
  .panel tr,
  .panel td {
    display: block;
  }
  .panel thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .panel td,
  .panel tr:last-child td {
    border: 0;
  }
  .panel tr {
    padding: .65rem 1rem;
    border-bottom: 1px solid var(--line);
  }
  .panel tr:last-child {
    border: 0;
  }
  .panel td {
    display: flex;
    justify-content: space-between;
    text-align: right;
    align-items: baseline;
    gap: 1rem;
    padding: .25rem 0;
  }
  .panel td:before {
    content: attr(data-label);
    font-size: .82rem;
    color: var(--muted);
    font-weight: 400;
    text-align: left;
    flex: none;
  }
  .panel td:last-child:has(button) {
    display: block;
  }
  .panel td:first-child {
    font-size: 1.02rem;
  }
}
.footnote {
  color: var(--muted);
  font-size: .84rem;
  margin-top: .7rem;
}

@media (max-width: 430px) {
  nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  nav .icon { display: inline-block; }
}
.tools .feed-picker {display:flex;align-items:center;gap:.5rem;margin:0;font-size:.88rem}

#preview-dialog {
  padding:0; overflow:auto;
  width:min(64rem, 94vw); max-width:none; max-height:96dvh;
}
#preview-dialog.portrait {
  width:min(28rem, 94vw, calc((96dvh - 5rem) * .5625));
}
.preview-bar {display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.65rem .9rem}
.preview-bar h2 {margin:0;font-size:1.15rem}
#preview-sku {font-size:.85rem;color:var(--muted);overflow-wrap:anywhere}
#preview-stage {position:relative;display:grid;place-items:center;aspect-ratio:16/10;max-height:calc(96dvh - 5rem);background:#eff1f3}
.portrait #preview-stage {aspect-ratio:9/16;background:#0e131b;color:white}
#preview-stage p {padding:1rem}
#preview-stage iframe {position:absolute;inset:0;width:100%;height:100%;border:0}

.file-link { text-decoration: underline; text-underline-offset: .18em; }
#package-files { padding: 1rem; max-height: 60vh; overflow: auto; overflow-wrap: anywhere; }
#package-files summary { cursor: pointer; font-weight: 600; padding: .5rem 0; }
#package-files li { margin-block: .35rem; }
