@font-face {
  font-family: "Fraunces";
  src: url("fonts/Fraunces_400Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/Fraunces_600SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/Fraunces_700Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat_400Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat_500Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat_600SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat_700Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --rh-bg: #f4f8f2;
  --rh-paper: #ffffff;
  --rh-ink: #1a1a1a;
  --rh-text: #2a2a2a;
  --rh-green: #1b8a4f;
  --rh-green-dark: #12683a;
  --rh-soft: #f2f5ef;
  --rh-muted: #e8ede4;
  --rh-muted-text: #595959;
  --rh-line: #dce6d7;
  --rh-brown: #7a5c3a;
  --rh-rose: #c97d6d;
  --rh-danger: #c53030;
  --rh-shadow: 0 18px 45px rgba(38, 65, 45, 0.07);
  --rh-radius: 1.35rem;
  --rh-topbar-height: 4rem;
  --rh-mobile-nav-height: 4.75rem;
}

/* RootHVN owns the complete signed-in visual system. Nova's component tokens
   remain useful structurally, but none of its purple vendor palette is allowed
   to leak into utilities, community, profiles, messages, or discovery. */
html[data-theme="nova"] {
  --color-primary: #1b8a4f;
  --color-primary-content: #ffffff;
  --color-secondary: #587c64;
  --color-secondary-content: #ffffff;
  --color-accent: #a77a36;
  --color-accent-content: #ffffff;
  --color-base-100: #ffffff;
  --color-base-200: #f2f5ef;
  --color-base-300: #dce6d7;
  --color-base-content: #243029;
  --color-info: #3773ac;
  --color-success: #1b8a4f;
  --color-warning: #a77a36;
  --color-error: #b84b45;
}

html[data-theme="nova-dark"] {
  --color-primary: #66bd86;
  --color-primary-content: #0d2417;
  --color-secondary: #8eb59a;
  --color-secondary-content: #102319;
  --color-accent: #d2aa6a;
  --color-accent-content: #2d1d08;
  --color-base-100: #222823;
  --color-base-200: #1a1f1b;
  --color-base-300: #3a463c;
  --color-base-content: #edf3eb;
}

html {
  max-width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  max-width: 100%;
  overflow-x: clip;
}

body.rh-platform-shell {
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--rh-green) 5%, transparent), transparent 24rem),
    var(--rh-bg);
  color: var(--rh-text);
  font-family: "Montserrat", system-ui, sans-serif;
}

body.rh-platform-shell .site-shell {
  background: transparent;
}

body.rh-platform-shell .site-content h1,
body.rh-platform-shell .site-content h2,
body.rh-platform-shell .site-content h3 {
  color: var(--rh-ink);
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.025em;
}

body.rh-platform-shell .site-topbar {
  border-color: var(--rh-line);
  background: color-mix(in srgb, var(--rh-paper) 94%, transparent);
}

body.rh-platform-shell .site-topbar-icon,
body.rh-platform-shell .site-topbar-search {
  border-color: var(--rh-line);
  background: var(--rh-soft);
  color: var(--rh-text);
}

body.rh-platform-shell .site-topbar-icon:hover,
body.rh-platform-shell .site-topbar-search:hover {
  border-color: color-mix(in srgb, var(--rh-green) 35%, var(--rh-line));
  background: color-mix(in srgb, var(--rh-green) 7%, var(--rh-paper));
  color: var(--rh-green-dark);
}

body.rh-platform-shell .dropdown-menu {
  border-color: var(--rh-line);
  background: var(--rh-paper);
  color: var(--rh-text);
  box-shadow: 0 24px 60px rgba(28, 59, 36, 0.13);
}

body.rh-platform-shell .card,
body.rh-platform-shell .rounded-box.bg-base-100 {
  border-color: var(--rh-line);
}

body.rh-platform-shell .card {
  box-shadow: 0 13px 34px rgba(38, 65, 45, 0.055);
}

body.rh-platform-shell input,
body.rh-platform-shell textarea,
body.rh-platform-shell select {
  min-width: 0;
  max-width: 100%;
  font-family: "Montserrat", system-ui, sans-serif;
}

body.rh-platform-shell .js_site-bottom-bar {
  border-color: var(--rh-line) !important;
  background: color-mix(in srgb, var(--rh-paper) 96%, transparent) !important;
  box-shadow: 0 -9px 30px rgba(25, 61, 34, 0.11) !important;
}

body.rh-platform-shell .js_site-bottom-bar a {
  color: var(--rh-muted-text) !important;
}

body.rh-platform-shell .js_site-bottom-bar a[aria-current="page"] {
  color: var(--rh-green) !important;
}

body.rh-platform-shell .js_site-bottom-bar a[aria-current="page"] > span:first-child {
  background: color-mix(in srgb, var(--rh-green) 11%, var(--rh-paper));
}

/* HeroUI carries per-component color variables, so the RootHVN shell owns
   those variables explicitly instead of allowing inherited purple defaults. */
body.rh-platform-shell .button--primary,
body.rh-platform-shell .btn-primary {
  --button-bg: var(--rh-green) !important;
  --button-bg-hover: var(--rh-green-dark) !important;
  --button-bg-pressed: var(--rh-green-dark) !important;
  --button-fg: #fff !important;
  border-color: var(--rh-green) !important;
  background-color: var(--rh-green) !important;
  color: #fff !important;
}

body.rh-platform-shell .button--primary:hover,
body.rh-platform-shell .btn-primary:hover {
  border-color: var(--rh-green-dark) !important;
  background-color: var(--rh-green-dark) !important;
}

body.rh-platform-shell :is(button, a, span)[class*="from-violet"],
body.rh-platform-shell :is(button, a, span)[class*="from-fuchsia"] {
  border-color: var(--rh-green) !important;
  background-color: var(--rh-green) !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #fff !important;
}

body.rh-platform-shell .text-primary { color: var(--rh-green) !important; }
body.rh-platform-shell .border-primary { border-color: var(--rh-green) !important; }
body.rh-platform-shell :is(button, a, input, select, textarea):focus-visible {
  outline-color: var(--rh-green) !important;
  --tw-ring-color: color-mix(in srgb, var(--rh-green) 35%, transparent) !important;
}

/* Keep content cards visually separate throughout utility and community
   screens without changing any data table or responsive grid semantics. */
body.rh-platform-shell .site-content .card + .card,
body.rh-platform-shell .site-content section.card + section.card {
  margin-top: 1rem;
}

body.rh-platform-shell #rh-cohorts-app > section + section {
  margin-top: 1.25rem !important;
}

body.rh-platform-shell #site-sidebar {
  border-radius: 1.15rem;
}

body.rh-platform-shell #site-sidebar a:hover,
body.rh-platform-shell #site-sidebar a[aria-current="page"] {
  background: color-mix(in srgb, var(--rh-green) 9%, var(--rh-paper));
  color: var(--rh-green-dark) !important;
}

body.rh-community-shell:not(.overflow-hidden) .site-content {
  padding-top: clamp(1rem, 2.2vw, 1.6rem);
}

.rh-community-intro,
.rh-network-page-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--rh-line);
  border-radius: 1.65rem 1.65rem 1.65rem 0.55rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--rh-green) 9%, var(--rh-paper)), var(--rh-paper) 58%),
    var(--rh-paper);
  box-shadow: 0 18px 44px rgba(38, 65, 45, 0.065);
}

