/* =========================================================
   SewaSync × ListMonk — public pages theme
   Tokens mirror packages/website/src/assets/css/site.css
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --teal-50: #e6f7f6;
  --teal-100: #ccefed;
  --teal-200: #99dfdb;
  --teal-500: #0d9488;
  --teal-600: #0a766d;
  --teal-700: #085952;
  --amber-500: #f59e0b;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-faint: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
}

/* ---- base ---- */
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: linear-gradient(180deg, var(--teal-50) 0%, #ffffff 340px, var(--surface-alt) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--teal-100); }

a { color: var(--teal-600); text-decoration-color: var(--teal-200); text-underline-offset: 3px; }
a:hover { color: var(--teal-700); }

h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
h2 { font-size: 1.55rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.1rem; }

label { color: var(--ink-soft); font-weight: 500; }

:focus-visible { outline: 3px solid var(--teal-500); outline-offset: 2px; border-radius: 4px; }

/* ---- card shell ---- */
.container { margin: 48px auto 16px auto; }

.wrap {
  background: var(--surface);
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 32px;
}

.section { margin-bottom: 40px; }

/* ---- brand (injected by custom.js) ---- */
.sw-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.sw-brand svg { width: 34px; height: 34px; display: block; }
.sw-brand .sw-name {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* ---- buttons ---- */
.button {
  background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: 13px 28px;
  min-width: 160px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.button:hover {
  background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
  color: #fff;
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.button:active { transform: translateY(0); }
.button:focus-visible { outline: 3px solid var(--teal-500); outline-offset: 2px; }

.button.button-outline {
  background: var(--surface);
  border: 1.5px solid var(--teal-500);
  color: var(--teal-600);
  box-shadow: none;
}
.button.button-outline:hover {
  background: var(--teal-50);
  border-color: var(--teal-600);
  color: var(--teal-700);
  filter: none;
}

/* ---- forms ---- */
input[type="text"], input[type="email"], input[type="password"], select {
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px var(--teal-100);
}
input::placeholder { color: var(--ink-faint); }
input[disabled] { opacity: 0.55; }

input[type="checkbox"], input[type="radio"] {
  accent-color: var(--teal-500);
  width: 1.05rem;
  height: 1.05rem;
  cursor: pointer;
}

.login input[name=totp_code] { letter-spacing: 6px; }

/* ---- list picker cards (subscription form / manage prefs) ---- */
.lists { list-style: none; padding: 0; }
.lists li {
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.lists li:has(input[type="checkbox"]:checked) {
  border-color: var(--teal-500);
  background: var(--teal-50);
}
.lists li label { color: var(--ink); font-weight: 600; }
.lists .description { margin: 4px 0 0 0; color: var(--ink-faint); font-size: 0.875em; line-height: 1.45; }

.form .captcha { margin-top: 28px; }

/* ---- misc ---- */
.row { margin-bottom: 20px; }
.error { color: #dc2626; }

.home-options { margin-top: 28px; }
.home-options a {
  display: inline-block;
  margin: 4px 7px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
  font-weight: 500;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.home-options a:hover { border-color: var(--teal-500); background: var(--teal-50); }

.archive li {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.archive .date { display: block; color: var(--ink-faint); font-size: 0.875em; }

.unsub-all { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--line); }

/* ---- footer ---- */
footer.container {
  margin-top: 24px;
  margin-bottom: 40px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.8rem;
}
footer a { color: var(--ink-faint); text-decoration: none; }
footer a:hover { color: var(--teal-600); }

/* ---- mobile ---- */
@media screen and (max-width: 650px) {
  .container { margin: 20px auto 12px auto; padding: 0 4vw; }
  .wrap { padding: 26px 22px; border-radius: var(--radius); }
}