:root {
  --site-bg: #fffaf3;
  --site-accent: #ff7a18;
  --site-accent-dark: #d85f08;
  --site-ink: #122033;
  --page-heading-space: 3rem;
  --page-content-space: 3rem;
}

body {
  background:
    radial-gradient(circle at top left, rgba(255, 122, 24, 0.08), transparent 30%),
    radial-gradient(circle at top right, rgba(18, 32, 51, 0.05), transparent 28%),
    var(--site-bg);
  color: var(--site-ink);
}

.site-header {
  background: rgba(255, 250, 243, 0.96);
  box-shadow: 0 1px 0 rgba(18, 32, 51, 0.05);
}

.site-header.header-sticky {
  background: rgba(255, 250, 243, 0.98);
  box-shadow: 0 12px 30px rgba(18, 32, 51, 0.08);
}

.site-brand img {
  filter: saturate(1.05);
}

.nav-dropdown-link.active {
  color: var(--site-accent);
}

.nav-dropdown:focus-within .nav-dropdown-list {
  display: block;
}

@media (min-width: 1024px) {
  .nav-dropdown:focus-within .nav-dropdown-list {
    visibility: visible;
    opacity: 1;
  }
}

.hero-copy {
  position: relative;
}

.banner.section {
  padding-top: var(--page-heading-space);
  padding-bottom: var(--page-content-space);
}

.page-hero {
  padding-top: var(--page-heading-space) !important;
  padding-bottom: var(--page-heading-space) !important;
}

.page-hero + .section,
.page-hero + main.section {
  padding-top: var(--page-content-space) !important;
}

.page-hero-content h1 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  background: rgba(255, 122, 24, 0.12);
  color: var(--site-accent-dark);
  padding: 0.45rem 0.9rem;
  font-weight: 600;
}

.tool-card {
  height: 100%;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 50px rgba(18, 32, 51, 0.08);
  padding: 1.5rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(18, 32, 51, 0.12);
}

.tool-card-link {
  color: inherit;
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.18), rgba(255, 122, 24, 0.06));
  color: var(--site-accent-dark);
  font-size: 1.15rem;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
}

.footer-links a {
  color: inherit;
}

.footer-link-grid {
  display: grid;
  gap: 1.5rem;
}

.footer-link-group {
  min-width: 0;
}

.site-footer p,
.site-footer a {
  color: #334155;
}

.site-footer h6 {
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.page-panel {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 50px rgba(18, 32, 51, 0.08);
}

.privacy-policy-panel {
  position: relative;
  overflow: hidden;
}

.privacy-policy-panel::before {
  position: absolute;
  top: -110px;
  right: -100px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: rgba(255, 122, 24, 0.12);
  content: "";
}

.privacy-intro {
  position: relative;
  max-width: 760px;
  margin-bottom: 2rem;
}

.privacy-kicker {
  display: inline-flex;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: rgba(255, 122, 24, 0.12);
  color: var(--site-accent-dark);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0.45rem 0.85rem;
}

.privacy-intro p,
.privacy-policy-card p {
  color: #475569;
  line-height: 1.8;
}

.privacy-intro p + p {
  margin-top: 1rem;
}

.privacy-policy-grid {
  position: relative;
  display: grid;
  gap: 1rem;
}

.privacy-policy-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  padding: 1.25rem;
}

.privacy-policy-card h2 {
  margin-bottom: 0.75rem;
  color: #0f172a;
  font-size: 1.2rem;
}

.privacy-policy-card a {
  color: var(--site-accent-dark);
  font-weight: 700;
}

.terms-panel {
  position: relative;
  overflow: hidden;
}

.terms-panel::before {
  position: absolute;
  top: -110px;
  right: -100px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: rgba(255, 122, 24, 0.12);
  content: "";
}

.terms-intro {
  position: relative;
  max-width: 780px;
  margin-bottom: 2rem;
}

.terms-kicker {
  display: inline-flex;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: rgba(255, 122, 24, 0.12);
  color: var(--site-accent-dark);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0.45rem 0.85rem;
}

