* {
  box-sizing: border-box;
}

html {
  background: #f6f7f9;
  color: #17202a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
}

a {
  color: #0b66d8;
}

a:hover {
  color: #084a9d;
}

.layout {
  min-height: 100vh;
}

.site-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #dfe5ec;
  display: flex;
  gap: 32px;
  justify-content: space-between;
  padding: 14px 56px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  color: #182435;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.05rem;
  font-weight: 800;
  gap: 10px;
  text-decoration: none;
}

.brand:hover {
  color: #0b66d8;
  text-decoration: none;
}

.brand img {
  height: 30px;
  width: 30px;
}

.nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.nav a {
  border-radius: 6px;
  color: #435266;
  font-size: 0.92rem;
  font-weight: 650;
  padding: 8px 10px;
  text-decoration: none;
}

.nav a:hover {
  background: #edf4ff;
  color: #0b66d8;
  text-decoration: none;
}

.active-link {
  background: #e5f0ff;
  color: #0b66d8 !important;
}

.content {
  margin: 0 auto;
  max-width: 1120px;
  padding: 44px 56px 56px;
}

.footer {
  align-items: center;
  border-top: 1px solid #dfe5ec;
  color: #5f6f83;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1120px;
  padding: 28px 56px 42px;
}

.footer p {
  margin: 4px 0 0;
}

.footer a {
  color: #0b66d8;
  font-weight: 700;
}

.eyebrow {
  color: #68778b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.lede {
  color: #4c5c70;
  font-size: 1.08rem;
  line-height: 1.65;
  margin: 0;
  max-width: 760px;
}

.home-hero,
.page-header,
.tool-header,
.seo-section,
.related-section,
.workspace-panel {
  background: #ffffff;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(18, 31, 48, 0.06);
}

.home-hero {
  align-items: center;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  padding: 54px;
}

.home-hero h1,
.page-header h1,
.tool-header h1 {
  color: #132033;
  font-size: 3.7rem;
  font-weight: 850;
  line-height: 1.04;
  margin: 0 0 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  align-items: center;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  text-decoration: none;
}

