:root {
  --ink: #10201f;
  --muted: #60716f;
  --paper: #eef6f5;
  --surface: rgba(255, 255, 255, 0.62);
  --surface-strong: rgba(255, 255, 255, 0.78);
  --surface-soft: rgba(255, 255, 255, 0.42);
  --teal: #08756d;
  --teal-2: #075c56;
  --red: #a74639;
  --gold: #d9a73f;
  --line: rgba(255, 255, 255, 0.58);
  --line-dark: rgba(16, 32, 31, 0.1);
  --shadow: 0 24px 80px rgba(12, 34, 33, 0.16);
  --shadow-soft: 0 14px 36px rgba(12, 34, 33, 0.1);
  --radius: 8px;
  --blur: blur(28px) saturate(1.45);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(91, 207, 190, 0.34), transparent 32%),
    radial-gradient(circle at 88% 10%, rgba(217, 167, 63, 0.28), transparent 30%),
    radial-gradient(circle at 72% 72%, rgba(167, 70, 57, 0.18), transparent 34%),
    linear-gradient(145deg, #f8fbfa 0%, #e4f1ef 47%, #f4efe7 100%);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.24) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  inset: 0;
  opacity: 0.24;
  pointer-events: none;
  position: fixed;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.site-shell {
  min-height: 100vh;
  position: relative;
}

.header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.56);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header::before {
  background: rgba(244, 250, 248, 0.74);
  backdrop-filter: var(--blur);
  content: "";
  inset: 0;
  position: absolute;
  z-index: -1;
}

.header-inner {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 14px 20px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 10px;
  font-weight: 850;
  letter-spacing: 0;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(145deg, rgba(8, 117, 109, 0.94), rgba(15, 172, 153, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 24px rgba(8, 117, 109, 0.25);
  color: #fff;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.nav {
  align-items: center;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: flex-end;
  min-width: 0;
  padding: 4px;
}

.nav a {
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  padding: 8px 10px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  transform: translateY(-1px);
}

.section {
  padding: 76px 20px;
}

.section.alt {
  background: rgba(255, 255, 255, 0.24);
  border-block: 1px solid rgba(255, 255, 255, 0.34);
}

.section-inner {
  margin: 0 auto;
  max-width: 1180px;
}

.hero {
  padding: 58px 20px 60px;
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: 38px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.86fr);
  margin: 0 auto;
  max-width: 1180px;
  width: 100%;
}

.hero-grid > * {
  min-width: 0;
}

.eyebrow {
  color: var(--red);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(48px, 8vw, 92px);
  line-height: 0.93;
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
  margin-bottom: 16px;
}

h3 {
  font-size: 21px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.lead {
  color: #445956;
  font-size: 21px;
  line-height: 1.55;
  max-width: 720px;
}

.body-copy {
  color: var(--muted);
  line-height: 1.72;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 10px 24px rgba(12, 34, 33, 0.08);
  display: inline-flex;
  font-weight: 820;
  gap: 8px;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52), 0 16px 34px rgba(12, 34, 33, 0.12);
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(145deg, var(--teal), #0aa38f);
  color: #fff;
}

.button.primary:hover {
  background: linear-gradient(145deg, var(--teal-2), #0b907f);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
}

.button.ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--teal);
  padding-left: 0;
}

.hero-card,
.card,
.notice,
.admin-list,
.ai-panel {
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.hero-card::after,
.card::after,
.notice::after,
.ai-panel::after {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.62), transparent 38%);
  content: "";
  inset: 0;
  opacity: 0.42;
  pointer-events: none;
  position: absolute;
}

.hero-card img {
  aspect-ratio: 4 / 3;
  display: block;
  max-width: 100%;
  object-fit: cover;
  width: 100%;
}

.hero-card-content {
  padding: 20px;
  position: relative;
  z-index: 1;
}

.hero-card-content strong {
  display: block;
  overflow-wrap: anywhere;
}

.mini-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 14px;
}

