:root {
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --max-width: 1180px;
  --transition: 220ms ease;
}

body[data-theme="dark"] {
  --bg: #050608;
  --bg-top: #090c11;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-strong: rgba(255, 255, 255, 0.055);
  --line: rgba(102, 204, 255, 0.15);
  --line-strong: rgba(102, 204, 255, 0.28);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --accent: #66ccff;
  --accent-strong: #8fdcff;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
  --surface-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  --grid: rgba(255, 255, 255, 0.018);
  --navbar: rgba(5, 6, 8, 0.78);
}

body[data-theme="light"] {
  --bg: #f4f8fb;
  --bg-top: #ffffff;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(102, 204, 255, 0.22);
  --line-strong: rgba(56, 149, 195, 0.32);
  --text: #0b1720;
  --muted: rgba(11, 23, 32, 0.66);
  --accent: #3fa9df;
  --accent-strong: #66ccff;
  --shadow: 0 10px 28px rgba(25, 41, 53, 0.08);
  --surface-shadow: 0 12px 26px rgba(27, 67, 94, 0.08);
  --grid: rgba(25, 41, 53, 0.025);
  --navbar: rgba(244, 248, 251, 0.8);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 46%, var(--bg) 100%);
  color: var(--text);
  transition: background var(--transition), color var(--transition);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
}

.page-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 110px 0 56px;
}

.navbar,
.footer,
.hero-content,
.workspace,
.features {
  position: relative;
  z-index: 1;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--navbar);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(127, 149, 168, 0.14);
  transition: border-color var(--transition), background var(--transition), backdrop-filter var(--transition);
  overflow: visible;
}

.nav-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 0 18px;
  overflow: visible;
  position: relative;
  z-index: 31;
}

.navbar.is-scrolled {
  border-bottom-color: rgba(127, 149, 168, 0.22);
}

body[data-page="flowstate"] .navbar,
body[data-page="flowstate"] .navbar.is-scrolled {
  border-bottom-color: transparent;
}

.nav-links,
.nav-right,
.workspace-actions,
.input-actions,
.action-row,
.modal-actions,
.timer-controls,
.timer-presets,
.custom-timer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-links {
  gap: 28px;
  position: relative;
  z-index: 32;
}

.nav-right {
  gap: 14px;
}

.theme-toggle {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
}

.nav-right #loginButton,
.nav-right #signupButton {
  border-radius: 4px;
  padding: 11px 16px;
  letter-spacing: 0.01em;
}

.nav-right #loginButton {
  background: transparent;
  border-color: transparent;
  color: color-mix(in srgb, var(--text) 84%, transparent);
  box-shadow: none;
}

.nav-right #loginButton:hover {
  background: rgba(127, 149, 168, 0.1);
  border-color: rgba(127, 149, 168, 0.14);
  color: var(--text);
}

.nav-right #signupButton {
  background: transparent;
  border-color: transparent;
  color: color-mix(in srgb, var(--text) 84%, transparent);
  box-shadow: none;
}

.nav-right #signupButton:hover {
  background: rgba(127, 149, 168, 0.1);
  border-color: rgba(127, 149, 168, 0.14);
  color: var(--text);
}

.profile-button {
  border-radius: 4px;
  padding: 11px 16px;
  background: rgba(127, 149, 168, 0.08);
  border-color: rgba(127, 149, 168, 0.18);
  color: var(--text);
  box-shadow: none;
}

.profile-button:hover,
.profile-button.is-active {
  background: rgba(102, 204, 255, 0.1);
  border-color: rgba(102, 204, 255, 0.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.brand-wordmark {
  letter-spacing: 0.08em;
}

.nav-links {
  color: var(--muted);
}

.nav-links a,
.footer a {
  position: relative;
  transition: color var(--transition);
}

.nav-dropdown {
  position: relative;
  margin-right: 10px;
  z-index: 80;
}

.nav-dropdown::after {
  content: "";
  position: absolute;
  left: -14px;
  right: -14px;
  top: 100%;
  height: 24px;
}

.nav-dropdown summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  transition: color var(--transition);
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-links a.is-active,
.nav-links a[aria-current="page"],
.nav-dropdown.is-active summary {
  color: var(--text);
}

body[data-page="about"] .nav-links a[href="./about.html"] {
  color: var(--text);
}

.nav-dropdown.is-active summary,
.nav-dropdown:hover summary,
.nav-dropdown:focus-within summary {
  background: transparent;
}

.nav-links a::after,
.nav-dropdown summary::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav-dropdown summary::after {
  left: 0;
  right: 0;
  width: auto;
  bottom: -6px;
}

.nav-links a.is-active::after,
.nav-links a[aria-current="page"]::after,
.nav-dropdown.is-active summary::after {
  transform: scaleX(1);
}

body[data-page="about"] .nav-links a[href="./about.html"]::after {
  transform: scaleX(1);
}

.nav-links a:hover::after,
.nav-dropdown:hover summary::after,
.nav-dropdown:focus-within summary::after {
  transform: scaleX(1);
}

.nav-links a:hover,
.nav-dropdown:hover summary,
.nav-dropdown:focus-within summary,
.footer a:hover {
  color: var(--text);
}

.nav-caret {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform var(--transition);
}

.nav-dropdown[open] .nav-caret,
.nav-dropdown:hover .nav-caret,
.nav-dropdown:focus-within .nav-caret {
  transform: rotate(225deg) translateY(-1px);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  padding: 12px;
  display: grid;
  gap: 8px;
  background: color-mix(in srgb, var(--panel-strong) 92%, transparent);
  border: 1px solid rgba(102, 204, 255, 0.18);
  border-radius: 14px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 120;
}

.nav-dropdown[open] .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  padding: 12px 14px;
  border-radius: 10px;
  color: color-mix(in srgb, var(--text) 92%, transparent);
  background: rgba(127, 149, 168, 0.05);
  border: 1px solid rgba(127, 149, 168, 0.1);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.nav-dropdown-menu a[data-nav-item="flow"] {
  color: color-mix(in srgb, var(--text) 68%, transparent);
  background: rgba(127, 149, 168, 0.04);
  border-color: rgba(127, 149, 168, 0.08);
}

.nav-dropdown-menu a[data-nav-item="flowplus"] {
  position: relative;
  overflow: hidden;
  color: #dff6ff;
  background:
    linear-gradient(135deg, rgba(102, 204, 255, 0.2), rgba(102, 204, 255, 0.06) 55%, rgba(255, 255, 255, 0.03)),
    rgba(127, 149, 168, 0.05);
  border-color: rgba(102, 204, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(143, 220, 255, 0.08);
  animation: enchantedFlowPlus 4.8s ease-in-out infinite;
}

.nav-dropdown-menu a[data-nav-item="flowplus"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 12%, rgba(255, 255, 255, 0.2) 44%, transparent 72%);
  transform: translateX(-120%);
  animation: enchantedFlowPlusShine 3.6s ease-in-out infinite;
  pointer-events: none;
}

.nav-dropdown-menu a.is-active,
.nav-dropdown-menu a[aria-current="page"] {
  color: var(--text);
  background: rgba(102, 204, 255, 0.1);
  border-color: rgba(102, 204, 255, 0.22);
}

.nav-dropdown-menu a[data-nav-item="flowplus"]:hover,
.nav-dropdown-menu a[data-nav-item="flowplus"].is-active,
.nav-dropdown-menu a[data-nav-item="flowplus"][aria-current="page"] {
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(102, 204, 255, 0.28), rgba(102, 204, 255, 0.12) 58%, rgba(255, 255, 255, 0.05)),
    rgba(102, 204, 255, 0.12);
  border-color: rgba(143, 220, 255, 0.36);
  box-shadow: 0 10px 18px rgba(102, 204, 255, 0.12);
}

.nav-dropdown-menu a::after {
  display: none;
}

.theme-toggle,
.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  border-radius: 10px;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition),
    background var(--transition),
    color var(--transition);
}

.theme-toggle,
.secondary-button,
.ghost-button,
.icon-button {
  color: var(--text);
  background: var(--panel);
  border: 1px solid rgba(127, 149, 168, 0.16);
}

.theme-toggle,
.secondary-button,
.ghost-button {
  padding: 12px 16px;
}