.terms-intro p,
.terms-card p {
  color: #475569;
  line-height: 1.8;
}

.terms-intro p + p {
  margin-top: 1rem;
}

.terms-grid {
  position: relative;
  display: grid;
  gap: 1rem;
}

.terms-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 252, 0.9));
  padding: 1.25rem;
}

.terms-card h2 {
  margin-bottom: 0.75rem;
  color: #0f172a;
  font-size: 1.2rem;
}

.terms-card a {
  color: var(--site-accent-dark);
  font-weight: 700;
}

.contact-alert {
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 1rem;
  font-weight: 600;
}

.contact-alert ul {
  list-style: disc;
  padding-left: 1.25rem;
}

.contact-alert-success {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.contact-alert-error {
  background: rgba(254, 242, 242, 0.95);
  color: #b42318;
}

.about-services-panel {
  position: relative;
  overflow: hidden;
}

.about-services-panel::before {
  position: absolute;
  top: -110px;
  right: -100px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: rgba(255, 122, 24, 0.12);
  content: "";
}

.about-services-kicker {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(255, 122, 24, 0.12);
  color: var(--site-accent-dark);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0.45rem 0.85rem;
}

.about-services-panel h2,
.about-services-panel p,
.about-services-grid {
  position: relative;
}

.about-services-panel p,
.about-service-card p {
  color: #475569;
  line-height: 1.8;
}

.about-services-grid {
  display: grid;
  gap: 1rem;
}

.about-service-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  padding: 1.35rem;
}

.about-service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.18), rgba(255, 122, 24, 0.06));
  color: var(--site-accent-dark);
  font-size: 1.1rem;
}

.about-service-card h3 {
  margin-bottom: 0.7rem;
  color: #0f172a;
  font-size: 1.15rem;
}

.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;
}

.tool-hero {
  padding: var(--page-heading-space) 0;
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.14), rgba(14, 165, 233, 0.08)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
}

.tool-hero + main.section {
  padding-top: var(--page-content-space) !important;
}

.tool-hero-grid {
  display: grid;
  gap: 2rem;
  align-items: end;
}

.tool-breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  min-height: 2rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: rgb(229 229 229);
  color: #222222;
  font-size: 0.875rem;
  line-height: 1;
  padding: 0.5rem 1rem;
}

.tool-breadcrumb a {
  display: inline-flex;
  align-items: center;
  color: rgb(254 96 25);
  font-weight: 600;
}

.tool-breadcrumb a::before {
  margin-right: 0.4rem;
  color: #222222;
  content: "\f015";
  font-family: "Font Awesome 6 Free";
  font-size: 0.78rem;
  font-weight: 900;
}

.breadcrumb-home-icon {
  margin-right: 0.4rem;
  color: #222222;
  font-size: 0.78rem;
}

.tool-hero h1 {
  max-width: 760px;
  margin-bottom: 1rem;
}

.tool-hero p {
  max-width: 720px;
  color: #475569;
  font-size: 1.08rem;
}

.tool-result {
  justify-self: start;
  min-width: 220px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  padding: 1rem 1.15rem;
}

.tool-result-label,
.tool-result-unit {
  display: block;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 600;
}

.tool-result strong {
  display: block;
  color: #064e3b;
  font-family: "Merriweather", serif;
  font-size: 2.8rem;
  line-height: 1.1;
}

.string-tool-shell {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.string-tool-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: flex-end;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
  padding: 0.9rem;
}

.case-mode-panel {
  display: grid;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 122, 24, 0.13), transparent 28%),
    linear-gradient(135deg, #fff7ed, #ecfeff);
  padding: 1rem;
}

.case-mode-option {
  cursor: pointer;
}

.case-mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.case-mode-option span {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #334155;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.case-mode-option:hover span {
  transform: translateY(-1px);
  border-color: rgba(255, 122, 24, 0.45);
  box-shadow: 0 12px 28px rgba(18, 32, 51, 0.08);
}

