:root {
  --bg: #f6f7fb;
  --bg-soft: #eef2ff;
  --card: #ffffff;
  --card-soft: #fafbff;
  --border: #dde3f0;
  --border-strong: #c8d2ea;
  --text: #1f2333;
  --muted: #626981;
  --accent: #5b67f3;
  --accent-hover: #4954dc;
  --accent-light: rgba(91, 103, 243, 0.14);
  --accent-soft: rgba(91, 103, 243, 0.08);
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 18px 40px rgba(91, 103, 243, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, #fbfbfe 0%, var(--bg) 220px, var(--bg) 100%);
}

body::before {
  content: '';
  position: fixed;
  top: -160px;
  left: 50%;
  width: min(960px, 92vw);
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(91, 103, 243, 0.18) 0%, rgba(129, 140, 248, 0.1) 42%, rgba(255, 255, 255, 0) 74%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

p,
ul,
ol {
  line-height: 1.6;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header {
  margin-bottom: 28px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(91, 103, 243, 0.06);
  backdrop-filter: blur(12px);
}

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

.site-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-hover), #7c6cf6 70%, #3f5bd9 100%);
  box-shadow: 0 10px 22px rgba(91, 103, 243, 0.22);
}

.site-brand-text {
  color: var(--accent-hover);
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-hover), #7c6cf6 70%, #3f5bd9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.view-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  text-decoration: none;
}

.site-nav,
.site-footer-links,
.inline-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.site-nav a,
.site-footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover,
.site-footer-links a:hover {
  color: var(--text);
}

.site-nav a {
  padding: 6px 10px;
  border-radius: 999px;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.9);
}

.site-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  align-items: flex-start;
}

.site-footer-copy {
  margin: 0;
  max-width: 540px;
  color: var(--muted);
  font-size: 14px;
}

.page-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 24px;
  align-items: start;
}

.card,
.section-card {
  width: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, var(--card) 100%);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.hero-copy-card,
.tool-card {
  border-color: rgba(255, 255, 255, 0.92);
}

.hero-copy-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98) 0%, #fbfbff 72%, #f6f8ff 100%);
}

.hero-copy-card h1,
.article-header h1 {
  margin: 0 0 12px;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero-lead,
.article-lead,
.section-intro {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-hover);
  background: var(--accent-soft);
  border: 1px solid rgba(91, 103, 243, 0.12);
  border-radius: 999px;
}

.section-card h2,
.tool-header h2,
.result h2 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.bullet-list {
  margin: 20px 0 0;
  padding-left: 20px;
}

.bullet-list li {
  margin-bottom: 8px;
}

.bullet-list li::marker {
  color: var(--accent);
}

.inline-link-row {
  margin-top: 20px;
}

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

.info-card,
.link-group,
.step-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--card-soft) 0%, #f7f9ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.info-card h3,
.link-group h3,
.step-card strong {
  display: block;
  margin: 0 0 8px;
  font-size: 18px;
}

.info-card p,
.link-group ul,
.step-card p,
.faq-item p,
.prose-copy p,
.article-content p,
.article-content li {
  margin: 0;
  color: #3f3f46;
  font-size: 15px;
}

.prose-copy p + p,
.article-content p + p,
.article-content h2 + p,
.article-content p + h2,
.article-content ol,
.article-content ul {
  margin-top: 14px;
}

.article-content h2 {
  margin: 24px 0 0;
  font-size: 24px;
  line-height: 1.2;
}

.article-content ol,
.article-content ul {
  padding-left: 20px;
}

.post-date {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step-card p {
  margin-top: 8px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--card-soft) 0%, #f8f9ff 100%);
  padding: 16px 18px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
}

.faq-item p {
  margin-top: 10px;
}

.link-group ul {
  margin: 0;
  padding-left: 18px;
}

.link-group li + li {
  margin-top: 8px;
}

.tool-card {
  margin: 0;
}

.tool-header {
  margin-bottom: 20px;
}

.tool-note {
  margin: 16px 0 0;
}

.trust-box {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(255, 249, 230, 0.6) 0%, rgba(255, 251, 240, 0.8) 100%);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: #78716c;
}