.icon-only {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.brightness-icon {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4.2' fill='black'/%3E%3Cg stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 1.8v3.2'/%3E%3Cpath d='M12 19v3.2'/%3E%3Cpath d='M1.8 12H5'/%3E%3Cpath d='M19 12h3.2'/%3E%3Cpath d='M4.5 4.5l2.2 2.2'/%3E%3Cpath d='M17.3 17.3l2.2 2.2'/%3E%3Cpath d='M19.5 4.5l-2.2 2.2'/%3E%3Cpath d='M6.7 17.3l-2.2 2.2'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4.2' fill='black'/%3E%3Cg stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 1.8v3.2'/%3E%3Cpath d='M12 19v3.2'/%3E%3Cpath d='M1.8 12H5'/%3E%3Cpath d='M19 12h3.2'/%3E%3Cpath d='M4.5 4.5l2.2 2.2'/%3E%3Cpath d='M17.3 17.3l2.2 2.2'/%3E%3Cpath d='M19.5 4.5l-2.2 2.2'/%3E%3Cpath d='M6.7 17.3l-2.2 2.2'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.brightness-icon::before {
  display: none;
}

.brightness-icon::after {
  display: none;
}

body[data-theme="dark"] .brightness-icon {
  color: #ffffff;
}

body[data-theme="light"] .brightness-icon {
  color: #000000;
}

.notification-center {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.notification-bell-button {
  position: relative;
}

.notification-bell-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 22a2.7 2.7 0 0 0 2.55-1.85h-5.1A2.7 2.7 0 0 0 12 22Zm7.15-5.3-1.35-1.6V10a5.83 5.83 0 0 0-4.35-5.63V3.7a1.45 1.45 0 1 0-2.9 0v.67A5.83 5.83 0 0 0 6.2 10v5.1l-1.35 1.6a1.15 1.15 0 0 0 .88 1.9h12.54a1.15 1.15 0 0 0 .88-1.9ZM8.1 10a3.9 3.9 0 1 1 7.8 0v5.35l1.15 1.35H6.95l1.15-1.35V10Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 22a2.7 2.7 0 0 0 2.55-1.85h-5.1A2.7 2.7 0 0 0 12 22Zm7.15-5.3-1.35-1.6V10a5.83 5.83 0 0 0-4.35-5.63V3.7a1.45 1.45 0 1 0-2.9 0v.67A5.83 5.83 0 0 0 6.2 10v5.1l-1.35 1.6a1.15 1.15 0 0 0 .88 1.9h12.54a1.15 1.15 0 0 0 .88-1.9ZM8.1 10a3.9 3.9 0 1 1 7.8 0v5.35l1.15 1.35H6.95l1.15-1.35V10Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: #03131c;
  font-size: 0.66rem;
  font-weight: 800;
  border: 2px solid var(--bg-top);
}

.notification-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: min(380px, calc(100vw - 28px));
  max-height: min(560px, calc(100vh - 110px));
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(127, 149, 168, 0.18);
  border-radius: 20px;
  background: color-mix(in srgb, var(--bg-top) 92%, transparent);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(20px);
  z-index: 120;
  animation: notificationPanelIn 180ms ease both;
}

body[data-theme="light"] .notification-panel {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 60px rgba(27, 67, 94, 0.14);
}

.notification-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.notification-panel-head h3 {
  margin: 2px 0 0;
  font-size: 1.05rem;
}

.notification-clear-button {
  border: 1px solid rgba(127, 149, 168, 0.2);
  border-radius: 11px;
  padding: 8px 11px;
  background: rgba(127, 149, 168, 0.06);
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease, background 160ms ease;
}

.notification-clear-button:hover {
  transform: translateY(-1px);
  border-color: rgba(102, 204, 255, 0.34);
  color: var(--text);
  background: rgba(102, 204, 255, 0.08);
}

.notification-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.notification-metrics span {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid rgba(127, 149, 168, 0.14);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.76rem;
  background: rgba(127, 149, 168, 0.05);
}

.notification-metrics strong {
  color: var(--text);
  font-size: 1rem;
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification-card,
.notification-empty {
  padding: 12px;
  border: 1px solid rgba(127, 149, 168, 0.12);
  border-radius: 14px;
  background: rgba(127, 149, 168, 0.045);
}

.notification-card.is-unread {
  border-color: rgba(102, 204, 255, 0.26);
  background: rgba(102, 204, 255, 0.07);
}

.notification-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification-card-top strong {
  font-size: 0.92rem;
}

.notification-card-top span,
.notification-card small,
.notification-empty {
  color: var(--muted);
  font-size: 0.8rem;
}

.notification-card p {
  margin: 7px 0 7px;
  color: color-mix(in srgb, var(--text) 84%, transparent);
  line-height: 1.45;
}

.side-notification-region {
  position: fixed;
  top: 92px;
  right: 22px;
  z-index: 140;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.side-notification {
  width: min(360px, calc(100vw - 32px));
  display: grid;
  gap: 5px;
  padding: 14px 15px;
  border: 1px solid rgba(102, 204, 255, 0.2);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-top) 92%, transparent);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  animation: sideNotificationIn 220ms ease both;
}

body[data-theme="light"] .side-notification {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 48px rgba(27, 67, 94, 0.14);
}

.side-notification strong {
  font-size: 0.95rem;
}

.side-notification span {
  color: color-mix(in srgb, var(--text) 84%, transparent);
  line-height: 1.4;
}

.side-notification small {
  color: var(--muted);
  font-size: 0.78rem;
}

.side-notification.is-hiding {
  animation: sideNotificationOut 220ms ease both;
}

.sparkle-mark {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-right: 0.35em;
  vertical-align: -0.1em;
  background: linear-gradient(180deg, #7fd2ff, #4bb5ff);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='black' d='M42.7 6.5c1 0 1.8.6 2.1 1.6 2 7.4 3.8 12 6.6 14.8 2.8 2.8 7.4 4.6 14.8 6.6 1 .3 1.6 1.1 1.6 2.1s-.6 1.8-1.6 2.1c-7.4 2-12 3.8-14.8 6.6-2.8 2.8-4.6 7.4-6.6 14.8-.3 1-1.1 1.6-2.1 1.6s-1.8-.6-2.1-1.6c-2-7.4-3.8-12-6.6-14.8-2.8-2.8-7.4-4.6-14.8-6.6-1-.3-1.6-1.1-1.6-2.1s.6-1.8 1.6-2.1c7.4-2 12-3.8 14.8-6.6 2.8-2.8 4.6-7.4 6.6-14.8.3-1 1.1-1.6 2.1-1.6ZM12.3 8.5c.7 0 1.3.4 1.5 1.1 1.2 4.5 2.3 7.2 4 8.9 1.7 1.7 4.4 2.8 8.9 4 .7.2 1.1.8 1.1 1.5s-.4 1.3-1.1 1.5c-4.5 1.2-7.2 2.3-8.9 4-1.7 1.7-2.8 4.4-4 8.9-.2.7-.8 1.1-1.5 1.1s-1.3-.4-1.5-1.1c-1.2-4.5-2.3-7.2-4-8.9-1.7-1.7-4.4-2.8-8.9-4-.7-.2-1.1-.8-1.1-1.5s.4-1.3 1.1-1.5c4.5-1.2 7.2-2.3 8.9-4 1.7-1.7 2.8-4.4 4-8.9.2-.7.8-1.1 1.5-1.1ZM17 40.5c.7 0 1.3.4 1.5 1.1 1.1 4 2 6.4 3.4 7.8 1.4 1.4 3.8 2.3 7.8 3.4.7.2 1.1.8 1.1 1.5s-.4 1.3-1.1 1.5c-4 1.1-6.4 2-7.8 3.4-1.4 1.4-2.3 3.8-3.4 7.8-.2.7-.8 1.1-1.5 1.1s-1.3-.4-1.5-1.1c-1.1-4-2-6.4-3.4-7.8-1.4-1.4-3.8-2.3-7.8-3.4-.7-.2-1.1-.8-1.1-1.5s.4-1.3 1.1-1.5c4-1.1 6.4-2 7.8-3.4 1.4-1.4 2.3-3.8 3.4-7.8.2-.7.8-1.1 1.5-1.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='black' d='M42.7 6.5c1 0 1.8.6 2.1 1.6 2 7.4 3.8 12 6.6 14.8 2.8 2.8 7.4 4.6 14.8 6.6 1 .3 1.6 1.1 1.6 2.1s-.6 1.8-1.6 2.1c-7.4 2-12 3.8-14.8 6.6-2.8 2.8-4.6 7.4-6.6 14.8-.3 1-1.1 1.6-2.1 1.6s-1.8-.6-2.1-1.6c-2-7.4-3.8-12-6.6-14.8-2.8-2.8-7.4-4.6-14.8-6.6-1-.3-1.6-1.1-1.6-2.1s.6-1.8 1.6-2.1c7.4-2 12-3.8 14.8-6.6 2.8-2.8 4.6-7.4 6.6-14.8.3-1 1.1-1.6 2.1-1.6ZM12.3 8.5c.7 0 1.3.4 1.5 1.1 1.2 4.5 2.3 7.2 4 8.9 1.7 1.7 4.4 2.8 8.9 4 .7.2 1.1.8 1.1 1.5s-.4 1.3-1.1 1.5c-4.5 1.2-7.2 2.3-8.9 4-1.7 1.7-2.8 4.4-4 8.9-.2.7-.8 1.1-1.5 1.1s-1.3-.4-1.5-1.1c-1.2-4.5-2.3-7.2-4-8.9-1.7-1.7-4.4-2.8-8.9-4-.7-.2-1.1-.8-1.1-1.5s.4-1.3 1.1-1.5c4.5-1.2 7.2-2.3 8.9-4 1.7-1.7 2.8-4.4 4-8.9.2-.7.8-1.1 1.5-1.1ZM17 40.5c.7 0 1.3.4 1.5 1.1 1.1 4 2 6.4 3.4 7.8 1.4 1.4 3.8 2.3 7.8 3.4.7.2 1.1.8 1.1 1.5s-.4 1.3-1.1 1.5c-4 1.1-6.4 2-7.8 3.4-1.4 1.4-2.3 3.8-3.4 7.8-.2.7-.8 1.1-1.5 1.1s-1.3-.4-1.5-1.1c-1.1-4-2-6.4-3.4-7.8-1.4-1.4-3.8-2.3-7.8-3.4-.7-.2-1.1-.8-1.1-1.5s.4-1.3 1.1-1.5c4-1.1 6.4-2 7.8-3.4 1.4-1.4 2.3-3.8 3.4-7.8.2-.7.8-1.1 1.5-1.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.primary-button {
  color: #04141d;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  padding: 13px 18px;
  font-weight: 700;
  box-shadow: none;
}

.upgrade-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.crown-icon {
  width: 14px;
  height: 11px;
  display: inline-block;
  background: linear-gradient(180deg, rgba(4, 20, 29, 0.92), rgba(4, 20, 29, 0.92));
  clip-path: polygon(0% 100%, 12% 36%, 32% 58%, 50% 0%, 68% 58%, 88% 36%, 100% 100%);
}

.upgrade-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 8%, rgba(255, 255, 255, 0.28) 42%, transparent 72%);
  transform: translateX(-130%);
  transition: transform 520ms ease;
  pointer-events: none;
}

.upgrade-button:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 12px 22px rgba(102, 204, 255, 0.18);
}

.upgrade-button:hover::before {
  transform: translateX(130%);
}

.upgrade-button:hover .crown-icon {
  animation: crownBob 700ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.theme-toggle:hover,
.icon-button:hover,
.task-step:hover {
  transform: translateY(-1px);
}

.ghost-button {
  color: var(--muted);
}

.nav-right .is-active {
  color: var(--text);
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--panel-strong) 90%, var(--accent) 10%);
}

.compact {
  padding: 10px 14px;
  font-size: 0.92rem;
}

.hero {
  min-height: calc(100vh - 150px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 0 34px;
}

.hero-content {
  width: min(100%, 840px);
  text-align: center;
  animation: rise 700ms ease;
}

.feature-media,
.pricing-card-media,
.auth-visual-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(127, 149, 168, 0.16);
  box-shadow: var(--surface-shadow);
}

.feature-media {
  aspect-ratio: 5 / 4;
}

.pricing-card-media {
  aspect-ratio: 16 / 10;
}

.auth-visual-card {
  aspect-ratio: 4 / 5;
}

.feature-media img,
.pricing-card-media img,
.auth-visual-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 360ms ease, filter 360ms ease;
}

.feature-media:hover img,
.pricing-card-media:hover img,
.auth-visual-card:hover img {
  transform: scale(1.05);
  filter: saturate(1.04);
}

.section-label,
.feature-index {
  margin: 0 0 12px;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title {
  margin: 0;
  min-height: 1.2em;
  font-size: clamp(2.8rem, 8vw, 6.1rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  padding: 9px 14px 9px 16px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--text) 92%, transparent);
  background: rgba(127, 149, 168, 0.06);
  border: 1px solid rgba(127, 149, 168, 0.12);
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.hero-link::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='black' d='M11.1 3.25a.75.75 0 0 1 0-1.5h5.65a.75.75 0 0 1 .75.75v5.65a.75.75 0 0 1-1.5 0V4.31l-8.22 8.22a.75.75 0 1 1-1.06-1.06l8.22-8.22H11.1Z'/%3E%3Cpath fill='black' d='M4.25 5.75a1.5 1.5 0 0 0-1.5 1.5v8.5a1.5 1.5 0 0 0 1.5 1.5h8.5a1.5 1.5 0 0 0 1.5-1.5V11.5a.75.75 0 0 1 1.5 0v4.25a3 3 0 0 1-3 3h-8.5a3 3 0 0 1-3-3v-8.5a3 3 0 0 1 3-3H8.5a.75.75 0 0 1 0 1.5H4.25Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='black' d='M11.1 3.25a.75.75 0 0 1 0-1.5h5.65a.75.75 0 0 1 .75.75v5.65a.75.75 0 0 1-1.5 0V4.31l-8.22 8.22a.75.75 0 1 1-1.06-1.06l8.22-8.22H11.1Z'/%3E%3Cpath fill='black' d='M4.25 5.75a1.5 1.5 0 0 0-1.5 1.5v8.5a1.5 1.5 0 0 0 1.5 1.5h8.5a1.5 1.5 0 0 0 1.5-1.5V11.5a.75.75 0 0 1 1.5 0v4.25a3 3 0 0 1-3 3h-8.5a3 3 0 0 1-3-3v-8.5a3 3 0 0 1 3-3H8.5a.75.75 0 0 1 0 1.5H4.25Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hero-link:hover {
  transform: translateY(-1px);
  color: var(--text);
  background: rgba(127, 149, 168, 0.1);
  border-color: rgba(102, 204, 255, 0.18);
}

.caret {
  display: inline-block;
  width: 0.08em;
  height: 0.92em;
  margin-left: 0.08em;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: baseline;
}

.hero-subtitle,
.modal-copy,
.feature-card p:last-child,
.response-status,
.follow-up-box,
.card-tip,
.drag-note,
.task-chat-empty {
  color: var(--muted);
}

.hero-subtitle {
  width: min(100%, 640px);
  margin: 22px auto 0;
  font-size: 1.04rem;
  line-height: 1.6;
}

.input-panel,
.response-shell,
.feature-card,
.modal-card,
.timer-widget,
.task-chat,
.quiz-panel,
.info-card,
.pricing-card {
  background: var(--panel-strong);
  border: 1px solid rgba(127, 149, 168, 0.14);
  box-shadow: var(--surface-shadow);
  backdrop-filter: blur(12px);
  transition:
    transform 320ms ease,
    border-color 320ms ease,
    background 320ms ease,
    box-shadow 320ms ease;
}

.input-panel {
  margin-top: 32px;
  padding: 18px;
  border-radius: var(--radius-xl);
}

.spotlight-zone {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.spotlight-zone::after {
  content: "";
  position: absolute;
  width: var(--spot-size, 220px);
  height: var(--spot-size, 220px);
  left: var(--spot-x, 50%);
  top: var(--spot-y, 50%);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(102, 204, 255, 0.16) 0%, rgba(102, 204, 255, 0.08) 28%, rgba(102, 204, 255, 0) 72%);
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
  filter: blur(16px);
  z-index: 0;
}

.spotlight-zone.is-spotlit::after {
  opacity: 1;
}

.spotlight-zone > * {
  position: relative;
  z-index: 1;
}

.spotlight-zone:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
}

textarea,
input,
select {
  width: 100%;
  color: var(--text);
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(127, 149, 168, 0.14);
  border-radius: 10px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

body[data-theme="light"] textarea,
body[data-theme="light"] input,
body[data-theme="light"] select {
  background: rgba(255, 255, 255, 0.78);
}

textarea {
  min-height: 118px;
  padding: 18px;
  resize: vertical;
}

input,
select {
  padding: 13px 14px;
}

textarea:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(102, 204, 255, 0.08);
}

.input-actions {
  margin-top: 14px;
}

.query-counter {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.pulse-button {
  animation: pulse 2.8s ease-in-out infinite;
}

.send-button {
  width: 50px;
  height: 50px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  flex-shrink: 0;
}

.send-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  background: currentColor;
  clip-path: polygon(0 46%, 100% 0, 70% 100%, 50% 62%);
  transform: translateX(0) rotate(-8deg);
}

.memory-strip {
  min-height: 24px;
  margin-top: 16px;
  color: color-mix(in srgb, var(--text) 84%, transparent);
}

.workspace {
  margin-top: 28px;
}

body[data-page="home"] .workspace {
  display: none;
}

body[data-page="home"] .feature-layout,
body[data-page="home"] .callout-layout {
  grid-template-columns: 1fr;
}

.entry-callout {
  margin-top: 32px;
  padding: 28px;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid rgba(127, 149, 168, 0.14);
  box-shadow: var(--surface-shadow);
}

.entry-callout h2 {
  margin: 0 0 10px;
  letter-spacing: -0.03em;
}

.entry-callout p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.flow-page-shell {
  padding-top: 118px;
}

.flow-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.flow-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  letter-spacing: -0.05em;
}

.flow-composer {
  margin-top: 0;
}

.flow-workspace {
  margin-top: 18px;
}

.flow-loader {
  display: grid;
  place-items: center;
  min-height: 280px;
  opacity: 1;
  transition: opacity 180ms ease;
}

.flow-loader.is-leaving {
  opacity: 0;
}

.flow-loader-logo {
  position: relative;
  width: 116px;
  height: 116px;
}

.flow-loader.is-built .flow-loader-logo {
  animation: flowLoaderBreathe 1.35s ease-in-out infinite;
}

.flow-loader-logo::after {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 28px;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 18%, rgba(102, 204, 255, 0.16) 46%, transparent 70%);
  transform: translateX(-28px);
}

.flow-loader.is-built .flow-loader-logo::after {
  opacity: 1;
  animation: flowLoaderSweep 1.65s ease-in-out infinite;
}

.flow-loader-slash,
.flow-loader-line {
  position: absolute;
  display: block;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  border-radius: 10px;
}

