@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;700;800;900&display=swap");

:root {
  --bg-main: #fff6ec;
  --bg-surface: #ffffff;
  --bg-accent: #143f8f;
  --bg-accent-2: #1d5bd8;
  --ink-900: #14213d;
  --ink-700: #2d3f66;
  --ink-500: #4c5d80;
  --line: #d9e0f2;
  --danger: #e63946;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-main: 0 12px 30px rgba(20, 33, 61, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Plus Jakarta Sans", "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 20%, rgba(20, 63, 143, 0.28), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(29, 91, 216, 0.22), transparent 45%),
    var(--bg-main);
  color: var(--ink-900);
  line-height: 1.45;
}

.container {
  width: min(1160px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 246, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(20, 33, 61, 0.08);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.95rem 0;
}

.brand {
  text-decoration: none;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.brand-flip {
  color: var(--ink-900);
}

.brand-units {
  color: #ff6b35;
}

.top-nav {
  display: flex;
  gap: 1rem;
}

.top-nav a {
  text-decoration: none;
  color: var(--ink-700);
  font-weight: 700;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: #ff6b35;
}

.hero {
  padding: 3rem 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 1.2rem;
  align-items: stretch;
}

.eyebrow {
  display: inline-block;
  margin: 0;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: var(--bg-accent);
  font-weight: 800;
  font-size: 0.85rem;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.06;
  margin: 0.6rem 0 0.8rem;
}

.hero-copy {
  max-width: 64ch;
  color: var(--ink-700);
  font-size: 1.05rem;
}

.quick-links {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.quick-links a {
  text-decoration: none;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.42rem 0.82rem;
  color: var(--ink-700);
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.quick-links a:hover,
.quick-links a:focus-visible {
  transform: translateY(-2px);
  border-color: #ff6b35;
}

.controls {
  margin: 1rem 0 2rem;
}

.controls-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.search-wrap {
  display: grid;
  gap: 0.45rem;
  font-weight: 700;
  color: var(--ink-700);
}

.search-wrap input {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.86rem 0.95rem;
  font-size: 1rem;
  background: #fff;
}

.search-wrap input:focus-visible {
  outline: 0;
  border-color: #1d5bd8;
  box-shadow: 0 0 0 3px rgba(29, 91, 216, 0.18);
}

.category-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  border: 1px solid var(--line);
  background: var(--bg-surface);
  color: var(--ink-700);
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.filter-btn.active {
  background: var(--ink-900);
  color: #fff;
  border-color: var(--ink-900);
}

.converters-section h2,
.faq-section h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
}

.section-lead {
  color: var(--ink-700);
  margin: 0.45rem 0 1.3rem;
}

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

.converter-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-main);
  animation: rise 320ms ease both;
}

.converter-card.pulse {
  animation: pulse-border 640ms ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-border {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4);
  }

  100% {
    box-shadow: 0 0 0 18px rgba(255, 107, 53, 0);
  }
}

.converter-card h3 {
  margin: 0;
  font-size: 1.02rem;
}

.converter-meta {
  margin: 0.25rem 0 0.8rem;
  color: var(--ink-500);
  font-size: 0.9rem;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: end;
}

.field {
  display: grid;
  gap: 0.3rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-700);
}

.field input {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
  font-size: 1rem;
  font-weight: 600;
}

.field input:focus-visible {
  outline: 0;
  border-color: #ff6b35;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.16);
}

.swap-icon {
  align-self: center;
  margin-bottom: 0.3rem;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--bg-accent), #ffd166);
  color: var(--ink-900);
  font-weight: 900;
  cursor: pointer;
}

.swap-icon:hover,
.swap-icon:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.18);
  outline: 0;
}

.converter-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  gap: 0.8rem;
}

.converter-actions button {
  border: 0;
  border-radius: 10px;
  padding: 0.46rem 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-clear {
  background: #f4f6fb;
  color: var(--ink-700);
}

.btn-swap {
  background: var(--bg-accent-2);
  color: #07261f;
}

.ad-band {
  margin: 1.3rem 0;
}

.ad-slot {
  border: 2px dashed rgba(20, 33, 61, 0.25);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.7);
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--ink-500);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.ad-slot-hero {
  min-height: 220px;
}

.ad-slot-wide {
  min-height: 120px;
}

.faq-section {
  margin: 2.4rem 0;
}

.tool-main {
  padding-bottom: 2rem;
}

.tool-hero {
  padding: 2.6rem 0 1.4rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 1rem;
}

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

.tool-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-main);
  padding: 1rem;
}

.tool-card h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.tool-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.status-line {
  margin-top: 0.75rem;
  margin-bottom: 0;
  color: var(--ink-700);
  font-weight: 700;
}

.simple-list {
  margin: 0;
  padding-left: 1rem;
  color: var(--ink-700);
}

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

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

.expansions-section {
  margin: 2rem 0;
}

.expansions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.expansion-link {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  text-decoration: none;
  color: var(--ink-900);
  box-shadow: var(--shadow-main);
}

.expansion-link span {
  display: block;
  color: var(--ink-700);
  margin-top: 0.2rem;
  font-size: 0.92rem;
}

.seo-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.seo-links a {
  text-decoration: none;
  color: var(--ink-700);
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}

.seo-links a:hover,
.seo-links a:focus-visible {
  border-color: #ff6b35;
  color: #ff6b35;
}

.seo-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.seo-content-grid.compact-grid {
  margin-top: 0;
}

.seo-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-main);
  padding: 1rem;
}

.seo-card h2 {
  margin-top: 0;
}

.formula-box {
  display: inline-block;
  margin: 0.5rem 0;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(214, 255, 107, 0.55), rgba(255, 209, 102, 0.55));
  font-weight: 800;
}

.muted-note {
  color: var(--ink-500);
  font-size: 0.94rem;
}

.examples-table-wrap {
  overflow-x: auto;
}

.examples-table {
  width: 100%;
  border-collapse: collapse;
}

.examples-table th,
.examples-table td {
  padding: 0.65rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tag-cloud span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.38rem 0.75rem;
  background: #fff8de;
  font-weight: 700;
  color: var(--ink-700);
}

.faq-stack details + details {
  margin-top: 0.65rem;
}

.faq-section details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  margin-top: 0.65rem;
}

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

.site-footer {
  border-top: 1px solid rgba(20, 33, 61, 0.14);
  padding: 1rem 0 2rem;
  margin-top: 1rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-grid p {
  margin: 0;
  color: var(--ink-700);
}

.footer-grid nav {
  display: flex;
  gap: 1rem;
}

.footer-grid a {
  text-decoration: none;
  color: var(--ink-700);
  font-weight: 700;
}

.footer-grid a:hover,
.footer-grid a:focus-visible {
  color: #ff6b35;
}

.noscript-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--danger);
  color: #fff;
  padding: 0.8rem;
  text-align: center;
  font-weight: 700;
}

@media (max-width: 990px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .converter-grid {
    grid-template-columns: 1fr;
  }

  .tool-grid,
  .tool-grid.three-up,
  .expansions-grid,
  .seo-links,
  .seo-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .top-nav {
    gap: 0.8rem;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .swap-icon {
    justify-self: start;
    margin: 0;
  }
}
