:root {
  --ink: #0f172a;
  --muted: #475569;
  --panel: #ffffff;
  --line: #d7dee8;
  --accent: #0f9f6e;
  --accent-strong: #057a4f;
  --accent-soft: #e8f8f0;
  --code: #07111f;
  --code-2: #0b1728;
  --page: #f6f8fb;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(15, 159, 110, 0.08), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, var(--page) 42%, #f8fafc 100%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.app-shell {
  width: min(1540px, calc(100vw - 56px));
  margin: 18px auto 26px;
}

.site-header {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  display: inline-block;
}

.brand-mark span {
  position: absolute;
  width: 28px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(135deg, #11a878, #057a4f);
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.22);
  transform: rotate(30deg) skewX(-28deg);
}

.brand-mark span:nth-child(1) {
  top: 0;
  left: 3px;
}

.brand-mark span:nth-child(2) {
  top: 8px;
  left: 3px;
  background: #0f172a;
}

.brand-mark span:nth-child(3) {
  top: 16px;
  left: 3px;
  background: linear-gradient(135deg, #10b981, #0b8159);
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.info-widget {
  position: relative;
  flex: 0 0 auto;
}

.info-button {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  appearance: none;
  cursor: pointer;
}

.info-button svg {
  width: 17px;
  height: 17px;
}

.info-button:hover,
.info-button:focus {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.info-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10;
  width: min(380px, calc(100vw - 32px));
  padding: 14px 15px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.45;
}

.hero {
  padding: 18px 0 24px;
  text-align: center;
}

.hero-copy {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 3.8vw, 50px);
  line-height: 1.08;
  font-weight: 700;
}

.hero-line {
  display: block;
  white-space: nowrap;
}

.hero-line-accent {
  color: var(--accent-strong);
}

.tagline {
  max-width: none;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.35;
  white-space: nowrap;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.chooser,
.file-panel {
  min-width: 0;
}

.chooser {
  align-self: start;
}

.chooser,
.editor-shell,
.command-bar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chooser-heading {
  min-height: 58px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #0a1424, #101c2e);
  color: #f8fafc;
}

.chooser-heading svg {
  width: 20px;
  height: 20px;
  color: #c7f9df;
}

.chooser h2 {
  margin: 0;
  color: inherit;
  font-size: 19px;
  line-height: 1;
  font-weight: 800;
}

.choice-group {
  padding: 20px 22px 14px;
  border-top: 1px solid #e7ecf2;
}

.choice-group:first-of-type {
  border-top: 0;
}

.choice-group h3 {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #172033;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
}

.choice-group h3 svg {
  width: 16px;
  height: 16px;
  color: #0f172a;
}

.choice-button,
.file-tab,
.icon-button {
  appearance: none;
  border: 0;
  cursor: pointer;
}

.choice-button {
  min-height: 40px;
  min-width: 116px;
  margin: 0 6px 8px 0;
  padding: 0 16px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.choice-button:hover,
.choice-button:focus {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.choice-button.is-active {
  border-color: #0c8b60;
  background: linear-gradient(135deg, #13a874, #078053);
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(15, 159, 110, 0.22);
}

.tls-fields {
  margin-top: 8px;
  display: grid;
  gap: 10px;
}

.tls-fields[hidden] {
  display: none;
}

.tls-fields label {
  margin: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.tls-fields input {
  height: 40px;
  margin: 5px 0 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
  color: #18212f;
  font-size: 14px;
}

.tls-fields input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 159, 110, 0.16);
}

.file-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.command-bar {
  padding: 18px 24px;
  background: linear-gradient(135deg, #07111f, #0d1c31);
  color: #d1fae5;
}

.command-bar label {
  display: block;
  margin: 0 0 8px;
  color: #10b981;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
}

.command-entry {
  display: flex;
  align-items: center;
  gap: 14px;
}

.command-entry code {
  flex: 1;
  min-height: 44px;
  padding: 12px 14px;
  overflow-x: auto;
  white-space: nowrap;
  border: 1px solid #334155;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.7);
  color: #c7f9df;
  font: 15px/1.25 "Courier New", monospace;
}

.icon-button {
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 6px;
  background: linear-gradient(135deg, #10b981, #078053);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
}

.icon-button:hover,
.icon-button:focus {
  background: #12a878;
}

.icon-button svg,
.action-button svg {
  width: 18px;
  height: 18px;
}

.editor-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: min(66vh, 720px);
}

.editor-heading {
  min-height: 64px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.editor-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}

.file-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.action-button {
  min-height: 38px;
  margin: 0;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

.action-button:first-child {
  border-color: rgba(15, 159, 110, 0.45);
  color: var(--accent-strong);
}

.action-button:hover,
.action-button:focus {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.editor-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  background: var(--code);
}

.file-tabs {
  min-height: 0;
  padding: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  border-right: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, #07111f, #0b1728);
}

.file-tab {
  min-height: 44px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 4px solid transparent;
  background: transparent;
  color: #e2e8f0;
  font: 700 15px/1.2 Arial, Helvetica, sans-serif;
  text-align: left;
  white-space: nowrap;
}

.file-tab svg {
  width: 18px;
  height: 18px;
}

.file-tab.is-active {
  border-left-color: #10b981;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.22), rgba(16, 185, 129, 0.04));
  color: #8df5c6;
}

.code-window {
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 24px 28px;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px) 0 0 / 40px 100%,
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 28%),
    var(--code);
  color: #e2e8f0;
  border-radius: 0;
  font: 14px/1.55 "Courier New", monospace;
}

.code-window code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .editor-shell {
    min-height: 620px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 28px, 760px);
    margin: 16px auto 24px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .info-widget {
    align-self: stretch;
  }

  .info-button {
    width: 100%;
  }

  .info-popover {
    left: 0;
    right: auto;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero-line {
    white-space: normal;
  }

  .tagline {
    font-size: 16px;
    white-space: normal;
  }

  .choice-button {
    width: 100%;
    margin-right: 0;
  }

  .command-entry,
  .editor-heading,
  .file-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .editor-body {
    grid-template-columns: 1fr;
  }

  .file-tabs {
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  }

  .action-button,
  .icon-button {
    width: 100%;
  }
}