.flow-loader-slash-large {
  width: 10px;
  height: 60px;
  left: 40px;
  top: 18px;
  opacity: 0;
  transform: rotate(28deg) translateX(-36px);
  animation: logoSlashLeft 700ms ease forwards;
}

.flow-loader-slash-small {
  width: 10px;
  height: 46px;
  right: 28px;
  top: 30px;
  opacity: 0;
  transform: rotate(28deg) translateX(36px);
  animation: logoSlashRight 700ms ease forwards 120ms;
}

.flow-loader-line {
  width: 54px;
  height: 8px;
  left: 30px;
  bottom: 18px;
  opacity: 0;
  transform: translateY(22px);
  animation: logoLineUp 700ms ease forwards 240ms;
}

.flow-thread {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 20px;
}

.flow-message {
  display: flex;
}

.flow-message.user {
  justify-content: flex-end;
}

.flow-message.assistant {
  justify-content: flex-start;
}

.flow-bubble {
  max-width: min(760px, 100%);
  border-radius: 18px;
}

.flow-message.user .flow-bubble {
  max-width: min(560px, calc(100% - 56px));
  padding: 16px 18px;
  background: rgba(127, 149, 168, 0.12);
  border: 1px solid rgba(127, 149, 168, 0.14);
}

.flow-message.assistant .flow-bubble {
  width: min(760px, 100%);
}

.flow-plan-card {
  padding: 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(127, 149, 168, 0.14);
}

.flow-plan-header-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex-direction: column;
}

.flow-plan-button-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.flow-typing {
  margin-top: 18px;
}

.saved-plans-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  max-height: 60vh;
  overflow-y: auto;
}

.saved-plan-card {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(127, 149, 168, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.saved-plan-card h3 {
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}

.saved-plan-meta,
.saved-plan-card p {
  color: var(--muted);
}

.saved-plan-meta {
  margin: 0 0 10px;
  font-size: 0.92rem;
}

.saved-plan-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.compact-header {
  justify-content: flex-end;
  margin-bottom: 18px;
}

.workspace-header,
.output-card-header,
.timer-header,
.task-chat-header,
.quiz-panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.output-card-header h3,
.feature-card h3,
.modal-card h2,
.timer-header h3,
.task-chat-header h3,
.quiz-panel-header h3,
.pricing-card h3,
.info-card h3 {
  margin: 0;
  letter-spacing: -0.03em;
}

.response-shell {
  padding: 24px;
  border-radius: 22px;
  min-height: 240px;
  animation: rise 820ms ease;
}

.typing-response {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: jump 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

.output-card {
  margin-top: 22px;
  padding: 22px;
  border-radius: 16px;
  border-color: var(--line);
  animation: rise 320ms ease;
}

.card-tip {
  margin: 4px 0 0;
  font-size: 0.92rem;
}

.follow-up-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(102, 204, 255, 0.04);
}

.steps-list {
  margin: 20px 0 0;
  padding-left: 20px;
}

.steps-list li {
  margin-bottom: 14px;
  line-height: 1.55;
}

.step-content {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(127, 149, 168, 0.12);
}

.step-content:last-child {
  border-bottom: none;
}

.task-step {
  flex: 1;
  text-align: left;
  padding: 0;
  background: transparent;
  color: var(--text);
  border: none;
  font-weight: 500;
}

.step-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-row {
  margin-top: 18px;
}

.features,
.info-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.feature-card,
.info-card {
  padding: 24px;
  border-radius: 16px;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
  gap: 22px;
  align-items: center;
}

.feature-media {
  min-height: 220px;
}

.feature-media-large {
  aspect-ratio: 4 / 3;
  min-height: 280px;
}

.about-contrast {
  margin-top: 28px;
  padding: 28px;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px solid rgba(127, 149, 168, 0.14);
  box-shadow: var(--surface-shadow);
}

.about-contrast-copy {
  width: min(100%, 860px);
}

.about-contrast-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.05em;
}

.about-contrast-copy p:last-child {
  margin-bottom: 0;
}

.about-centered-card .feature-copy {
  text-align: center;
}

.about-centered-card .feature-layout {
  justify-items: center;
}

.about-story-grid {
  display: grid;
  gap: 26px;
  margin-top: 34px;
}

.about-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px solid rgba(127, 149, 168, 0.14);
  box-shadow: var(--surface-shadow);
}

.about-story.reverse {
  grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1fr);
}

.about-story.reverse .about-story-copy {
  order: 2;
}

.about-story.reverse .about-media-card {
  order: 1;
}

.about-story-copy h2 {
  margin: 0 0 12px;
  letter-spacing: -0.04em;
  font-size: clamp(2rem, 4vw, 3rem);
}

.about-story-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.about-media-card {
  position: relative;
  min-height: 0;
  aspect-ratio: 5 / 4;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(127, 149, 168, 0.16);
  box-shadow: var(--surface-shadow);
}

.about-media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 360ms ease, filter 360ms ease;
}

.about-media-card:hover img {
  transform: scale(1.06);
  filter: saturate(1.05);
}

.media-hover-note {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(5, 6, 8, 0.62);
  color: white;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 260ms ease, opacity 260ms ease;
}

body[data-theme="light"] .media-hover-note {
  background: rgba(244, 248, 251, 0.82);
  color: var(--text);
}

.about-media-card:hover .media-hover-note {
  transform: translateY(0);
  opacity: 1;
}

.float-card {
  animation: floatCard 6s ease-in-out infinite;
}

.delayed-float {
  animation-delay: 1.2s;
}

.hover-note-card {
  position: relative;
}

.hover-note {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(5, 6, 8, 0.72);
  color: white;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 220ms ease;
}

body[data-theme="light"] .hover-note {
  background: rgba(244, 248, 251, 0.88);
  color: var(--text);
}

.hover-note-card:hover .hover-note {
  opacity: 1;
  transform: translateY(0);
}

.feature-copy h3 {
  margin-top: 0;
}

.feature-visual {
  position: relative;
  min-height: 150px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(127, 149, 168, 0.12);
  overflow: hidden;
}

.callout-layout .feature-visual {
  min-height: 170px;
}

.orbit-dot,
.visual-sheet,
.visual-check,
.visual-card,
.visual-pill,
.timer-ring,
.timer-hand,
.chat-bubble,
.flow-track,
.flow-node {
  position: absolute;
  display: block;
}

.orbit-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
  animation: floatSoft 4.2s ease-in-out infinite;
}

.orbit-a {
  top: 22px;
  left: 26px;
}

.orbit-b {
  right: 24px;
  bottom: 26px;
  animation-delay: 0.9s;
}

.visual-sheet {
  left: 50%;
  top: 50%;
  width: 88px;
  height: 108px;
  border-radius: 18px;
  transform: translate(-50%, -50%) rotate(-8deg);
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(127, 149, 168, 0.16);
}

.visual-sheet::before,
.visual-sheet::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.4);
}

.visual-sheet::before {
  top: 34px;
}

.visual-sheet::after {
  top: 52px;
}

.visual-check {
  width: 28px;
  height: 14px;
  border-left: 4px solid var(--accent);
  border-bottom: 4px solid var(--accent);
  transform: rotate(-45deg);
  right: 34px;
  top: 56px;
}

.visual-card {
  width: 78px;
  height: 96px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(127, 149, 168, 0.16);
}

.feature-visual-plan {
  overflow: hidden;
}

.plan-line {
  position: absolute;
  left: 24px;
  right: 28px;
  height: 2px;
  background: rgba(255, 255, 255, 0.34);
}

.plan-line-a {
  top: 38px;
}

.plan-line-b {
  top: 68px;
  right: 54px;
}

.plan-line-c {
  top: 98px;
  right: 78px;
}

.plan-marker {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  left: 24px;
  top: 88px;
  box-shadow: 68px -30px 0 -2px rgba(102, 204, 255, 0.42);
}

.visual-card-a {
  left: 38px;
  top: 24px;
  transform: rotate(-8deg);
}

.visual-card-b {
  right: 34px;
  bottom: 22px;
  transform: rotate(10deg);
}

.visual-pill {
  left: 50%;
  top: 50%;
  width: 92px;
  height: 28px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: rgba(102, 204, 255, 0.18);
  border: 1px solid rgba(102, 204, 255, 0.2);
}

.timer-ring {
  left: 50%;
  top: 50%;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 5px solid rgba(102, 204, 255, 0.26);
}

.timer-hand {
  left: 50%;
  top: 50%;
  transform-origin: 50% 100%;
  background: var(--accent);
  border-radius: 999px;
}

.timer-hand-long {
  width: 4px;
  height: 34px;
  margin-left: -2px;
  margin-top: -32px;
  transform: rotate(26deg);
}

.timer-hand-short {
  width: 4px;
  height: 22px;
  margin-left: -2px;
  margin-top: -20px;
  transform: rotate(-48deg);
}

.chat-bubble {
  width: 94px;
  height: 62px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(127, 149, 168, 0.14);
}

.chat-bubble::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: inherit;
  border-left: 1px solid rgba(127, 149, 168, 0.14);
  border-bottom: 1px solid rgba(127, 149, 168, 0.14);
  transform: rotate(-45deg);
  bottom: -7px;
  left: 18px;
}

.chat-bubble-a {
  top: 26px;
  left: 30px;
}

.chat-bubble-b {
  right: 30px;
  bottom: 28px;
}

.flow-track {
  left: 22px;
  right: 22px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(102, 204, 255, 0.18), rgba(102, 204, 255, 0.55), rgba(102, 204, 255, 0.18));
}

.flow-node {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(102, 204, 255, 0.34);
  top: 50%;
  transform: translateY(-50%);
  animation: floatSoft 4.6s ease-in-out infinite;
}

.flow-node-a {
  left: 26px;
}

.flow-node-b {
  left: 50%;
  margin-left: -10px;
  animation-delay: 0.8s;
}

.flow-node-c {
  right: 26px;
  animation-delay: 1.5s;
}

.feature-card:nth-child(2),
.info-card:nth-child(2) {
  animation-delay: 90ms;
}

.feature-card:nth-child(3),
.info-card:nth-child(3) {
  animation-delay: 180ms;
}

.feature-card:nth-child(4),
.info-card:nth-child(4) {
  animation-delay: 270ms;
}

.info-card {
  animation: rise 760ms ease both;
}

.feature-card h3 {
  margin-bottom: 12px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto 32px;
  color: var(--muted);
  width: min(calc(100% - 32px), var(--max-width));
  font-size: 0.96rem;
  padding-top: 10px;
  border-top: 1px solid rgba(127, 149, 168, 0.12);
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-brand-logo {
  width: 18px;
  height: 18px;
  display: block;
}

.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(3, 5, 8, 0.46);
  backdrop-filter: blur(5px);
}

.tutorial-highlight {
  position: fixed;
  border: 1px solid rgba(102, 204, 255, 0.4);
  border-radius: 16px;
  box-shadow:
    0 0 0 9999px rgba(3, 5, 8, 0.2),
    0 0 0 6px rgba(102, 204, 255, 0.08);
  pointer-events: none;
  transition:
    top 260ms ease,
    left 260ms ease,
    width 260ms ease,
    height 260ms ease;
}

.tutorial-bubble {
  position: fixed;
  width: min(340px, calc(100vw - 32px));
  padding: 20px;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid rgba(127, 149, 168, 0.16);
  box-shadow: var(--surface-shadow);
  transition:
    top 260ms ease,
    left 260ms ease;
}

.tutorial-bubble::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--panel-strong);
  border-left: 1px solid rgba(127, 149, 168, 0.16);
  border-top: 1px solid rgba(127, 149, 168, 0.16);
  transform: rotate(45deg);
  top: -7px;
  left: 24px;
}

.tutorial-progress {
  margin: 12px 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.tutorial-target {
  position: relative;
  z-index: 51;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  z-index: 40;
}

.modal-card {
  width: min(100%, 540px);
  padding: 28px;
  border-radius: 18px;
}

.compact-modal {
  width: min(100%, 440px);
}

.modal-form,
.pricing-grid {
  display: grid;
  gap: 14px;
}

.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.pricing-card {
  padding: 20px;
  border-radius: 16px;
}

.pricing-card-media {
  min-height: 180px;
  margin-bottom: 18px;
}

.pricing-card.featured {
  border-color: var(--line-strong);
}

.plan-button.is-selected {
  border-color: rgba(102, 204, 255, 0.5);
  background: rgba(102, 204, 255, 0.16);
}

.plan-button.is-coming-soon,
.plan-button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.premium-tier {
  background: linear-gradient(180deg, rgba(102, 204, 255, 0.12), rgba(255, 255, 255, 0.04));
  border-color: rgba(102, 204, 255, 0.22);
}

.premium-tier h3,
#flowPlusLocked .section-label {
  display: inline-flex;
  align-items: center;
}

.price-tag {
  margin: 8px 0 10px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.06em;
}

.price-tag span {
  margin-left: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
}

.plan-feature-list {
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.plan-feature-list li {
  position: relative;
  padding-left: 28px;
  line-height: 1.55;
  color: color-mix(in srgb, var(--text) 92%, transparent);
}

.plan-feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.modal-field {
  display: grid;
  gap: 8px;
  color: color-mix(in srgb, var(--text) 88%, transparent);
}

.split {
  justify-content: flex-end;
}

.onboarding-card {
  width: min(100%, 620px);
}

.onboarding-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}

.onboarding-dot {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(127, 149, 168, 0.18);
}

.onboarding-dot.active {
  background: var(--accent);
}

.onboarding-step {
  display: none;
}

.onboarding-step.active {
  display: block;
}

.onboarding-nav {
  margin-top: 20px;
}

