/*
 * eventnotes-site — site.css
 * T-269. Own layout — NOT a copy of eventnotes-app's or eventnotes-admin's
 * styling (AC-8). Every color and corner-radius value below is copied
 * LITERALLY from product/design/tokens.css (Sakura palette, Д-020) — only
 * the roles this site actually needs, not the full token set (no dark
 * theme, no premium/dev-badge roles: this site has none of those surfaces).
 * check.sh (CH-5) greps each literal against tokens.css on every run — do
 * not introduce a color or radius that isn't copied from there.
 * Font: system stack from tokens.css — no @font-face, no remote font.
 */

:root {
  --md-sys-color-primary: #B0476A;
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-primary-container: #E8B5CE;
  --md-sys-color-on-primary-container: #2D101E;
  --md-sys-color-error: #BA1A1A;
  --md-sys-color-on-error: #FFFFFF;
  --md-sys-color-error-container: #FFDAD6;
  --md-sys-color-on-error-container: #410002;
  --md-sys-color-surface: #FEFCFC;
  --md-sys-color-on-surface: #241E20;
  --md-sys-color-on-surface-variant: #4F4648;
  --md-sys-color-surface-container: #F2ECEE;
  --md-sys-color-surface-container-low: #F8F4F5;
  --md-sys-color-outline: #7A7375;
  --md-sys-color-outline-variant: #C8BEC1;

  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;

  --font-family: Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.5;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--md-sys-color-primary);
}

.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.site-header a.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
  font-weight: 500;
  font-size: 18px;
}

.locale-switch {
  margin-left: auto;
  font-size: 14px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 12px 24px;
  font-size: 14px;
}

main {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 24px;
}

h1 {
  font-size: 28px;
  margin: 0 0 16px 0;
}

.tagline {
  color: var(--md-sys-color-on-surface-variant);
}

.lang-select-body main {
  text-align: center;
  padding-top: 12vh;
  max-width: 480px;
}

.lang-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 24px;
}

.lang-links a {
  padding: 12px 28px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-medium);
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
}

.card {
  background: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-large);
  padding: 20px;
  margin: 16px 0;
}

.panel-success {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border-radius: var(--md-sys-shape-corner-large);
  padding: 16px 20px;
  margin: 16px 0;
}

.panel-error {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
  border-radius: var(--md-sys-shape-corner-large);
  padding: 16px 20px;
  margin: 16px 0;
}

.panel-error p,
.panel-success p {
  margin: 0;
}

.panel-error p + p,
.panel-success p + p {
  margin-top: 8px;
}

.meta {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
}

.policy-body {
  white-space: pre-wrap;
  margin-top: 16px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

input[type='password'] {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-small);
  font-size: 16px;
  font-family: inherit;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
}

ul.rules {
  padding-left: 20px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
}

ul.rules li {
  margin: 4px 0;
}

button {
  margin-top: 20px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  padding: 20px 24px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}

.site-footer a {
  color: var(--md-sys-color-on-surface-variant);
}

.support-email {
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}
