:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-soft: #faf5f6;
  --text: #111111;
  --muted: #69605f;
  --line: #e5dfdc;
  --teal: #d9283f;
  --teal-dark: #a6162c;
  --green: #f3d1d6;
  --green-deep: #111111;
  --rose: #d9283f;
  --ink: #111111;
  --shadow: 0 24px 70px rgba(17, 17, 17, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(17, 17, 17, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 17, 17, 0.03) 1px, transparent 1px),
    var(--bg);
  background-size: 38px 38px;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.site-header {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 223, 220, 0.88);
  box-shadow: 0 3px 18px rgba(17, 17, 17, 0.04);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 14px clamp(16px, 4vw, 28px);
}

.brand {
  align-items: center;
  display: inline-flex;
  font-size: 1.16rem;
  font-weight: 900;
  gap: 10px;
  white-space: nowrap;
}

.brand-mark {
  align-items: center;
  background: #111111;
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.download-icon {
  border: 2px solid #ffffff;
  border-radius: 3px;
  border-top: 0;
  height: 14px;
  position: relative;
  width: 16px;
}

.download-icon::before {
  background: #ffffff;
  content: "";
  height: 14px;
  left: 50%;
  position: absolute;
  top: -10px;
  transform: translateX(-50%);
  width: 2px;
}

.download-icon::after {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #ffffff;
  content: "";
  left: 50%;
  position: absolute;
  top: 1px;
  transform: translateX(-50%);
}

.nav {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
}

.nav a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
}

.nav a:hover {
  color: var(--text);
}

.language-button,
.paste-button,
.primary-button,
.secondary-button,
.ghost-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  min-height: 46px;
}

.language-button {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0 15px;
}

select.language-button {
  appearance: none;
  min-width: 66px;
  text-align: center;
}

.hero {
  background:
    radial-gradient(circle at 88% 20%, rgba(17, 17, 17, 0.045), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 247, 245, 0.9));
  border-bottom: 1px solid rgba(229, 223, 220, 0.8);
  padding: clamp(30px, 5vw, 54px) clamp(16px, 4vw, 28px) 42px;
}

.hero-inner {
  margin: 0 auto;
  max-width: 1020px;
  text-align: center;
}

.tool-tabs {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(17, 17, 17, 0.06);
  display: inline-grid;
  grid-template-columns: repeat(5, minmax(104px, 1fr));
  margin: 0 auto 24px;
  max-width: 640px;
  overflow: hidden;
}

.tool-tab {
  align-items: center;
  border-right: 1px solid var(--line);
  color: #2b2525;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  font-weight: 850;
}

.tool-tab:last-child {
  border-right: 0;
}

.tool-tab:hover,
.tool-tab.active {
  background: #111111;
  color: #ffffff;
}

.tool-icon {
  border: 2px solid currentColor;
  border-radius: 4px;
  height: 16px;
  position: relative;
  width: 16px;
}

.tool-tab:nth-child(1) .tool-icon::after {
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
  border-top: 4px solid transparent;
  content: "";
  left: 5px;
  position: absolute;
  top: 2px;
}

.tool-tab:nth-child(2) .tool-icon::after,
.tool-tab:nth-child(4) .tool-icon::after {
  background: currentColor;
  border-radius: 2px;
  bottom: 3px;
  content: "";
  height: 5px;
  left: 3px;
  position: absolute;
  width: 8px;
}

.tool-tab:nth-child(3) .tool-icon {
  border-radius: 50%;
}

.tool-tab:nth-child(5) .tool-icon::after {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 4px;
  left: 4px;
  position: absolute;
  top: 4px;
  width: 4px;
}

.eyebrow {
  color: #b91c3a;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2 {
  letter-spacing: 0;
  line-height: 1.06;
  margin: 0;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 4.35rem);
  margin: 0 auto;
  max-width: 760px;
}

.hero-copy {
  color: var(--muted);
  font-size: clamp(0.98rem, 1.6vw, 1.1rem);
  margin: 12px auto 20px;
  max-width: 620px;
}

.download-form {
  background: var(--surface);
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 0 auto;
  max-width: 960px;
  padding: clamp(14px, 2vw, 18px);
}

.input-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 128px 178px;
}

.input-row input {
  background: #fbfbfa;
  border: 2px solid #111111;
  border-left: 6px solid #d9283f;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 24px rgba(17, 17, 17, 0.08);
  color: var(--text);
  min-height: 58px;
  min-width: 0;
  outline: 0;
  padding: 0 18px 0 20px;
}

.input-row input:focus {
  background: #ffffff;
  border-color: #111111;
  border-left-color: #d9283f;
  box-shadow: 0 0 0 4px rgba(217, 40, 63, 0.12), 0 14px 32px rgba(17, 17, 17, 0.1);
}

.input-row input::placeholder {
  color: #7b7371;
  font-weight: 600;
}

.paste-button {
  background: #f4eeee;
  color: #111111;
  padding: 0 18px;
}

.primary-button,
.secondary-button {
  background: #111111;
  color: #fff;
}

.primary-button:hover,
.secondary-button:hover {
  background: #d9283f;
}

.form-message {
  color: var(--muted);
  font-size: 0.94rem;
  margin: 12px 0 0;
  min-height: 22px;
  text-align: left;
}

.form-message.error {
  color: #be123c;
}

.result-section,
.steps,
.features,
.seo-info,
.guide,
.faq,
.internal-links {
  padding: 42px clamp(16px, 4vw, 28px);
}

.internal-links-inner {
  background: var(--surface);
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 8px;
  margin: 0 auto;
  max-width: 1180px;
  padding: 24px;
}