.rh-community-intro::after,
.rh-network-page-header::after {
  position: absolute;
  z-index: -1;
  width: 13rem;
  height: 13rem;
  border: 1px solid color-mix(in srgb, var(--rh-green) 13%, transparent);
  border-radius: 50%;
  content: "";
  inset-block-start: -8.5rem;
  inset-inline-end: -4rem;
  box-shadow: 0 0 0 2.8rem color-mix(in srgb, var(--rh-green) 3.5%, transparent);
}

.rh-community-intro {
  padding: clamp(1.25rem, 3.2vw, 2.25rem);
}

.rh-community-intro__eyebrow,
.rh-network-page-header__eyebrow {
  color: var(--rh-green);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rh-community-intro__row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 0.35rem;
}

.rh-community-intro h1,
.rh-network-page-header h1 {
  margin: 0;
  font: 600 clamp(2rem, 5vw, 3.25rem)/1 "Fraunces", Georgia, serif;
}

.rh-community-intro p,
.rh-network-page-header p {
  max-width: 44rem;
  margin: 0.65rem 0 0;
  color: var(--rh-muted-text);
  font-size: 0.86rem;
  line-height: 1.65;
}

.rh-community-intro__workspace {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.65rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--rh-line);
  border-radius: 999px;
  background: var(--rh-paper);
  color: var(--rh-green-dark) !important;
  font-size: 0.75rem;
  font-weight: 700;
}

.rh-network-page-header {
  display: flex;
  min-height: clamp(8.75rem, 22vw, 12rem);
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.rh-network-page-header__leaf {
  display: grid;
  width: clamp(3.25rem, 9vw, 5.5rem);
  height: clamp(3.25rem, 9vw, 5.5rem);
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--rh-green) 24%, var(--rh-line));
  border-radius: 50% 50% 50% 18%;
  background: color-mix(in srgb, var(--rh-green) 9%, var(--rh-paper));
  color: var(--rh-green);
}

.rh-network-page-header__leaf svg {
  width: 58%;
  height: 58%;
}

.rh-network-page-header__copy {
  min-width: 0;
}

body.rh-community-shell .js_stories {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--rh-line);
  border-radius: 1.35rem;
  background: color-mix(in srgb, var(--rh-green) 3%, var(--rh-paper));
}

body.rh-community-shell .js_story-create {
  border-color: color-mix(in srgb, var(--rh-green) 25%, var(--rh-line));
}

body.rh-community-shell .js_stories-strip {
  min-height: 5.6rem;
  align-items: flex-start;
}

body.rh-community-shell .js_story-create,
body.rh-community-shell .js_story-open {
  box-shadow: none;
}