.task-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(calc(100% - 24px), 360px);
  border-radius: 18px;
  z-index: 36;
  overflow: hidden;
}

.quiz-panel {
  position: fixed;
  right: 400px;
  bottom: 24px;
  width: min(calc(100% - 24px), 400px);
  border-radius: 18px;
  z-index: 37;
  overflow: hidden;
}

.task-chat-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(127, 149, 168, 0.12);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.quiz-panel-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(127, 149, 168, 0.12);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.quiz-panel-header > div:first-child {
  flex: 1;
  min-width: 0;
}

.task-chat-header h3 {
  font-size: 1rem;
}

.task-chat-header.dragging,
.timer-header.dragging,
.quiz-panel-header.dragging {
  cursor: grabbing;
}

.task-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 210px;
  max-height: 320px;
  padding: 16px;
  overflow-y: auto;
}

.task-chat-bubble {
  max-width: 88%;
  padding: 11px 12px;
  border-radius: 12px;
  line-height: 1.5;
}

.task-chat-bubble.assistant {
  background: rgba(102, 204, 255, 0.08);
  border: 1px solid rgba(102, 204, 255, 0.12);
}

.task-chat-bubble.user {
  align-self: flex-end;
  background: rgba(127, 149, 168, 0.12);
}

.task-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid rgba(127, 149, 168, 0.12);
}

.quiz-panel-body {
  padding: 0 16px 16px;
}

.quiz-panel.minimized .quiz-panel-body {
  display: none;
}

.quiz-panel-actions {
  display: flex;
  gap: 8px;
}

.quiz-status {
  margin: 12px 0 14px;
  color: var(--muted);
  line-height: 1.5;
}

.quiz-question-list {
  display: grid;
  gap: 12px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 2px;
}

.quiz-question-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(127, 149, 168, 0.12);
  background: rgba(127, 149, 168, 0.05);
}

.quiz-question-index {
  margin: 0 0 8px;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.quiz-question-card h4 {
  margin: 0;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.quiz-choice-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.quiz-choice {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(127, 149, 168, 0.12);
}

.quiz-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(102, 204, 255, 0.22);
  background: rgba(102, 204, 255, 0.06);
}

.quiz-choice:disabled {
  cursor: default;
  opacity: 1;
}

.quiz-choice.is-correct {
  border-color: rgba(88, 201, 155, 0.34);
  background: rgba(88, 201, 155, 0.12);
  color: var(--text);
}

.quiz-choice.is-incorrect {
  border-color: rgba(255, 120, 120, 0.34);
  background: rgba(255, 120, 120, 0.1);
  color: var(--text);
}

.quiz-answer {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease, color 180ms ease;
}

.quiz-answer.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.quiz-answer.is-correct {
  color: #6ed8a7;
}

.quiz-answer.is-incorrect {
  color: #ff9b9b;
}

.quiz-panel-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(127, 149, 168, 0.12);
}

.flowzcode-prompt,
.flowzcode-panel {
  position: fixed;
  z-index: 39;
  border-radius: 22px;
  border: 1px solid rgba(127, 149, 168, 0.14);
  background: var(--panel-strong);
  box-shadow: var(--surface-shadow);
}

.flowzcode-prompt {
  left: 24px;
  bottom: 24px;
  width: min(calc(100% - 32px), 430px);
  padding: 18px;
  display: grid;
  gap: 16px;
}

.flowzcode-prompt h3,
.flowzcode-header h3 {
  margin: 2px 0 8px;
  letter-spacing: -0.04em;
}

.flowzcode-prompt p:last-child {
  margin-bottom: 0;
}

.flowzcode-prompt-meta,
.flowzcode-usage,
.flowzcode-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(102, 204, 255, 0.08);
  border: 1px solid rgba(102, 204, 255, 0.14);
  color: color-mix(in srgb, var(--text) 88%, var(--accent));
  font-size: 0.84rem;
}

.flowzcode-prompt-actions,
.flowzcode-form-actions,
.flowzcode-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.flowzcode-panel {
  right: 24px;
  top: 106px;
  width: min(calc(100% - 48px), 980px);
  max-height: calc(100vh - 132px);
  overflow: hidden;
}

.flowzcode-panel.is-expanded {
  width: min(calc(100% - 36px), 1180px);
  max-height: calc(100vh - 118px);
}

.flowzcode-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 22px 18px;
  border-bottom: 1px solid rgba(127, 149, 168, 0.12);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.flowzcode-header-copy {
  flex: 1;
  min-width: 0;
}

.flowzcode-header-copy p:last-child {
  margin: 0;
  color: var(--muted);
}

.flowzcode-header.dragging,
.task-chat-header.dragging,
.timer-header.dragging,
.quiz-panel-header.dragging {
  cursor: grabbing;
}

.flowzcode-control {
  min-width: 88px;
}

.flowzcode-body {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  min-height: 520px;
}

.flowzcode-editor-panel,
.flowzcode-chat-panel {
  min-width: 0;
  padding: 18px 20px 20px;
}

.flowzcode-editor-panel {
  border-right: 1px solid rgba(127, 149, 168, 0.12);
}

.flowzcode-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.flowzcode-section-head strong {
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.flowzcode-editor-panel textarea,
.flowzcode-form textarea {
  width: 100%;
  border: 1px solid rgba(127, 149, 168, 0.14);
  background: rgba(7, 10, 14, 0.6);
  color: var(--text);
  resize: none;
}

body[data-theme="light"] .flowzcode-editor-panel textarea,
body[data-theme="light"] .flowzcode-form textarea {
  background: rgba(248, 251, 253, 0.96);
}

.flowzcode-editor-panel textarea {
  min-height: 420px;
  padding: 16px 18px;
  border-radius: 18px;
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.92rem;
  line-height: 1.6;
}

.flowzcode-chat-panel {
  display: flex;
  flex-direction: column;
}

.flowzcode-messages {
  flex: 1;
  min-height: 280px;
  max-height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 2px;
}

.flowzcode-message {
  display: flex;
}

.flowzcode-message.user {
  justify-content: flex-end;
}

.flowzcode-bubble {
  max-width: min(92%, 520px);
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(127, 149, 168, 0.12);
  background: rgba(127, 149, 168, 0.08);
}

.flowzcode-message.assistant .flowzcode-bubble {
  background: rgba(102, 204, 255, 0.08);
  border-color: rgba(102, 204, 255, 0.14);
}

.flowzcode-message-meta {
  margin: 0 0 6px;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.flowzcode-message-copy {
  white-space: pre-wrap;
  line-height: 1.58;
}

.flowzcode-code-block {
  margin-top: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(6, 8, 12, 0.76);
  border: 1px solid rgba(127, 149, 168, 0.14);
}

body[data-theme="light"] .flowzcode-code-block {
  background: rgba(243, 247, 250, 0.96);
}

.flowzcode-code-language {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.flowzcode-code-block pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre;
}

.flowzcode-inline-button {
  margin-top: 10px;
}

.flowzcode-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(127, 149, 168, 0.12);
}

.flowzcode-form textarea {
  min-height: 104px;
  padding: 14px 16px;
  border-radius: 16px;
  line-height: 1.55;
}

.flowzcode-form-actions {
  justify-content: space-between;
  align-items: center;
}

.flowzcode-thinking-dots {
  padding: 2px 0;
}

.timer-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(calc(100% - 24px), 320px);
  padding: 18px;
  border-radius: 18px;
  z-index: 35;
}

.timer-widget.timer-complete {
  animation: timerCelebrate 900ms ease;
  border-color: rgba(102, 204, 255, 0.36);
}

.timer-header {
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.drag-note {
  margin: 6px 0 0;
  font-size: 0.86rem;
}

.icon-button {
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
}

.timer-display {
  margin: 18px 0;
  font-size: 3rem;
  letter-spacing: -0.08em;
}

.timer-widget.timer-complete .timer-display {
  animation: timerDigits 900ms ease;
}

.custom-timer input {
  flex: 1;
}

.subpage-hero {
  padding-top: 10px;
}

.subpage-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  letter-spacing: -0.05em;
}

.subpage-hero p {
  width: min(100%, 720px);
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.65;
}

.flowplus-page-shell {
  padding-top: 124px;
}

body[data-page="flowplus"] .subpage-hero .section-label {
  display: inline-flex;
  width: max-content;
  padding: 8px 12px;
  border-radius: 999px;
  color: #9de4ff;
  background:
    linear-gradient(120deg, rgba(102, 204, 255, 0.18), rgba(102, 204, 255, 0.04) 48%, rgba(255, 255, 255, 0.1)),
    rgba(102, 204, 255, 0.06);
  border: 1px solid rgba(102, 204, 255, 0.22);
  text-shadow: 0 0 18px rgba(102, 204, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

body[data-page="flowplus"] .subpage-hero .section-label::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -35%;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-16deg);
  animation: flowPlusLabelShine 3.4s ease-in-out infinite;
}

.flowplus-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 22px;
  margin: 8px 0 22px;
}

.flowplus-overview-card,
.locked-panel,
.flowplus-panel {
  padding: 28px;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px solid rgba(127, 149, 168, 0.14);
  box-shadow: var(--surface-shadow);
}

.locked-panel {
  width: min(100%, 760px);
}

.flowplus-overview-card h2 {
  margin: 0 0 12px;
  letter-spacing: -0.04em;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.process-step-card {
  padding: 28px;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid rgba(127, 149, 168, 0.14);
  box-shadow: var(--surface-shadow);
}

.process-step-card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.04em;
}

.process-step-card p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.compact-list {
  margin-bottom: 0;
}

.flowplus-layout {
  display: grid;
  grid-template-columns: minmax(290px, 0.86fr) minmax(0, 1.34fr);
  gap: 24px;
  margin-top: 22px;
  align-items: stretch;
}

.upload-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.flowplus-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.upload-item {
  display: grid;
  gap: 14px;
  padding: 14px 15px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(102, 204, 255, 0.055), transparent 48%),
    rgba(127, 149, 168, 0.065);
  border: 1px solid rgba(127, 149, 168, 0.14);
}

.upload-item-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.upload-item strong {
  font-size: 0.98rem;
}

.upload-item span {
  color: var(--muted);
  font-size: 0.92rem;
}

.upload-item-preview {
  color: color-mix(in srgb, var(--text) 88%, transparent);
  line-height: 1.55;
  font-size: 0.94rem;
}

.flowplus-file-dock {
  position: relative;
  overflow: hidden;
}

.flowplus-file-dock::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -78px;
  top: -86px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(102, 204, 255, 0.16), transparent 68%);
  pointer-events: none;
}

.flowplus-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.flowplus-panel-heading h2 {
  margin: 4px 0 0;
  letter-spacing: -0.04em;
}

.flowplus-plan-pill {
  padding: 8px 10px;
  border-radius: 999px;
  color: #06202e;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.flowplus-upload-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.flowplus-upload-grid input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.flowplus-browse-card {
  min-height: 164px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(102, 204, 255, 0.12), rgba(127, 149, 168, 0.04) 44%, rgba(255, 255, 255, 0.025)),
    rgba(127, 149, 168, 0.055);
  border: 1px solid rgba(127, 149, 168, 0.16);
  color: var(--text);
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.flowplus-browse-card:hover {
  transform: translateY(-3px);
  border-color: rgba(102, 204, 255, 0.36);
  background:
    linear-gradient(145deg, rgba(102, 204, 255, 0.18), rgba(127, 149, 168, 0.06) 50%, rgba(255, 255, 255, 0.035)),
    rgba(127, 149, 168, 0.07);
}

.flowplus-browse-card strong {
  font-size: 1rem;
}

.flowplus-browse-card small {
  color: var(--muted);
  line-height: 1.35;
}

.flowplus-browse-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(102, 204, 255, 0.14);
  color: var(--accent);
}

.flowplus-browse-icon::before {
  content: "";
  width: 22px;
  height: 22px;
  background: currentColor;
}

.document-icon::before {
  clip-path: polygon(18% 0, 64% 0, 88% 24%, 88% 100%, 18% 100%);
}

.image-icon::before {
  clip-path: polygon(8% 15%, 92% 15%, 92% 85%, 8% 85%);
}

.flowplus-empty-source {
  padding: 16px;
  border: 1px dashed rgba(127, 149, 168, 0.22);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(127, 149, 168, 0.04);
}

.flowplus-chat-panel {
  display: grid;
  grid-template-rows: auto auto minmax(320px, 1fr) auto auto;
  min-height: 720px;
  background:
    linear-gradient(180deg, rgba(102, 204, 255, 0.06), transparent 34%),
    var(--panel-strong);
}

.flowplus-heading-spark {
  width: 28px;
  height: 28px;
  margin: 4px 0 0;
  animation: floatSoft 3.6s ease-in-out infinite;
}

.flowplus-thread {
  display: grid;
  gap: 14px;
  min-height: 320px;
  max-height: 560px;
  overflow-y: auto;
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 4px 8px 8px 0;
}

.flowplus-message {
  display: flex;
}

.flowplus-message.user {
  justify-content: flex-end;
}

.flowplus-bubble {
  width: min(100%, 760px);
  padding: 17px 19px;
  border-radius: 22px;
  line-height: 1.65;
  background: rgba(127, 149, 168, 0.08);
  border: 1px solid rgba(127, 149, 168, 0.12);
  white-space: pre-line;
}

.flowplus-message.user .flowplus-bubble {
  background: rgba(102, 204, 255, 0.1);
  border-color: rgba(102, 204, 255, 0.16);
}

.flowplus-composer {
  display: grid;
  gap: 18px;
  margin-top: 4px;
}

.flowplus-composer textarea {
  min-height: 150px;
  border-radius: 18px;
}