.case-mode-option input:checked + span {
  border-color: rgba(216, 95, 8, 0.5);
  background: linear-gradient(135deg, #ff7a18, #f97316);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(216, 95, 8, 0.22);
}

.icon-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  font-weight: 700;
  padding: 0.65rem 0.85rem;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.icon-action:hover {
  transform: translateY(-1px);
  border-color: rgba(5, 150, 105, 0.55);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.icon-action.danger {
  color: #b42318;
}

.upload-action {
  color: #0369a1;
}

.string-tool-layout {
  display: grid;
  gap: 0;
}

.dual-textarea-layout {
  display: grid;
  gap: 0;
}

.string-input-panel {
  padding: 1.2rem;
}

.tool-label {
  display: block;
  margin-bottom: 0.65rem;
  color: #0f172a;
  font-weight: 800;
}

.string-textarea {
  width: 100%;
  min-height: 330px;
  resize: vertical;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  color: #0f172a;
  font: inherit;
  line-height: 1.65;
  padding: 1rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.string-textarea:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.output-panel {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.68), rgba(239, 246, 255, 0.72));
}

.output-textarea {
  background: #f8fafc;
}

.tool-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
  margin-top: 0.8rem;
  color: #64748b;
  font-size: 0.94rem;
}

.string-stats-panel {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(180deg, rgba(240, 253, 250, 0.78), rgba(239, 246, 255, 0.84)),
    #f8fafc;
  padding: 1.2rem;
}

.stat-tile {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 1rem;
}

.stat-tile span {
  display: block;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 700;
}

.stat-tile strong {
  display: block;
  margin-top: 0.2rem;
  color: #0f172a;
  font-size: 1.8rem;
  line-height: 1.15;
}

.stat-tile.primary {
  background: #064e3b;
}

.stat-tile.primary span,
.stat-tile.primary strong {
  color: #ffffff;
}

.calculate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  white-space: normal;
}

.tool-content-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.tool-content-grid article {
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  padding-top: 1.25rem;
}

.tool-content-grid p {
  color: #475569;
}

.tool-seo-panel {
  position: relative;
  overflow: hidden;
  margin-top: 2rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background:
    radial-gradient(circle at top right, rgba(255, 122, 24, 0.13), transparent 28%),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 50px rgba(18, 32, 51, 0.07);
  padding: 1.4rem;
}

.tool-seo-intro {
  max-width: 760px;
}

.tool-seo-kicker {
  display: inline-flex;
  margin-bottom: 0.9rem;
  border-radius: 999px;
  background: rgba(255, 122, 24, 0.12);
  color: var(--site-accent-dark);
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0.45rem 0.85rem;
}

.tool-seo-intro h2 {
  margin-bottom: 0.8rem;
  color: #0f172a;
}

.tool-seo-intro p,
.tool-steps p,
.tool-faq-list p {
  color: #475569;
  line-height: 1.8;
}

.tool-steps,
.tool-faq-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.tool-steps article,
.tool-faq-list article {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 1.1rem;
}

.tool-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.85rem;
  border-radius: 999px;
  background: #064e3b;
  color: #ffffff;
  font-weight: 800;
}

.tool-steps h3,
.tool-faq-list h3 {
  margin-bottom: 0.55rem;
  color: #0f172a;
  font-size: 1.08rem;
}

@media (min-width: 992px) {
  .footer-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-mode-panel {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .privacy-policy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .about-services-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tool-hero-grid {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .tool-result {
    justify-self: end;
  }

  .string-tool-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
  }

  .dual-textarea-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .output-panel {
    border-top: 0;
    border-left: 1px solid rgba(15, 23, 42, 0.08);
  }

  .string-stats-panel {
    border-top: 0;
    border-left: 1px solid rgba(15, 23, 42, 0.08);
  }

  .tool-content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tool-faq-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  :root {
    --page-heading-space: 2.25rem;
    --page-content-space: 2.25rem;
  }
}