@media (max-width: 42rem) {
  .rh-community-intro__row {
    align-items: flex-start;
    flex-direction: column;
  }

  .rh-network-page-header {
    min-height: 0;
  }
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

.site-topbar {
  top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--color-base-100) 95%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.site-content,
.site-content > *,
.rh-profile-theme,
.rh-profile-theme > * {
  min-width: 0;
}

.rh-verified-leaf {
  display: inline-block;
  flex: 0 0 auto;
  color: var(--rh-green);
  background: transparent;
}

[data-theme$="-dark"] {
  --rh-bg: #1a1a1a;
  --rh-paper: #2a2a2a;
  --rh-ink: #faf7f0;
  --rh-text: #e8ede4;
  --rh-soft: #333633;
  --rh-muted: #3a3a3a;
  --rh-muted-text: #a0a0a0;
  --rh-line: #4a4a4a;
  --rh-brown: #b8935a;
  --rh-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
}

body:has(.rh-app) {
  background: var(--rh-bg);
}

body:has(.rh-auth) {
  background: var(--rh-bg);
  color: var(--rh-text);
  font-family: "Montserrat", system-ui, sans-serif;
}

body:has(.rh-auth) .site-topbar {
  border-color: var(--rh-line);
  background: color-mix(in srgb, var(--rh-bg) 94%, transparent);
  backdrop-filter: blur(16px);
}

body:has(.rh-auth) .site-topbar .button--primary,
.rh-auth .button--primary {
  --button-bg: var(--rh-green);
  --button-bg-hover: var(--rh-green-dark);
  --button-bg-pressed: var(--rh-green-dark);
  --button-fg: #fff;
}

body:has(.rh-auth) .site-topbar .button--tertiary {
  --button-bg: var(--rh-paper);
  --button-bg-hover: var(--rh-soft);
  border: 1px solid var(--rh-line);
}

.rh-topbar-wordmark {
  color: var(--rh-green);
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
}

.rh-topbar-network-icon { width: 1.35rem; height: 1.35rem; color: var(--rh-green); }
.rh-explore-icon {
  --rh-explore-accent: var(--rh-green);
  display: inline-grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--rh-explore-accent) 22%, var(--rh-line));
  border-radius: 0.9rem;
  background: color-mix(in srgb, var(--rh-explore-accent) 9%, var(--rh-paper));
  color: var(--rh-explore-accent);
}
.rh-explore-icon svg { width: 1.35rem; height: 1.35rem; }
.rh-explore-icon--groups { --rh-explore-accent: #587c64; }
.rh-explore-icon--events { --rh-explore-accent: #a77a36; }
.rh-explore-icon--roots { --rh-explore-accent: var(--rh-brown); }
.rh-explore-icon--summits { --rh-explore-accent: #456e57; }
.rh-explore-icon--forums { --rh-explore-accent: #6f8651; }

.rh-auth {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: calc(100dvh - 8rem);
  place-items: center;
  align-content: center;
  gap: 1.15rem;
  overflow: hidden;
  padding: clamp(2rem, 6vw, 5rem) 1rem;
}

.rh-auth::before,
.rh-auth::after {
  position: absolute;
  z-index: -1;
  width: min(42rem, 80vw);
  height: min(42rem, 80vw);
  border: 1px solid color-mix(in srgb, var(--rh-green) 10%, transparent);
  border-radius: 50%;
  content: "";
}

.rh-auth::before {
  top: -27rem;
  left: -17rem;
  box-shadow: 0 0 0 5rem color-mix(in srgb, var(--rh-green) 2.8%, transparent);
}

.rh-auth::after {
  right: -24rem;
  bottom: -30rem;
  box-shadow: 0 0 0 7rem color-mix(in srgb, var(--rh-brown) 2.5%, transparent);
}

.rh-auth-card {
  width: min(100%, 31rem);
  padding: clamp(1.55rem, 5vw, 2.75rem);
  border: 1px solid var(--rh-line);
  border-radius: 1.75rem 1.75rem 1.75rem 0.55rem;
  background: var(--rh-paper);
  box-shadow: 0 24px 60px rgba(38, 65, 45, 0.09);
}

.rh-auth-brand {
  display: grid;
  justify-items: center;
  margin-bottom: 2rem;
  text-align: center;
}

.rh-auth-mark {
  width: 4.6rem;
  height: 4.6rem;
  margin-bottom: 0.7rem;
  object-fit: contain;
}

.rh-auth-brand h1 {
  margin: 0;
  color: var(--rh-green);
  font: 700 clamp(2.4rem, 9vw, 3.25rem)/0.95 "Fraunces", Georgia, serif;
  letter-spacing: -0.035em;
}

.rh-auth-brand p {
  margin: 0.75rem 0 0;
  color: var(--rh-muted-text);
  font-size: 0.88rem;
  font-weight: 500;
}

.rh-auth-form,
.rh-auth-form button,
.rh-auth-form input,
.rh-auth-form select,
.rh-auth-form textarea {
  font-family: "Montserrat", system-ui, sans-serif;
}

.rh-auth-form .js_panel > .text-center {
  text-align: left;
}

.rh-auth-form .js_panel > .text-center h2 {
  margin: 0;
  color: var(--rh-ink);
  font: 600 1.45rem/1.2 "Fraunces", Georgia, serif;
  letter-spacing: -0.02em;
}

.rh-auth-form .js_panel > .text-center p {
  margin-top: 0.35rem;
  color: var(--rh-muted-text);
  font-size: 0.8rem;
}

.rh-auth-form .input {
  border-color: var(--rh-line);
  border-radius: 0.85rem;
  background: var(--rh-paper);
  color: var(--rh-text);
  box-shadow: none;
}

.rh-auth-form .input:focus,
.rh-auth-form .input:focus-within {
  border-color: var(--rh-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rh-green) 12%, transparent);
}

.rh-auth-form .checkbox:checked {
  border-color: var(--rh-green);
  background: var(--rh-green);
}

.rh-auth-form .link,
body:has(.rh-auth) .link {
  color: var(--rh-green) !important;
}

.rh-auth-form .button--primary {
  min-height: 3.15rem;
  border-radius: 0.85rem;
  font-weight: 700;
}

.rh-auth-form .alert-warning {
  border: 1px solid color-mix(in srgb, #d69e2e 35%, var(--rh-line));
  border-radius: 0.85rem;
  background: color-mix(in srgb, #d69e2e 11%, var(--rh-paper));
  color: var(--rh-text);
}

.rh-auth-promise {
  max-width: 31rem;
  margin: 0;
  color: var(--rh-muted-text);
  font-size: 0.72rem;
  line-height: 1.55;
  text-align: center;
}

body:has(.rh-auth) .js_site-bottom-bar {
  display: none;
}

.rh-profile-theme[style*="--rh-profile-accent"] {
  padding: clamp(0.65rem, 2vw, 1.25rem);
  border-radius: 2rem;
  background: color-mix(in srgb, var(--rh-profile-accent) 16%, transparent);
}
.rh-profile-theme[style*="--rh-profile-accent"] > section:first-child {
  border: 1px solid color-mix(in srgb, var(--rh-profile-accent) 36%, transparent);
  box-shadow: 0 18px 48px color-mix(in srgb, var(--rh-profile-accent) 18%, transparent);
}
.rh-profile-theme[style*="--rh-profile-accent"] .profile-cover-wrapper:not(:has(img)) {
  background: linear-gradient(135deg, color-mix(in srgb, var(--rh-profile-accent) 75%, #fff), color-mix(in srgb, var(--rh-profile-accent) 28%, var(--rh-paper)));
}

.rh-offline-body {
  min-height: 100vh;
  margin: 0;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) calc(5.75rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: var(--rh-bg);
}

.rh-offline-body .rh-app {
  width: min(100%, 86rem);
  margin: 0 auto;
}

.rh-app,
.rh-app button,
.rh-app input,
.rh-app select,
.rh-app textarea {
  color: var(--rh-text);
  font-family: "Montserrat", system-ui, sans-serif;
}

.rh-app {
  min-height: 70vh;
  color: var(--rh-text);
}

.rh-app h1,
.rh-app h2,
.rh-app h3,
.rh-wordmark {
  color: var(--rh-ink);
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.025em;
}

.rh-app h1 {
  margin: 0.15rem 0 0;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  font-weight: 600;
  line-height: 1.02;
}

.rh-app h2 {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.rh-app-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 0.15rem 0 0.9rem;
  border-bottom: 1px solid var(--rh-line);
}

.rh-app-toolbar-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--rh-muted-text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rh-app-toolbar-label > span {
  width: 1rem;
  height: 1rem;
  color: var(--rh-green);
}

.rh-sync-button {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--rh-line);
  border-radius: 999px;
  background: var(--rh-paper);
  color: var(--rh-muted-text);
  cursor: pointer;
  font: 700 0.68rem/1 "Montserrat", system-ui, sans-serif;
}

.rh-sync-button > span:first-child { width: 0.95rem; height: 0.95rem; }
.rh-sync-button:hover { border-color: var(--rh-green); color: var(--rh-green); }

.rh-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--rh-green) !important;
  font-size: 1.45rem;
  font-weight: 700;
  text-decoration: none;
}

.rh-mark {
  display: block;
  width: 2.15rem;
  height: 2.15rem;
  object-fit: contain;
}

.rh-header-actions,
.rh-form-actions,
.rh-page-heading,
.rh-card-heading,
.rh-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.rh-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--rh-muted-text);
  font-size: 0.78rem;
}

.rh-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #d69e2e;
}

.rh-status[data-state="online"] .rh-status-dot { background: var(--rh-green); }
.rh-status[data-state="offline"] .rh-status-dot { background: var(--rh-rose); }
.rh-status[data-state="attention"] .rh-status-dot { background: #d69e2e; }

.rh-layout {
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 1fr);
  gap: 2rem;
}

.rh-rail {
  display: flex;
  min-height: 34rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.35rem 0;
}

.rh-nav {
  display: grid;
  gap: 0.25rem;
}

.rh-nav a,
.rh-mobile-nav a {
  color: var(--rh-muted-text) !important;
  text-decoration: none;
}

.rh-nav a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 3rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.rh-nav a:hover { background: var(--rh-soft); }
.rh-nav a[aria-current="page"] {
  background: color-mix(in srgb, var(--rh-green) 10%, var(--rh-paper));
  color: var(--rh-green) !important;
}

.rh-nav a > span:first-child { width: 1.25rem; height: 1.25rem; }

.rh-rail-note {
  padding: 1rem;
  border: 1px solid var(--rh-line);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--rh-paper) 65%, transparent);
}

.rh-rail-note p {
  margin: 0.45rem 0 0;
  color: var(--rh-muted-text);
  font-size: 0.76rem;
  line-height: 1.55;
}

.rh-main { min-width: 0; }
.rh-main:focus { outline: none; }
.rh-view { animation: rh-in 180ms ease-out; }
@keyframes rh-in { from { opacity: 0; transform: translateY(4px); } }

.rh-page-heading {
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.rh-kicker {
  color: var(--rh-green);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.rh-button,
.rh-icon-button {
  border: 1px solid var(--rh-line);
  background: var(--rh-paper);
  color: var(--rh-text);
  cursor: pointer;
  font-weight: 600;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.rh-button:hover,
.rh-icon-button:hover { transform: translateY(-1px); }
.rh-button:disabled,
.rh-icon-button:disabled { cursor: not-allowed; opacity: 0.55; transform: none; }

.rh-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  text-decoration: none !important;
}

.rh-button-primary {
  border-color: var(--rh-green);
  background: var(--rh-green);
  color: #fff !important;
}

.rh-button-primary:hover { background: var(--rh-green-dark); }
.rh-button-quiet { background: var(--rh-soft); }
.rh-button-danger { border-color: color-mix(in srgb, var(--rh-danger) 45%, var(--rh-line)); color: var(--rh-danger); }

.rh-icon-button {
  display: inline-grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 50%;
}

.rh-card,
.rh-capture-card,
.rh-empty-state {
  border: 1px solid var(--rh-line);
  border-radius: var(--rh-radius);
  background: var(--rh-paper);
  box-shadow: var(--rh-shadow);
}

.rh-card { padding: 1.15rem; }
.rh-card-heading { align-items: flex-start; margin-bottom: 0.85rem; }
.rh-card-heading > a { color: var(--rh-green) !important; font-size: 0.74rem; font-weight: 700; }

.rh-capture-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9.5rem, 0.25fr) auto;
  align-items: end;
  gap: 0.8rem;
  margin-bottom: 1.15rem;
  padding: 1rem;
}

