/* Big Show Golf: shared styles for the public pages (support, join, results, delete account).
   Colors match the app: cream page, forest green type, gold accents. */
:root {
  --page: #fdfbf4;
  --card: #fcfbf7;
  --field: #ffffff;
  --forest: #1e3a27;
  --text: #3f4a42;
  --muted: #6b766e;
  --fairway: #3b6b44;
  --sage: #c3cdb5;
  --sage-light: #e5eadb;
  --gold: #c9a23a;
  --gold-soft: rgba(201, 162, 58, .18);
  --line: rgba(30, 58, 39, .18);
  --danger: #b3332b;
  --on-forest: #ffffff;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(30, 58, 39, .08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0f1712;
    --card: #16211a;
    --field: #1b281f;
    --forest: #e8efe6;
    --text: #c9d3cb;
    --muted: #93a197;
    --fairway: #6fb07a;
    --sage: #3a4a3e;
    --sage-light: #223026;
    --gold: #e0bb55;
    --gold-soft: rgba(224, 187, 85, .16);
    --line: rgba(232, 239, 230, .14);
    --danger: #ef7a70;
    --on-forest: #0f1712;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--fairway); }
h1, h2, h3 { color: var(--forest); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(26px, 5vw, 34px); }
h2 { font-size: 21px; margin-top: 1.6em; }
h3 { font-size: 17px; }
p { margin: 0 0 1em; }

/* Layout */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 880px; width: 100%; margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px 8px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--forest); font-weight: 700; font-size: 17px; }
.brand img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--gold); }
.nav { display: flex; gap: 16px; font-size: 15px; }
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--forest); text-decoration: underline; text-underline-offset: 4px; }
main { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: 16px 16px 48px; }
main.narrow { max-width: 480px; }
.site-footer {
  border-top: 1px solid var(--line); color: var(--muted); font-size: 14px;
  padding: 20px 16px max(20px, env(safe-area-inset-bottom)); text-align: center;
}
.site-footer a { color: var(--muted); margin: 0 8px; }

/* Pieces */
.lead { font-size: 18px; color: var(--text); max-width: 620px; }
.card {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.grid-2 > .card + .card { margin-top: 0; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fairway); margin-bottom: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: var(--sage-light); color: var(--forest); font-size: 13px; font-weight: 600;
}
.chip.gold { background: var(--gold-soft); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.hidden { display: none !important; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: 0; border-radius: 14px; padding: 14px 18px;
  font-family: inherit; font-size: 17px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--forest); color: var(--on-forest); }
.btn-outline { background: transparent; color: var(--forest); border: 1.5px solid var(--forest); }
.btn-danger { background: var(--danger); color: #fff; }
.btn + .btn { margin-top: 10px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}

/* Forms */
label { display: block; font-weight: 600; color: var(--forest); font-size: 15px; margin: 14px 0 6px; }
input, textarea, select {
  width: 100%; font: inherit; color: var(--forest);
  background: var(--field); border: 1.2px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.alert { border-radius: 12px; padding: 12px 14px; margin: 14px 0; font-size: 15px; }
.alert.ok { background: var(--sage-light); color: var(--forest); }
.alert.error { background: rgba(179, 51, 43, .1); color: var(--danger); }
.hp { position: absolute; left: -9999px; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 4px 0; }
details:last-of-type { border-bottom: 0; }
summary { cursor: pointer; list-style: none; padding: 12px 28px 12px 0; position: relative; font-weight: 600; color: var(--forest); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 20px; color: var(--fairway); }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 12px; }

/* Code box (join page) */
.code-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--sage-light); border-radius: 12px; padding: 12px 14px; margin: 16px 0; }
.code { font: 700 24px/1.1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 3px; color: var(--forest); }
.btn-small { width: auto; padding: 8px 12px; font-family: inherit; font-size: 14px; cursor: pointer; background: var(--card); color: var(--forest); border: 1px solid var(--line); border-radius: 10px; }

/* Results page */
.hero-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); display: block; margin-bottom: 16px; background: var(--sage-light); }
.standings { width: 100%; border-collapse: collapse; }
.standings th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 6px; border-bottom: 1.5px solid var(--line); }
.standings td { padding: 10px 6px; border-bottom: 1px solid var(--line); color: var(--forest); }
.standings td.num, .standings th.num { text-align: right; font-variant-numeric: tabular-nums; }
.standings tr.first td { font-weight: 700; }
.pos { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sage-light); font-size: 13px; font-weight: 700; }
tr.first .pos { background: var(--gold); color: #1e3a27; }
.highlights { list-style: none; padding: 0; margin: 0; }
.highlights li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.highlights li:last-child { border-bottom: 0; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--sage-light); border-top-color: var(--fairway); animation: spin 1s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* Continue with Apple (Apple's style: black, white logo and words) */
.btn-apple { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: #000; color: #fff; border: 0; border-radius: 12px; padding: 13px 16px; font-size: 16px; font-weight: 600; cursor: pointer; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; }
.btn-apple:disabled { opacity: .6; cursor: default; }
.or-line { display: flex; align-items: center; gap: 10px; margin: 16px 0 2px; color: var(--muted); font-size: 13px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .3; }

/* Drop-downs: our own chevron, set in from the right edge */
select:not([multiple]) {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b766e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
  padding-right: 42px;
}
@media (prefers-color-scheme: dark) {
  select:not([multiple]) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2393a197' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

/* Night look (support, delete account): the dark green of the Privacy and Terms pages, in light and dark mode */
html.theme-night {
  --page: #0b1f12;
  --card: #12301c;
  --field: #173823;
  --forest: #f2f6f1;
  --text: rgba(242, 246, 241, .88);
  --muted: rgba(242, 246, 241, .68);
  --fairway: #f2c862;
  --sage: #2c4a35;
  --sage-light: #1a3a24;
  --gold: #f2c862;
  --gold-soft: rgba(242, 200, 98, .16);
  --line: rgba(255, 255, 255, .12);
  --danger: #ef7a70;
  --on-forest: #0b1f12;
  --shadow: none;
  color-scheme: dark;
}
html.theme-night h2 { color: var(--gold); }

/* A checkbox with its words on one line ("Show password") */
.check-line { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 12px 0 6px; cursor: pointer; }
.check-line input[type="checkbox"] { width: 20px; height: 20px; margin: 0; padding: 0; flex: none; accent-color: var(--fairway); }
