@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/v4/nunito-latin.woff2") format("woff2");
}

:root {
  --body-bg: #f8fafc;
  --text: #212529;
  --muted: #6c757d;
  --border: #dee2e6;
  --blue: #3490dc;
  --blue-dark: #227dc7;
  --pink: #f66d9b;
  --danger: #e3342f;
  --white: #fff;
  font-family: "Nunito", sans-serif;
  color: var(--text);
  background: var(--body-bg);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--body-bg); }
body { min-height: 100vh; margin: 0; color: var(--text); background: var(--body-bg); font-size: .9rem; font-weight: 400; line-height: 1.6; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.topbar { min-height: 58px; border-bottom: 1px solid rgba(0,0,0,.05); background: var(--white); box-shadow: 0 .125rem .25rem rgba(0,0,0,.075); }
.navbar-inner { width: min(1440px, calc(100% - 48px)); min-height: 58px; margin: 0 auto; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand img { display: block; width: auto; height: 25px; }
.main-nav { display: flex; align-self: stretch; gap: 2px; }
.main-nav a { display: flex; align-items: center; padding: 0 15px; border-bottom: 2px solid transparent; color: rgba(0,0,0,.5); font-size: .95rem; }
.main-nav a:hover { color: rgba(0,0,0,.75); text-decoration: none; }
.main-nav a[aria-current="page"] { border-bottom-color: var(--pink); color: rgba(0,0,0,.9); }
.account { margin-left: auto; display: flex; align-items: center; gap: 15px; color: rgba(0,0,0,.5); }
.account form { margin: 0; }
.sign-out { border: 0; padding: 4px 0; color: rgba(0,0,0,.5); background: transparent; }
.sign-out:hover { color: rgba(0,0,0,.8); text-decoration: underline; }

.page-shell { width: min(1440px, calc(100% - 48px)); margin: 0 auto; padding: 30px 0 60px; }
.workspace { display: grid; grid-template-columns: minmax(360px, .92fr) minmax(520px, 1.08fr); gap: 34px; align-items: start; }
.form-column { display: grid; gap: 24px; }
.page-title { margin: 0; text-align: center; font-size: 2rem; font-weight: 400; line-height: 1.2; }
.generator-panel { padding: 24px; border: 1px solid var(--border); border-radius: .25rem; background: var(--white); }
.generator-panel h2 { margin: 0 0 12px; font-size: 1.6rem; font-weight: 400; line-height: 1.2; }
.panel-note { margin: 0 0 18px; }
.generator-form, .stack-form { display: grid; gap: 15px; }
.generator-form label, .stack-form label { display: grid; gap: 7px; font-size: .95rem; }
.generator-form label > span, .stack-form label > span { font-weight: 400; }
.generator-form small { color: var(--muted); }
.generator-form code { color: var(--pink); }
input, select { width: 100%; min-height: 43px; padding: .55rem .75rem; border: 1px solid #ced4da; border-radius: .25rem; color: #495057; background: var(--white); outline: none; }
input:focus, select:focus { border-color: #a1cbef; box-shadow: 0 0 0 .2rem rgba(52,144,220,.25); }
select:disabled { color: #8b949c; background: #e9ecef; }
.search-select-native {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}
.search-select { position: relative; min-width: 0; }
.search-select-trigger {
  position: relative;
  width: 100%;
  min-height: 43px;
  padding: .55rem 2.2rem .55rem .75rem;
  overflow: hidden;
  border: 1px solid #ced4da;
  border-radius: .25rem;
  color: #495057;
  background: var(--white);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-select-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: .85rem;
  width: .5rem;
  height: .5rem;
  border-right: 2px solid #6c757d;
  border-bottom: 2px solid #6c757d;
  transform: translateY(-70%) rotate(45deg);
}
.search-select-trigger:focus {
  border-color: #a1cbef;
  box-shadow: 0 0 0 .2rem rgba(52,144,220,.25);
  outline: none;
}
.search-select-trigger:disabled {
  cursor: default;
  color: #8b949c;
  background: #e9ecef;
}
.search-select-trigger.is-placeholder { color: #6c757d; }
.search-select-panel {
  position: absolute;
  z-index: 50;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  overflow: hidden;
  border: 1px solid #ced4da;
  border-radius: .25rem;
  background: var(--white);
  box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
}
.search-select-input {
  display: block;
  width: calc(100% - 16px);
  min-height: 39px;
  margin: 8px;
}
.search-select-options {
  max-height: 260px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}
.search-select-option {
  display: block;
  width: 100%;
  border: 0;
  padding: .6rem .75rem;
  color: #495057;
  background: var(--white);
  text-align: left;
}
.search-select-option:hover,
.search-select-option.is-active {
  color: var(--white);
  background: var(--blue);
}
.search-select-option[aria-selected="true"] { font-weight: 700; }
.search-select-empty { margin: 0; padding: .75rem; color: var(--muted); }
.button { justify-self: start; border: 1px solid transparent; border-radius: .25rem; padding: .55rem .9rem; font-size: .9rem; line-height: 1.6; }
.button-primary { border-color: var(--blue); color: var(--white); background: var(--blue); }
.button-primary:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.button:disabled { cursor: wait; opacity: .65; }
.form-status { min-height: 1.2em; margin: -3px 0 -4px; color: var(--danger); font-size: .85rem; }

.output-column { min-width: 0; padding-top: 4px; }
.empty-output { padding: 55px 20px; border: 1px dashed #ced4da; border-radius: .25rem; text-align: center; color: var(--muted); background: rgba(255,255,255,.55); }
.empty-output h2 { margin: 0 0 6px; color: var(--text); font-size: 1.75rem; font-weight: 400; }
.empty-output p { margin: 0; }
.output-block { margin: 0 0 28px; }
.output-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 6px; }
.output-heading h2 { margin: 0; font-size: 1.75rem; font-weight: 400; line-height: 1.25; }
.output-heading h2 small { color: var(--muted); font-size: .9rem; }
.output-heading button { flex: 0 0 auto; border: 1px solid var(--blue); border-radius: .25rem; padding: .35rem .65rem; color: var(--white); background: var(--blue); }
.output-heading button:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.generated-code { display: block; padding: 0; color: var(--pink); background: transparent; font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: .88rem; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.output-block h3 { margin: 22px 0 7px; font-size: 1.45rem; font-weight: 400; }
.link-preview { font-size: 1rem; }
.preview-frame { width: 100%; overflow: hidden; border: 1px solid var(--border); border-radius: .25rem; background: var(--white); }
.preview-frame iframe { display: block; width: 100%; border: 0; background: var(--body-bg); }
.preview-wide iframe { height: 260px; }
.preview-mpu { width: min(360px, 100%); }
.preview-mpu iframe { height: 620px; }

.login-shell { width: min(620px, calc(100% - 32px)); margin: 0 auto; padding: 60px 0; }
.login-card { padding: 24px; border: 1px solid var(--border); border-radius: .25rem; background: var(--white); }
.login-card h1 { margin: -24px -24px 24px; padding: 12px 24px; border-bottom: 1px solid rgba(0,0,0,.125); font-size: 1rem; font-weight: 400; background: rgba(0,0,0,.03); }
.stack-form { max-width: 450px; margin: 0 auto; }
.alert { margin-bottom: 18px; padding: .75rem 1rem; border: 1px solid #f5c6cb; border-radius: .25rem; color: #721c24; background: #f8d7da; }

@media (max-width: 920px) {
  .navbar-inner { width: min(100% - 28px, 1440px); flex-wrap: wrap; gap: 10px 18px; padding: 10px 0; }
  .main-nav { order: 3; width: 100%; min-height: 40px; overflow-x: auto; }
  .main-nav a { padding: 0 11px; }
  .account > span { display: none; }
  .page-shell { width: min(100% - 28px, 1440px); padding-top: 24px; }
  .workspace { grid-template-columns: 1fr; }
  .output-column { padding-top: 0; }
}

@media (max-width: 520px) {
  .brand img { height: 21px; }
  .generator-panel { padding: 18px; }
  .output-heading { align-items: flex-start; }
  .output-heading h2 { font-size: 1.45rem; }
  .output-heading button { font-size: .78rem; }
}