.rh-capture-card[hidden] { display: none; }

.rh-app label {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  color: var(--rh-muted-text);
  font-size: 0.72rem;
  font-weight: 600;
}

.rh-app input,
.rh-app select,
.rh-app textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--rh-line);
  border-radius: 0.7rem;
  outline: none;
  background: var(--rh-paper);
  color: var(--rh-text);
  font-size: 0.88rem;
}

.rh-app input:focus,
.rh-app select:focus,
.rh-app textarea:focus { border-color: var(--rh-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rh-green) 13%, transparent); }

.rh-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.rh-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--rh-line);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--rh-paper) 78%, var(--rh-soft));
}

.rh-summary span { color: var(--rh-muted-text); font-size: 0.72rem; font-weight: 600; }
.rh-summary strong { color: var(--rh-ink); font-family: "Fraunces", serif; font-size: 1.55rem; }

.rh-today-grid,
.rh-planning-grid,
.rh-more-grid {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.rh-today-grid { grid-template-columns: minmax(0, 1.6fr) minmax(15rem, 0.8fr); }
.rh-planning-grid { grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 0.65fr); }
.rh-more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rh-stack { display: grid; gap: 0.8rem; }

.rh-feed-intro {
  max-width: 48rem;
  margin: -0.75rem 0 1.5rem;
  color: var(--rh-muted-text);
  font-size: 0.85rem;
  line-height: 1.65;
}

.rh-feed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.rh-feed-section { min-width: 0; }
.rh-feed-cards { display: grid; gap: 0.65rem; }
.rh-feed-card {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  padding: 0.55rem;
  border: 1px solid transparent;
  border-radius: 1rem;
  color: var(--rh-text) !important;
  text-decoration: none !important;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}
.rh-feed-card:hover { border-color: var(--rh-line); background: var(--rh-soft); transform: translateY(-1px); }
.rh-feed-card-media { display: grid; width: 4.25rem; aspect-ratio: 1; place-items: center; overflow: hidden; border-radius: 0.85rem; background: var(--rh-soft); }
.rh-feed-card-media img { width: 100%; height: 100%; padding: 0.35rem; object-fit: contain; }
.rh-feed-card-copy { min-width: 0; }
.rh-feed-card-copy strong,
.rh-feed-card-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-feed-card-copy strong { color: var(--rh-ink); font-size: 0.82rem; }
.rh-feed-card-copy small { margin-top: 0.25rem; color: var(--rh-muted-text); font-size: 0.68rem; }
.rh-discussion-list { display: grid; }
.rh-discussion-list > a {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.72rem 0;
  border-top: 1px solid var(--rh-line);
  color: var(--rh-text) !important;
  text-decoration: none !important;
}
.rh-discussion-list > a:first-child { border-top: 0; }
.rh-discussion-list img { width: 2.6rem; height: 2.6rem; padding: 0.18rem; border-radius: 50%; background: var(--rh-soft); object-fit: contain; }
.rh-discussion-list a > span:nth-child(2) { min-width: 0; }
.rh-discussion-list strong,
.rh-discussion-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-discussion-list strong { font-size: 0.8rem; }
.rh-discussion-list small { margin-top: 0.2rem; color: var(--rh-muted-text); font-size: 0.66rem; }
.rh-discussion-list a > span:last-child { width: 1rem; height: 1rem; color: var(--rh-muted-text); }
.rh-feed-empty { display: grid; min-height: 12rem; place-items: center; align-content: center; gap: 0.65rem; padding: 1.5rem; border: 1px dashed var(--rh-line); border-radius: 1rem; color: var(--rh-muted-text); text-align: center; }
.rh-feed-empty > span { width: 1.75rem; height: 1.75rem; color: var(--rh-green); }
.rh-feed-empty p { max-width: 24rem; margin: 0; font-size: 0.78rem; line-height: 1.55; }

.rh-list { display: grid; }
.rh-list-horizontal { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; }

.rh-list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  min-height: 3.5rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--rh-line);
  box-shadow: inset 3px 0 0 transparent;
}

