/* SA Group: white, Apple-style. Brand colour from the logo. */
:root {
  --bg: #ffffff;
  --fill: #f5f5f7;
  --fill-2: #e8e8ed;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --brand: #0b4d54;
  --brand-press: #083b40;
  --on-brand: #ffffff;
  --err: #d70015;
  --warn-bg: #fff8e6;
  --warn-text: #6b4e00;
  --focus: rgba(11, 77, 84, .35);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.01em;
}

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.topbar-in {
  max-width: 560px; margin: 0 auto; padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.logo { display: block; height: 34px; width: auto; }

/* segmented control (languages, anonymous/open) */
.seg {
  display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--fill-2);
}
.langs button {
  min-width: 44px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.langs button[aria-pressed="true"] {
  background: #fff; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04);
}

.wrap { max-width: 560px; margin: 0 auto; padding: 20px 16px 40px; }

/* intro */
.hero h1 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.025em; margin: 4px 0 10px; }
.hero p { margin: 0 0 6px; color: var(--muted); font-size: 15px; }
.sign { font-size: 14px !important; color: var(--text) !important; font-weight: 600; margin-top: 8px !important; }

/* form */
.card { margin-top: 22px; }
.field { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
legend, label, .label {
  display: block; margin: 0 0 8px; padding: 0;
  font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { margin: 0; position: relative; color: var(--text); font-size: 15px; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border-radius: 999px; background: var(--fill); color: var(--text); font-weight: 500;
  transition: background-color .15s ease, color .15s ease;
}
.chip input:checked + span { background: var(--brand); color: var(--on-brand); }
.chip input:focus-visible + span { box-shadow: 0 0 0 4px var(--focus); }

/* anonymous / open as a segmented control */
.chips.two.seg { display: flex; width: 100%; gap: 2px; }
.chips.two .chip { flex: 1 1 0; }
.chips.two .chip span {
  width: 100%; min-height: 40px; border-radius: 7px; background: transparent; font-size: 15px;
}
.chips.two .chip input:checked + span {
  background: #fff; color: var(--text); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04);
}

textarea, input[type="text"] {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--fill); border: 1px solid transparent; border-radius: 12px;
  padding: 12px 14px; min-height: 44px; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
textarea { resize: vertical; min-height: 132px; }
textarea::placeholder, input::placeholder { color: #8e8e93; }
textarea:focus, input[type="text"]:focus {
  outline: none; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px var(--focus);
}
#fromWrap { margin-top: 12px; }

.row-between { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 6px; }
.counter { margin: 0 0 0 auto; order: 1; color: var(--muted); font-size: 13px; white-space: nowrap; }
.row-between .error { flex: 1 1 100%; order: 2; margin-top: 0; }
.error { color: var(--err); font-size: 14px; font-weight: 500; margin: 6px 0 0; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.warn { background: var(--warn-bg); color: var(--warn-text); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 10px 0 0; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0;
  font: inherit; font-weight: 600; cursor: pointer; text-align: center;
  transition: background-color .15s ease, transform .1s ease;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); color: var(--on-brand); width: 100%; min-height: 50px; font-size: 17px; }
.btn.primary:hover { background: var(--brand-press); }
.btn.secondary { background: var(--fill); color: var(--brand); margin: 0; position: relative; font-size: 15px; }
.btn.secondary:hover { background: var(--fill-2); }
.btn.secondary::before { content: "+"; font-size: 20px; font-weight: 400; line-height: 1; }
.btn.secondary:focus-within { box-shadow: 0 0 0 4px var(--focus); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; }

.filechip {
  display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 4px 4px 4px 14px;
  border-radius: 12px; background: var(--fill);
}
.fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 500; }
.fsize { color: var(--muted); font-size: 13px; white-space: nowrap; }
.x {
  min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; background: transparent;
  color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer;
}

/* privacy note: small grey print under the form */
.privacy { margin: 0 0 16px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.privacy p { margin: 0 0 4px; }
.priv-mode { color: var(--text); font-weight: 600; }

/* thank-you */
.thanks { text-align: center; padding: 40px 8px 24px; }
.thanks h2 { margin: 14px 0 6px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.thanks p { color: var(--muted); margin: 0 0 24px; font-size: 15px; }
.check {
  width: 60px; height: 60px; border-radius: 50%; margin: 0 auto; background: var(--brand); color: var(--on-brand);
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700;
}

button:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus); }
@media (min-width: 600px) {
  .hero h1 { font-size: 34px; }
  .wrap { padding-top: 36px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
