/* Yidiantong visual theme. The application owns navigation, state and actions. */
html {
  --ydt-paper: #f4f6f2;
  --ydt-surface: #ffffff;
  --ydt-subtle: #eaf0eb;
  --ydt-line: #d4e0d8;
  --ydt-text: #172a24;
  --ydt-muted: #52685e;
  --ydt-accent: #125840;
  --ydt-on-accent: #ffffff;
  --ydt-soft: #dcefe3;
  --ydt-ring: #268a66;
  --ydt-shadow: 0 14px 38px rgb(17 56 39 / 9%);
  --ydt-hero: #091e19;
  --ydt-mint: #a8f3d3;
  --ydt-width: min(100% - 3rem, 1224px);
  --ydt-font: "Manrope", "PingFang SC", "Microsoft YaHei UI", system-ui, sans-serif;
  --background: var(--ydt-paper);
  --foreground: var(--ydt-text);
  --card: var(--ydt-surface);
  --card-foreground: var(--ydt-text);
  --popover: var(--ydt-surface);
  --popover-foreground: var(--ydt-text);
  --primary: var(--ydt-accent);
  --primary-foreground: var(--ydt-on-accent);
  --secondary: var(--ydt-subtle);
  --secondary-foreground: var(--ydt-text);
  --muted: var(--ydt-subtle);
  --muted-foreground: var(--ydt-muted);
  --accent: var(--ydt-soft);
  --accent-foreground: var(--ydt-text);
  --border: var(--ydt-line);
  --input: var(--ydt-line);
  --ring: var(--ydt-ring);
  --sidebar: var(--ydt-surface);
  --sidebar-foreground: var(--ydt-text);
  --sidebar-primary: var(--ydt-accent);
  --sidebar-primary-foreground: var(--ydt-on-accent);
  --sidebar-accent: var(--ydt-soft);
  --sidebar-accent-foreground: var(--ydt-text);
  --sidebar-border: var(--ydt-line);
  --sidebar-ring: var(--ydt-ring);
  --font-sans: var(--ydt-font);
  --radius: .875rem;
}
html.dark, html[data-theme="dark"] {
  --ydt-paper: #0c1714;
  --ydt-surface: #14241e;
  --ydt-subtle: #192f26;
  --ydt-line: #2d483b;
  --ydt-text: #e6f3eb;
  --ydt-muted: #a6c0b4;
  --ydt-accent: #9be6c5;
  --ydt-on-accent: #092b20;
  --ydt-soft: #203b30;
  --ydt-ring: #8de1bc;
  --ydt-shadow: 0 14px 40px rgb(0 0 0 / 23%);
}
html body { background: var(--ydt-paper); color: var(--ydt-text); font-family: var(--ydt-font); }
::selection { color: var(--ydt-on-accent); background: var(--ydt-accent); }
:where(a,button,input,select,textarea,[role="tab"]):focus-visible { outline: 2px solid var(--ydt-ring); outline-offset: 2px; }
html :where([data-slot="card"], [data-slot="dialog-content"], [data-slot="sheet-content"], [data-slot="popover-content"]) {
  border-color: var(--ydt-line);
  border-radius: 16px;
  box-shadow: var(--ydt-shadow);
}
html [data-slot="card"] [data-slot="card-header"] { border-bottom-color: var(--ydt-line); }
html :where([data-slot="input"],[data-slot="select-trigger"],[data-slot="button"]) { border-radius: 10px; }
html :where(button, a)[data-slot="button"][data-variant="default"] {
  background-color: var(--ydt-accent);
  color: var(--ydt-on-accent);
}
html :where([data-slot="sidebar-inner"],[data-sidebar="sidebar"]) {
  background: var(--ydt-surface);
  color: var(--ydt-text);
}
html [data-sidebar="menu-button"][data-active="true"] {
  background: var(--ydt-soft);
  box-shadow: inset 3px 0 0 var(--ydt-ring);
  color: var(--ydt-accent);
  font-weight: 650;
}
html [data-slot="table-header"] { background: var(--ydt-subtle); }
html [data-slot="table-row"] { border-color: var(--ydt-line); }
html [data-slot="table-row"]:hover { background: var(--ydt-subtle); }
html body header.fixed:has(nav) {
  background: var(--ydt-surface) !important;
  border-bottom: 1px solid var(--ydt-line);
  box-shadow: 0 8px 22px rgb(15 44 32 / 9%);
}
html body header.fixed:has(nav) nav { width: min(100%, 1320px); margin-inline: auto; }
html body header.fixed:has(nav) :where(a,button) { border-radius: 9px; }
html body header.fixed:has(nav) [aria-current="page"] { background: var(--ydt-soft); color: var(--ydt-accent); }

