:root {
  --ink: #1f2a32;
  --muted: #64717a;
  --paper: rgba(255, 255, 255, 0.76);
  --paper-strong: rgba(255, 255, 255, 0.84);
  --line: rgba(31, 42, 50, 0.14);
  --accent: #3f6f74;
  --accent-soft: rgba(63, 111, 116, 0.12);
  --footer-surface: rgba(255, 255, 255, 0.28);
  --shadow: 0 24px 80px rgba(15, 23, 27, 0.22);
  --landscape-image: url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1920&q=80");
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(135deg, rgba(245, 248, 246, 0.34), rgba(219, 232, 228, 0.46)),
    var(--landscape-image) center / cover fixed;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: -24px;
  z-index: -1;
  background: inherit;
  filter: blur(9px) saturate(1);
  transform: scale(1.025);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.28), transparent 34rem),
    rgba(244, 248, 246, 0.08);
}

a {
  color: inherit;
  text-underline-offset: 0.25em;
}

a:focus-visible,
.suggestion-link:focus-visible,
.mobile-support-link:focus-visible {
  outline: 2px solid rgba(63, 111, 116, 0.46);
  outline-offset: 4px;
}

.page-shell {
  min-height: calc(100vh - 88px);
  display: grid;
  place-items: center;
  padding: 48px 20px 24px;
}

.tip-panel {
  width: min(680px, 100%);
  padding: clamp(28px, 6vw, 54px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.eyebrow,
.category {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--muted);
}

.category {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(63, 111, 116, 0.2);
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  text-transform: none;
}

h1 {
  margin: 26px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  line-height: 0.98;
  font-weight: 500;
}

.tip-content {
  max-width: 58ch;
  margin: 22px 0 0;
  color: #324047;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.65;
}

.suggestion-panel {
  width: min(760px, 100%);
}

.admin-shell {
  place-items: start center;
}

.admin-panel {
  width: min(980px, 100%);
}

.suggestion-form {
  display: grid;
  gap: 18px;
  margin-top: 30px;
}

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

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

.form-field label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid rgba(31, 42, 50, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
  padding: 11px 12px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.form-field textarea {
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: rgba(63, 111, 116, 0.58);
  box-shadow: 0 0 0 3px rgba(63, 111, 116, 0.12);
  outline: none;
  background: rgba(255, 255, 255, 0.86);
}

.turnstile-box {
  min-height: 65px;
}

.submit-button {
  width: fit-content;
  border: 1px solid rgba(31, 42, 50, 0.12);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 11px 18px;
  transition:
    background 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.submit-button:hover {
  background: #345e62;
}

.submit-button:active {
  transform: translateY(1px);
}

.submit-button:disabled {
  background: rgba(31, 42, 50, 0.24);
  color: rgba(31, 42, 50, 0.48);
  cursor: not-allowed;
  opacity: 1;
}

.form-status {
  min-height: 1.5em;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-status[data-type="success"] {
  color: #286247;
}

.form-status[data-type="error"] {
  color: #9d3030;
}

.admin-dashboard {
  margin-top: 30px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  border-bottom: 1px solid var(--line);
}

.admin-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(31, 42, 50, 0.66);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 10px 4px;
}

.admin-tab.is-active {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.admin-tab-panel {
  margin-top: 20px;
}

.admin-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-filter label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-filter select {
  border: 1px solid rgba(31, 42, 50, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  font: inherit;
  padding: 8px 12px;
}

.admin-filter input {
  min-width: min(260px, 100%);
  border: 1px solid rgba(31, 42, 50, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  font: inherit;
  padding: 8px 12px;
}

.admin-kicker,
.admin-user {
  margin: 0;
}

.admin-kicker {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-user {
  margin-top: 4px;
  font-weight: 700;
}

.admin-actions,
.suggestion-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.text-button {
  border: 0;
  background: transparent;
  color: rgba(31, 42, 50, 0.74);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(31, 42, 50, 0.28);
  text-underline-offset: 0.25em;
}

.text-button:hover {
  color: var(--accent);
  text-decoration-color: rgba(63, 111, 116, 0.58);
}

.danger-button:hover {
  color: #9d3030;
  text-decoration-color: rgba(157, 48, 48, 0.48);
}

.compact-button {
  padding: 8px 13px;
}

.suggestions-list {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0 2px;
}

.pagination-size,
.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination-size label,
.pagination-info {
  color: var(--muted);
  font-size: 0.84rem;
}

.pagination-size select {
  border: 1px solid rgba(31, 42, 50, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  font: inherit;
  padding: 7px 10px;
}

.text-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.suggestion-card {
  padding: 18px;
  border: 1px solid rgba(31, 42, 50, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.suggestion-meta,
.suggestion-author {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.suggestion-title {
  margin: 8px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.1;
}

.suggestion-content {
  margin: 12px 0 0;
  line-height: 1.6;
}

.suggestion-example {
  margin: 12px 0 0;
  padding-left: 14px;
  border-left: 2px solid rgba(63, 111, 116, 0.52);
  color: #34454d;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

.suggestion-author,
.suggestion-actions {
  margin-top: 14px;
}

.admin-tip-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.new-tip-form {
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid rgba(31, 42, 50, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.38);
}

.new-tip-button {
  margin-left: auto;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.examples {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.examples[hidden] {
  display: none;
}

.example {
  margin: 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid rgba(63, 111, 116, 0.62);
  border-radius: 0;
  background: transparent;
  color: #34454d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.6;
}

.example strong {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
}

.site-footer {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(20px, 5vw, 56px);
  color: rgba(31, 42, 50, 0.78);
  font-size: 0.92rem;
  background: transparent;
  backdrop-filter: none;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.suggestion-link {
  color: rgba(31, 42, 50, 0.76);
  font-size: 0.9rem;
  text-decoration: underline;
  text-decoration-color: rgba(31, 42, 50, 0.28);
  transition:
    color 160ms ease,
    text-decoration-color 160ms ease;
}

.suggestion-link:hover {
  color: var(--accent);
  text-decoration-color: rgba(63, 111, 116, 0.58);
}

.mobile-support-link {
  display: none;
}

@media (max-width: 640px) {
  body {
    background-attachment: scroll;
  }

  .page-shell {
    min-height: calc(100vh - 136px);
    padding: 28px 16px 20px;
  }

  .tip-panel {
    padding: 28px 22px;
  }

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

  .submit-button {
    width: 100%;
  }

  .admin-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-actions,
  .suggestion-actions,
  .pagination-controls,
  .pagination-buttons {
    width: 100%;
  }

  .pagination-controls {
    align-items: flex-start;
    flex-direction: column;
  }

  .compact-button {
    width: 100%;
  }

  .new-tip-button {
    margin-left: 0;
  }

  .site-footer {
    min-height: 136px;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 18px 16px 24px;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .mobile-support-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 7px 13px;
    border: 1px solid rgba(31, 42, 50, 0.14);
    border-radius: 999px;
    background: rgba(255, 221, 0, 0.92);
    color: #111;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(31, 42, 50, 0.12);
  }

  .mobile-support-link img {
    width: 18px;
    height: 18px;
    object-fit: contain;
  }

  #bmc-wbtn,
  #bmc-iframe,
  #bmc-widget,
  #bmc-close-btn,
  #bmc-message,
  #bmc-notification,
  iframe[src*="buymeacoffee"],
  [id^="bmc-"],
  [id*="bmc-"],
  [class*="bmc-"],
  [class*="bmc_"],
  [class*="buymeacoffee"] {
    display: none !important;
  }
}