.mini-pill,
.tag,
.tab,
.filter,
.check-row,
input,
select,
textarea,
th {
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

.mini-pill {
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
  padding: 10px;
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-heading p {
  margin-bottom: 0;
  max-width: 560px;
}

.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  min-width: 0;
  overflow: hidden;
  padding: 20px;
  position: relative;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card.soft {
  background: rgba(255, 255, 255, 0.38);
}

.icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 8px;
  color: var(--teal);
  display: inline-flex;
  font-size: 22px;
  height: 42px;
  justify-content: center;
  margin-bottom: 14px;
  width: 42px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  padding: 6px 9px;
}

.tabs,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.tab,
.filter {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 820;
  padding: 9px 13px;
}

.tab.active,
.filter.active {
  background: linear-gradient(145deg, var(--teal), #0aa38f);
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.phrase {
  display: grid;
  gap: 8px;
}

.script {
  direction: rtl;
  font-size: 24px;
  font-weight: 850;
  text-align: right;
}

.roman {
  color: var(--red);
  font-weight: 850;
}

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

table {
  border-collapse: collapse;
  min-width: 620px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid rgba(16, 32, 31, 0.1);
  padding: 13px;
  text-align: left;
}

th {
  background: rgba(255, 255, 255, 0.46);
  color: var(--ink);
  font-size: 13px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
}

input,
select,
textarea {
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
  color: var(--ink);
  min-height: 44px;
  padding: 11px 12px;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(8, 117, 109, 0.55);
  box-shadow: 0 0 0 4px rgba(8, 117, 109, 0.12);
  outline: 0;
}

textarea {
  min-height: 118px;
  resize: vertical;
}

.stack {
  display: grid;
  gap: 14px;
}

.notice {
  background: rgba(255, 248, 222, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  color: #694b14;
  font-weight: 760;
  line-height: 1.55;
  overflow: hidden;
  padding: 16px;
  position: relative;
}

.danger-notice {
  background: rgba(255, 236, 232, 0.66);
  color: #743228;
}

.profile-top {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.avatar {
  align-items: center;
  background: linear-gradient(135deg, #08756d, #d9a73f);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  font-size: 22px;
  font-weight: 900;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.badge {
  background: rgba(235, 250, 245, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  padding: 6px 8px;
}

.chat-box {
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  display: grid;
  gap: 10px;
  max-height: 310px;
  overflow-y: auto;
  padding: 14px;
}

.message {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 8px;
  line-height: 1.45;
  max-width: 86%;
  padding: 10px 12px;
}

.message.me {
  background: rgba(220, 248, 242, 0.7);
  justify-self: end;
}

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

.check-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
}

.admin-list {
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  max-height: 360px;
  overflow: auto;
}

.admin-row {
  border-bottom: 1px solid rgba(16, 32, 31, 0.1);
  display: grid;
  gap: 4px;
  padding: 12px;
}

.admin-row:last-child {
  border-bottom: 0;
}

.ai-helper {
  bottom: max(18px, env(safe-area-inset-bottom));
  position: fixed;
  right: 18px;
  z-index: 30;
}

.ai-panel {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: none;
  margin-bottom: 10px;
  max-width: min(360px, calc(100vw - 36px));
  overflow: hidden;
  padding: 16px;
  position: relative;
}

.ai-panel > * {
  position: relative;
  z-index: 1;
}

.ai-panel.open {
  display: block;
}

.ai-toggle {
  border: 0;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.footer {
  background: rgba(255, 255, 255, 0.28);
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--muted);
  padding: 28px 20px;
  text-align: center;
}

@media (max-width: 920px) {
  .hero-grid,
  .card-grid,
  .card-grid.three,
  .card-grid.two {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 680px) {
  .site-shell,
  .header,
  .hero,
  .section,
  .footer {
    max-width: 100vw;
    overflow-x: hidden;
    width: 100vw;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 16px;
  }

  .nav {
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(2, 1fr);
    justify-content: stretch;
    max-width: calc(100vw - 56px);
    overflow: hidden;
    width: 100%;
  }

  .nav a {
    font-size: 12px;
    padding: 7px 6px;
    text-align: center;
  }

  .section {
    padding: 56px 16px;
  }

  .hero {
    padding: 34px 16px 52px;
  }

  .hero-grid,
  .hero-grid > *,
  .hero-card,
  .hero .lead {
    max-width: calc(100vw - 96px);
    width: calc(100vw - 96px);
  }

  .body-copy,
  .lead {
    overflow-wrap: break-word;
  }

  .hero .body-copy {
    max-width: 29ch;
  }

  .hero .lead {
    max-width: 27ch;
  }

  .hero-card-content strong {
    max-width: 31ch;
  }

  .hero-card {
    max-width: calc(100vw - 96px);
  }

  .form-grid,
  .privacy-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .actions .button {
    max-width: calc(100vw - 96px);
    width: 100%;
  }

  .ai-helper {
    right: 14px;
  }

  .ai-toggle {
    font-size: 0;
    height: 50px;
    min-height: 48px;
    padding: 0;
    width: 50px;
  }

  .ai-toggle::before {
    content: "AI";
    font-size: 16px;
  }
}