.rh-list-item:first-child { border-top: 0; }
.rh-list-item[data-color]:not([data-color=""]) { padding-inline-start: 0.65rem; }
.rh-list-item[data-complete="true"] .rh-list-title { color: var(--rh-muted-text); text-decoration: line-through; }
.rh-list-title { color: var(--rh-text); font-size: 0.86rem; font-weight: 600; overflow-wrap: anywhere; }
.rh-list-meta { margin-top: 0.2rem; color: var(--rh-muted-text); font-size: 0.68rem; }
.rh-list-item[data-color="green"] { box-shadow: inset 3px 0 0 var(--rh-green); }
.rh-list-item[data-color="rose"] { box-shadow: inset 3px 0 0 var(--rh-rose); }
.rh-list-item[data-color="brown"] { box-shadow: inset 3px 0 0 var(--rh-brown); }
.rh-list-item[data-color="gold"] { box-shadow: inset 3px 0 0 #b8935a; }
.rh-list-item[data-color="blue"] { box-shadow: inset 3px 0 0 #3182ce; }
.rh-list-item[data-color="plum"] { box-shadow: inset 3px 0 0 #7f5b78; }
.rh-list-item[data-color="pink"] { box-shadow: inset 3px 0 0 #c97d6d; }
.rh-list-item[data-color="dark_green"] { box-shadow: inset 3px 0 0 #047643; }
.rh-list-item[data-color="black"] { box-shadow: inset 3px 0 0 #111111; }
.rh-list-item[data-color="orange"] { box-shadow: inset 3px 0 0 #d97706; }
.rh-list-item[data-color="purple"] { box-shadow: inset 3px 0 0 #9333ea; }
.rh-list-item[data-color="red"] { box-shadow: inset 3px 0 0 #c53030; }
.rh-list-item[data-color="yellow"] { box-shadow: inset 3px 0 0 #b8935a; }
.rh-list-item[data-priority="urgent"] { background: color-mix(in srgb, var(--rh-rose) 7%, transparent); }
.rh-item-open { min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.rh-item-open > span { display: block; }
.rh-item-side { display: flex; align-items: center; gap: 0.35rem; }
.rh-habit-marker { display: grid; width: 1.45rem; height: 1.45rem; place-items: center; border-radius: 0.4rem; background: var(--rh-soft); color: var(--rh-muted-text); }
.rh-habits-card { align-self: start; }
.rh-habit-date { margin-bottom: 0.35rem; padding: 0.75rem; border: 1px solid var(--rh-line); border-radius: 0.85rem; background: color-mix(in srgb, var(--rh-soft) 72%, var(--rh-paper)); }
.rh-habit-date input { background: var(--rh-paper); }
.rh-archive-drawer { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--rh-line); }
.rh-archive-drawer summary { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; color: var(--rh-green); cursor: pointer; font-size: 0.74rem; font-weight: 700; list-style: none; }
.rh-archive-drawer summary::-webkit-details-marker { display: none; }
.rh-archive-drawer[open] summary { margin-bottom: 0.35rem; }
.rh-list-item[data-archived="true"] { opacity: 0.76; }

.rh-check {
  display: grid;
  width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  border: 1.5px solid var(--rh-line);
  border-radius: 50%;
  background: var(--rh-paper);
  color: transparent;
  cursor: pointer;
}

.rh-check[aria-pressed="true"] { border-color: var(--rh-green); background: var(--rh-green); color: #fff; }
.rh-check-square { border-radius: 0.4rem; }
.rh-icon-button-small { width: 1.9rem; height: 1.9rem; }

.rh-dialog {
  width: min(48rem, calc(100vw - 2rem));
  max-height: min(90vh, 58rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--rh-line);
  border-radius: 1.5rem;
  background: var(--rh-paper);
  color: var(--rh-text);
  box-shadow: 0 28px 90px rgba(16, 43, 24, 0.28);
}
.rh-dialog::backdrop { background: rgba(14, 28, 19, 0.58); backdrop-filter: blur(5px); }
.rh-dialog-compact { width: min(38rem, calc(100vw - 2rem)); }
.rh-item-form { display: grid; gap: 1rem; padding: clamp(1rem, 3vw, 1.5rem); }
.rh-dialog-header,
.rh-dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.rh-dialog-header { padding-bottom: 0.9rem; border-bottom: 1px solid var(--rh-line); }
.rh-dialog-header h2,
.rh-subtask-editor h3 { margin: 0.1rem 0 0; }
.rh-item-form-grid { display: grid; grid-template-columns: minmax(8.5rem, 0.65fr) minmax(12rem, 1.6fr) minmax(8.5rem, 0.65fr); gap: 0.8rem; }
.rh-item-form-grid > [hidden] { display: none; }
.rh-habit-form-grid { grid-template-columns: minmax(0, 1fr) minmax(10rem, 0.4fr); }
.rh-field-grow { min-width: 0; }
.rh-field-span { grid-column: 1 / -1; }
.rh-kind-choices { min-width: 0; margin: 0; padding: 0.75rem; border: 1px solid var(--rh-line); border-radius: 0.85rem; }
.rh-kind-choices legend { padding: 0 0.35rem; color: var(--rh-muted-text); font-size: 0.72rem; font-weight: 700; }
.rh-kind-choices legend small { font-weight: 500; }
.rh-kind-choices > div { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.4rem; }
.rh-kind-choices button { min-height: 2.4rem; border: 1px solid var(--rh-line); border-radius: 0.65rem; background: var(--rh-paper); color: var(--rh-muted-text); font-size: 0.72rem; font-weight: 700; touch-action: manipulation; }
.rh-kind-choices button[aria-pressed="true"] { border-color: var(--rh-green); background: color-mix(in srgb, var(--rh-green) 10%, var(--rh-paper)); color: var(--rh-green); }
.rh-highlighter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.65rem; }
.rh-highlighter-grid button { min-height: 4.5rem; padding: 2.1rem 0.5rem 0.5rem; border: 1px solid var(--rh-line); border-radius: 0.8rem; background: linear-gradient(to bottom, var(--rh-highlight) 0 1.65rem, var(--rh-paper) 1.65rem); color: var(--rh-text); font-size: 0.72rem; font-weight: 700; }
.rh-highlighter-grid .rh-highlighter-default { padding-top: 0.5rem; background: var(--rh-paper); }
@media (prefers-color-scheme: dark) {
  .rh-list-item[data-color="dark_green"] { box-shadow: inset 3px 0 0 #1b8a4f; }
  .rh-highlighter-grid button[data-rh-highlighter="dark_green"] { --rh-highlight: #1b8a4f !important; }
}
[data-theme$="-dark"] .rh-list-item[data-color="dark_green"] { box-shadow: inset 3px 0 0 #1b8a4f; }
[data-theme$="-dark"] .rh-highlighter-grid button[data-rh-highlighter="dark_green"] { --rh-highlight: #1b8a4f !important; }
.rh-check-label { display: flex !important; align-items: center; align-self: end; gap: 0.55rem !important; min-height: 2.75rem; }
.rh-check-label input { width: 1.05rem; min-height: 1.05rem; accent-color: var(--rh-green); }
.rh-subtask-editor { padding: 1rem; border: 1px solid var(--rh-line); border-radius: 1rem; background: color-mix(in srgb, var(--rh-soft) 65%, var(--rh-paper)); }
.rh-subtask-editor[hidden] { display: none; }
.rh-reminder-editor { display: grid; gap: 0.75rem; padding: 1rem; border: 1px solid var(--rh-line); border-radius: 1rem; background: color-mix(in srgb, var(--rh-soft) 65%, var(--rh-paper)); }
.rh-reminder-editor[hidden] { display: none; }
.rh-reminder-editor h3 { margin: 0.1rem 0 0; }
.rh-reminder-editor .rh-card-heading,
.rh-reminder-editor p { margin: 0; }
.rh-reminder-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.65fr); gap: 0.65rem; }
.rh-reminder-editor > .rh-form-actions { flex-wrap: wrap; justify-content: flex-end; }
.rh-subtask-list { display: grid; }
.rh-recipe-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.65rem; margin-top: 0.7rem; }
.rh-recipe-add .rh-button { border-radius: 0.7rem; }
.rh-recipe-ingredient { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.65rem; padding: 0.55rem 0; border-top: 1px solid var(--rh-line); }
.rh-recipe-ingredient:first-child { border-top: 0; }
.rh-recipe-ingredient span { min-width: 0; overflow-wrap: anywhere; font-size: 0.82rem; }
.rh-subtask-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.65rem; padding: 0.55rem 0; border-top: 1px solid var(--rh-line); }
.rh-subtask-row:first-child { border-top: 0; }
.rh-subtask-row[data-complete="true"] strong { color: var(--rh-muted-text); text-decoration: line-through; }
.rh-subtask-row strong,
.rh-subtask-row small { display: block; }
.rh-subtask-row strong { font-size: 0.78rem; }
.rh-subtask-row small { margin-top: 0.15rem; color: var(--rh-muted-text); font-size: 0.65rem; }
.rh-subtask-open { min-width: 0; padding: 0; border: 0; background: transparent; color: var(--rh-text); cursor: pointer; text-align: left; }
.rh-subtask-actions { display: flex; align-items: center; gap: 0.2rem; }
.rh-subtask-actions button:disabled { cursor: default; opacity: 0.35; }
.rh-subtask-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(6rem, 0.25fr) minmax(8rem, 0.75fr) auto; gap: 0.55rem; margin-top: 0.65rem; }
.rh-snooze-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; color: var(--rh-muted-text); font-size: 0.7rem; font-weight: 600; }
.rh-snooze-row button { padding: 0.4rem 0.65rem; border: 1px solid var(--rh-line); border-radius: 999px; background: var(--rh-soft); color: var(--rh-text); cursor: pointer; font: inherit; }
.rh-segmented { display: inline-flex; align-items: center; padding: 0.2rem; border: 1px solid var(--rh-line); border-radius: 999px; background: var(--rh-soft); }
.rh-segmented button { min-height: 2.2rem; padding: 0.4rem 0.7rem; border: 0; border-radius: 999px; background: transparent; color: var(--rh-muted-text); cursor: pointer; font: inherit; font-size: 0.7rem; font-weight: 700; }
.rh-segmented button[aria-pressed="true"] { background: var(--rh-paper); color: var(--rh-green); box-shadow: 0 2px 8px rgba(16, 43, 24, 0.1); }
.rh-dialog-footer { padding-top: 0.9rem; border-top: 1px solid var(--rh-line); }

.rh-empty {
  padding: 1.25rem 0;
  color: var(--rh-muted-text);
  font-size: 0.82rem;
  line-height: 1.55;
}

.rh-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 0.7fr);
  gap: 0.8rem;
}

.rh-calendar-toolbar { margin-bottom: 1rem; }
.rh-weekdays,
.rh-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.rh-weekdays span { padding: 0.35rem; color: var(--rh-muted-text); font-size: 0.64rem; font-weight: 700; text-align: center; text-transform: uppercase; }

.rh-day {
  position: relative;
  min-height: 5.2rem;
  padding: 0.55rem;
  border: 0;
  border-top: 1px solid var(--rh-line);
  border-left: 1px solid var(--rh-line);
  background: var(--rh-paper);
  color: var(--rh-text);
  cursor: pointer;
  text-align: left;
}

.rh-day:nth-child(7n) { border-right: 1px solid var(--rh-line); }
.rh-day:nth-last-child(-n + 7) { border-bottom: 1px solid var(--rh-line); }
.rh-day[data-outside="true"] { color: var(--rh-muted-text); background: var(--rh-soft); }
.rh-day[aria-current="date"] .rh-day-number { background: var(--rh-green); color: #fff; }
.rh-day[aria-selected="true"] { box-shadow: inset 0 0 0 2px var(--rh-brown); }
.rh-day-number { display: grid; width: 1.7rem; height: 1.7rem; place-items: center; border-radius: 50%; font-size: 0.75rem; font-weight: 700; }
.rh-day-count { display: block; margin-top: 0.45rem; color: var(--rh-green); font-size: 0.63rem; font-weight: 700; }
.rh-sky-markers { position: absolute; right: 0.42rem; bottom: 0.38rem; display: inline-flex; align-items: center; gap: 0.3rem; color: var(--rh-green); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.04em; }
.rh-sky-marker { display: inline-flex; align-items: center; gap: 0.12rem; }
.rh-sky-marker svg { width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.rh-calendar-aside { display: flex; flex-direction: column; gap: 0.9rem; }
.rh-astronomy-details { display: grid; gap: 0.4rem; padding: 0.75rem; border: 1px solid color-mix(in srgb, var(--rh-green) 22%, var(--rh-line)); border-radius: 0.85rem; background: color-mix(in srgb, var(--rh-green) 5%, var(--rh-paper)); }
.rh-astronomy-details p { display: flex; align-items: flex-start; gap: 0.4rem; margin: 0; color: var(--rh-text); font-size: 0.75rem; line-height: 1.45; }
.rh-astronomy-details svg { width: 0.9rem; height: 0.9rem; flex: 0 0 auto; margin-top: 0.08rem; fill: none; stroke: var(--rh-green); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.rh-astronomy-settings { display: grid; gap: 0.55rem; margin-top: auto; padding-top: 0.85rem; border-top: 1px solid var(--rh-line); }
.rh-astronomy-settings h3 { margin: 0.08rem 0 0; font: 700 1rem/1.2 Fraunces, Georgia, serif; }
.rh-astronomy-settings .rh-check-label { justify-content: flex-start; }
.rh-astronomy-settings .rh-muted { margin: 0.1rem 0 0; font-size: 0.67rem; line-height: 1.45; }

.rh-notebook-layout {
  display: grid;
  grid-template-columns: minmax(11rem, 0.32fr) minmax(0, 1fr);
  gap: 0.8rem;
}

.rh-page-list button[data-selected="true"] { border-color: var(--rh-green); background: color-mix(in srgb, var(--rh-green) 8%, var(--rh-paper)); }
.rh-page-list > div:last-child { display: grid; gap: 0.4rem; }
.rh-page-tab { width: 100%; padding: 0.75rem; border: 1px solid transparent; border-radius: 0.75rem; background: transparent; color: var(--rh-text); cursor: pointer; font-size: 0.8rem; text-align: left; }
.rh-note-sheet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(10rem, 0.3fr); gap: 0.85rem; }
.rh-note-body { grid-column: 1 / -1; }
.rh-note-body textarea { min-height: 14rem; resize: vertical; line-height: 1.75; }
.rh-note-sheet > p { grid-column: 1 / -1; margin: 0; }
.rh-ink-panel { grid-column: 1 / -1; padding: 0.9rem; border: 1px solid var(--rh-line); border-radius: 1rem; background: color-mix(in srgb, var(--rh-soft) 55%, var(--rh-paper)); }
.rh-ink-panel h3 { margin: 0.1rem 0 0; color: var(--rh-ink); font-family: "Fraunces", Georgia, serif; font-size: 1.1rem; }
.rh-ink-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.55rem; margin-bottom: 0.75rem; }
.rh-ink-group { display: flex; align-items: center; gap: 0.35rem; }
.rh-ink-group button { min-height: 2.25rem; padding: 0.45rem 0.65rem; border: 1px solid var(--rh-line); border-radius: 999px; background: var(--rh-paper); color: var(--rh-text); cursor: pointer; font: inherit; font-size: 0.68rem; font-weight: 700; }
.rh-ink-group button[aria-pressed="true"] { border-color: var(--rh-green); box-shadow: 0 0 0 2px color-mix(in srgb, var(--rh-green) 13%, transparent); color: var(--rh-green); }
.rh-ink-group .rh-ink-color { width: 2.15rem; min-width: 2.15rem; padding: 0; background: var(--rh-ink); }
.rh-ink-group .rh-ink-color[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--rh-paper), 0 0 0 5px var(--rh-green); }
#rh-note-canvas { display: block; width: 100%; aspect-ratio: 1000 / 440; border: 1px solid var(--rh-line); border-radius: 0.8rem; background-color: var(--rh-paper); background-image: radial-gradient(circle, color-mix(in srgb, var(--rh-line) 80%, transparent) 1px, transparent 1px); background-size: 20px 20px; cursor: crosshair; touch-action: none; }
.rh-note-footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.rh-note-footer p { margin: 0; }

.rh-link-list,
.rh-module-list { display: grid; gap: 0.4rem; }
.rh-link-list a { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; border-radius: 0.75rem; color: var(--rh-text) !important; font-size: 0.82rem; font-weight: 600; text-decoration: none; }
.rh-link-list a:hover { background: var(--rh-soft); }
.rh-more-preferences { display: grid; gap: 0.5rem; margin-bottom: 0.7rem; }
.rh-preference-row { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.65rem 0.75rem; border-radius: 0.75rem; background: var(--rh-soft); }
.rh-preference-row > span:first-child { display: inline-flex; min-width: 0; align-items: center; gap: 0.7rem; font-size: 0.78rem; font-weight: 700; }
.rh-preference-row > span:first-child > span { width: 1.1rem; height: 1.1rem; color: var(--rh-green); }
.rh-legal-links { padding-top: 0.25rem; border-top: 1px solid var(--rh-line); }
.rh-more-copyright { margin: 0.75rem 0 0; color: var(--rh-muted-text); font-size: 0.68rem; text-align: center; }
.rh-calendar-connect-copy { display: grid; gap: 0.75rem; }
.rh-calendar-connect-copy > p { margin: 0; color: var(--rh-text); font-size: 0.82rem; line-height: 1.65; }
.rh-private-note { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.8rem; border: 1px solid color-mix(in srgb, var(--rh-green) 22%, var(--rh-line)); border-radius: 0.8rem; background: color-mix(in srgb, var(--rh-green) 5%, var(--rh-paper)); color: var(--rh-muted-text); font-size: 0.72rem; line-height: 1.55; }
.rh-private-note > span:first-child { width: 1rem; height: 1rem; flex: 0 0 auto; margin-top: 0.12rem; color: var(--rh-green); }
.rh-connect-state { display: grid; gap: 0.8rem; padding: 0.9rem; border: 1px solid var(--rh-line); border-radius: 0.9rem; background: var(--rh-soft); }
.rh-connect-state > .rh-button { justify-self: start; }
.rh-connect-state p { margin: 0.45rem 0 0; }
.rh-calendar-feed-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.rh-calendar-feed-actions .rh-button { width: 100%; min-width: 0; }
.rh-alert-master { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.9rem; border: 1px solid var(--rh-line); border-radius: 0.85rem; background: var(--rh-soft); cursor: pointer; }
.rh-alert-master input { margin-top: 0.22rem; }
.rh-alert-master span { display: grid; gap: 0.18rem; }
.rh-alert-master strong { color: var(--rh-text); font-size: 0.82rem; }
.rh-alert-master small { color: var(--rh-muted-text); font-size: 0.68rem; line-height: 1.45; }
.rh-alert-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; padding: 0; border: 0; }
.rh-alert-categories legend { margin-bottom: 0.55rem; color: var(--rh-text); font-size: 0.75rem; font-weight: 700; }
.rh-alert-categories label { display: flex; align-items: center; gap: 0.55rem; min-width: 0; padding: 0.65rem; border: 1px solid var(--rh-line); border-radius: 0.75rem; color: var(--rh-text); cursor: pointer; font-size: 0.72rem; font-weight: 650; }
.rh-alert-categories label:has(input:disabled) { cursor: default; opacity: 0.5; }
.rh-module { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.8rem; padding: 0.7rem 0; border-top: 1px solid var(--rh-line); }
.rh-module:first-child { border-top: 0; }
.rh-module strong { display: block; font-size: 0.82rem; }
.rh-module small { color: var(--rh-muted-text); font-size: 0.66rem; }
.rh-module .rh-module-lock { color: #946514; }
.rh-module[data-activation-locked="true"] select { cursor: not-allowed; opacity: 0.68; }
.rh-sensitive-controls { display: grid; gap: 0.8rem; margin-top: 1rem; }
.rh-sensitive-form { display: grid; gap: 0.7rem; }
.rh-sensitive-form label { display: grid; gap: 0.35rem; color: var(--rh-muted-text); font-size: 0.7rem; font-weight: 700; }
.rh-sensitive-form input { width: 100%; min-height: 2.8rem; padding: 0.7rem 0.8rem; border: 1px solid var(--rh-line); border-radius: 0.7rem; background: var(--rh-paper); color: var(--rh-text); font: inherit; letter-spacing: 0.18em; }
.rh-sensitive-form .rh-button { justify-self: start; }
.rh-sensitive-details { border-top: 1px solid var(--rh-line); padding-top: 0.75rem; }
.rh-sensitive-details summary { color: var(--rh-green); cursor: pointer; font-size: 0.76rem; font-weight: 700; }
.rh-sensitive-details form { margin-top: 0.75rem; }
.rh-profile-color-controls { margin-top: 1rem; }
.rh-color-wheel { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; }
.rh-color-swatch { width: 2.45rem; height: 2.45rem; border: 2px solid var(--rh-paper); border-radius: 50%; background: var(--rh-swatch); box-shadow: 0 0 0 1px var(--rh-line); cursor: pointer; }
.rh-color-swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--rh-green); }
.rh-color-reset { min-height: 2.45rem; padding: 0.45rem 0.75rem; border: 1px solid var(--rh-line); border-radius: 999px; background: var(--rh-paper); color: var(--rh-text); cursor: pointer; font: inherit; font-size: 0.72rem; font-weight: 700; }
.rh-color-reset[aria-pressed="true"] { border-color: var(--rh-green); color: var(--rh-green); }
.rh-state { padding: 0.28rem 0.55rem; border-radius: 999px; background: var(--rh-soft); color: var(--rh-muted-text); font-size: 0.64rem; font-weight: 700; text-transform: capitalize; }
.rh-state[data-state="enabled"] { background: color-mix(in srgb, var(--rh-green) 12%, var(--rh-paper)); color: var(--rh-green); }
.rh-state[data-state="maintenance"] { background: color-mix(in srgb, #d69e2e 15%, var(--rh-paper)); color: #946514; }

.rh-focus-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr); gap: 1rem; }
.rh-focus-card { display: grid; gap: 1rem; }
.rh-focus-title,
.rh-focus-duration { display: grid; gap: 0.4rem; color: var(--rh-muted-text); font-size: 0.72rem; font-weight: 700; }
.rh-focus-title input,
.rh-focus-duration input { width: 100%; min-height: 2.85rem; padding: 0.7rem 0.85rem; border: 1px solid var(--rh-line); border-radius: 0.8rem; background: var(--rh-paper); color: var(--rh-text); font: inherit; }
.rh-focus-duration { width: min(9rem, 100%); }
.rh-focus-progress { position: relative; display: grid; width: min(20rem, 82vw); aspect-ratio: 1; margin: 0.25rem auto; place-items: center; border-radius: 50%; background: conic-gradient(var(--rh-green) var(--rh-focus-progress), color-mix(in srgb, var(--rh-green) 10%, var(--rh-paper)) 0); }
.rh-focus-progress::before { position: absolute; inset: 0.75rem; border: 1px solid var(--rh-line); border-radius: inherit; background: var(--rh-paper); content: ""; }
.rh-focus-progress strong { position: relative; color: var(--rh-text); font: 700 clamp(2.6rem, 9vw, 4.7rem)/1 Fraunces, Georgia, serif; letter-spacing: -0.04em; }
.rh-focus-actions { justify-content: center; }
.rh-focus-guide { display: flex; flex-direction: column; justify-content: center; background: linear-gradient(145deg, color-mix(in srgb, var(--rh-green) 10%, var(--rh-paper)), var(--rh-paper)); }
.rh-focus-guide h2 { margin: 0.4rem 0 0.8rem; font: 700 clamp(1.75rem, 4vw, 2.7rem)/1.05 Fraunces, Georgia, serif; }
.rh-focus-guide ol { display: grid; gap: 0.75rem; margin: 0.4rem 0 1rem; padding-left: 1.2rem; }
.rh-focus-guide li,
.rh-focus-guide p { color: var(--rh-muted-text); font-size: 0.82rem; line-height: 1.65; }

.rh-publishing-hero { position: relative; overflow: hidden; margin-bottom: 1rem; padding: clamp(1.3rem, 4vw, 2.4rem); border: 1px solid var(--rh-line); border-radius: 1.3rem; background: linear-gradient(135deg, color-mix(in srgb, var(--rh-green) 12%, var(--rh-paper)), var(--rh-paper) 70%); }
.rh-publishing-hero::after { position: absolute; top: -5rem; right: -4rem; width: 13rem; height: 13rem; border: 1px solid color-mix(in srgb, var(--rh-green) 20%, transparent); border-radius: 50%; content: ""; }
.rh-publishing-hero h2 { max-width: 38rem; margin: 0.45rem 0; font: 700 clamp(1.9rem, 5vw, 3.4rem)/1 Fraunces, Georgia, serif; }
.rh-publishing-hero p { max-width: 42rem; margin: 0.75rem 0 0; color: var(--rh-muted-text); line-height: 1.7; }
.rh-publishing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.rh-publishing-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.9rem; color: var(--rh-text) !important; text-decoration: none !important; transition: border-color 160ms ease, transform 160ms ease; }
.rh-publishing-card:hover { border-color: color-mix(in srgb, var(--rh-green) 50%, var(--rh-line)); transform: translateY(-2px); }
.rh-publishing-icon { display: grid; width: 2.8rem; height: 2.8rem; place-items: center; border-radius: 0.85rem; background: color-mix(in srgb, var(--rh-green) 10%, var(--rh-paper)); color: var(--rh-green); }
.rh-publishing-card > span:nth-child(2) { display: grid; gap: 0.25rem; }
.rh-publishing-card strong { font: 700 1.05rem/1.2 Fraunces, Georgia, serif; }
.rh-publishing-card small { color: var(--rh-muted-text); font-size: 0.7rem; line-height: 1.45; }
.rh-publishing-note { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 1rem; margin-top: 1rem; }
.rh-publishing-note h2 { margin: 0.2rem 0 0; font: 700 1.25rem/1.2 Fraunces, Georgia, serif; }
.rh-publishing-note p { margin: 0; }

.rh-muted { color: var(--rh-muted-text); font-size: 0.8rem; line-height: 1.65; }
.rh-note { color: var(--rh-brown); font-size: 0.8rem; }
.rh-alerts { display: grid; gap: 0.55rem; margin-bottom: 0.75rem; }
.rh-alert { padding: 0.8rem 1rem; border: 1px solid var(--rh-line); border-left: 3px solid var(--rh-green); border-radius: 0.7rem; background: var(--rh-paper); font-size: 0.78rem; }
.rh-alert[data-tone="error"] { border-left-color: var(--rh-danger); }
.rh-alert[data-tone="warning"] { border-left-color: #d69e2e; }

.rh-empty-state { max-width: 42rem; margin: 3rem auto; padding: 2rem; text-align: center; }
.rh-empty-state p { max-width: 34rem; margin: 1rem auto 1.5rem; color: var(--rh-muted-text); line-height: 1.65; }

.rh-mobile-nav { display: none; }

@media (max-width: 960px) {
  input,
  select,
  textarea {
    max-width: 100%;
    min-width: 0;
    font-size: 16px !important;
  }
  button,
  a,
  input,
  select,
  textarea { touch-action: manipulation; }
  .rh-layout { grid-template-columns: 1fr; }
  .rh-rail { display: none; }
  .rh-today-grid,
  .rh-calendar-layout,
  .rh-planning-grid,
  .rh-feed-grid,
  .rh-focus-layout,
  .rh-publishing-grid { grid-template-columns: 1fr; }
  .rh-mobile-nav {
    position: fixed;
    z-index: 60;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(var(--rh-mobile-nav-height) + env(safe-area-inset-bottom));
    padding: 0.35rem max(0.45rem, env(safe-area-inset-right)) max(0.35rem, env(safe-area-inset-bottom)) max(0.45rem, env(safe-area-inset-left));
    border: 1px solid var(--rh-line);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    background: color-mix(in srgb, var(--rh-paper) 97%, transparent);
    box-shadow: 0 -8px 28px rgba(16, 43, 24, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  .rh-mobile-nav a { display: grid; min-width: 0; place-content: center; gap: 0.2rem; border-radius: 0.85rem; font-size: 0.61rem; font-weight: 700; text-align: center; }
  .rh-mobile-nav a > span:first-child { width: 1.2rem; height: 1.2rem; margin: auto; }
  .rh-mobile-nav a[aria-current="page"] { background: color-mix(in srgb, var(--rh-green) 10%, var(--rh-paper)); color: var(--rh-green) !important; }
  .rh-app { padding-bottom: calc(var(--rh-mobile-nav-height) + env(safe-area-inset-bottom)); }
  body:has(.rh-app) .js_site-bottom-bar { display: none; }
}

/* RootHVN's community composer intentionally opens as a clean writing canvas. */
#modal-content .publisher .ql-editor.ql-blank::before,
.modal__dialog .publisher .ql-editor.ql-blank::before {
  content: "" !important;
}

@media (max-width: 640px) {
  .rh-kind-choices > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rh-highlighter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rh-app-toolbar { margin-bottom: 1rem; }
  .rh-status span:last-child { display: none; }
  .rh-page-heading { align-items: flex-start; flex-direction: column; }
  .rh-page-heading > .rh-button { width: 100%; }
  .rh-page-heading > .rh-form-actions { width: 100%; flex-wrap: wrap; }
  .rh-page-heading > .rh-form-actions > .rh-segmented { order: 3; width: 100%; }
  .rh-page-heading > .rh-form-actions > .rh-segmented button { flex: 1; }
  .rh-capture-card { grid-template-columns: 1fr; }
  .rh-capture-card .rh-form-actions { justify-content: flex-end; }
  .rh-summary-grid { grid-template-columns: 1fr 1fr; }
  .rh-summary:last-child { grid-column: 1 / -1; }
  .rh-list-horizontal { grid-template-columns: 1fr; }
  .rh-more-grid,
  .rh-notebook-layout { grid-template-columns: 1fr; }
  .rh-publishing-note { grid-template-columns: 1fr; }
  .rh-note-sheet { grid-template-columns: 1fr; }
  .rh-note-sheet > * { grid-column: 1; }
  .rh-ink-toolbar { align-items: flex-start; flex-direction: column; }
  .rh-note-footer { align-items: stretch; flex-direction: column; }
  .rh-calendar-card {
    width: 100%;
    min-width: 0;
    padding: 0.65rem 0.45rem 0.55rem;
    overflow: hidden;
  }
  .rh-calendar-toolbar { margin-bottom: 0.55rem; padding-inline: 0.15rem; }
  .rh-calendar-toolbar h2 { font-size: 1.05rem; }
  .rh-weekdays,
  .rh-calendar-grid {
    width: 100%;
    min-width: 0;
  }
  .rh-weekdays span {
    min-width: 0;
    padding: 0.25rem 0;
    font-size: 0.53rem;
    letter-spacing: 0;
  }
  .rh-day {
    min-width: 0;
    min-height: 3.15rem;
    padding: 0.24rem;
    overflow: hidden;
  }
  .rh-day-number { width: 1.5rem; height: 1.5rem; margin-inline: auto; font-size: 0.68rem; }
  .rh-day-count { display: none; }
  .rh-sky-markers { right: 0.18rem; bottom: 0.16rem; max-width: calc(100% - 0.3rem); gap: 0.1rem; }
  .rh-sky-marker { font-size: 0; }
  .rh-sky-marker svg { width: 7px; height: 7px; }
  .rh-calendar-feed-actions,
  .rh-alert-categories { grid-template-columns: 1fr; }
  .rh-connect-state > .rh-form-actions { align-items: stretch; flex-direction: column; }
  .rh-connect-state > .rh-form-actions .rh-button { width: 100%; }
  .rh-dialog { width: calc(100vw - 1rem); max-height: calc(100vh - 1rem); border-radius: 1.15rem; }
  .rh-item-form-grid { grid-template-columns: 1fr 1fr; }
  .rh-habit-form-grid { grid-template-columns: 1fr; }
  .rh-habit-form-grid > label { grid-column: 1; }
  .rh-item-form-grid .rh-field-grow { grid-column: span 1; }
  .rh-item-form-grid > label:nth-child(2),
  .rh-field-span { grid-column: 1 / -1; }
  .rh-subtask-add { grid-template-columns: 1fr; }
  .rh-reminder-fields { grid-template-columns: 1fr; }
  .rh-dialog-footer { align-items: stretch; flex-direction: column-reverse; }
  .rh-dialog-footer > .rh-form-actions { justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .rh-view { animation: none; }
  .rh-button,
  .rh-icon-button { transition: none; }
}