.flowplus-composer #flowPlusAskButton {
  justify-self: start;
  min-width: 190px;
  padding-inline: 28px;
}

.flowplus-response {
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(102, 204, 255, 0.06);
  border: 1px solid rgba(102, 204, 255, 0.14);
  line-height: 1.65;
  color: color-mix(in srgb, var(--text) 92%, transparent);
  white-space: pre-line;
}

.flowplus-browser-pilot {
  grid-column: 1 / -1;
}

.flowplus-browser-pilot {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 7% 8%, rgba(102, 204, 255, 0.18), transparent 26%),
    linear-gradient(120deg, rgba(102, 204, 255, 0.09), transparent 48%),
    var(--panel-strong);
}

.flowplus-browser-pilot::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -220px;
  top: -190px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(102, 204, 255, 0.16), transparent 62%),
    repeating-linear-gradient(90deg, rgba(102, 204, 255, 0.1) 0 1px, transparent 1px 28px);
  opacity: 0.85;
  pointer-events: none;
}

.flowplus-browser-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 24px;
}

.magic-pen-logo {
  position: relative;
  width: 86px;
  height: 86px;
  flex: 0 0 auto;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(102, 204, 255, 0.28), rgba(102, 204, 255, 0.08)),
    rgba(127, 149, 168, 0.07);
  border: 1px solid rgba(102, 204, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 44px rgba(0, 0, 0, 0.14);
  transform: rotate(-4deg);
}

.magic-pen-body {
  position: absolute;
  width: 18px;
  height: 58px;
  left: 38px;
  top: 13px;
  border-radius: 999px 999px 5px 5px;
  background: linear-gradient(180deg, #ffffff, #66ccff 52%, #0e415c);
  transform: rotate(42deg);
  box-shadow: 0 0 24px rgba(102, 204, 255, 0.3);
}

.magic-pen-tip {
  position: absolute;
  left: 23px;
  top: 56px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: rotate(42deg);
}

.magic-pen-spark {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #66ccff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: sparkleBlink 2.8s ease-in-out infinite;
}

.spark-one {
  left: 18px;
  top: 18px;
}

.spark-two {
  right: 16px;
  bottom: 17px;
  width: 9px;
  height: 9px;
  animation-delay: 850ms;
}

.flowplus-browser-header h2 {
  margin: 4px 0 10px;
  letter-spacing: -0.04em;
}

.flowplus-browser-header p:last-child {
  margin: 0;
  max-width: 820px;
  color: var(--muted);
  line-height: 1.65;
}

.browser-pilot-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.browser-pilot-prompt,
.browser-pilot-panel {
  padding: 18px;
  border-radius: 22px;
  background: rgba(5, 8, 12, 0.36);
  border: 1px solid rgba(127, 149, 168, 0.14);
}

body[data-theme="light"] .browser-pilot-prompt,
body[data-theme="light"] .browser-pilot-panel {
  background: rgba(255, 255, 255, 0.54);
}

.browser-pilot-prompt-main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.browser-pilot-input-stack {
  display: grid;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.browser-pilot-prompt textarea {
  min-height: 150px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.browser-pilot-controls,
.browser-pilot-actions,
.browser-pilot-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.browser-pilot-controls {
  margin-top: 0;
}

.browser-pilot-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.46;
}

.browser-pilot-panel {
  display: grid;
  grid-template-rows: auto minmax(132px, 1fr) auto;
  min-height: 220px;
}

.browser-pilot-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.browser-pilot-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(127, 149, 168, 0.45);
  box-shadow: 0 0 0 4px rgba(127, 149, 168, 0.06);
}

.browser-pilot-status-dot.is-running {
  background: #66ccff;
  box-shadow: 0 0 0 4px rgba(102, 204, 255, 0.12), 0 0 22px rgba(102, 204, 255, 0.42);
  animation: pilotPulse 1.2s ease-in-out infinite;
}

.browser-pilot-log {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 204, 255, 0.74) rgba(127, 149, 168, 0.08);
}

.browser-pilot-log::-webkit-scrollbar {
  width: 9px;
}

.browser-pilot-log::-webkit-scrollbar-track {
  background: rgba(127, 149, 168, 0.08);
  border-radius: 999px;
}

.browser-pilot-log::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(102, 204, 255, 0.75) padding-box;
}

.browser-pilot-log p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  color: color-mix(in srgb, var(--text) 90%, transparent);
  background: rgba(127, 149, 168, 0.07);
  border: 1px solid rgba(127, 149, 168, 0.1);
  line-height: 1.45;
}

.browser-pilot-actions {
  margin-top: 0;
}

.browser-pilot-capabilities {
  position: relative;
  z-index: 1;
  margin-top: 18px;
}

.browser-pilot-capabilities span {
  padding: 10px 12px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--text) 88%, transparent);
  background: rgba(127, 149, 168, 0.08);
  border: 1px solid rgba(127, 149, 168, 0.12);
  white-space: nowrap;
}

.flowplus-feature-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.flowplus-feature-card {
  padding: 22px;
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(102, 204, 255, 0.08), transparent 48%),
    var(--panel-strong);
  border: 1px solid rgba(127, 149, 168, 0.14);
  box-shadow: var(--surface-shadow);
}

.flowplus-feature-number {
  display: inline-flex;
  margin-bottom: 26px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.flowplus-feature-card h3 {
  margin: 0 0 10px;
  letter-spacing: -0.03em;
}

.flowplus-feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.flowplus-page-shell {
  width: min(calc(100% - 24px), 1860px);
  margin: 0 auto;
  padding: 84px 12px 18px;
}

.flowplus-studio-shell {
  grid-template-columns: minmax(280px, 0.88fr) minmax(0, 1.34fr) minmax(300px, 0.94fr);
  gap: 18px;
  align-items: stretch;
  min-height: calc(100vh - 176px);
  max-height: calc(100vh - 176px);
  margin-top: 0;
}

.flowplus-studio-shell .flowplus-panel {
  position: relative;
  overflow: hidden;
  min-height: 0;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012)),
    rgba(22, 25, 31, 0.96);
  border: 1px solid rgba(124, 138, 157, 0.16);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

body[data-theme="light"] .flowplus-studio-shell .flowplus-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 249, 255, 0.88)),
    rgba(255, 255, 255, 0.92);
  border-color: rgba(102, 204, 255, 0.16);
}

.flowplus-surface-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(124, 138, 157, 0.14);
}

.flowplus-surface-copy {
  display: grid;
  gap: 6px;
}

.flowplus-surface-head h2,
.flowplus-studio-history-head h3,
.flowplus-studio-workbench-copy h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

.flowplus-surface-copy p,
.flowplus-studio-workbench-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.flowplus-surface-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(170, 183, 197, 0.18);
  position: relative;
  opacity: 0.9;
}

.flowplus-surface-icon::before,
.flowplus-surface-icon::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 6px;
  border-radius: 3px;
  border: 1px solid rgba(170, 183, 197, 0.3);
}

.flowplus-surface-icon::before {
  left: 4px;
}

.flowplus-surface-icon::after {
  right: 4px;
}

.flowplus-surface-icon-alt::before,
.flowplus-surface-icon-alt::after {
  width: 4px;
}

.flowplus-sources-panel,
.flowplus-chat-shell,
.flowplus-studio-panel {
  display: grid;
  min-height: 0;
  max-height: 100%;
}

.flowplus-sources-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.flowplus-chat-shell {
  grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
}

.flowplus-studio-panel {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.flowplus-source-stack {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.flowplus-source-picker-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.flowplus-source-picker-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.flowplus-source-picker {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 62px;
  padding: 0 18px;
  border-radius: 18px;
  background: rgba(127, 149, 168, 0.06);
  border: 1px solid rgba(127, 149, 168, 0.14);
  color: color-mix(in srgb, var(--text) 92%, transparent);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.flowplus-source-picker:hover,
.flowplus-source-picker:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(102, 204, 255, 0.32);
  background: rgba(102, 204, 255, 0.08);
}

.flowplus-source-picker-plus {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
}

.flowplus-source-picker-alt {
  background: rgba(102, 204, 255, 0.06);
}

.flowplus-link-shell,
.flowplus-source-search-shell,
.flowplus-web-research-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 0 16px;
  border-radius: 22px;
  background: rgba(127, 149, 168, 0.05);
  border: 1px solid rgba(127, 149, 168, 0.1);
}

.flowplus-source-search-shell {
  grid-template-columns: auto minmax(0, 1fr);
}

.flowplus-link-icon {
  width: 18px;
  height: 18px;
  position: relative;
  display: inline-block;
  opacity: 0.84;
}

.flowplus-link-icon::before,
.flowplus-link-icon::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 7px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.flowplus-link-icon::before {
  left: 0;
  top: 4px;
  transform: rotate(-32deg);
}

.flowplus-link-icon::after {
  right: -1px;
  top: 7px;
  transform: rotate(-32deg);
}

.flowplus-search-icon {
  width: 18px;
  height: 18px;
  position: relative;
  display: inline-block;
  opacity: 0.84;
}

.flowplus-search-icon::before,
.flowplus-search-icon::after {
  content: "";
  position: absolute;
}

.flowplus-search-icon::before {
  inset: 0;
  border-radius: 999px;
  border: 2px solid currentColor;
}

.flowplus-search-icon::after {
  width: 9px;
  height: 2px;
  right: -5px;
  bottom: -1px;
  background: currentColor;
  transform: rotate(45deg);
  border-radius: 999px;
}

.flowplus-source-search-shell input,
.flowplus-link-shell input,
.flowplus-web-research-shell input,
.flowplus-studio-workbench textarea,
.flowplus-composer-inline textarea {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
}

.flowplus-source-search-shell input:focus,
.flowplus-link-shell input:focus,
.flowplus-web-research-shell input:focus,
.flowplus-studio-workbench textarea:focus,
.flowplus-composer-inline textarea:focus {
  outline: none;
}

.flowplus-add-link-button,
.flowplus-web-research-button {
  appearance: none;
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(102, 204, 255, 0.16);
  border: 1px solid rgba(102, 204, 255, 0.22);
  color: var(--text);
  font-weight: 600;
}

.flowplus-add-link-button:hover,
.flowplus-web-research-button:hover {
  background: rgba(102, 204, 255, 0.22);
  border-color: rgba(102, 204, 255, 0.3);
}

.flowplus-source-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.flowplus-select-button {
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text);
  font-weight: 600;
}

.flowplus-selected-count,
.flowplus-composer-count,
.flowplus-inline-status,
.flowplus-studio-history-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.flowplus-source-summary {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.flowplus-source-list {
  margin: 0;
  padding: 0 20px 20px;
  overflow-y: auto;
  align-content: start;
}

.flowplus-empty-source-card {
  display: grid;
  gap: 12px;
}

.flowplus-empty-source-title {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.flowplus-empty-source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.upload-item.flowplus-source-item {
  width: 100%;
  text-align: left;
  color: inherit;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(102, 204, 255, 0.12), transparent 54%),
    rgba(127, 149, 168, 0.05);
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.upload-item.flowplus-source-item:hover {
  transform: translateY(-2px);
  border-color: rgba(102, 204, 255, 0.28);
}

.upload-item.flowplus-source-item.is-selected {
  border-color: rgba(102, 204, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(102, 204, 255, 0.14), transparent 56%),
    rgba(127, 149, 168, 0.08);
}

.flowplus-source-card-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.flowplus-source-check {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(127, 149, 168, 0.2);
  background: rgba(8, 10, 13, 0.3);
  position: relative;
  margin-top: 2px;
  cursor: pointer;
}

.upload-item.flowplus-source-item.is-selected .flowplus-source-check {
  border-color: rgba(102, 204, 255, 0.42);
  background: rgba(102, 204, 255, 0.22);
}

.upload-item.flowplus-source-item.is-selected .flowplus-source-check::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-right: 2px solid #061723;
  border-bottom: 2px solid #061723;
  transform: rotate(45deg);
}

.flowplus-source-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.flowplus-source-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.flowplus-source-kind {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.flowplus-source-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.flowplus-source-actions .compact {
  min-height: 38px;
}

.flowplus-chat-head {
  align-items: flex-start;
}

.flowplus-chat-head-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.flowplus-thread-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 42px;
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(127, 149, 168, 0.05);
  border: 1px solid rgba(127, 149, 168, 0.12);
  color: color-mix(in srgb, var(--text) 72%, transparent);
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.flowplus-thread-menu-button:hover,
.flowplus-thread-menu-button[aria-expanded="true"] {
  background: rgba(102, 204, 255, 0.08);
  border-color: rgba(102, 204, 255, 0.2);
  color: var(--text);
}

.flowplus-chat-head-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(170, 183, 197, 0.55);
}

.flowplus-thread-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 170px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(127, 149, 168, 0.14);
  background: color-mix(in srgb, var(--bg-top) 94%, transparent);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  z-index: 12;
}

body[data-theme="light"] .flowplus-thread-menu {
  background: rgba(255, 255, 255, 0.96);
}

.flowplus-thread-menu-item {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  transition: background var(--transition), color var(--transition);
}

.flowplus-thread-menu-item:hover {
  background: rgba(102, 204, 255, 0.08);
}

.flowplus-inline-status {
  margin: 6px 0 0;
  min-height: 0;
}

.flowplus-inline-status:empty {
  display: none;
}

.flowplus-context-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 18px;
  padding: 10px 0 0;
}

.flowplus-context-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(127, 149, 168, 0.14);
  background: rgba(127, 149, 168, 0.06);
  color: var(--muted);
  font-size: 0.86rem;
}

.flowplus-context-pill.is-active {
  color: var(--text);
  background: rgba(102, 204, 255, 0.08);
  border-color: rgba(102, 204, 255, 0.2);
}

