:root {
  color-scheme: light;
  --ink: #18202c;
  --muted: #637083;
  --line: #dfe4eb;
  --paper: #ffffff;
  --wash: #f5f7fa;
  --blue: #315be8;
  --blue-dark: #2448c9;
  --green: #16845b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--wash); color: var(--ink); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-underline-offset: 2px; }
.shell { width: min(100% - 40px, 1016px); margin: 0 auto; padding: 36px 0 28px; }
.tool { width: min(100%, 670px); margin: 0 auto; padding: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 34px rgb(24 32 44 / 5%); }
.brand { display: flex; align-items: center; gap: 9px; color: #344052; font-size: 13px; font-weight: 720; letter-spacing: .01em; }
.brand-mark { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 8px; color: white; background: var(--blue); font-size: 14px; font-weight: 800; }
.local-badge { margin-left: 2px; border: 1px solid #cce8db; border-radius: 99px; padding: 3px 7px; color: #18714f; background: #f0fbf5; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
h1 { margin: 20px 0 7px; font-size: clamp(25px, 4vw, 32px); line-height: 1.16; letter-spacing: -.045em; }
.privacy-note { display: flex; align-items: center; gap: 8px; margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.privacy-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #25a673; box-shadow: 0 0 0 3px #e6f7ef; }
.drop-zone { min-height: 178px; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 22px; border: 1.5px dashed #b9c5d5; border-radius: 13px; background: #fbfcfe; text-align: center; transition: border-color .15s ease, background .15s ease; }
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.is-over { outline: none; border-color: var(--blue); background: #f4f7ff; }
.upload-icon { display: grid; width: 40px; height: 40px; place-items: center; margin-bottom: 12px; border-radius: 12px; color: var(--blue); background: #edf1ff; }
.upload-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.drop-zone strong { font-size: 15px; }
.drop-subtitle { margin-top: 6px; color: var(--muted); font-size: 13px; }
.text-link { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.file-name { margin-top: 9px; color: #314050; font-size: 12px; overflow-wrap: anywhere; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 11px; color: #7b8695; font-size: 10px; font-weight: 760; letter-spacing: .09em; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.url-form { display: flex; gap: 8px; }
.url-form input { min-width: 0; flex: 1; height: 44px; padding: 0 12px; border: 1px solid #d6dce5; border-radius: 9px; color: var(--ink); background: #fff; font-size: 13px; }
.url-form input:focus, .markdown-output:focus { outline: 3px solid rgb(49 91 232 / 16%); border-color: #8298f1; }
.url-form input::placeholder { color: #99a3b1; }
.button { min-height: 42px; border: 1px solid transparent; border-radius: 9px; padding: 0 15px; font-size: 13px; font-weight: 680; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.button:active { transform: translateY(1px); }
.button-primary { color: #fff; background: var(--blue); }
.button-primary:hover:not(:disabled) { background: var(--blue-dark); }
.button-primary:disabled { cursor: not-allowed; color: #9ba5b3; background: #e9edf3; }
.button-secondary { border-color: #d9dfe7; color: #273345; background: #fff; }
.button-secondary:hover { background: #f5f7fa; }
.url-hint { margin: 8px 0 17px; color: #798596; font-size: 11px; line-height: 1.5; }
#convert-button { width: 100%; min-height: 47px; }
.status { min-height: 19px; margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.status[data-kind="error"] { color: #b42318; }
.status[data-kind="success"] { color: var(--green); }
.status[data-kind="busy"] { color: #4058b6; }
.result-section { margin: 16px auto 0; padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.eyebrow { color: #758195; font-size: 10px; font-weight: 780; letter-spacing: .1em; }
.result-heading h2, .details h2, .qa-section h2 { margin: 5px 0 0; font-size: 19px; line-height: 1.25; letter-spacing: -.025em; }
.result-actions { display: flex; gap: 8px; }
.markdown-output { display: block; width: 100%; min-height: 330px; resize: vertical; padding: 15px; border: 1px solid #dfe4eb; border-radius: 10px; color: #1c2735; background: #fbfcfe; font: 12px/1.65 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; overflow-wrap: anywhere; white-space: pre-wrap; }
.result-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.text-button { border: 0; padding: 5px 0; color: var(--blue); background: transparent; font-size: 12px; font-weight: 650; }
.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px auto 0; }
.detail-card { padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.details h2 { font-size: 15px; }
.detail-card p { margin: 8px 0 0; color: #637083; font-size: 12px; line-height: 1.65; }
code { padding: 1px 4px; border-radius: 4px; background: #f0f2f6; font-size: .92em; }
.qa-section { margin: 22px auto 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.faq-section { margin: 22px auto 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.faq-section h2 { margin: 5px 0 11px; font-size: 18px; letter-spacing: -.025em; }
.faq-section details { border-top: 1px solid #e9edf2; }
.faq-section summary { padding: 13px 2px; color: #2c3748; cursor: pointer; font-size: 13px; font-weight: 650; }
.faq-section details p { margin: -2px 0 13px; max-width: 76ch; color: var(--muted); font-size: 12px; line-height: 1.65; }
.qa-section h2 { font-size: 18px; }
.qa-intro, .qa-footnote { color: var(--muted); font-size: 12px; line-height: 1.6; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; }
table { width: 100%; min-width: 650px; border-collapse: collapse; text-align: left; font-size: 11px; }
th, td { padding: 10px 11px; border-bottom: 1px solid #e9edf2; vertical-align: top; line-height: 1.45; }
thead th { color: #556174; background: #f7f8fa; font-weight: 730; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { color: #293447; font-weight: 620; }
.qa-state[data-state="pass"] { color: var(--green); font-weight: 720; }
.qa-state[data-state="fail"] { color: #b42318; font-weight: 720; }
.qa-detail { max-width: 220px; overflow-wrap: anywhere; color: #5c6878; }
footer { display: flex; justify-content: space-between; gap: 10px; margin: 17px auto 0; color: #7b8695; font-size: 10px; }
.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; }

@media (max-width: 600px) {
  .shell { width: min(100% - 24px, 1016px); padding-top: 12px; }
  .tool { padding: 19px 15px 15px; border-radius: 14px; }
  h1 { margin-top: 17px; font-size: 25px; }
  .privacy-note { align-items: flex-start; font-size: 12px; }
  .drop-zone { min-height: 158px; padding: 18px 12px; }
  .url-form { flex-direction: column; }
  .url-form input, .url-form .button { width: 100%; min-height: 44px; }
  .url-hint { margin-bottom: 13px; }
  .result-section { padding: 16px 12px; }
  .result-heading { align-items: flex-start; flex-direction: column; }
  .result-actions { width: 100%; }
  .result-actions .button { flex: 1; padding: 0 8px; }
  .markdown-output { min-height: 260px; padding: 11px; font-size: 11px; }
  .details { grid-template-columns: 1fr; gap: 9px; margin-top: 12px; }
  .detail-card { padding: 15px; }
  .qa-section { margin-top: 12px; padding: 16px 12px; }
  .faq-section { margin-top: 12px; padding: 16px 14px; }
  footer { flex-direction: column; gap: 5px; padding: 0 2px; }
}
