:root {
  --primary: #0d9488;
  --primary-strong: #0f766e;
  --primary-soft: #e6fffa;
  --accent: #f59e0b;
  --ink: #1e293b;
  --muted: #64748b;
  --bg: #cfeae3;
  --card: #ffffff;
  --line: #e2e8f0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 480px at 50% -8%, #d8f5ee 0%, rgba(216, 245, 238, 0) 62%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* ---------- Header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.head-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand .tld { color: var(--primary); }
.head-brand { display: flex; flex-direction: column; }
.brand-identity { font-size: 0.78rem; font-weight: 600; color: var(--primary-strong); margin-top: 0.15rem; }

/* ---------- Nav ---------- */
.nav { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.nav a:hover { color: var(--primary-strong); }
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  padding: 0;
  line-height: 1.5;
}
.nav-dropdown-toggle:hover { color: var(--primary-strong); }
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  min-width: 180px;
  padding: 0.35rem 0;
  display: none;
  z-index: 50;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { color: var(--primary-strong); background: var(--primary-soft); }

/* ---------- Page / hero ---------- */
.page {
  display: block;
  flex: 1;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
}
.hero-sm { text-align: center; padding: 2rem 1rem 1.25rem; }
.hero-sm h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}
.hero-sm p { color: var(--muted); margin: 0; }

/* ---------- Panels & forms ---------- */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.08);
  padding: 2rem;
  margin: 0 auto 2rem;
}
.form-panel { max-width: 820px; }
.form-panel-narrow { max-width: 420px; }

.form-panel label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.85rem;
}
.form-panel input[type="text"],
.form-panel input[type="email"],
.form-panel input[type="password"],
.form-panel textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #dbeafe;
}
.form-panel input:focus, .form-panel textarea:focus {
  outline: 2px solid var(--primary-soft);
  border-color: var(--primary);
}

.intro-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  transition: opacity 0.15s ease;
  margin-top: 0.5rem;
}
.intro-btn.primary {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
  color: #fff;
}
.intro-btn:hover { opacity: 0.9; }

/* ---------- Flash ---------- */
.flash {
  max-width: 640px;
  margin: 0 auto 1rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
}
.flash-error { background: #fee2e2; color: #b91c1c; }
.flash-ok { background: var(--primary-soft); color: var(--primary-strong); }

/* ---------- Tools table ---------- */
.tools-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tools-table th {
  text-align: left;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  font-weight: 700;
  padding: 0.5rem 0.6rem;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
.tools-table td {
  padding: 0.85rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.tool-name {
  white-space: nowrap;
  font-weight: 700;
}
.tool-name a {
  color: var(--primary-strong);
  text-decoration: none;
}
.tool-name a:hover { text-decoration: underline; }
.tool-info { color: var(--ink); }

/* ---------- Footer ---------- */
.site-foot {
  text-align: center;
  padding: 1.75rem 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  background: #fff;
  margin-top: auto;
}
.site-foot a { color: var(--primary-strong); text-decoration: none; font-weight: 600; }
.site-foot a:hover { text-decoration: underline; }
.site-foot p { margin: 0.25rem 0; }

/* ---------- Flag dialog (site issues) ---------- */
.tz-help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.tz-help-modal {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3);
}
.tz-help-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.tz-help-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.flag-body label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.75rem 0 0.3rem;
}
.flag-body select,
.flag-body textarea {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
}
.flag-body textarea { min-height: 100px; resize: vertical; }
.flag-body .mini { font-size: 0.8rem; color: var(--muted); margin: 0; }
