:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --blue: #2563eb;
  --green: #15803d;
  --red: #b91c1c;
  --radius: 14px;

  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #ffffff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: #ffffff;
  font-size: 15px;
  line-height: 1.6;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

/* Header and navigation */

.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 30px;
  width: min(1120px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.brand-logo {
  display: block;
  width: 190px;
  max-width: 100%;
  height: auto;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.top-nav a,
.site-footer a {
  color: #4b5563;
  font-size: 14px;
  text-decoration: none;
}

.top-nav a:hover,
.site-footer a:hover {
  color: #111827;
}

/* Product introduction */

.page-intro {
  padding: 52px 0 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.13em;
}

.page-intro h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.intro-copy {
  max-width: 760px;
  margin: 16px 0 18px;
  color: #4b5563;
  font-size: 17px;
}

.trust-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: #4b5563;
  font-size: 13px;
}

.trust-points span {
  display: inline-flex;
  align-items: center;
}

.trust-points i {
  margin-right: 6px;
  color: var(--green);
  font-style: normal;
  font-weight: 800;
}

/* Main converter */

.tool-section {
  padding-bottom: 42px;
}

.converter {
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(20, 35, 70, 0.045);
}

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

.editor-panel {
  min-width: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 10px;
}

.panel-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.panel-title label {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.panel-hint {
  color: var(--muted);
  font-size: 11px;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.text-button {
  padding: 5px 0;
  color: #4b5563;
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.text-button:hover {
  color: var(--blue);
}

textarea {
  display: block;
  width: 100%;
  height: 340px;
  min-height: 260px;
  padding: 14px;
  color: var(--ink);
  background: #fafbfc;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  outline: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
  resize: vertical;
  tab-size: 2;
}

textarea:focus {
  border-color: #93c5fd;
  outline: 2px solid #dbeafe;
}

textarea::placeholder {
  color: #9ca3af;
}

textarea[readonly] {
  background: #f9fafb;
}

/* Conversion actions and status */

.convert-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 650;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.primary-button {
  color: #ffffff;
  background: #111827;
  border-color: #111827;
}

.primary-button:hover:not(:disabled) {
  background: #293548;
  border-color: #293548;
}

.secondary-button {
  color: #111827;
  background: #ffffff;
  border-color: #d1d5db;
}

.secondary-button:hover:not(:disabled) {
  background: #f3f4f6;
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.status-message {
  min-height: 22px;
  color: var(--muted);
  font-size: 12px;
}

.status-message.success {
  color: var(--green);
}

.status-message.error {
  color: var(--red);
}

/* Privacy notice */

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0 0;
  padding: 14px 16px;
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  border-radius: 11px;
}

.privacy-icon {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--green);
  font-size: 16px;
  font-weight: 800;
}

.privacy-note p {
  margin: 0;
  color: #365744;
  font-size: 13px;
}

.privacy-note strong {
  color: #14532d;
}

/* Instructions and product information */

.content-section {
  padding: 10px 0 58px;
}

.content-article {
  width: 100%;
}

.content-article h2,
.faq-section h2,
.privacy-section h2 {
  margin: 30px 0 12px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.content-article h2:first-child {
  margin-top: 0;
}

.content-article p,
.content-article li,
.faq-item p,
.privacy-section p {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.8;
}

.content-article p {
  margin: 0 0 14px;
}

.content-article ul,
.content-article ol {
  padding-left: 22px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.8;
}

.content-article li {
  margin: 5px 0;
}

/* FAQ */

.faq-section {
  width: 100%;
  margin-top: 34px;
}

.faq-section h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

.faq-item {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.faq-item:first-of-type {
  border-top: 1px solid var(--line);
}

.faq-item summary {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.6;
  cursor: pointer;
}

.faq-item summary::marker {
  color: var(--blue);
}

.faq-item p {
  margin: 8px 0 2px;
}

/* Privacy information */

.privacy-section {
  width: 100%;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.privacy-section h2 {
  margin-top: 0;
}

.privacy-section p {
  margin: 0 0 13px;
}

/* Unified footer */

.site-footer {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #9ca3af;
  font-size: 12px;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer a {
  font-size: 12px;
}

/* Tablet */

@media (max-width: 800px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 10px 18px;
    padding: 12px 0;
  }

  .top-nav {
    order: 3;
    width: 100%;
    margin: 0;
    gap: 18px;
  }

  .page-intro {
    padding: 40px 0 24px;
  }

  .intro-copy {
    font-size: 15px;
  }

  .editor-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .converter {
    padding: 18px;
  }

  textarea {
    height: 300px;
  }

  .content-section {
    padding-bottom: 46px;
  }
}

/* Mobile */

@media (max-width: 520px) {
  .container,
  .header-inner {
    width: calc(100% - 28px);
  }

  .brand-logo {
    width: 155px;
  }

  .top-nav {
    gap: 18px;
  }

  .top-nav a {
    font-size: 12px;
  }

  .page-intro {
    padding: 34px 0 22px;
  }

  .page-intro h1 {
    font-size: 34px;
  }

  .intro-copy {
    margin: 12px 0 16px;
  }

  .trust-points {
    gap: 8px 15px;
    font-size: 12px;
  }

  .converter {
    padding: 14px;
    border-radius: 11px;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .panel-actions {
    justify-content: flex-start;
    gap: 14px;
  }

  textarea {
    height: 250px;
    min-height: 210px;
    padding: 12px;
    font-size: 12px;
  }

  .convert-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .primary-button {
    width: 100%;
  }

  .privacy-note {
    padding: 12px;
  }

  .content-article h2,
  .faq-section h2,
  .privacy-section h2 {
    font-size: 19px;
  }

  .content-section {
    padding-bottom: 38px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .footer-inner nav {
    gap: 10px 16px;
  }
}
