@font-face {
  font-family: Inter;
  src: url('/static/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: optional;
}

:root {
  color-scheme: light dark;
  --background: light-dark(#f9fbf9, #181818);
  --foreground: light-dark(#2f2f2f, #d1d1d1);
  --muted: light-dark(#5d5d5d, #a3a3a3);
  --surface: light-dark(#fcfdfc, #232323);
  --divider: light-dark(#dadada, #2f2f2f);
  --input-border: light-dark(#858585, #858585);
  --hover: light-dark(rgb(24 24 24 / 4%), rgb(255 255 255 / 6%));
  --accent: light-dark(#087238, #7fee64);
  --primary: light-dark(#09af58, #7fee64);
  --primary-text: #181818;
  --primary-hover: light-dark(#079b4d, #6ed654);
  --success: light-dark(#1a6d42, #6ac345);
  --success-surface: light-dark(#d8f9d9, #222d20);
  --error: light-dark(#b72121, #f87171);
  --error-surface: light-dark(#fbe5e5, #3a2525);
  --selection: light-dark(#d8efd8, #365335);
  --section-space: 32px;
  --group-space: 16px;
  --label-space: 8px;
  font-family: Inter, Arial, sans-serif;
  font-size: 100%;
  font-feature-settings: 'cv11' 1;
  color: var(--foreground);
  background: var(--background);
  accent-color: var(--accent);
  caret-color: var(--accent);
  scrollbar-color: var(--input-border) var(--background);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
::selection { color: var(--foreground); background: var(--selection); }
body { margin: 0; font-size: .8125rem; line-height: 1.5; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
button, input, textarea { font: inherit; }
.button { text-decoration: none; }
button, a, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

header {
  min-height: 56px;
  padding: 8px 24px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; text-decoration: none; font-size: .9375rem; font-weight: 500; }
.brand-context { color: var(--muted); font-size: .8125rem; font-weight: 400; }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.skip-link { position: absolute; left: 16px; top: -80px; background: var(--surface); padding: 8px 12px; z-index: 2; }
.skip-link:focus { top: 8px; }

main { width: calc(100% - 40px); margin: 64px auto 0; }
.box { max-width: 640px; margin-bottom: var(--section-space); }
.login { max-width: 380px; margin-top: 96px; }
h1 { margin: 0; font-size: 1.5rem; font-weight: 500; line-height: 1.3; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; }
.login h1 { margin-bottom: var(--section-space); }
.title-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.state { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; color: var(--muted); }
.state::before { content: ''; width: 8px; height: 8px; border: 1.5px solid currentColor; border-radius: 50%; }
.state[data-state='running']::before { background: currentColor; }
.state[data-state='loading']::before { border-style: dashed; }
.state[data-state='unknown']::before { border-radius: 1px; background: currentColor; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.state[data-state='running'] { color: var(--success); }
.state[data-state='unknown'] { color: var(--error); }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 34px;
  border: 1px solid var(--input-border);
  border-radius: 4px;
  padding: 6px 12px;
  font-weight: 500;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
button:hover, .button:hover { background: var(--hover); }
button:active, .button:active { border-color: var(--foreground); }
button:disabled { opacity: .6; cursor: wait; }
.primary { background: var(--primary); border-color: transparent; color: var(--primary-text); }
.primary:hover { color: var(--primary-text); background: var(--primary-hover); }
.primary:active { border-color: var(--primary-text); }
.primary:disabled { background: var(--surface); border-color: var(--divider); color: var(--muted); opacity: 1; cursor: default; }
.primary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.quiet { border-color: transparent; color: var(--muted); padding: 6px 8px; }
.danger { color: var(--error); border-color: var(--error); }
.danger:hover { background: var(--error-surface); }
.danger:active { border-color: var(--error); }
.full { width: 100%; justify-content: space-between; }
.text-button { display: inline; padding: 0; min-height: auto; border: 0; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
label { display: block; font-weight: 500; margin-bottom: 8px; }
input:not([type='checkbox']), textarea {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--input-border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--foreground);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus-visible, textarea:focus-visible { outline-offset: 2px; }

.environment-info { margin: 0; padding: 0 0 24px; display: grid; gap: var(--group-space); }
.environment-info > div { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: var(--group-space); }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
dd a { text-decoration-color: var(--input-border); }
details { border-bottom: 1px solid var(--divider); }
summary { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; cursor: pointer; font-weight: 500; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { flex-shrink: 0; content: ''; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); margin-right: 4px; }
details[open] > summary::after { transform: rotate(225deg); }
summary:hover { color: var(--accent); }
.confirmation { display: flex; gap: 8px; align-items: center; font-weight: 400; margin-bottom: 16px; cursor: pointer; min-height: 24px; }
.confirmation input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
.save-note { margin-top: 16px; color: var(--muted); font-size: .75rem; }
.notice { padding: 12px 14px; border-radius: 6px; margin-bottom: 24px; }
.notice.error { color: var(--error); background: var(--error-surface); }
.notice.success, .notice.info { background: transparent; padding: 0; margin-bottom: var(--section-space); }
.notice.success { color: var(--success); }
.notice.info { color: var(--muted); }
.action-progress { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 40px); padding: 12px 16px; border: 1px solid var(--divider); border-radius: 6px; background: var(--surface); box-shadow: 0 4px 16px rgb(0 0 0 / 8%); }
noscript p { margin-block: 20px; color: var(--muted); }

@media (max-width: 560px) {
  body { font-size: 1rem; }
  header { padding-inline: 20px; }
  .task-note, .save-note { font-size: .875rem; }
  .header-actions { gap: 8px; }
  main { margin-top: 32px; }
  .login { margin-top: 64px; }
  .environment-info > div { grid-template-columns: 100px minmax(0, 1fr); }
}

@media (pointer: coarse), (max-width: 560px) {
  button, .button, .confirmation { min-height: 44px; }
  input:not([type='checkbox']), textarea { min-height: 44px; font-size: 1rem; }
  .text-button { padding-inline: 4px; }
}

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

.task-area { padding: var(--section-space) 0; border-bottom: 1px solid var(--divider); }
.setup-panel > p:not(.task-note) { color: var(--muted); max-width: 64ch; margin-bottom: 24px; }
.setup-panel + .setup-panel:not([hidden]) { margin-top: var(--section-space); }
.setup-panel[hidden] + .setup-panel { margin-top: 0; }
textarea { resize: vertical; height: auto; min-height: 88px; line-height: 1.65; font-family: ui-monospace, monospace; font-size: .75rem; }
form > textarea { display: block; margin-bottom: 24px; }
.task-note { color: var(--muted); font-size: .75rem; margin-top: var(--group-space); max-width: 64ch; }
.box > .notice { margin-top: 24px; margin-bottom: 0; }
.loading-placeholder { min-height: 13rem; display: flex; flex-direction: column; gap: var(--group-space); }
.loading-placeholder span { display: block; height: .75rem; max-width: 100%; background: var(--divider); border-radius: 2px; }
.loading-placeholder span:nth-child(1) { width: 12rem; height: 1.25rem; }
.loading-placeholder span:nth-child(2) { width: 24rem; }
.loading-placeholder span:nth-child(3) { width: 8rem; height: 2.5rem; margin-top: var(--group-space); }
@media (max-width: 560px) {
  .setup-panel form > .primary { width: 100%; }
}
@media (pointer: coarse), (max-width: 560px) {
  textarea { font-size: 1rem; }
}
@media (scripting: none) {
  #task-area, #state { display: none; }
}

button, .button, .notice, h1 { overflow-wrap: anywhere; }
.header-actions, .brand { min-width: 0; max-width: 100%; }

.destination-context { display: flex; flex-wrap: wrap; gap: 16px 40px; margin: 24px 0; }
.destination-context dt { color: var(--muted); font-size: .75rem; }
.destination-context dd { margin: 4px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.destination-context > div { min-width: 0; max-width: 100%; }

/* A connecting branch leads from the launcher to its Box. */
.launcher { max-width: 640px; margin-bottom: 48px; }
.entity-heading { display: flex; align-items: center; gap: 12px; }
.entity-icon { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
h1 .entity-icon { width: 26px; height: 26px; }
.hierarchy-branch { margin: 24px 0 0 12px; padding: 8px 0 0 28px; position: relative; }
.hierarchy-branch::before { content: ''; position: absolute; left: 0; top: -12px; width: 28px; height: 65px; border-left: 1px solid var(--input-border); border-bottom: 1px solid var(--input-border); border-bottom-left-radius: 8px; }
.box-surface { padding: 24px; border: 1px solid var(--divider); border-radius: 8px; background: light-dark(#f0f5ef, #20261f); }
.box-surface h2, .box-assembly h2 { margin: 0; font-size: 1.125rem; font-weight: 500; line-height: 1.4; }
.box-surface h2 .entity-icon { color: var(--accent); }
.box-surface .destination-context { margin: 20px 0; }
.editor-preview { margin: 0 0 24px; padding: 16px 0; border-block: 1px solid var(--divider); font-weight: 500; }
.box-surface .full { justify-content: center; }
.box-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--label-space) var(--group-space); }
.assembly-type { color: var(--muted); }
.box-assembly { border: 1px solid var(--divider); border-radius: 6px; background: var(--surface); }
.gateway-services, .editor-host { padding: 24px; }
.gateway-services { border-bottom: 1px solid var(--divider); }
.gateway-services .entity-icon { color: var(--muted); }
.component-description { color: var(--muted); margin-top: var(--label-space); max-width: 65ch; }
.box-context { margin-top: var(--group-space); }
.box-context > details:last-child { border-bottom: 0; }
.disclosure-note { margin-bottom: 24px; color: var(--muted); max-width: 65ch; }
.editor-host h2 .entity-icon { color: var(--accent); }
.editor-host .task-area { border-bottom: 0; padding-bottom: 0; }
.editor-host .notice { margin: 24px 0 0; }
.editor-host #box-details { margin-top: 24px; border-top: 1px solid var(--divider); }
.editor-host > details:last-child { border-bottom: 0; }
.editor-host > details:last-child:not([open]) > summary { padding-bottom: 0; }
@media (max-width: 560px) {
  .hierarchy-branch { padding-left: 16px; }
  .hierarchy-branch::before { width: 16px; height: 61px; }
  .box-surface, .gateway-services, .editor-host { padding: 20px; }
  .box .environment-info > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

.administration-actions { padding-bottom: 4px; }
.administration-actions > section { padding: 4px 0 24px; }
.administration-actions > section:not([hidden]) ~ section:not([hidden]) { border-top: 1px solid var(--divider); padding-top: 24px; }
.administration-actions > section:last-child { padding-bottom: 0; }