/* Landing. Retain the application's links and section anchors. */
#first-screen {
  color: #edf9f1;
  background: var(--ydt-paper) !important;
  height: auto !important;
  min-height: 0 !important;
}
#first-stage {
  isolation: isolate;
  box-sizing: border-box;
  width: var(--ydt-width) !important;
  min-height: clamp(33rem, 71svh, 48rem) !important;
  height: auto !important;
  margin: clamp(4.5rem, 7vw, 6rem) auto clamp(1rem, 3vw, 2.5rem) !important;
  border-radius: clamp(1rem, 3vw, 2rem);
  overflow: hidden;
  display: grid !important;
  grid-template-columns: 1fr;
  align-content: center;
  padding: clamp(2rem, 6vw, 6rem);
  text-align: left;
  background:
    linear-gradient(90deg, rgb(6 27 19 / 96%) 0%, rgb(6 27 19 / 78%) 40%, rgb(6 27 19 / 13%) 100%),
    var(--ydt-hero) url("/ydt-river-hero.20261203.webp") center right / cover no-repeat !important;
  box-shadow: 0 24px 72px rgb(0 24 13 / 24%);
}
#first-stage .plate { display: none !important; }
#first-stage .hero {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  text-align: left !important;
  margin: 0 !important;
  width: min(100%, 42rem) !important;
  display: block;
}
#first-stage .headline {
  font-family: var(--ydt-font) !important;
  font-size: clamp(3rem, 7.3vw, 7rem) !important;
  font-weight: 750;
  line-height: 1.03;
  letter-spacing: -.075em;
  text-wrap: balance;
  color: #f0fbf4;
  -webkit-text-fill-color: #f0fbf4;
  text-shadow: none !important;
  margin: 0 0 1rem;
}
#first-stage .hero :where(p, .subtitle) { color: #c9e4d6 !important; }
#first-stage .hero > :where(.headline,.sub) {
  position: static !important;
  transform: none !important;
  width: auto !important;
  max-width: 100%;
}
#first-stage .hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
#first-stage .hero :where(a,button) {
  position: static !important;
  transform: none !important;
  border-radius: 10px !important;
  min-height: 44px;
  display: inline-flex !important;
  align-items: center;
  padding-inline: 1rem;
  font-family: var(--ydt-font);
  font-weight: 650;
}
#first-stage .hero :where(a,button):first-of-type { background: var(--ydt-mint); color: #092b20; }
#first-stage .logos {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  display: flex !important;
  justify-content: flex-start !important;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 1.5rem 0 0;
}
#first-stage .logos > * { position: static !important; transform: none !important; }
#credentials, #capabilities, #narrative { background: var(--ydt-paper) !important; }
#credentials .app {
  width: var(--ydt-width);
  margin-inline: auto;
  border: 1px solid var(--ydt-line);
  border-radius: clamp(1rem, 2vw, 1.5rem);
  background: var(--ydt-surface);
  color: var(--ydt-text);
  box-shadow: var(--ydt-shadow);
}
#credentials .hero-layout { min-height: auto; padding: clamp(1.5rem, 4.5vw, 4rem); gap: clamp(1.25rem,4vw,4rem); }
#credentials .hero-copy :where(.hero-title,h1,h2) { color: var(--ydt-text); letter-spacing: -.045em; }
#credentials .hero-copy :where(p) { color: var(--ydt-muted); }
#credentials .hero-copy :where(a,button) { border-radius: 10px; }
#capabilities .modern-agency-background { opacity: .12; }
#capabilities .ydt-plans-section__content {
  width: var(--ydt-width) !important;
  margin-inline: auto;
  padding: clamp(1.25rem,4vw,3rem);
  border: 1px solid var(--ydt-line);
  border-radius: clamp(1rem, 2vw, 1.5rem);
  background: var(--ydt-surface);
  color: var(--ydt-text);
}
#capabilities .ydt-plans-section__header h2 { color: var(--ydt-text); letter-spacing: -.035em; }
#narrative > div {
  width: var(--ydt-width);
  height: auto !important;
  min-height: clamp(23rem, 50svh, 34rem) !important;
  margin-inline: auto;
  border-radius: clamp(1rem,2.5vw,1.75rem);
  background: #122e25 !important;
}
#narrative > div > video { opacity: .21; }
#narrative h1 { font-family: var(--ydt-font) !important; font-weight: 680; text-shadow: none !important; font-size: clamp(2.1rem, 6vw, 5rem) !important; }
#narrative > div > div:has(h1) { margin-top: 0; }
#footer .footer { background: #091e19 !important; color: #d6ecdf; }
#footer .footer__wordmark { color: rgb(168 243 211 / 9%) !important; }
#footer .footer__content { width: var(--ydt-width); margin-inline: auto; }

