:root {
  color: #e7f7ff;
  background: #07090b;
  font-family:
    "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-synthesis: none;
  text-rendering: geometricPrecision;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(#111820 1px, transparent 1px),
    linear-gradient(90deg, #111820 1px, transparent 1px),
    #07090b;
  background-size: 28px 28px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  min-height: 42px;
  border: 1px solid #e7f7ff;
  border-radius: 0;
  background: #e7f7ff;
  color: #07090b;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0 16px;
  text-transform: uppercase;
}

button:hover:not(:disabled) {
  background: #9cff00;
  border-color: #9cff00;
}

button:disabled {
  background: #22282f;
  border-color: #3b4652;
  color: #697684;
  cursor: not-allowed;
}

.app-shell {
  min-height: 100vh;
  padding: 14px;
}

.converter-panel {
  min-height: calc(100vh - 28px);
  border: 1px solid #e7f7ff;
  background: rgb(7 9 11 / 94%);
  box-shadow:
    8px 8px 0 #9cff00,
    -1px -1px 0 #00d5ff;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.top-strip,
.command-row,
.output-toolbar {
  border-bottom: 1px solid #2f3b46;
  display: grid;
}

.top-strip {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

h1 {
  color: #e7f7ff;
  font-size: clamp(1.35rem, 4vw, 2.35rem);
  font-weight: 950;
  line-height: 1;
  margin: 0;
  padding: 12px 14px;
  text-transform: uppercase;
}

.version-pill {
  align-items: center;
  align-self: stretch;
  border-left: 1px solid #2f3b46;
  color: #9cff00;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 900;
  justify-content: center;
  min-width: 118px;
  padding: 0 12px;
  text-transform: uppercase;
  white-space: nowrap;
}

.command-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

input,
textarea {
  border: 0;
  border-radius: 0;
  color: #e7f7ff;
  outline: none;
}

input {
  min-height: 50px;
  background: #0d1217;
  border-right: 1px solid #2f3b46;
  caret-color: #9cff00;
  font-size: 0.95rem;
  padding: 0 14px;
  width: 100%;
}

input::placeholder,
textarea::placeholder {
  color: #697684;
}

input:focus,
textarea:focus {
  box-shadow: inset 0 0 0 2px #00d5ff;
}

.output-toolbar {
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 42px;
}

.telemetry {
  align-items: center;
  display: grid;
  gap: 0;
  grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr);
  min-width: 0;
}

.status,
.output-meta {
  align-content: center;
  color: #e7f7ff;
  display: grid;
  font-size: 0.76rem;
  font-weight: 900;
  min-height: 42px;
  overflow: hidden;
  padding: 0 12px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.status {
  border-right: 1px solid #2f3b46;
  color: #00d5ff;
}

.status[data-type="success"] {
  color: #9cff00;
}

.status[data-type="error"] {
  color: #ff3366;
}

.output-meta {
  color: #8997a4;
  margin: 0;
}

.button-group {
  display: flex;
  height: 42px;
}

.button-group button {
  border-bottom: 0;
  border-right: 0;
  border-top: 0;
  min-width: 112px;
}

textarea {
  background:
    repeating-linear-gradient(
      180deg,
      rgb(255 255 255 / 2%) 0,
      rgb(255 255 255 / 2%) 1px,
      transparent 1px,
      transparent 28px
    ),
    #090c10;
  color: #cfe7ef;
  font-size: 0.86rem;
  line-height: 1.55;
  min-height: 0;
  padding: 14px;
  resize: none;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  width: 100%;
}

@media (max-width: 720px) {
  .app-shell {
    padding: 8px;
  }

  .converter-panel {
    min-height: calc(100vh - 16px);
    box-shadow:
      4px 4px 0 #9cff00,
      -1px -1px 0 #00d5ff;
  }

  .top-strip,
  .command-row,
  .output-toolbar,
  .telemetry {
    grid-template-columns: 1fr;
  }

  .version-pill,
  input,
  .status {
    border-left: 0;
    border-right: 0;
    border-top: 1px solid #2f3b46;
  }

  .button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .button-group button {
    min-width: 0;
  }
}
