:root {
  --bg: #f4f6f8 !important;
  --paper: #fbfbfa !important;
  --paper-soft: #f0f4f6 !important;
  --ink: #15171a !important;
  --text: #20252a !important;
  --muted: #6b737c !important;
  --soft: #8a929b !important;
  --line: rgba(21, 23, 26, 0.1) !important;
  --line-strong: rgba(21, 23, 26, 0.16) !important;
  --glass: rgba(255, 255, 255, 0.58) !important;
  --glass-strong: rgba(255, 255, 255, 0.78) !important;
  --accent: #5977d6 !important;
  --accent-soft: rgba(89, 119, 214, 0.14) !important;
  --shadow: 0 26px 80px rgba(35, 48, 66, 0.12) !important;
  --shadow-soft: 0 16px 42px rgba(35, 48, 66, 0.08) !important;
}

body {
  color: var(--text) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 246, 248, 0.94) 42%, rgba(248, 244, 240, 0.9)),
    var(--bg) !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif !important;
  letter-spacing: 0 !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 10%, rgba(155, 196, 226, 0.44), rgba(155, 196, 226, 0) 46%),
    linear-gradient(130deg, rgba(255, 255, 255, 0.86), rgba(235, 239, 244, 0.54) 52%, rgba(255, 219, 191, 0.34));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.24;
  background-image: radial-gradient(rgba(21, 23, 26, 0.18) 0.7px, transparent 0.7px);
  background-size: 12px 12px;
  mask-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7) 26%, rgba(0, 0, 0, 0.14) 72%, transparent);
}

.nav,
.top {
  min-height: 72px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.72) !important;
}

.brand {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  color: var(--ink) !important;
  font-size: 20px !important;
  font-weight: 780 !important;
  letter-spacing: -0.035em !important;
}

.brand::before {
  content: "";
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 13px;
  background:
    linear-gradient(74deg, transparent 42%, rgba(255, 255, 255, 0.92) 43% 53%, transparent 54%),
    linear-gradient(106deg, transparent 42%, rgba(255, 255, 255, 0.76) 43% 53%, transparent 54%),
    var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 12px 24px rgba(21, 23, 26, 0.14);
}

.brand b,
.brand i,
.brand span { color: var(--ink) !important; font-style: normal; }

.nav-links,
.top > a:not(.brand) {
  color: #59616a !important;
  font-size: 14px !important;
  font-weight: 690 !important;
}

.nav-links a,
.top > a:not(.brand) {
  padding: 10px 13px;
  border-radius: 999px;
  transition: color 180ms ease, background 180ms ease;
}

.nav-links a:hover,
.top > a:not(.brand):hover { color: var(--ink) !important; background: rgba(255, 255, 255, 0.62); }

.button,
.cta,
.start,
.prompt-panel a {
  background: var(--ink) !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  box-shadow: 0 12px 24px rgba(21, 23, 26, 0.12) !important;
}

.study img,
.hero figure,
.example,
.stage,
.prompt-stack,
.output,
.hero-note,
.note,
.format-pills span,
.prompt-panel,
.related a,
.rules article,
.parameter-list div {
  border-color: rgba(255, 255, 255, 0.74) !important;
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
}

.note,
.hero-note,
.prompt-stack,
.output,
.stage.read,
.format-pills span,
.parameter-list div,
.rules article,
.example,
.related a {
  background: var(--glass) !important;
  backdrop-filter: blur(24px) saturate(1.16);
  -webkit-backdrop-filter: blur(24px) saturate(1.16);
}

.study img,
.hero figure,
.example,
.stage,
.prompt-stack,
.output,
.hero-note,
.note,
.related a,
.prompt-panel,
.rules article,
.parameter-list div { border-radius: 26px !important; }

.kicker,
.label,
.observation span,
.field small,
.output span,
.parameter-list b { color: var(--accent) !important; }

/* Page-specific color normalization while retaining each page's layout. */
.hero { background: transparent !important; }
.hero::after { opacity: 0.22; }
.hero h1,
.intro h1,
h1,
h2,
h3 { color: var(--ink) !important; }