.trust-box strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
}

.trust-box ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.trust-box li {
  margin-bottom: 2px;
}

.trust-box a {
  color: #b45309;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.hidden {
  display: none !important;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: linear-gradient(180deg, rgba(91, 103, 243, 0.08) 0%, rgba(91, 103, 243, 0.04) 100%);
  border: 1px solid rgba(91, 103, 243, 0.08);
  border-radius: 10px;
  margin-bottom: 16px;
}

.tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.tab:hover {
  color: var(--accent-hover);
}

.tab.active {
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(91, 103, 243, 0.12);
}

.tab-panel {
  margin-bottom: 16px;
}

textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 8px;
  resize: vertical;
  min-height: 200px;
}

textarea:focus,
select:focus,
.result-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 44px 20px;
  background: linear-gradient(180deg, rgba(91, 103, 243, 0.05) 0%, rgba(255, 255, 255, 0.92) 100%);
  border: 2px dashed var(--border-strong);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.drop-zone:hover,
.drop-zone.dragging {
  background: linear-gradient(180deg, rgba(91, 103, 243, 0.1) 0%, rgba(255, 255, 255, 0.96) 100%);
  border-color: var(--accent);
  box-shadow: 0 12px 24px rgba(91, 103, 243, 0.08);
}

.drop-zone-main {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}

.drop-zone-file {
  margin-top: 10px;
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
}

.controls {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 140px;
}

.field-label {
  font-size: 13px;
  color: var(--accent-hover);
  font-weight: 500;
}

select {
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  text-decoration: none;
}

.btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--border-strong);
  box-shadow: 0 8px 18px rgba(91, 103, 243, 0.08);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, #7181ff 100%);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px rgba(91, 103, 243, 0.22);
}

.btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-hover) 0%, #5c6df5 100%);
  border-color: var(--accent-hover);
  color: #fff;
}

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

.link-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 14px;
  padding: 8px 0;
  cursor: pointer;
  margin-top: 8px;
}

.link-btn:hover {
  text-decoration: underline;
}

.error {
  margin: 12px 0 0;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  border-radius: 8px;
  font-size: 14px;
}

.result {
  padding: 22px;
  border: 1px solid rgba(91, 103, 243, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(91, 103, 243, 0.08) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.result-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.result-row input {
  flex: 1;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(91, 103, 243, 0.14);
  border-radius: 8px;
  color: var(--text);
}

.drag-overlay {
  position: fixed;
  inset: 0;
  background: rgba(91, 103, 243, 0.14);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
}

.drag-overlay-inner {
  padding: 32px 48px;
  background: var(--card);
  border: 2px dashed var(--accent);
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  box-shadow: 0 18px 38px rgba(91, 103, 243, 0.16);
}

.article-page-shell {
  max-width: 820px;
}

.article-card {
  padding-bottom: 32px;
}

.view-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
}

.view-card {
  max-width: 760px;
}

.view-brand .site-brand-text {
  font-size: 17px;
}

.view-header h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
}

.view-header {
  margin-bottom: 16px;
}

.paste {
  margin: 0;
  padding: 16px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

.file-card {
  padding: 20px;
  background: linear-gradient(180deg, var(--card-soft) 0%, #f7f9ff 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.file-name {
  font-size: 16px;
  font-weight: 500;
  word-break: break-all;
}

.file-meta {
  margin-bottom: 8px;
}

@media (max-width: 900px) {
  .hero-grid,
  .info-grid,
  .link-group-grid,
  .steps-list {
    grid-template-columns: 1fr;
  }

  .hero-copy-card h1,
  .article-header h1 {
    font-size: 34px;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header {
    border-radius: 20px;
  }

  .card,
  .section-card {
    padding: 20px;
  }

  .controls,
  .result-row {
    flex-direction: column;
    align-items: stretch;
  }

  .field {
    flex: 1 1 auto;
  }

  .btn.primary,
  .btn,
  .result-row input {
    width: 100%;
  }

  .hero-copy-card h1,
  .article-header h1 {
    font-size: 28px;
  }

  .section-card h2,
  .tool-header h2,
  .result h2 {
    font-size: 24px;
  }
}