.flowplus-thread {
  margin: 8px 18px 0;
  padding: 14px;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 24px;
  border: 1px solid rgba(124, 138, 157, 0.12);
  background:
    radial-gradient(circle at top left, rgba(102, 204, 255, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(10, 13, 19, 0.92), rgba(14, 17, 23, 0.82));
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 204, 255, 0.72) rgba(127, 149, 168, 0.08);
  overscroll-behavior: contain;
}

.flowplus-thread::-webkit-scrollbar,
.flowplus-source-list::-webkit-scrollbar,
.flowplus-studio-history-list::-webkit-scrollbar,
.browser-pilot-log::-webkit-scrollbar {
  width: 10px;
}

.flowplus-thread::-webkit-scrollbar-track,
.flowplus-source-list::-webkit-scrollbar-track,
.flowplus-studio-history-list::-webkit-scrollbar-track,
.browser-pilot-log::-webkit-scrollbar-track {
  background: rgba(127, 149, 168, 0.07);
  border-radius: 999px;
  margin: 10px 0;
}

.flowplus-thread::-webkit-scrollbar-thumb,
.flowplus-source-list::-webkit-scrollbar-thumb,
.flowplus-studio-history-list::-webkit-scrollbar-thumb,
.browser-pilot-log::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(102, 204, 255, 0.92), rgba(102, 204, 255, 0.48)) padding-box;
}

.flowplus-message {
  display: flex;
}

.flowplus-message.user {
  justify-content: flex-end;
}

.flowplus-bubble {
  width: min(100%, 700px);
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(14, 17, 23, 0.7);
  border: 1px solid rgba(127, 149, 168, 0.09);
}

.flowplus-message.user .flowplus-bubble {
  background: rgba(102, 204, 255, 0.11);
  color: #eaf8ff;
}

.flowplus-message-meta {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.flowplus-message-copy {
  white-space: pre-wrap;
  line-height: 1.62;
}

.flowplus-intro-bubble {
  width: min(100%, 760px);
  padding: 16px 18px;
  background:
    radial-gradient(circle at top right, rgba(102, 204, 255, 0.12), transparent 34%),
    rgba(14, 17, 23, 0.76);
}

.flowplus-intro-bubble h3 {
  margin: 0 0 6px;
  font-size: clamp(1.08rem, 0.94rem + 0.6vw, 1.38rem);
  letter-spacing: -0.04em;
}

.flowplus-intro-bubble > p:last-of-type {
  margin: 0;
  max-width: 56ch;
  line-height: 1.52;
}

.flowplus-bubble-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.flowplus-intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.flowplus-intro-action {
  appearance: none;
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(127, 149, 168, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.flowplus-intro-action:hover {
  transform: translateY(-2px);
  border-color: rgba(102, 204, 255, 0.26);
  background: rgba(102, 204, 255, 0.08);
}

.flowplus-intro-action strong {
  font-size: 0.92rem;
  letter-spacing: -0.02em;
}

.flowplus-intro-action span {
  color: var(--muted);
  line-height: 1.36;
  font-size: 0.84rem;
}

.flowplus-response {
  margin: 0 18px 10px;
  padding: 10px 12px;
  min-height: 40px;
  border-radius: 16px;
  background: rgba(102, 204, 255, 0.06);
  border: 1px solid rgba(102, 204, 255, 0.12);
  font-size: 0.94rem;
}

.flowplus-chat-prompts {
  margin: 0 18px 10px;
}

.flowplus-chat-prompts .flowplus-prompt-chip {
  background: rgba(14, 17, 23, 0.72);
  border-color: rgba(127, 149, 168, 0.1);
}

.flowplus-composer-inline {
  gap: 12px;
  margin: 0 18px 18px;
  padding: 14px 16px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(14, 17, 23, 0.9), rgba(14, 17, 23, 0.74));
  border: 1px solid rgba(127, 149, 168, 0.12);
}

.flowplus-composer-inline textarea {
  min-height: 82px;
  padding: 0;
  line-height: 1.6;
  resize: none;
}

.flowplus-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.flowplus-composer-footer .send-button {
  width: 56px;
  height: 56px;
  border-radius: 18px;
}

.flowplus-studio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 20px;
}

.flowplus-studio-card {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 126px;
  padding: 18px;
  border-radius: 22px;
  text-align: left;
  color: var(--text);
  border: 1px solid transparent;
  background: rgba(127, 149, 168, 0.08);
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.flowplus-studio-card:hover {
  transform: translateY(-2px);
  border-color: rgba(102, 204, 255, 0.28);
}

.flowplus-studio-card-copy {
  display: grid;
  gap: 6px;
}

.flowplus-studio-card-copy strong {
  font-size: 1.02rem;
  letter-spacing: -0.03em;
}

.flowplus-studio-card-copy small {
  color: color-mix(in srgb, var(--muted) 92%, transparent);
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.flowplus-studio-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  position: relative;
  background: rgba(255, 255, 255, 0.08);
}

.flowplus-studio-card-icon::before,
.flowplus-studio-card-icon::after,
.flowplus-studio-card-arrow::before,
.flowplus-studio-card-arrow::after {
  content: "";
  position: absolute;
}

.flowplus-studio-card-arrow {
  width: 28px;
  height: 28px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
}

.flowplus-studio-card-arrow::before {
  width: 9px;
  height: 9px;
  top: 9px;
  left: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.audio-icon::before {
  left: 12px;
  top: 9px;
  width: 4px;
  height: 24px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 7px 4px 0 currentColor, 14px -2px 0 currentColor;
}

.video-icon::before {
  left: 11px;
  top: 11px;
  width: 20px;
  height: 16px;
  border-radius: 6px;
  border: 2px solid currentColor;
}

.video-icon::after {
  left: 18px;
  top: 15px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}

.mindmap-icon::before {
  inset: 9px;
  border-radius: 999px;
  border: 2px solid currentColor;
}

.mindmap-icon::after {
  left: 20px;
  top: 10px;
  width: 2px;
  height: 22px;
  background: currentColor;
  box-shadow: -8px 8px 0 currentColor, 8px 8px 0 currentColor;
}

.report-icon::before {
  left: 12px;
  top: 10px;
  width: 18px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid currentColor;
}

.report-icon::after {
  left: 17px;
  top: 16px;
  width: 10px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
}

.flashcard-icon::before,
.table-icon::before {
  left: 10px;
  top: 12px;
  width: 20px;
  height: 16px;
  border-radius: 5px;
  border: 2px solid currentColor;
}

.flashcard-icon::after {
  left: 16px;
  top: 8px;
  width: 20px;
  height: 16px;
  border-radius: 5px;
  border: 2px solid currentColor;
  opacity: 0.75;
}

.quiz-icon::before {
  left: 13px;
  top: 9px;
  width: 16px;
  height: 22px;
  border-radius: 8px;
  border: 2px solid currentColor;
}

.quiz-icon::after {
  left: 19px;
  top: 15px;
  width: 4px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(40deg);
}

.table-icon::after {
  left: 10px;
  top: 18px;
  width: 20px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.work-icon::before {
  left: 10px;
  top: 20px;
  width: 18px;
  height: 2px;
  background: currentColor;
  transform: rotate(-32deg);
  border-radius: 999px;
}

.work-icon::after {
  left: 22px;
  top: 10px;
  width: 9px;
  height: 9px;
  border-radius: 2px 2px 4px 4px;
  background: currentColor;
  transform: rotate(-32deg);
}

.studio-audio {
  background: linear-gradient(145deg, rgba(102, 204, 255, 0.18), rgba(67, 132, 172, 0.08));
}

.studio-video {
  background: linear-gradient(145deg, rgba(126, 216, 196, 0.18), rgba(76, 139, 125, 0.08));
}

.studio-mindmap {
  background: linear-gradient(145deg, rgba(164, 150, 227, 0.18), rgba(92, 84, 150, 0.08));
}

.studio-report {
  background: linear-gradient(145deg, rgba(245, 195, 129, 0.17), rgba(152, 110, 59, 0.08));
}

.studio-flashcards {
  background: linear-gradient(145deg, rgba(241, 163, 146, 0.18), rgba(140, 87, 78, 0.08));
}

.studio-quiz {
  background: linear-gradient(145deg, rgba(135, 179, 229, 0.2), rgba(77, 105, 154, 0.08));
}

.studio-table {
  background: linear-gradient(145deg, rgba(157, 203, 141, 0.18), rgba(87, 123, 72, 0.08));
}

.studio-work {
  background: linear-gradient(145deg, rgba(118, 216, 255, 0.2), rgba(61, 114, 159, 0.08));
}

.flowplus-studio-workbench {
  display: grid;
  gap: 12px;
  padding: 0 18px 16px;
  border-top: 1px solid rgba(124, 138, 157, 0.12);
  margin-top: 2px;
  padding-top: 16px;
}

.flowplus-studio-workbench-copy {
  display: grid;
  gap: 4px;
}

.flowplus-studio-workbench-copy h3 {
  font-size: 1.08rem;
}

.flowplus-studio-workbench-copy p:last-child {
  font-size: 0.92rem;
  line-height: 1.48;
}

.flowplus-studio-workbench textarea {
  min-height: 84px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(14, 17, 23, 0.72);
  border: 1px solid rgba(127, 149, 168, 0.12);
  resize: vertical;
}

.browser-pilot-controls {
  margin-top: 0;
}

.browser-pilot-controls .primary-button,
.browser-pilot-controls .secondary-button {
  min-height: 48px;
}

.browser-pilot-note {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.46;
}

.browser-pilot-panel {
  min-height: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(127, 149, 168, 0.12);
  background: rgba(14, 17, 23, 0.68);
}

.flowplus-studio-history {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 0 18px 16px;
  border-top: 1px solid rgba(124, 138, 157, 0.12);
}

.flowplus-studio-history-head {
  padding: 16px 0 12px;
}

.flowplus-studio-history-list {
  display: grid;
  gap: 12px;
  align-content: start;
  overflow-y: auto;
}

.flowplus-studio-history-item {
  appearance: none;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(127, 149, 168, 0.055);
  border: 1px solid rgba(127, 149, 168, 0.12);
  text-align: left;
  color: var(--text);
}

.flowplus-studio-history-item:hover {
  border-color: rgba(102, 204, 255, 0.26);
  background: rgba(102, 204, 255, 0.08);
}

.flowplus-studio-history-item strong {
  display: block;
  margin-bottom: 6px;
}

.flowplus-studio-history-empty {
  padding: 14px 0;
  color: var(--muted);
}

body[data-theme="light"] .flowplus-source-picker,
body[data-theme="light"] .flowplus-link-shell,
body[data-theme="light"] .flowplus-source-search-shell,
body[data-theme="light"] .flowplus-web-research-shell,
body[data-theme="light"] .flowplus-composer-inline,
body[data-theme="light"] .flowplus-studio-workbench textarea,
body[data-theme="light"] .flowplus-bubble,
body[data-theme="light"] .browser-pilot-panel,
body[data-theme="light"] .flowplus-thread {
  background: rgba(255, 255, 255, 0.8);
}

body[data-theme="light"] .flowplus-source-check {
  background: rgba(214, 241, 255, 0.58);
}

@media (max-width: 1360px) {
  .flowplus-studio-shell {
    grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.22fr);
    min-height: auto;
    height: auto;
    max-height: none;
  }

  .flowplus-studio-panel {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
  }

  .flowplus-studio-panel .flowplus-surface-head {
    grid-column: 1 / -1;
  }

  .flowplus-studio-history {
    grid-column: 1 / -1;
  }

  .flowplus-studio-workbench,
  .flowplus-studio-history {
    padding-top: 0;
  }
}

@media (max-width: 1024px) {
  .flowplus-page-shell {
    padding-top: 102px;
  }

  .flowplus-studio-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    max-height: none;
  }

  .flowplus-studio-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .flowplus-page-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .flowplus-source-picker-row,
  .flowplus-studio-grid {
    grid-template-columns: 1fr;
  }

  .flowplus-source-toolbar,
  .flowplus-composer-footer,
  .browser-pilot-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .flowplus-link-shell {
    grid-template-columns: 1fr;
    padding: 14px 16px;
  }

  .flowplus-context-strip,
  .flowplus-response,
  .flowplus-chat-prompts,
  .flowplus-thread,
  .flowplus-composer-inline {
    margin-left: 16px;
    margin-right: 16px;
  }

  .flowplus-thread {
    min-height: 300px;
  }

  .flowplus-intro-grid {
    grid-template-columns: 1fr;
  }

  .flowplus-source-meta {
    flex-direction: column;
  }

  .flowplus-source-actions,
  .flowplus-context-strip {
    justify-content: flex-start;
  }
}

.flowstate-page-shell {
  width: min(calc(100% - 24px), 1920px);
  margin: 0 auto;
  padding: 84px 12px 18px;
}

.flowstate-shell {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 16px;
  height: calc(100vh - 176px);
  min-height: calc(100vh - 176px);
  max-height: calc(100vh - 176px);
  overflow: visible;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  transition: grid-template-columns 220ms ease;
  position: relative;
}

.flowstate-shell::before {
  display: none;
}

.flowstate-sidebar {
  padding: 18px 16px 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 14px;
  align-content: stretch;
  background: rgba(127, 149, 168, 0.035);
  border: 1px solid rgba(127, 149, 168, 0.08);
  border-radius: 24px;
  min-height: 100%;
  max-height: 100%;
  overflow: hidden;
  transition: opacity 180ms ease, transform 220ms ease, padding 220ms ease;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(10px);
}

.flowstate-sidebar-top h1,
.flowstate-topbar h2 {
  margin: 0 0 10px;
  letter-spacing: -0.05em;
}

.flowstate-sidebar-top {
  display: grid;
  gap: 12px;
}

.flowstate-sidebar-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.flowstate-sidebar-button {
  flex: 1;
  padding: 18px 20px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(180deg, rgba(127, 149, 168, 0.15), rgba(127, 149, 168, 0.11));
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 500;
  justify-content: flex-start;
  border: 1px solid rgba(127, 149, 168, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.flowstate-sidebar-button:hover {
  background: linear-gradient(180deg, rgba(127, 149, 168, 0.2), rgba(127, 149, 168, 0.14));
  border-color: rgba(127, 149, 168, 0.22);
}

.flowstate-sidebar-button-icon,
.flowstate-search-icon {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.flowstate-sidebar-button-icon {
  width: 22px;
  height: 22px;
  opacity: 0.92;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5.75A2.75 2.75 0 0 1 6.75 3h6.5a.75.75 0 0 1 0 1.5h-6.5A1.25 1.25 0 0 0 5.5 5.75v11.5c0 .69.56 1.25 1.25 1.25h10.5c.69 0 1.25-.56 1.25-1.25v-6.5a.75.75 0 0 1 1.5 0v6.5A2.75 2.75 0 0 1 17.25 20H6.75A2.75 2.75 0 0 1 4 17.25V5.75Zm11.45-1.72a1.75 1.75 0 0 1 2.47 0l1.05 1.05a1.75 1.75 0 0 1 0 2.47l-7.5 7.5a.75.75 0 0 1-.33.2l-3  .75a.75.75 0 0 1-.91-.91l.75-3a.75.75 0 0 1 .2-.33l7.5-7.5Zm1.41 1.06a.25.25 0 0 0-.35 0l-.73.73 1.4 1.4.73-.73a.25.25 0 0 0 0-.35l-1.05-1.05Zm-.74 3.19-1.4-1.4-5.98 5.98-.42 1.69 1.69-.42 5.98-5.98Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5.75A2.75 2.75 0 0 1 6.75 3h6.5a.75.75 0 0 1 0 1.5h-6.5A1.25 1.25 0 0 0 5.5 5.75v11.5c0 .69.56 1.25 1.25 1.25h10.5c.69 0 1.25-.56 1.25-1.25v-6.5a.75.75 0 0 1 1.5 0v6.5A2.75 2.75 0 0 1 17.25 20H6.75A2.75 2.75 0 0 1 4 17.25V5.75Zm11.45-1.72a1.75 1.75 0 0 1 2.47 0l1.05 1.05a1.75 1.75 0 0 1 0 2.47l-7.5 7.5a.75.75 0 0 1-.33.2l-3 .75a.75.75 0 0 1-.91-.91l.75-3a.75.75 0 0 1 .2-.33l7.5-7.5Zm1.41 1.06a.25.25 0 0 0-.35 0l-.73.73 1.4 1.4.73-.73a.25.25 0 0 0 0-.35l-1.05-1.05Zm-.74 3.19-1.4-1.4-5.98 5.98-.42 1.69 1.69-.42 5.98-5.98Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.flowstate-sidebar-button-icon::after {
  display: none;
}

.flowstate-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(127, 149, 168, 0.05);
  border: 1px solid rgba(127, 149, 168, 0.1);
}

.flowstate-search input {
  border: none;
  background: transparent;
  color: var(--text);
  width: 100%;
  padding: 0;
  outline: none;
}

.flowstate-search-icon {
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: var(--muted);
}

.flowstate-search-icon::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  right: -5px;
  bottom: 0;
  transform: rotate(45deg);
}

.flowstate-profile-summary,
.flowstate-session-list {
  display: grid;
  gap: 10px;
}

.flowstate-session-list {
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  padding-right: 2px;
}

.flowstate-session-list,
.flowstate-thread {
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 204, 255, 0.72) rgba(127, 149, 168, 0.08);
}

.flowstate-session-list::-webkit-scrollbar,
.flowstate-thread::-webkit-scrollbar {
  width: 10px;
}

.flowstate-session-list::-webkit-scrollbar-track,
.flowstate-thread::-webkit-scrollbar-track {
  background: rgba(127, 149, 168, 0.07);
  border-radius: 999px;
  margin: 10px 0;
}

.flowstate-session-list::-webkit-scrollbar-thumb,
.flowstate-thread::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(102, 204, 255, 0.92), rgba(102, 204, 255, 0.48)) padding-box;
}

.flowstate-session-list::-webkit-scrollbar-thumb:hover,
.flowstate-thread::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(102, 204, 255, 1), rgba(102, 204, 255, 0.68)) padding-box;
}