.hero p,
.intro p,
.worksheet header p,
.translation p,
.lab-head p,
.guide p,
.reference p,
.diagram-intro p,
.benefits p,
.formats p,
.reading > div > p,
.observation p,
.benefit-list p,
.rules p { color: var(--muted) !important; }

.prompt { background: var(--ink) !important; border-radius: 18px !important; box-shadow: var(--shadow) !important; }
.prompt b { color: #a9c3f1 !important; }
.output { color: var(--text) !important; }
.output code { color: var(--accent) !important; }
.field { border-color: var(--line) !important; }
.guide article,
.benefit-list article { border-color: var(--accent) !important; }

.stage.source,
.stage.output,
.prompt-panel { background: var(--glass-strong) !important; color: var(--text) !important; }
.stage.output p,
.prompt-panel p { color: var(--muted) !important; }
.mini-prompt { color: var(--text) !important; border-color: rgba(89, 119, 214, 0.24) !important; background: rgba(89, 119, 214, 0.08); }
.formats { background: transparent !important; }
.example-copy { background: linear-gradient(transparent, rgba(21, 23, 26, 0.76)) !important; }
.prompt-panel { border: 1px solid rgba(255, 255, 255, 0.74); }

@media (max-width: 760px) {
  .nav,
  .top { min-height: 64px !important; }
  .brand { font-size: 18px !important; gap: 8px; }
  .brand::before { width: 30px; height: 30px; flex-basis: 30px; border-radius: 11px; }
  .nav-links a,
  .top > a:not(.brand) { padding: 8px 7px; }
}

/* Shared site chrome copied from the main PromptExtract product surface. */
.page-shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 72px;
  display: flex;
  align-items: center;
  background: rgba(244, 246, 248, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
}

.site-header .nav { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 72px !important; border: 0 !important; }
.site-header .brand::before { display: none; }
.site-header .brand-mark { width: 34px; height: 34px; position: relative; flex: 0 0 34px; border-radius: 13px; background: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 12px 24px rgba(21, 23, 26, 0.14); }
.site-header .brand-mark::before,
.site-header .brand-mark::after { content: ""; position: absolute; top: 9px; width: 7px; height: 16px; border-radius: 99px; background: #ffffff; }
.site-header .brand-mark::before { left: 8px; transform: rotate(-16deg); }
.site-header .brand-mark::after { right: 8px; transform: rotate(16deg); opacity: 0.76; }
.site-header .nav-links { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 0; }
.site-header .nav-link { padding: 10px 13px; font-size: 0; border-radius: 999px; }
.site-header .nav-link::after { font-size: 14px; font-weight: 690; }
.site-header .nav-link--generator::after { content: "Generator"; }
.site-header .nav-link--examples::after { content: "Examples"; }
.site-header .nav-link--formats::after { content: "Formats"; }
.site-header .nav-link--faq::after { content: "FAQ"; }
.site-header .nav-link--pricing::after { content: "Pricing"; }
.site-header .nav-link--history::after { content: "History"; }
.auth-nav { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.credit-pill { min-height: 38px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: #4a5f9c; background: rgba(89, 119, 214, 0.1); border: 1px solid rgba(89, 119, 214, 0.16); font-size: 13px; font-weight: 780; white-space: nowrap; }
.credit-pill[hidden], .auth-button[hidden], .auth-menu[hidden] { display: none; }
.auth-button { min-height: 40px; padding: 0 15px; border: 1px solid transparent; border-radius: 999px; color: #ffffff; background: var(--ink); box-shadow: 0 14px 28px rgba(21, 23, 26, 0.14); font-size: 13px; font-weight: 780; white-space: nowrap; cursor: pointer; }
.auth-button:hover { transform: translateY(-1px); background: #262a30; }
.user-menu { position: relative; display: none; }
.user-menu.is-visible { display: block; }
.avatar-button { width: 42px; height: 42px; padding: 2px; display: grid; place-items: center; border: 1px solid rgba(21, 23, 26, 0.1); border-radius: 999px; background: rgba(255, 255, 255, 0.74); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84), 0 12px 26px rgba(21, 23, 26, 0.08); cursor: pointer; }
.auth-avatar { width: 36px; height: 36px; display: block; border-radius: 999px; object-fit: cover; background: #e7ecf2; }
.auth-menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: 218px; padding: 8px; border: 1px solid rgba(21, 23, 26, 0.1); border-radius: 18px; background: rgba(255, 255, 255, 0.94); box-shadow: 0 20px 54px rgba(21, 23, 26, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.84); backdrop-filter: blur(20px) saturate(1.1); }
.auth-menu-user { padding: 8px 10px 10px; border-bottom: 1px solid rgba(21, 23, 26, 0.08); color: var(--muted); font-size: 12px; line-height: 1.35; word-break: break-word; }
.auth-menu-user strong { display: block; color: var(--ink); font-size: 13px; font-weight: 780; margin-bottom: 2px; }
.auth-menu-item { width: 100%; min-height: 40px; margin-top: 7px; display: flex; align-items: center; padding: 0 10px; border: 0; border-radius: 12px; color: var(--ink); background: transparent; font-size: 13px; font-weight: 760; text-align: left; text-decoration: none; cursor: pointer; }
.auth-menu-item:hover { background: rgba(89, 119, 214, 0.1); }

.site-footer { padding: 64px 0 72px; border-top: 1px solid rgba(21, 23, 26, 0.08); background: rgba(255, 255, 255, 0.18); }
.footer-grid { display: grid; grid-template-columns: 1.45fr .8fr .8fr .95fr; gap: 30px; }
.footer-brand { margin: 0; color: var(--ink); font-size: 20px; font-weight: 780; }
.footer-grid h3 { margin: 0 0 14px; }
.footer-grid p, .footer-grid a { color: var(--muted); font-size: 14px; line-height: 1.6; }
.footer-heading { font-size: 0; }
.footer-heading::after { color: var(--ink); font-size: 14px; font-weight: 780; }
.footer-heading--product::after { content: "Product"; }
.footer-heading--legal::after { content: "Legal"; }
.footer-heading--contact::after { content: "Contact"; }
.footer-link { display: block; margin: 8px 0; font-size: 0 !important; text-decoration: none; }
.footer-link::after { display: block; color: var(--muted); font-size: 14px; }
.footer-link--generator::after { content: "Generator"; }
.footer-link--examples::after { content: "Examples"; }
.footer-link--formats::after { content: "Formats"; }
.footer-link--faq::after { content: "FAQ"; }
.footer-link--pricing::after { content: "Pricing"; }
.footer-link--terms::after { content: "Terms of Service"; }
.footer-link--privacy::after { content: "Privacy Policy"; }
.footer-grid a:hover { color: var(--ink); }

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

@media (max-width: 860px) {
  .site-header .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .page-shell { width: min(100% - 28px, 640px); }
  .site-header .nav { min-height: 64px !important; }
  .site-header .brand { font-size: 18px !important; }
  .site-header .brand-mark { width: 30px; height: 30px; flex-basis: 30px; border-radius: 11px; }
  .site-header .brand-mark::before, .site-header .brand-mark::after { top: 8px; height: 14px; width: 6px; }
  .site-header .brand-mark::before { left: 7px; }
  .site-header .brand-mark::after { right: 7px; }
  .credit-pill { display: none; }
  .site-footer { padding: 48px 0 86px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .mobile-bottom-nav { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; min-height: 58px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 5px; border: 1px solid rgba(255,255,255,.78); border-radius: 20px; background: rgba(251,251,250,.88); box-shadow: 0 18px 40px rgba(35,48,66,.16); backdrop-filter: blur(20px); }
  .mobile-bottom-nav__link { display: grid; place-items: center; color: var(--muted); font-size: 11px; font-weight: 760; text-decoration: none; }
  .mobile-bottom-nav__link::after { content: attr(data-label); }
}
