:root {
  --platform-canvas: #ffffff;
  --platform-surface: #ffffff;
  --platform-surface-muted: #f7f8f7;
  --platform-border: #e2e8e5;
  --platform-text: #18211d;
  --platform-text-muted: #52605a;
  --platform-focus: #059669;
}

html[data-platform-theme="dark"] {
  --platform-canvas: #0d0f0e;
  --platform-surface: #151817;
  --platform-surface-muted: #1d211f;
  --platform-border: #303632;
  --platform-text: #f4f7f5;
  --platform-text-muted: #b6c0ba;
  --platform-focus: #34d399;
}

*, *::before, *::after { box-sizing: border-box; }
html { line-height: 1.5; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.public-page {
  min-width: 320px;
  color: var(--platform-text);
  background: var(--platform-canvas);
  font-family: InterVariable, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.public-shell-container { width: 100%; max-width: 80rem; margin-inline: auto; padding-inline: 1rem; }
.public-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid #f3f4f6; background: #fff; transition: box-shadow .15s ease; }
.public-header.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1); }
.public-header-inner { display: flex; height: 4rem; align-items: center; justify-content: space-between; gap: 1rem; }
.public-brand { display: inline-flex; align-items: center; gap: .375rem; color: #111827; }
.public-brand > span:first-child { font-size: 1.5rem; line-height: 2rem; font-weight: 800; letter-spacing: -.025em; }
.public-brand-dot { width: .5rem; height: .5rem; border-radius: 9999px; background: #10b981; }
.public-desktop-nav { display: none; align-items: center; gap: 1.75rem; }
.public-desktop-nav a { color: #4b5563; font-size: .875rem; line-height: 1.25rem; font-weight: 500; }
.public-desktop-nav a:hover { color: #111827; }
.public-header-actions { display: flex; align-items: center; gap: .5rem; }
.public-login { display: none; color: #374151; font-size: .875rem; line-height: 1.25rem; font-weight: 600; }
.public-login:hover { color: #111827; }
.public-register { display: none; border-radius: .5rem; padding: .625rem 1rem; color: #fff; background: #059669; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); font-size: .875rem; line-height: 1.25rem; font-weight: 600; text-align: center; }
.public-register:hover { background: #047857; }
.public-mobile-toggle { display: inline-flex; padding: .5rem; border-radius: .5rem; color: #374151; background: transparent; }
.public-mobile-toggle:hover { background: #f9fafb; }
.public-mobile-toggle svg { width: 1.5rem; height: 1.5rem; }

.public-language { position: relative; }
.public-language-trigger { display: flex; height: 2.5rem; align-items: center; gap: .5rem; padding-inline: .75rem; border-radius: .5rem; color: #374151; background: transparent; font-size: .875rem; line-height: 1.25rem; font-weight: 600; transition: background-color .15s, color .15s; }
.public-language-trigger:hover { color: #030712; background: #f3f4f6; }
.public-language-trigger:focus-visible, .public-theme-toggle:focus-visible, .public-mobile-toggle:focus-visible, .public-language-menu a:focus-visible, .public-footer a:focus-visible { outline: 2px solid #059669; outline-offset: 2px; }
.public-flag { display: flex; width: 1.5rem; height: 1.5rem; flex: 0 0 auto; align-items: center; justify-content: center; }
.public-flag img { width: 1.5rem; height: 1rem; border-radius: .125rem; object-fit: cover; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.public-language-label { display: none; }
.public-language-short { display: inline; }
.public-language-chevron { width: 1rem; height: 1rem; flex: 0 0 auto; color: #9ca3af; transition: transform .15s; }
.public-language-chevron.rotate-180 { transform: rotate(180deg); }
.public-language-menu { position: absolute; right: 0; z-index: 70; width: 13rem; margin-top: .5rem; padding: .375rem; border-radius: .5rem; color: #374151; background: #fff; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1), inset 0 0 0 1px #e5e7eb; }
.public-language-menu a { display: flex; height: 2.75rem; align-items: center; gap: .75rem; padding-inline: .75rem; border-radius: .5rem; font-size: .875rem; line-height: 1.25rem; font-weight: 600; }
.public-language-menu a:hover { color: #030712; background: #f9fafb; }
.public-language-menu a.is-current { color: #030712; background: #f3f4f6; }
.public-language-menu a > span:nth-child(2) { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.public-language-check { width: 1rem; height: 1rem; flex: 0 0 auto; color: #059669; }
.public-theme-toggle { display: inline-flex; width: 2.5rem; height: 2.5rem; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: .5rem; color: #374151; background: transparent; transition: background-color .15s, color .15s; }
.public-theme-toggle:hover { color: #030712; background: #f3f4f6; }
.public-theme-toggle svg { width: 1.25rem; height: 1.25rem; }

.public-mobile-menu { border-top: 1px solid #f3f4f6; background: #fff; }
.public-mobile-nav { padding: 1rem; }
.public-mobile-nav > a { display: block; padding: .625rem .75rem; border-radius: .5rem; color: #374151; font-size: 1rem; line-height: 1.5rem; font-weight: 500; }
.public-mobile-nav > a:hover { background: #f9fafb; }
.public-mobile-actions { display: grid; gap: .5rem; padding-top: .75rem; }
.public-mobile-actions .public-register { display: block; padding-block: .75rem; }
.public-mobile-login { display: block; padding: .75rem 1rem; border-radius: .5rem; color: #374151; box-shadow: inset 0 0 0 1px #d1d5db; font-size: .875rem; line-height: 1.25rem; font-weight: 600; text-align: center; }
.public-mobile-login:hover { background: #f9fafb; }

.public-footer { border-top: 1px solid #e5e7eb; color: #4b5563; background: #f9fafb; }
.public-footer-inner { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.public-footer-grid { display: grid; gap: 2.5rem; }
.public-footer-tagline { margin: 1rem 0 0; color: #111827; font-size: .875rem; line-height: 1.25rem; font-weight: 600; }
.public-footer-description { max-width: 28rem; margin: .5rem 0 0; font-size: .875rem; line-height: 1.625; }
.public-footer-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 2.5rem 2rem; }
.public-footer h2 { margin: 0; color: #030712; font-size: .875rem; line-height: 1.25rem; font-weight: 600; letter-spacing: normal; }
.public-footer ul { display: grid; gap: .625rem; margin: 1rem 0 0; padding: 0; list-style: none; font-size: .875rem; line-height: 1.25rem; }
.public-footer li { margin: 0; }
.public-footer a:hover { color: #030712; }
.public-footer-bottom { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #e5e7eb; color: #6b7280; font-size: .875rem; line-height: 1.25rem; }
.public-footer-bottom p { margin: 0; }

html[data-platform-theme="dark"] .public-header,
html[data-platform-theme="dark"] .public-mobile-menu,
html[data-platform-theme="dark"] .public-language-menu { color: var(--platform-text); background: var(--platform-surface); border-color: var(--platform-border); }
html[data-platform-theme="dark"] .public-brand,
html[data-platform-theme="dark"] .public-footer-tagline,
html[data-platform-theme="dark"] .public-footer h2 { color: #f9fafb; }
html[data-platform-theme="dark"] .public-desktop-nav a,
html[data-platform-theme="dark"] .public-login,
html[data-platform-theme="dark"] .public-mobile-toggle,
html[data-platform-theme="dark"] .public-language-trigger,
html[data-platform-theme="dark"] .public-theme-toggle,
html[data-platform-theme="dark"] .public-mobile-nav > a,
html[data-platform-theme="dark"] .public-mobile-login { color: #d1d5db; }
html[data-platform-theme="dark"] .public-desktop-nav a:hover,
html[data-platform-theme="dark"] .public-login:hover,
html[data-platform-theme="dark"] .public-language-trigger:hover,
html[data-platform-theme="dark"] .public-theme-toggle:hover,
html[data-platform-theme="dark"] .public-language-menu a:hover,
html[data-platform-theme="dark"] .public-language-menu a.is-current,
html[data-platform-theme="dark"] .public-footer a:hover { color: #fff; }
html[data-platform-theme="dark"] .public-language-trigger:hover,
html[data-platform-theme="dark"] .public-theme-toggle:hover,
html[data-platform-theme="dark"] .public-mobile-toggle:hover,
html[data-platform-theme="dark"] .public-mobile-nav > a:hover,
html[data-platform-theme="dark"] .public-mobile-login:hover,
html[data-platform-theme="dark"] .public-language-menu a:hover { background: #252b27; }
html[data-platform-theme="dark"] .public-language-menu a.is-current { background: var(--platform-surface-muted); }
html[data-platform-theme="dark"] .public-mobile-login { box-shadow: inset 0 0 0 1px var(--platform-border); }
html[data-platform-theme="dark"] .public-footer { color: var(--platform-text-muted); background: var(--platform-surface-muted); border-color: var(--platform-border); }
html[data-platform-theme="dark"] .public-footer-bottom { color: var(--platform-text-muted); border-color: var(--platform-border); }

@media (min-width: 640px) {
  .public-shell-container { padding-inline: 1.5rem; }
  .public-header-actions { gap: .75rem; }
  .public-language-label { display: inline; }
  .public-language-short { display: none; }
  .public-login, .public-register { display: block; }
  .public-mobile-actions .public-register { display: block; }
  .public-mobile-nav { padding-inline: 1.5rem; }
}

@media (min-width: 768px) {
  .public-footer-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .public-footer-brand, .public-footer-links { grid-column: span 6 / span 6; }
}

@media (min-width: 1024px) {
  .public-shell-container { padding-inline: 2rem; }
  .public-desktop-nav { display: flex; }
  .public-mobile-toggle, .public-mobile-menu { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .public-header, .public-language-chevron { transition: none; }
}
