/* Native CSS for a compact developer utility. One 8px radius and one green accent. */
:root {
  color-scheme: light dark;
  --background: #f7f8f7;
  --surface: #fdfefd;
  --text: #202923;
  --muted: #58645d;
  --line: #d5dcd7;
  --accent: #256346;
  --tint: #eef5f0;
  --error: #b02e29;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--background);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #151b17;
    --surface: #1a221d;
    --text: #ecf1ed;
    --muted: #b0bdb4;
    --line: #3e5044;
    --accent: #99d6b0;
    --tint: #202f25;
    --error: #ffaaa1;
  }
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
a:hover {
  color: var(--accent);
}
button,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.shell {
  width: min(1120px, calc(100% - 96px));
  margin-inline: auto;
}
.site-header {
  height: 80px;
  display: flex;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  flex-shrink: 0;
  text-decoration: none;
}
.wordmark img {
  display: block;
}
.header-caption {
  color: var(--muted);
  padding-left: 22px;
  border-left: 1px solid var(--line);
  font-size: 14px;
}
.site-header nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
}
.site-header :where(nav) a {
  text-decoration: none;
}
.intro {
  padding: 64px 0 36px;
}
.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  margin: 0 0 18px;
}
h1 {
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.1;
  margin: 0 0 22px;
}
.intro :where(h1) span {
  color: var(--accent);
}
.lead {
  max-width: 580px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 17px;
  margin: 0;
}
.type-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 0 0 35px;
}
.type-nav a {
  text-decoration: none;
  font-size: 14px;
  padding-block: 8px;
}
.type-nav span {
  font: 12px var(--mono);
  color: var(--muted);
  margin-left: 7px;
}
.converter {
  padding: 32px 0 24px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.converter-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 22px;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.025em;
  margin: 0;
  font-weight: 600;
}
.description {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 7px 0 0;
}
.example-button {
  color: var(--accent);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  min-height: 38px;
}
.example-button:hover {
  background: var(--tint);
  border-color: var(--accent);
}
.fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
  align-items: center;
}
.field {
  min-width: 0;
  align-self: stretch;
}
.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  min-height: 30px;
}
.field-heading label {
  font-size: 13px;
  font-weight: 600;
}
.field-encoded label {
  color: var(--accent);
  font-family: var(--mono);
}
.copy-button {
  font-size: 12px;
  color: var(--muted);
  border: 0;
  background: transparent;
  padding: 7px 9px;
  border-radius: 8px;
}
.copy-button:hover:not(:disabled) {
  color: var(--accent);
  background: var(--tint);
}
textarea {
  display: block;
  width: 100%;
  min-height: 98px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 18px;
  font: 15px / 1.7 var(--mono);
  letter-spacing: -0.025em;
  color: var(--text);
  background: var(--surface);
  overflow-wrap: anywhere;
}
.field-encoded textarea {
  background: var(--tint);
}
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
textarea[aria-invalid="true"] {
  border-color: var(--error);
}
.field-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin: 9px 0 0;
}
.direction {
  color: var(--muted);
  text-align: center;
  font-size: 22px;
  padding-bottom: 3px;
}
.conversion-status {
  color: var(--muted);
  font: 11px / 1.7 var(--mono);
  min-height: 19px;
  margin: 18px 0 0;
  overflow-wrap: anywhere;
}
.is-error {
  color: var(--error);
}
.format-note {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  padding: 42px 0 48px;
  margin-top: 12px;
}
.format-note h2 {
  font-size: 19px;
}
.format-note p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 12px;
  max-width: 620px;
}
.format-note a {
  font-size: 13px;
  color: var(--accent);
}
code {
  font-family: var(--mono);
  font-size: 0.9em;
}
.site-footer {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 26px;
  font-size: 12px;
  color: var(--muted);
}
.site-footer p {
  margin: 0 auto 0 0;
  line-height: 1.6;
}
.site-footer a {
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  padding: 12px;
  background: var(--surface);
}
.skip-link:focus {
  top: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.notice {
  color: var(--error);
}

@media (max-width: 767px) {
  .shell {
    width: calc(100% - 40px);
  }
  .site-header {
    height: 72px;
    gap: 16px;
  }
  .header-caption {
    padding-left: 16px;
    font-size: 12px;
  }
  .site-header nav {
    gap: 18px;
    font-size: 13px;
  }
  .intro {
    padding: 42px 0 24px;
  }
  .lead {
    font-size: 15px;
  }
  .type-nav {
    gap: 4px 22px;
    padding-bottom: 25px;
  }
  .type-nav span {
    display: none;
  }
  .converter {
    padding-top: 26px;
  }
  .converter-header {
    gap: 12px;
    margin-bottom: 16px;
  }
  h2 {
    font-size: 19px;
  }
  .description {
    font-size: 13px;
  }
  .fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .direction {
    display: none;
  }
  textarea {
    font-size: 16px;
    padding: 16px;
    min-height: 96px;
  }
  .format-note {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-block: 32px;
  }
  .site-footer {
    flex-wrap: wrap;
    gap: 16px 24px;
  }
  .site-footer p {
    flex-basis: 100%;
  }
}

@media (max-width: 380px) {
  .header-caption {
    display: none;
  }
  .example-button {
    padding-inline: 9px;
  }
}
