:root {
  --bg: #f6f7f1;
  --panel: #ffffff;
  --panel-alt: #eef3e4;
  --text: #1e2c2a;
  --muted: #4f605e;
  --accent: #126a4e;
  --accent-strong: #0b4b36;
  --line: #d4ddcf;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(18, 43, 37, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 600px at 90% -20%, #d8ead3 0%, transparent 62%),
    radial-gradient(900px 500px at -10% 0%, #fceac5 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: 'Nunito Sans', 'Avenir Next', 'Segoe UI', sans-serif;
}

body[dir='rtl'] {
  font-family: 'Noto Naskh Arabic', 'Amiri', 'Tahoma', sans-serif;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

sup {
  font-size: 0.72em;
  line-height: 0;
  vertical-align: super;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  z-index: 999;
}

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

.container {
  width: min(1120px, 100% - 1.5rem);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, #f6f7f1 75%, #fff 25%);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.8rem 0;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.brand-title {
  font-family: 'Source Serif 4', 'Iowan Old Style', 'Georgia', serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.brand-tag {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
}

.search-form input[type='text'] {
  flex: 1 1 240px;
}

.search-form button {
  flex: 0 0 auto;
}

.lang-picker {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.lang-picker select {
  min-width: 10rem;
}

input[type='text'],
input[type='email'],
textarea,
select,
button {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font: inherit;
}

input[type='text'],
input[type='email'],
textarea,
select {
  padding: 0.6rem 0.75rem;
  background: #fff;
}

textarea {
  resize: vertical;
}

button {
  padding: 0.6rem 0.95rem;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  filter: brightness(1.04);
}

.hero {
  padding: 1.25rem 0 0.8rem;
}

.hero-title {
  font-family: 'Source Serif 4', 'Iowan Old Style', 'Georgia', serif;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin: 0;
}

.hero-subtitle {
  margin: 0.5rem 0 0;
  color: var(--muted);
  max-width: 70ch;
}

.notice {
  margin-top: 0.75rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.main-grid {
  display: grid;
  gap: 0.9rem;
  padding: 0.8rem 0 1.4rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  animation: rise 260ms ease both;
}

.card:nth-child(2) { animation-delay: 50ms; }
.card:nth-child(3) { animation-delay: 80ms; }
.card:nth-child(4) { animation-delay: 110ms; }

@keyframes rise {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.card h2,
.card h3 {
  margin-top: 0;
  font-family: 'Source Serif 4', 'Iowan Old Style', 'Georgia', serif;
}

.meta-list,
.link-list,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.meta-pill,
.tag {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-alt);
  padding: 0.3rem 0.7rem;
  font-size: 0.88rem;
}

.number-line {
  font-size: 1.05rem;
  margin: 0.35rem 0;
}

.number-main {
  font-family: 'Source Serif 4', 'Iowan Old Style', 'Georgia', serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0;
}

.cards-two {
  display: grid;
  gap: 0.9rem;
}

.product-grid {
  display: grid;
  gap: 0.9rem;
}

.product-card h3 {
  margin-bottom: 0.35rem;
}

.product-meta {
  list-style: none;
  margin: 0.65rem 0 0.8rem;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}

.product-cta-row {
  margin: 0.9rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 0.5rem 0.8rem;
  text-decoration: none;
}

.button-link:hover,
.button-link:focus-visible {
  text-decoration: none;
  filter: brightness(1.04);
}

.button-link-secondary {
  background: #fff;
  color: var(--accent-strong);
}

.button-link-buy {
  background: linear-gradient(135deg, #0f7b5a, #0b5a41);
  border-color: #0b5a41;
}

.product-note {
  display: block;
  margin-top: 0.35rem;
}

.mono {
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-word;
}

.small {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2rem;
}

.footer-grid {
  display: grid;
  gap: 0.7rem;
}

.footer-grid .link-list {
  gap: 0.8rem;
}

.ad-slot {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 0.65rem;
  font-size: 0.9rem;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel-alt) 70%, #fff 30%);
}

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

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

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: start;
  padding: 0.45rem 0.25rem;
}

.page-links {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
}

.diagram-wrap {
  margin: 0.7rem 0 0.9rem;
}

.diagram-svg {
  width: min(420px, 100%);
  height: auto;
  color: var(--accent-strong);
}

.contact-form {
  display: grid;
  gap: 0.6rem;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-line input[type='checkbox'] {
  width: 18px;
  height: 18px;
}

.hp-field {
  position: absolute;
  left: -10000px;
  opacity: 0;
  pointer-events: none;
}

@media (min-width: 760px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
  }

  .controls {
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
  }

  .search-form {
    width: min(430px, 45vw);
    min-width: min(340px, 40vw);
  }

  .lang-picker {
    justify-content: flex-start;
  }

  .cards-two {
    grid-template-columns: 1fr 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.1fr 1fr;
    align-items: start;
  }
}