.button:hover {
  text-decoration: none;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button-primary {
  background: #0b66d8;
  color: #ffffff;
}

.button-primary:hover {
  background: #084a9d;
  color: #ffffff;
}

.button-secondary {
  background: #e9eef5;
  color: #182435;
}

.button-secondary:hover {
  background: #dbe5f1;
  color: #182435;
}

.hero-console {
  background: #101823;
  border-radius: 8px;
  color: #d9e6f7;
  display: grid;
  gap: 12px;
  padding: 22px;
}

.hero-console div {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 6px;
  padding-bottom: 12px;
}

.hero-console div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.hero-console span {
  color: #8fa6c2;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-console code,
.tool-card code,
.output-box,
.preview-box {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.section-heading {
  margin: 42px 0 18px;
}

.section-heading h2,
.seo-section h2,
.related-section h2 {
  color: #17202a;
  font-size: 1.55rem;
  margin: 0;
}

.tool-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tool-card {
  background: #ffffff;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 22px;
}

.tool-card__top,
.tool-title-row {
  align-items: center;
  display: flex;
  gap: 16px;
}

.tool-card__top > div,
.tool-title-row > div {
  min-width: 0;
}

.tool-icon {
  align-items: center;
  background: #17202a;
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9rem;
  font-weight: 850;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.tool-icon-large {
  height: 56px;
  width: 56px;
}

.tool-card__meta {
  color: #68778b;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.tool-card h3 {
  font-size: 1.25rem;
  margin: 0;
}

.tool-card h3 a {
  color: #17202a;
  text-decoration: none;
}

.tool-card h3 a:hover {
  color: #0b66d8;
}

.tool-card p {
  color: #536276;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.55;
  margin: 18px 0 14px;
}

.mini-flow {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.mini-flow div,
.tool-card__example {
  background: #f3f6fa;
  border-radius: 7px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.mini-flow div:last-child {
  background: #edf7f1;
}

.mini-flow span,
.tool-card__example span {
  color: #68778b;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mini-flow code {
  color: #17202a;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.tool-card__button {
  margin-top: 14px;
  width: 100%;
}

.page-header,
.tool-header,
.seo-section,
.related-section,
.workspace-panel {
  padding: 34px;
}

.tool-page {
  display: grid;
  gap: 20px;
}

.workspace-panel,
.tool-header {
  box-shadow: none;
}

.tool-header {
  padding-bottom: 26px;
}

.tool-header h1 {
  font-size: 2.8rem;
  margin-bottom: 0;
}

.tool-glance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tool-glance span {
  background: #eef4fb;
  border-radius: 999px;
  color: #344255;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 8px 12px;
}

.tool-glance span + span {
  background: #edf7f1;
}

.tool-form {
  display: grid;
  gap: 18px;
}

.conversion-grid,
.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
.output-label {
  color: #344255;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  color: #17202a;
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.field textarea {
  min-height: 210px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #0b66d8;
  box-shadow: 0 0 0 3px rgba(11, 102, 216, 0.15);
  outline: 0;
}

.input-stack {
  display: grid;
  gap: 10px;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-row button {
  background: #eef4fb;
  border: 1px solid #d7e4f3;
  border-radius: 999px;
  color: #344255;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 7px 10px;
}

.preset-row button:hover {
  background: #dfeeff;
  color: #0b66d8;
}

.result-panel {
  align-items: center;
  background: #101823;
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 22px;
}

.result-panel .output-label {
  color: #9fb2ca;
}

.output-value {
  color: #ffffff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.output-meta {
  color: #9fb2ca;
  font-size: 0.9rem;
  font-weight: 750;
  margin-top: 8px;
}

.result-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 850;
  margin-top: 7px;
  padding: 5px 8px;
}

.status-ok {
  background: #edf7f1;
  color: #23663b;
}

.status-error {
  background: #fff3f0;
  color: #9f2a16;
}

.output-box,
.preview-box {
  background: #f8fafc;
  border: 1px solid #dfe5ec;
  border-radius: 7px;
  color: #17202a;
  min-height: 68px;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
}

.output-box-error {
  background: #fff9f7;
  border-color: #ffc9bd;
  color: #9f2a16;
}

.preview-box {
  font-family: inherit;
  line-height: 1.6;
  min-height: 280px;
  white-space: normal;
}

.preview-box h1,
.preview-box h2,
.preview-box h3 {
  margin-top: 0;
}

.preview-box pre {
  background: #17202a;
  border-radius: 7px;
  color: #f8fafc;
  overflow: auto;
  padding: 12px;
}

.error-message {
  background: #fff3f0;
  border: 1px solid #ffc9bd;
  border-radius: 7px;
  color: #9f2a16;
  font-weight: 700;
  padding: 12px;
}

.keyword-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.keyword-grid span {
  background: #eef4fb;
  border-radius: 999px;
  color: #344255;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 8px 10px;
}

.seo-section p {
  color: #536276;
  line-height: 1.65;
  margin: 14px 0 0;
}

.related-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.related-link {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  color: #17202a;
  display: flex;
  gap: 12px;
  padding: 14px;
  text-decoration: none;
}

.related-link:hover {
  background: #edf4ff;
  color: #17202a;
  text-decoration: none;
}

.related-link strong {
  display: block;
  line-height: 1.25;
}

.related-link small {
  color: #5f6f83;
  display: block;
  line-height: 1.35;
  margin-top: 4px;
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 14px 18px;
    position: static;
  }

  .content {
    padding: 28px 18px 42px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 18px 36px;
  }

  .nav {
    justify-content: flex-start;
  }
}

@media (max-width: 780px) {
  .home-hero,
  .tool-grid,
  .conversion-grid,
  .form-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .home-hero h1,
  .page-header h1,
  .tool-header h1 {
    font-size: 2rem;
  }

  .tool-title-row {
    align-items: flex-start;
    gap: 22px;
  }

  .tool-icon-large {
    height: 48px;
    margin-top: 2px;
    width: 48px;
  }

  .output-value {
    font-size: 1.35rem;
  }

  .tool-header h1 {
    font-size: 2.15rem;
  }

  .home-hero,
  .page-header,
  .tool-header,
  .seo-section,
  .related-section,
  .workspace-panel {
    padding: 22px;
  }

  .result-panel,
  .result-heading {
    align-items: stretch;
    flex-direction: column;
  }
}
