:root {
  color-scheme: light;
  --bg: #f4efe2;
  --bg-elev: #fbf7ee;
  --bg-muted: #ece4d2;
  --bg-inverse: #070707;
  --text: #121212;
  --text-muted: #5e584c;
  --text-inverse: #f3ead8;
  --line: rgba(18, 18, 18, 0.1);
  --brand: #c9a227;
  --brand-hover: #b48e16;
  --brand-soft: rgba(201, 162, 39, 0.14);
  --brand-ink: #0a0a0a;
  --gold: #c9a227;
  --gold-soft: rgba(201, 162, 39, 0.12);
  --navy: #0a0a0a;
  --ring: rgba(201, 162, 39, 0.28);
  --shadow: 0 12px 40px rgba(10, 10, 10, 0.08);
  --nav-h: 72px;
  --bg-color: var(--bg);
  --text-color: var(--text);
  --heading-color: var(--text);
  --fg-color: var(--text);
  --card-bg: var(--bg-elev);
  --border-color: var(--line);
  --control-bg: var(--bg-elev);
  --primary-color: var(--brand);
}

html.dark {
  color-scheme: dark;
  --bg: #070707;
  --bg-elev: #0e0e0e;
  --bg-muted: #141414;
  --bg-inverse: #f3ead8;
  --text: #f3ead8;
  --text-muted: #9a9180;
  --text-inverse: #0a0a0a;
  --line: rgba(201, 162, 39, 0.16);
  --brand: #c9a227;
  --brand-hover: #d4b24a;
  --brand-soft: rgba(201, 162, 39, 0.1);
  --brand-ink: #0a0a0a;
  --gold: #c9a227;
  --gold-soft: rgba(201, 162, 39, 0.12);
  --navy: #050505;
  --ring: rgba(201, 162, 39, 0.22);
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  --bg-color: #070707;
  --text-color: #f3ead8;
  --heading-color: #f3ead8;
  --fg-color: #f3ead8;
  --card-bg: #0e0e0e;
  --border-color: rgba(201, 162, 39, 0.16);
  --control-bg: #0e0e0e;
  --primary-color: #c9a227;
}

html,
body,
.page-me,
#page-me,
.web-page-wrapper,
.page-card,
.page-content,
.page-content-wrapper,
.page_content,
.web-page-content,
.website-doc,
.layout-main,
.layout-main-section,
main.container,
.container,
[data-page-container] {
  margin: 0;
  height: auto !important;
  min-height: 100%;
  overflow: visible !important;
  background: var(--bg) !important;
  background-color: var(--bg) !important;
  color: var(--text) !important;
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  scroll-behavior: smooth;
}

#root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: auto !important;
  overflow: visible !important;
  background: var(--bg);
  color: var(--text);
}
#root > main {
  flex: 1 0 auto;
}
#root > footer {
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}
.sw-page {
  background: var(--bg);
  color: var(--text);
}

#root h1,
#root h2,
#root h3,
#root h4,
#root h5,
#root h6,
#root p,
#root label,
#root li,
#root span,
#root a,
#root button {
  color: inherit;
  text-decoration: none !important;
}

#root a:hover,
#root a:focus,
#root a:visited,
#root a:active {
  text-decoration: none !important;
}

#root h1,
#root h2,
#root h3,
#root h4 {
  color: var(--text) !important;
}

#root .sw-muted,
#root .sw-muted * {
  color: var(--text-muted) !important;
}

::selection {
  background: var(--brand);
  color: var(--brand-ink);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
  border: 2px solid var(--bg);
}

.sw-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

@media (min-width: 768px) {
  .sw-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.sw-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}

.sw-title {
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--text);
}

.sw-muted {
  color: var(--text-muted);
}

.sw-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}

.sw-plate {
  background: var(--bg-muted);
  border-radius: 1.15rem;
}
html.dark .sw-plate {
  background: #101010;
}

.sw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1;
  min-height: 48px;
  padding: 0 1.35rem;
  text-decoration: none !important;
  white-space: nowrap;
  border: 1px solid transparent;
  box-sizing: border-box;
  vertical-align: middle;
  touch-action: manipulation;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.sw-btn svg {
  display: block;
  flex-shrink: 0;
}
.sw-btn:hover {
  transform: translateY(-1px);
  text-decoration: none !important;
}
.sw-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
.sw-btn:disabled {
  opacity: 0.5;
  pointer-events: none;
  transform: none;
}

.sw-btn-primary,
#root a.sw-btn-primary,
#root button.sw-btn-primary {
  background: var(--brand) !important;
  color: var(--brand-ink) !important;
  border-color: var(--brand);
}
.sw-btn-primary:hover,
#root a.sw-btn-primary:hover {
  background: var(--brand-hover) !important;
  color: var(--brand-ink) !important;
}

.sw-btn-ghost,
#root a.sw-btn-ghost {
  background: transparent;
  color: var(--text) !important;
  border-color: var(--line);
}
.sw-btn-ghost:hover {
  background: var(--bg-muted);
}

.sw-btn-nav {
  min-height: 2.4rem;
  padding: 0 1.05rem;
  font-size: 0.875rem;
}