.flowstate-profile-item,
.flowstate-session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.flowstate-profile-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(127, 149, 168, 0.08);
}

.flowstate-profile-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.flowstate-profile-item span,
.flowstate-session-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.flowstate-profile-item strong,
.flowstate-session-title {
  font-size: 0.96rem;
  font-weight: 600;
}

.flowstate-session-item {
  width: 100%;
  padding: 14px 15px;
  border-radius: 14px;
  background: rgba(127, 149, 168, 0.04);
  border: 1px solid rgba(127, 149, 168, 0.1);
  text-align: left;
  color: var(--text);
  align-items: flex-start;
}

.flowstate-session-open {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.flowstate-session-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.flowstate-session-delete {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(127, 149, 168, 0.18);
  border-radius: 10px;
  background: rgba(127, 149, 168, 0.05);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.flowstate-session-delete svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.flowstate-session-delete:hover {
  color: #ff8d8d;
  border-color: rgba(255, 141, 141, 0.38);
  background: rgba(255, 141, 141, 0.1);
  transform: translateY(-1px);
}

.flowstate-session-item:hover,
.flowstate-session-item.is-active {
  border-color: rgba(102, 204, 255, 0.22);
  background: rgba(102, 204, 255, 0.08);
}

.flowstate-session-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.flowstate-session-preview {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.flowstate-empty-state {
  padding: 14px 4px;
  color: var(--muted);
}

.flowstate-main {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-height: 0;
  max-height: 100%;
  background: rgba(127, 149, 168, 0.03);
  position: relative;
  border: 1px solid rgba(127, 149, 168, 0.08);
  border-radius: 28px;
  overflow: hidden;
  z-index: 2;
  backdrop-filter: blur(10px);
}

.flowstate-main::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 6, 8, 0), rgba(5, 6, 8, 0.5) 70%, #000 100%);
  z-index: 2;
}

body[data-theme="light"] .flowstate-main::after {
  background: linear-gradient(180deg, rgba(244, 248, 251, 0), rgba(244, 248, 251, 0.64) 74%, var(--bg) 100%);
}

.flowstate-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px 8px;
  border-bottom: none;
  position: relative;
  z-index: 1;
}

.flowstate-topbar-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.flowstate-topbar .query-counter {
  text-align: right;
  max-width: 240px;
}

.flowstate-thread {
  padding: 14px 28px 18px;
  display: grid;
  gap: 22px;
  overflow-y: auto;
  min-height: 0;
  max-height: 100%;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  position: relative;
  z-index: 1;
  align-content: start;
}

.flowstate-thread::after {
  display: none;
}

.flowstate-message {
  display: flex;
}

.flowstate-message.user {
  justify-content: flex-end;
}

.flowstate-bubble {
  width: fit-content;
  max-width: 84%;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(127, 149, 168, 0.06);
  border: 1px solid rgba(127, 149, 168, 0.12);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  position: relative;
}

.flowstate-message.user .flowstate-bubble {
  min-width: 128px;
  max-width: min(50%, 420px);
  background: linear-gradient(180deg, rgba(102, 204, 255, 0.18), rgba(102, 204, 255, 0.1));
  border-color: rgba(102, 204, 255, 0.22);
  border-bottom-right-radius: 10px;
}

.flowstate-message.assistant .flowstate-bubble {
  max-width: 84%;
  background: linear-gradient(180deg, rgba(127, 149, 168, 0.1), rgba(127, 149, 168, 0.05));
  border-bottom-left-radius: 10px;
}

.flowstate-message-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.flowstate-message-text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.75;
  color: color-mix(in srgb, var(--text) 94%, transparent);
}

.flowstate-thinking-bubble {
  width: auto;
  min-width: 92px;
  padding: 14px 16px;
}

.flowstate-thinking-dots {
  margin-top: 2px;
}

.flowstate-composer {
  padding: 14px 22px 20px;
  border-top: none;
  background: linear-gradient(180deg, rgba(127, 149, 168, 0.008), rgba(127, 149, 168, 0.035));
  position: relative;
  z-index: 1;
  transition: background 180ms ease, box-shadow 180ms ease;
  border-radius: 28px;
  background-color: rgba(127, 149, 168, 0.06);
  box-shadow: inset 0 0 0 1px rgba(127, 149, 168, 0.1);
}

.flowstate-composer textarea {
  min-height: 60px;
  max-height: 168px;
  resize: none;
  border-radius: 26px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(127, 149, 168, 0.12);
}

.flowstate-status {
  min-height: 0;
  margin: 0 32px;
  font-size: 0.92rem;
}

.flowstate-status:empty {
  display: none;
}

.flowstate-composer.is-drag-active {
  background: linear-gradient(180deg, rgba(102, 204, 255, 0.06), rgba(127, 149, 168, 0.05));
  box-shadow: inset 0 0 0 1px rgba(102, 204, 255, 0.18);
}

.flowmium-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.flowmium-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text);
  background: rgba(127, 149, 168, 0.08);
  border: 1px solid rgba(127, 149, 168, 0.14);
}

.flowmium-attachment-remove {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
}

.flowmium-message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.flowmium-message-attachment {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(127, 149, 168, 0.08);
  border: 1px solid rgba(127, 149, 168, 0.12);
  font-size: 0.86rem;
  color: color-mix(in srgb, var(--text) 92%, transparent);
}


.flowstate-composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}

.flowstate-chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.flowstate-chip {
  background: rgba(127, 149, 168, 0.06);
}

.flowstate-composer-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: center;
  position: relative;
}

.flowmium-plus-button {
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 999px;
}

.flowstate-composer .send-button {
  border-radius: 999px;
}

.flowmium-plus-icon {
  font-size: 1.55rem;
  line-height: 1;
  display: inline-block;
  transform: translateY(-1px) scale(1);
  transition: transform 320ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.flowmium-plus-button:hover .flowmium-plus-icon,
.flowmium-plus-button:focus-visible .flowmium-plus-icon,
.flowstate-composer.is-drag-active .flowmium-plus-icon {
  transform: translateY(-1px) scale(1.12);
}

.flowmium-upload-hint {
  position: absolute;
  right: calc(100% + 12px);
  bottom: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(20, 24, 29, 0.94);
  border: 1px solid rgba(127, 149, 168, 0.12);
  color: var(--text);
  min-width: 230px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px) scale(0.96);
  transform-origin: right center;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.9, 0.2, 1);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.flowmium-upload-hint-title {
  display: block;
  font-size: 0.92rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--text) 94%, transparent);
}