/* Auth pages use their existing forms, messages, and native autofill. */
html:has(.auth-hero-shell) .auth-hero-shell { background: var(--ydt-paper); }
html:has(.auth-hero-shell) .auth-hero__scene {
  background: linear-gradient(90deg, #091e19 0%, rgb(9 30 25 / 26%) 80%),
    #091e19 url("/ydt-river-hero.20261203.webp") center right / cover no-repeat;
}
html:has(.auth-hero-shell) .auth-hero__canvas { opacity: 0; }
html:has(.auth-hero-shell) .auth-hero__backdrop { opacity: .4; }
html:has(.auth-hero-shell) .auth-hero__card {
  background: var(--ydt-surface);
  color: var(--ydt-text);
  border: 1px solid var(--ydt-line);
  border-radius: 20px;
  box-shadow: var(--ydt-shadow);
}
html:has(.auth-hero-shell) .auth-hero__card h2 { text-align: left; letter-spacing: -.035em; }

/* Short-drama workspace has its own stylesheet and palette. */
html:has(link[href^="/member-studio/assets/"]) {
  --ink-900: var(--ydt-surface);
  --ink-800: var(--ydt-subtle);
  --ink-700: var(--ydt-line);
  --amberx: var(--ydt-accent);
  --amberx-soft: var(--ydt-mint);
}
html:has(link[href^="/member-studio/assets/"]) body { background: var(--ydt-paper) !important; color: var(--ydt-text) !important; }
html:has(link[href^="/member-studio/assets/"]) :where(.card,.panel-soft,.bg-ink-900,.bg-ink-800) {
  background: var(--ydt-surface) !important;
  border-color: var(--ydt-line) !important;
}
html:has(link[href^="/member-studio/assets/"]) .card { border-radius: 16px; box-shadow: var(--ydt-shadow); }
html:has(link[href^="/member-studio/assets/"]) :where(.btn,.btn-primary,.btn-ghost) { border-radius: 9px !important; }
html:has(link[href^="/member-studio/assets/"]) .btn-primary {
  color: var(--ydt-on-accent) !important;
  background: var(--ydt-accent) !important;
  border-color: transparent !important;
}
html:has(link[href^="/member-studio/assets/"]) .btn-ghost { border-color: var(--ydt-line) !important; }
html:has(link[href^="/member-studio/assets/"]) .btn-ghost:hover { background: var(--ydt-soft) !important; }
html:has(link[href^="/member-studio/assets/"]) .pill-ok { color: var(--ydt-accent); background: var(--ydt-soft); }
html:has(link[href^="/member-studio/assets/"]) .studio-project-card { border-radius: 16px !important; }
html:has(link[href^="/member-studio/assets/"]) :where(.text-amberx,.text-amberx-soft) { color: var(--ydt-accent) !important; }

@media (max-width: 680px) {
  html { --ydt-width: calc(100% - 1.5rem); }
  #first-stage { padding: 2rem 1.15rem; min-height: 31rem !important; background-position: 60% center !important; }
  #first-stage .headline { font-size: clamp(2.7rem, 12.8vw, 4.5rem) !important; }
  #credentials .hero-layout { padding: 1.25rem; }
  #capabilities .ydt-plans-section__content { padding: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  #first-screen, #credentials, #capabilities, #narrative { scroll-behavior: auto; }
}