.sw-input,
.sw-select,
.sw-textarea {
  width: 100%;
  min-height: 48px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
.sw-textarea {
  min-height: 8rem;
  resize: vertical;
}
.sw-input:focus,
.sw-select:focus,
.sw-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}

.sw-logo-wrap {
  background: #fff;
  border-radius: 0.85rem;
  padding: 0.35rem 0.45rem;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 0 0 1px rgba(20, 24, 31, 0.06);
}

/* Nav: real hover fill + active module shading. Kill Bootstrap a:hover underline. */
.sw-nav-link,
button.sw-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.4rem 0.9rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-muted) !important;
  background: transparent;
  border: 1px solid transparent;
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.sw-nav-link:hover,
.sw-nav-link:focus-visible,
button.sw-nav-link:hover {
  color: var(--text) !important;
  background: var(--bg-muted);
  text-decoration: none !important;
}
.sw-nav-link.is-active,
button.sw-nav-link.is-active {
  color: var(--brand) !important;
  background: var(--brand-soft);
  border-color: rgba(201, 162, 39, 0.28);
  font-weight: 700;
}
.sw-nav-link.is-active::after,
button.sw-nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 5px;
  height: 2px;
  background: var(--brand);
  border-radius: 99px;
}

.sw-nav-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
}
.sw-nav-icon:hover,
.sw-nav-icon:focus-visible {
  background: var(--bg-muted);
  border-color: var(--brand);
  text-decoration: none !important;
}
.sw-nav-icon.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.sw-nav-drawer-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.15rem;
  font-weight: 600;
  color: var(--text) !important;
  text-decoration: none !important;
  border-bottom: 1px solid var(--line);
}
.sw-nav-drawer-link.is-active {
  color: var(--brand) !important;
}

.sw-footer-link:hover,
.sw-footer-link:focus {
  color: #fff !important;
  text-decoration: none !important;
}

html.dark .navbar,
html.dark .web-footer,
.navbar,
header.navbar,
.web-footer,
footer.web-footer,
.page-breadcrumbs,
.page-header-wrapper,
.page-header,
.web-sidebar,
.sidebar,
.page-sidebar {
  display: none !important;
}

/* Avoid Tailwind `hidden` — Frappe/Bootstrap sets it as display:none !important. */
.sw-from-sm { display: none; }
@media (min-width: 640px) {
  .sw-from-sm { display: block; }
  .sw-from-sm-flex { display: flex; }
}
.sw-from-sm-flex { display: none; }
.sw-from-md { display: none; }
@media (min-width: 768px) {
  .sw-from-md { display: inline-flex; }
}
.sw-desktop-nav { display: none; align-items: center; gap: 0.2rem; }
@media (min-width: 1024px) {
  .sw-desktop-nav { display: flex; }
}
.sw-mobile-only { display: flex; }
@media (min-width: 1024px) {
  .sw-mobile-only { display: none !important; }
}

.sw-prose {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.65;
}
.sw-prose p { margin: 0.55rem 0; }
.sw-prose ul, .sw-prose ol { margin: 0.55rem 0 0.55rem 1.15rem; }
.sw-prose li { margin: 0.2rem 0; }
.sw-prose h1, .sw-prose h2, .sw-prose h3, .sw-prose strong, .sw-prose b {
  color: var(--text);
  font-weight: 700;
}
.sw-prose h2, .sw-prose h3 { font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase; margin-top: 1.25rem; }
.sw-prose img { max-width: 100%; border-radius: 1rem; }
.sw-prose table { display: block; width: 100%; overflow-x: auto; }
.sw-prose td, .sw-prose th { padding: 0.25rem 0.5rem; }

.sw-consent {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 95;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}
.sw-consent-card {
  max-width: 420px;
  margin-left: auto;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem 1.1rem;
}
.sw-install {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 70;
  padding: 0.85rem 1rem calc(0.85rem + 4.5rem);
}
.sw-install-card {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.75rem 0.85rem;
  box-shadow: var(--shadow);
}
@media (min-width: 640px) {
  .sw-consent-card { margin-right: 1rem; }
}

.sw-chat-panel {
  width: min(26rem, calc(100vw - 1.5rem));
  height: min(620px, calc(100dvh - 5.5rem));
}
.sw-chat-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 0.45rem 0.55rem;
  padding: 0.75rem 0.85rem 0.6rem;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
}
.sw-chat-input {
  grid-column: 1;
  width: 100%;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.45;
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  box-sizing: border-box;
}
.sw-chat-input::placeholder {
  color: var(--text-muted);
}
.sw-chat-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
}
.sw-chat-send {
  grid-column: 2;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: var(--brand-ink);
  border: none;
  cursor: pointer;
}
.sw-chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.sw-chat-disclaimer {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 10px;
  line-height: 1.35;
  color: var(--text-muted);
  text-align: center;
}

header.navbar a[href*="login"],
.navbar a[href*="login"],
.navbar .nav-link[href*="login"],
a.sw-btn-nav[href*="login"],
body:has(#root) a[href="/login"],
body:has(#root) a[href*="/login"]:not(#root a) {
  display: none !important;
}