.link-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
}

.link-grid a {
  background: #fbfbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #111111;
  font-weight: 900;
  padding: 14px 16px;
}

.link-grid a:hover {
  background: #111111;
  color: #ffffff;
}

.result-panel {
  align-items: start;
  background: var(--surface);
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: clamp(24px, 5vw, 72px);
  grid-template-columns: minmax(300px, 0.95fr) minmax(320px, 0.75fr);
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(18px, 4vw, 30px);
}

.result-actions {
  display: grid;
  gap: 8px;
  justify-items: start;
  margin-bottom: 24px;
}

.secondary-button,
.soft-button {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
}

.soft-button {
  background: #fbfbfa;
  border: 1px solid var(--line);
  color: #111111;
}

.soft-button:hover {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.soft-button:focus-visible,
.secondary-button:focus-visible {
  outline: 3px solid rgba(217, 40, 63, 0.22);
  outline-offset: 2px;
}

.author-avatar {
  border-radius: 8px;
  display: block;
  height: 70px;
  margin: 4px 0 18px;
  object-fit: cover;
  width: 70px;
}

.meta-table {
  margin: 0;
}

.meta-table div {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1fr);
  padding: 10px 0;
}

.meta-table dt {
  color: #3b3433;
  font-weight: 700;
}

.meta-table dd {
  color: #3b3433;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.source-link {
  color: #3b3433;
  display: inline-block;
  margin-top: 18px;
  overflow-wrap: anywhere;
}

.source-link::before {
  content: "Link: ";
}

.preview-card {
  background: #111111;
  border-radius: 8px;
  min-height: 520px;
  overflow: hidden;
  position: relative;
}

.preview-card img {
  display: block;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  width: 100%;
}

.preview-overlay {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.72));
  bottom: 0;
  color: #fff;
  display: grid;
  gap: 4px;
  left: 0;
  padding: 80px 22px 22px;
  position: absolute;
  right: 0;
}

.preview-overlay span {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 900;
  line-height: 1.15;
}

.preview-overlay small {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.section-heading {
  margin: 0 auto 24px;
  max-width: 760px;
  text-align: center;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.step-grid,
.feature-grid,
.info-grid {
  display: grid;
  gap: 16px;
  margin: 0 auto;
  max-width: 1180px;
}

.step-grid {
  grid-template-columns: repeat(3, 1fr);
}

.feature-grid {
  grid-template-columns: repeat(4, 1fr);
}

.step-grid article,
.feature-grid article,
.info-grid article,
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.info-grid {
  grid-template-columns: repeat(2, 1fr);
}

.step-grid span {
  align-items: center;
  background: #f4eeee;
  border-radius: 8px;
  color: var(--rose);
  display: inline-flex;
  font-weight: 950;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.step-grid h3,
.feature-grid h3,
.info-grid h3,
.guide-list h3 {
  margin: 18px 0 8px;
}

.step-grid p,
.feature-grid p,
.info-grid p,
.guide-list p,
.faq p {
  color: var(--muted);
  margin: 0;
}

.seo-info {
  background: rgba(255, 255, 255, 0.66);
}

.guide {
  background: linear-gradient(180deg, #ffffff, #f4eeee);
}

.guide-inner {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  margin: 0 auto;
  max-width: 1180px;
}

.guide-inner h2 {
  font-size: clamp(1.9rem, 3.5vw, 3.1rem);
  line-height: 1.08;
  margin: 0;
}

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

.guide-list article {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 8px;
  padding: 20px;
}

.faq {
  margin: 0 auto;
  max-width: 900px;
}

.faq details + details {
  margin-top: 12px;
}

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

.faq p {
  padding-top: 12px;
}

.footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 28px clamp(16px, 4vw, 28px);
}

.static-page {
  padding: clamp(42px, 7vw, 76px) clamp(16px, 4vw, 28px);
}

.static-page-inner {
  background: var(--surface);
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 0 auto;
  max-width: 900px;
  padding: clamp(24px, 5vw, 44px);
}

.static-page h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.05;
  margin: 0 0 22px;
}

.static-content {
  display: grid;
  gap: 20px;
}

.static-content h2 {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  margin: 10px 0 0;
}

.static-content p,
.static-content li {
  color: var(--muted);
  margin: 0;
}

.static-content ul {
  margin: 0;
  padding-left: 20px;
}

.static-content a {
  color: #a6162c;
  font-weight: 900;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  justify-content: flex-end;
}

.footer a {
  color: #111111;
  font-weight: 900;
}

.back-to-top {
  align-items: center;
  background: #111111;
  border: 0;
  border-radius: 8px;
  bottom: 22px;
  box-shadow: 0 16px 32px rgba(17, 17, 17, 0.18);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  font-size: 1.45rem;
  font-weight: 900;
  height: 48px;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: 22px;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
  width: 48px;
  z-index: 20;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #d9283f;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    overflow-x: auto;
    width: 100%;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .result-panel,
  .step-grid,
  .feature-grid,
  .info-grid,
  .link-grid,
  .guide-inner {
    grid-template-columns: 1fr;
  }

  .preview-card,
  .preview-card img {
    min-height: 420px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    gap: 12px;
  }

  .hero {
    padding-top: 24px;
  }

  .tool-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(88px, 1fr));
    max-width: 100%;
    overflow-x: auto;
  }

  .tool-tab {
    min-height: 44px;
    padding: 0 12px;
  }

  .meta-table div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .preview-card,
  .preview-card img {
    min-height: 360px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}