.flowmium-plus-button:hover + .flowmium-upload-hint,
.flowmium-plus-button:focus-visible + .flowmium-upload-hint,
.flowstate-composer.is-drag-active .flowmium-upload-hint {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.flowstate-plus-note {
  padding: 12px 2px 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.page-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: color-mix(in srgb, var(--text) 88%, transparent);
}

.auth-lock-banner {
  margin-top: 18px;
  margin-left: auto;
  margin-right: auto;
  max-width: 640px;
  padding: 22px 24px;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid rgba(127, 149, 168, 0.16);
  box-shadow: var(--surface-shadow);
  text-align: center;
}

.auth-lock-banner h3 {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  letter-spacing: -0.05em;
}

.auth-lock-banner p:last-of-type {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-lock-banner .modal-actions {
  justify-content: center;
}

.auth-page-shell {
  padding-top: 132px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.profile-card {
  padding: 28px;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px solid rgba(127, 149, 168, 0.14);
  box-shadow: var(--surface-shadow);
}

.profile-card h2 {
  margin: 0 0 14px;
  letter-spacing: -0.04em;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 26px;
  align-items: stretch;
}

.auth-visual-card {
  min-height: 620px;
}

.signup-visual-card {
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 32%, rgba(102, 204, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(127, 149, 168, 0.14);
  box-shadow: var(--surface-shadow);
}

.login-visual-card {
  display: flex;
  align-items: stretch;
}

.signup-brand-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.signup-brand-logo,
.signup-brand-copy,
.signup-brand-reveal {
  position: absolute;
}

.signup-brand-logo {
  width: 220px;
  height: 220px;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  animation: signupLogoSettle 540ms ease-out 2.1s forwards;
}

.signup-logo-slash,
.signup-logo-line {
  position: absolute;
  display: block;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  border-radius: 8px;
  box-shadow: 0 0 22px rgba(102, 204, 255, 0.12);
}

.signup-logo-slash-large {
  width: 11px;
  height: 82px;
  left: 77px;
  top: 36px;
  transform: translateY(-180px) rotate(28deg);
  animation: signupSlashLargeIn 1.5s cubic-bezier(0.18, 0.88, 0.2, 1.16) forwards;
}

.signup-logo-slash-small {
  width: 11px;
  height: 58px;
  left: 132px;
  top: 70px;
  transform: translateY(180px) rotate(28deg);
  animation: signupSlashSmallIn 1.5s cubic-bezier(0.18, 0.88, 0.2, 1.16) 0.12s forwards;
}

.signup-logo-line {
  width: 60px;
  height: 9px;
  top: 144px;
}

.signup-logo-line-left {
  left: 52px;
  border-radius: 8px 0 0 8px;
  transform: translateX(-220px);
  animation: signupLineLeftIn 1.5s cubic-bezier(0.18, 0.88, 0.2, 1.16) 0.2s forwards;
}

.signup-logo-line-right {
  left: 110px;
  border-radius: 0 8px 8px 0;
  transform: translateX(220px);
  animation: signupLineRightIn 1.5s cubic-bezier(0.18, 0.88, 0.2, 1.16) 0.2s forwards;
}

.signup-brand-reveal {
  inset: 0;
  background:
    radial-gradient(circle at 50% 52%, rgba(102, 204, 255, 0.08), transparent 24%),
    linear-gradient(180deg, color-mix(in srgb, var(--panel-strong) 96%, transparent), color-mix(in srgb, var(--panel-strong) 92%, transparent));
  clip-path: circle(0% at 50% 52%);
  animation: signupCircleReveal 860ms cubic-bezier(0.19, 0.95, 0.22, 1) 2.35s forwards;
}

.signup-brand-copy {
  inset: 0;
  display: grid;
  place-items: center;
  justify-items: center;
  text-align: center;
  padding: 32px;
  align-content: center;
  transform: translateY(-28px);
  opacity: 0;
  z-index: 2;
  animation: signupCopyIn 620ms ease 2.7s forwards;
}

.signup-brand-copy h2 {
  margin: 6px 0 0;
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  letter-spacing: -0.06em;
  line-height: 1.08;
  max-width: 380px;
  text-align: center;
}

.signup-brand-copy .section-label {
  margin-bottom: 14px;
}

.login-brand-copy {
  gap: 14px;
}

.auth-form-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 620px;
  padding: 38px;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid rgba(127, 149, 168, 0.14);
  box-shadow: var(--surface-shadow);
  backdrop-filter: blur(12px);
}

.auth-form-card h1 {
  margin: 0 0 10px;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: -0.06em;
}

.auth-page-form {
  margin-top: 14px;
}

.oauth-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(127, 149, 168, 0.18);
  background: color-mix(in srgb, var(--panel-strong) 92%, transparent);
  color: var(--text);
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.oauth-button:hover {
  transform: translateY(-1px);
  border-color: rgba(102, 204, 255, 0.24);
  background: color-mix(in srgb, var(--panel-strong) 96%, transparent);
}

.google-auth-mark {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1b1b1b;
  font-weight: 700;
  font-size: 0.95rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(127, 149, 168, 0.16);
}

.auth-secondary-actions {
  margin-top: 12px;
}

.auth-form-card input[readonly] {
  color: color-mix(in srgb, var(--text) 82%, transparent);
  background: color-mix(in srgb, var(--panel-strong) 90%, transparent);
  cursor: default;
}

body[data-page="signup"] .auth-form-card {
  padding-top: 30px;
  padding-bottom: 30px;
}

body[data-page="signup"] .auth-page-form {
  margin-top: 10px;
  gap: 10px;
}

body[data-page="signup"] .auth-switch-copy {
  margin-top: 14px;
}

.auth-switch-copy {
  margin: 18px 0 0;
  color: var(--muted);
}

.auth-switch-copy a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(102, 204, 255, 0.4);
  text-underline-offset: 3px;
}

.reveal-up {
  animation: rise 760ms ease both;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.012);
  }
}

@keyframes jump {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.55;
  }

  40% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes signupSlashLargeIn {
  0% {
    transform: translateY(-180px) rotate(28deg);
  }

  55% {
    transform: translateY(-28px) rotate(28deg);
  }

  82% {
    transform: translateY(12px) rotate(28deg);
  }

  100% {
    transform: translateY(0) rotate(28deg);
  }
}

@keyframes signupSlashSmallIn {
  0% {
    transform: translateY(180px) rotate(28deg);
  }

  55% {
    transform: translateY(30px) rotate(28deg);
  }

  82% {
    transform: translateY(-10px) rotate(28deg);
  }

  100% {
    transform: translateY(0) rotate(28deg);
  }
}

@keyframes signupLineLeftIn {
  0% {
    transform: translateX(-180px);
  }

  55% {
    transform: translateX(-20px);
  }

  82% {
    transform: translateX(10px);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes signupLineRightIn {
  0% {
    transform: translateX(180px);
  }

  55% {
    transform: translateX(20px);
  }

  82% {
    transform: translateX(-10px);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes signupLogoSettle {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
}

@keyframes signupCircleReveal {
  from {
    clip-path: circle(0% at 50% 52%);
  }

  to {
    clip-path: circle(140% at 50% 52%);
  }
}

@keyframes signupCopyIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floatSoft {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-10px) rotate(0.6deg);
  }
}

@keyframes enchantedFlowPlus {
  0%,
  100% {
    transform: translateY(0);
    border-color: rgba(102, 204, 255, 0.24);
  }

  50% {
    transform: translateY(-1px);
    border-color: rgba(143, 220, 255, 0.38);
  }
}

@keyframes enchantedFlowPlusShine {
  0%,
  100% {
    transform: translateX(-120%);
    opacity: 0;
  }

  20% {
    opacity: 0.35;
  }

  55% {
    transform: translateX(120%);
    opacity: 0.55;
  }

  70% {
    opacity: 0;
  }
}

@keyframes crownBob {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  35% {
    transform: translateY(-1px) scale(1.08);
  }

  65% {
    transform: translateY(0) scale(0.98);
  }
}

@keyframes timerCelebrate {
  0% {
    transform: scale(1);
    box-shadow: var(--surface-shadow);
  }

  35% {
    transform: scale(1.025);
    box-shadow: 0 0 0 8px rgba(102, 204, 255, 0.08), 0 18px 36px rgba(0, 0, 0, 0.18);
  }

  100% {
    transform: scale(1);
    box-shadow: var(--surface-shadow);
  }
}

@keyframes timerDigits {
  0%,
  100% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-4px);
  }

  60% {
    transform: translateY(2px);
  }
}

@keyframes logoSlashLeft {
  from {
    opacity: 0;
    transform: rotate(28deg) translateX(-36px);
  }

  to {
    opacity: 1;
    transform: rotate(28deg) translateX(0);
  }
}

@keyframes logoSlashRight {
  from {
    opacity: 0;
    transform: rotate(28deg) translateX(36px);
  }

  to {
    opacity: 1;
    transform: rotate(28deg) translateX(0);
  }
}

@keyframes logoLineUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flowLoaderBreathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.035);
  }
}

@keyframes flowLoaderSweep {
  0% {
    opacity: 0;
    transform: translateX(-28px);
  }

  32%,
  68% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(28px);
  }
}

@keyframes flowPlusLabelShine {
  0%,
  58%,
  100% {
    transform: translateX(0) skewX(-16deg);
    opacity: 0;
  }

  18% {
    opacity: 0.7;
  }

  42% {
    transform: translateX(420%) skewX(-16deg);
    opacity: 0;
  }
}

@keyframes sparkleBlink {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.82) rotate(0deg);
  }

  48% {
    opacity: 1;
    transform: scale(1.16) rotate(18deg);
  }
}

@keyframes pilotPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.22);
  }
}

@keyframes notificationPanelIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes sideNotificationIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes sideNotificationOut {
  to {
    opacity: 0;
    transform: translateX(18px);
  }
}

@media (max-width: 980px) {
  .features,
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pricing-grid,
  .about-story,
  .about-story.reverse,
  .flowplus-overview,
  .flowplus-layout,
  .flowstate-shell,
  .profile-grid,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .about-story.reverse .about-story-copy,
  .about-story.reverse .about-media-card {
    order: initial;
  }

  .nav-shell {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links,
  .nav-right {
    justify-content: space-between;
  }

  .flow-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .flowstate-page-shell {
    width: min(calc(100% - 24px), var(--max-width));
    padding-top: 98px;
  }

  .flowstate-shell {
    height: auto;
    min-height: auto;
    max-height: none;
    border-radius: 24px;
  }

  .flowstate-sidebar {
    max-height: none;
    overflow: visible;
    padding-top: 18px;
  }

  .flowstate-topbar {
    padding-top: 18px;
  }

  .flowplus-chat-panel {
    min-height: 640px;
  }

  .flowplus-browser-header,
  .browser-pilot-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .browser-pilot-grid {
    grid-template-columns: 1fr;
  }

  .flowplus-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 720px) {
  .page-shell,
  .nav-shell,
  .footer {
    width: min(calc(100% - 20px), var(--max-width));
  }

  .page-shell {
    padding-top: 96px;
    padding-bottom: 44px;
  }

  .nav-shell {
    gap: 14px;
    padding: 16px 0 14px;
  }

  .nav-links,
  .nav-right,
  .workspace-actions,
  .output-card-header,
  .pricing-grid,
  .task-chat-form,
  .footer,
  .flowstate-composer-row {
    flex-direction: column;
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown summary {
    justify-content: space-between;
  }

  .nav-dropdown-menu {
    position: static;
    margin-top: 8px;
    min-width: 0;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    display: none;
  }

  .nav-dropdown[open] .nav-dropdown-menu {
    display: grid;
  }

  .flow-plan-header-actions,
  .flow-plan-button-row {
    align-items: stretch;
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
    padding: 32px 0 36px;
  }

  .subpage-hero {
    padding-top: 4px;
  }

  .subpage-hero h1 {
    font-size: clamp(2rem, 10vw, 2.9rem);
    line-height: 1.02;
  }

  .subpage-hero p {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .response-shell,
  .feature-card,
  .modal-card {
    padding: 20px;
  }

  .modal-backdrop {
    align-items: flex-start;
    padding: 12px;
    overflow-y: auto;
  }

  .modal-card {
    width: 100%;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    border-radius: 20px;
  }

  .step-content {
    flex-direction: column;
  }

  .features,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .feature-layout,
  .about-story {
    grid-template-columns: 1fr;
  }

  .auth-form-card {
    padding: 24px;
  }

  .flowstate-sidebar,
  .flowstate-main,
  .flowstate-thread,
  .flowstate-topbar,
  .flowstate-composer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .flowstate-topbar {
    gap: 12px;
    padding-top: 28px;
  }

  .flowstate-topbar .query-counter {
    max-width: none;
    text-align: left;
  }

  .flowstate-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(127, 149, 168, 0.08);
  }

  .flowstate-thread {
    padding-top: 10px;
    padding-bottom: 14px;
  }

  .flowstate-bubble,
  .flowstate-message.user .flowstate-bubble,
  .flowstate-message.assistant .flowstate-bubble {
    max-width: 100%;
  }

  .flowstate-composer {
    padding-bottom: 18px;
  }

  .flowstate-status {
    margin-left: 18px;
    margin-right: 18px;
  }

  .flowstate-chip-row,
  .footer-links,
  .flowplus-upload-grid {
    width: 100%;
    justify-content: space-between;
    grid-template-columns: 1fr;
  }

  .flowplus-browse-card {
    min-height: 138px;
  }

  .pricing-card,
  .locked-panel,
  .flowplus-overview-card,
  .flowplus-panel,
  .process-step-card {
    padding: 20px;
    border-radius: 18px;
  }

  .price-tag {
    font-size: clamp(1.9rem, 9vw, 2.45rem);
  }

  .plan-feature-list {
    gap: 8px;
    margin-bottom: 16px;
  }

  .plan-button,
  .locked-panel .primary-button,
  .modal-card .plan-button {
    width: 100%;
    justify-content: center;
  }

  .flowplus-panel-heading {
    flex-direction: column;
  }

  .flowplus-composer #flowPlusAskButton {
    width: 100%;
  }

  .flowplus-feature-grid {
    grid-template-columns: 1fr;
  }

  .flowplus-browser-header {
    gap: 16px;
  }

  .magic-pen-logo {
    width: 72px;
    height: 72px;
  }

  .flowplus-page-shell {
    padding-top: 104px;
  }

  .browser-pilot-prompt-main {
    flex-direction: column;
  }

  .feature-media,
  .feature-media-large,
  .pricing-card-media,
  .auth-visual-card {
    min-height: 200px;
  }

  .timer-widget,
  .task-chat,
  .quiz-panel,
  .flowzcode-prompt,
  .flowzcode-panel,
  .tutorial-bubble {
    right: 12px;
    left: 12px;
    width: auto;
  }

  .flowzcode-prompt {
    bottom: 12px;
  }

  .flowzcode-panel,
  .flowzcode-panel.is-expanded {
    top: 88px;
    max-height: calc(100vh - 104px);
  }

  .flowzcode-header,
  .flowzcode-body,
  .flowzcode-prompt-actions,
  .flowzcode-form-actions {
    flex-direction: column;
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .flowzcode-body {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .flowzcode-editor-panel {
    border-right: none;
    border-bottom: 1px solid rgba(127, 149, 168, 0.12);
  }

  .flowzcode-editor-panel textarea {
    min-height: 240px;
  }
}

@media (max-width: 520px) {
  .page-shell,
  .nav-shell,
  .footer {
    width: min(calc(100% - 16px), var(--max-width));
  }

  .nav-links,
  .nav-right {
    gap: 10px;
  }

  .nav-links a,
  .nav-dropdown summary,
  .nav-right a,
  .nav-right button {
    width: 100%;
    justify-content: center;
  }

  .modal-card {
    padding: 18px;
  }

  .price-tag span {
    display: block;
    margin: 4px 0 0;
  }

  .pricing-card p,
  .plan-feature-list li {
    font-size: 0.95rem;
  }

  .footer-links {
    width: 100%;
    justify-content: space-between;
  }

  .flowzcode-header,
  .flowzcode-editor-panel,
  .flowzcode-chat-panel,
  .flowzcode-prompt {
    padding-left: 16px;
    padding-right: 16px;
  }
}
