
:root {
  --ink: #111111;
  --muted: #5c564f;
  --paper: #f7f2e9;
  --panel: #fffaf1;
  --line: #d7c9b8;
  --gold: #9a6b24;
  --gold-dark: #6d4714;
  --charcoal: #1c1a17;
  --soft: #ece2d2;
  --danger: #7a2d20;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(17, 17, 17, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff8ec, var(--paper) 34%, #f2eadf 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
a { color: var(--gold-dark); font-weight: 700; }
a:hover { color: var(--ink); }
.container { width: min(1120px, calc(100% - 36px)); margin: 0 auto; }
.skip-link {
  position: absolute; left: -999px; top: 8px; background: var(--ink); color: white;
  padding: .8rem 1rem; z-index: 1000; border-radius: 10px;
}
.skip-link:focus { left: 8px; }
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(247, 242, 233, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand span { display: grid; line-height: 1.1; }
.brand small { color: var(--muted); font-weight: 600; font-size: .76rem; margin-top: .25rem; }
.brand-mark { color: var(--gold-dark); flex: 0 0 auto; }
.site-nav { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.nav-link {
  text-decoration: none; color: var(--charcoal); padding: .55rem .75rem; border-radius: 999px;
  font-size: .92rem; font-weight: 800;
}
.nav-link:hover, .nav-link.active { background: var(--soft); color: var(--gold-dark); }
.nav-toggle { display: none; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: .55rem .9rem; font-weight: 800; }
.hero { padding: 5.5rem 0 3rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .15em; color: var(--gold-dark); font-size: .78rem; font-weight: 900; margin: 0 0 .75rem; }
h1, h2, h3 { line-height: 1.05; margin: 0 0 1rem; color: var(--charcoal); }
h1 { font-size: clamp(2.45rem, 7vw, 5.8rem); letter-spacing: -.06em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.6rem); letter-spacing: -.04em; }
h3 { font-size: 1.2rem; }
.hero-copy, .page-hero p { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--muted); max-width: 720px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .75rem 1rem;
  border-radius: 999px; text-decoration: none; font-weight: 900; border: 1px solid transparent; cursor: pointer;
}
.button.primary { background: var(--ink); color: white; }
.button.secondary { background: var(--panel); color: var(--ink); border-color: var(--line); }
.button:hover { transform: translateY(-1px); }
.hero-card, .card, .product-card, .price-card, .stack-card {
  background: rgba(255, 250, 241, .82); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.35rem;
}
.hero-card { min-height: 360px; display: grid; align-content: center; }
.route-line {
  border: 1px solid var(--line); border-radius: 16px; padding: .95rem; background: white;
  display: grid; gap: .2rem; margin: .7rem 0;
}
.route-line span { color: var(--muted); font-size: .82rem; font-weight: 800; }
.route-line strong { font-size: 1.05rem; }
.notice, .legal-note { color: var(--muted); font-size: .95rem; }
.section { padding: 3rem 0; }
.section-head { max-width: 760px; margin-bottom: 1.35rem; }
.card-grid { display: grid; gap: 1rem; }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card.deep { padding: 1.6rem; }
.split-panel {
  display: grid; grid-template-columns: 1fr .85fr; gap: 1.25rem; align-items: start;
  background: rgba(255, 250, 241, .48); border: 1px solid var(--line); border-radius: calc(var(--radius) + 8px);
  padding: 2rem;
}
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; }
.check-list li { position: relative; padding-left: 1.6rem; font-weight: 750; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--gold-dark); font-weight: 900; }
.check-list.compact li { font-weight: 650; }
.page-hero {
  padding: 4.5rem 0 2rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255,250,241,.72), rgba(236,226,210,.78));
}
.arche-hero {
  background:
    radial-gradient(circle at 15% 15%, rgba(154,107,36,.22), transparent 32%),
    linear-gradient(135deg, rgba(255,250,241,.75), rgba(28,26,23,.08));
}
.narrow { max-width: 820px; }
.catalog-grid, .pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.pricing-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.product-card ul { padding-left: 1.2rem; }
.status {
  display: inline-flex; padding: .35rem .6rem; background: var(--soft); color: var(--gold-dark);
  border-radius: 999px; font-size: .75rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em;
}
.product-card button {
  border: 1px solid var(--line); border-radius: 999px; padding: .75rem 1rem; background: #eee; color: #777;
  cursor: not-allowed; font-weight: 800;
}
.tool-card {
  background: var(--charcoal); color: white; border-radius: var(--radius); padding: 1.25rem;
}
.tool-card h3 { color: white; }
.tool-card p { color: #e8dfd1; }
.tool-card span { display: inline-flex; margin-top: .7rem; padding: .3rem .55rem; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; color: #f5dba1; font-size: .78rem; font-weight: 800; }
.price-card { display: grid; gap: .7rem; align-content: start; }
.price-card.featured { border: 2px solid var(--gold); transform: translateY(-.35rem); }
.price { font-size: 1.55rem; font-weight: 950; margin: 0; color: var(--gold-dark); }
.banner {
  background: var(--charcoal); color: white; padding: 2rem; border-radius: var(--radius);
}
.banner h2 { color: white; }
.banner p { color: #efe5d8; }
.banner.warning { background: #2b1d19; }
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 1.3rem; align-items: start; }
.contact-form { display: grid; gap: .85rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); }
label { display: grid; gap: .35rem; font-weight: 850; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: .82rem .9rem;
  background: white; color: var(--ink); font: inherit;
}
input:focus, select:focus, textarea:focus, button:focus, a:focus { outline: 3px solid rgba(154,107,36,.35); outline-offset: 3px; }
.callout { border-left: 5px solid var(--gold); background: var(--panel); border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem; margin: 1.2rem 0; }
.site-footer { background: var(--charcoal); color: white; padding: 2.5rem 0; margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr .7fr .7fr; gap: 1.5rem; }
.site-footer h2, .site-footer h3 { color: white; }
.site-footer p { color: #d8cec0; }
.site-footer a { display: block; color: #f2d28d; text-decoration: none; margin: .3rem 0; }
.version { font-size: .85rem; opacity: .85; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 18px; right: 18px; top: 72px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: .8rem; box-shadow: var(--shadow); }
  .site-nav.open { display: grid; }
  .nav-link { display: block; }
  .hero-grid, .split-panel, .contact-grid { grid-template-columns: 1fr; }
  .card-grid.three, .card-grid.two, .catalog-grid, .pricing-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 3.5rem; }
  .price-card.featured { transform: none; }
}


.arche-command-section { scroll-margin-top: 96px; }
.arche-console {
  background: rgba(28, 26, 23, .96);
  color: white;
  border: 1px solid rgba(242, 210, 141, .35);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.arche-console-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(135deg, rgba(154,107,36,.25), rgba(255,255,255,.04));
}
.arche-console-head h3 { color: white; margin-bottom: .35rem; }
.arche-console-head p { color: #e8dfd1; margin: 0; }
.status.live { background: #f2d28d; color: #1c1a17; white-space: nowrap; }
.arche-messages {
  display: grid;
  gap: .8rem;
  padding: 1.2rem;
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  background:
    radial-gradient(circle at 10% 10%, rgba(154,107,36,.18), transparent 28%),
    rgba(17,17,17,.18);
}
.message {
  max-width: 820px;
  border-radius: 18px;
  padding: .9rem 1rem;
  border: 1px solid rgba(255,255,255,.12);
}
.message strong { display: block; margin-bottom: .25rem; }
.message p { margin: 0; color: inherit; }
.arche-message { background: rgba(255, 250, 241, .10); color: #fff8ec; }
.user-message { background: rgba(242, 210, 141, .18); color: white; margin-left: auto; }
.arche-command-form {
  display: grid;
  gap: .75rem;
  padding: 1.2rem;
  background: rgba(255,255,255,.06);
}
.arche-command-form label { color: white; }
.command-row { display: grid; grid-template-columns: 1fr auto; gap: .75rem; align-items: center; }
.command-row input { border-color: rgba(242,210,141,.45); }
.arche-command-form .notice { color: #e8dfd1; margin: 0; }
@media (max-width: 700px) {
  .arche-console-head, .command-row { grid-template-columns: 1fr; display: grid; }
  .status.live { width: fit-content; }
}


/* ArchĒ AI OS global chat bar */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.arche-global-bar {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}
.arche-global-toggle {
  margin-left: auto;
  display: block;
  pointer-events: auto;
  border: 1px solid rgba(242,210,141,.75);
  background: #111;
  color: #f2d28d;
  border-radius: 999px;
  padding: .85rem 1.15rem;
  box-shadow: 0 18px 45px rgba(0,0,0,.24);
  font-weight: 800;
  letter-spacing: .03em;
}
.arche-global-panel {
  pointer-events: auto;
  margin-top: .75rem;
  background: rgba(17,17,17,.98);
  color: #fff;
  border: 1px solid rgba(242,210,141,.35);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0,0,0,.36);
  overflow: hidden;
}
.arche-global-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: baseline;
  padding: .95rem 1rem;
  border-bottom: 1px solid rgba(242,210,141,.18);
}
.arche-global-head span { color: #e8dfd1; font-size: .82rem; text-align: right; }
.arche-global-log {
  max-height: 170px;
  overflow: auto;
  padding: .85rem 1rem;
}
.arche-global-log p { margin: 0 0 .65rem; color: #f8f5ef; font-size: .95rem; }
.arche-global-form { display: grid; grid-template-columns: 1fr auto; gap: .5rem; padding: 0 1rem 1rem; }
.arche-global-form input {
  border: 1px solid rgba(242,210,141,.45);
  background: #fff;
  color: #111;
  border-radius: 999px;
  padding: .8rem 1rem;
}
.arche-global-form button {
  border: 0;
  border-radius: 999px;
  padding: .8rem 1rem;
  font-weight: 800;
  background: #f2d28d;
  color: #111;
}
.arche-global-note { color: #e8dfd1; font-size: .78rem; margin: -.35rem 1rem 1rem; }
@media (max-width: 560px) {
  .arche-global-bar { right: .75rem; bottom: .75rem; width: calc(100vw - 1.5rem); }
  .arche-global-form { grid-template-columns: 1fr; }
  .arche-global-head { display: block; }
  .arche-global-head span { display: block; text-align: left; margin-top: .25rem; }
}


/* v3.2.5 high-traffic platform structure */
.platform-hero h1 { max-width: 980px; }
.conversion-card .route-line strong { text-align: right; }
.conversion-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .9rem;
  margin-top: -1.2rem;
  position: relative;
  z-index: 2;
}
.conversion-strip a {
  display: grid;
  gap: .25rem;
  text-decoration: none;
  background: rgba(255,250,241,.96);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 12px 30px rgba(17,17,17,.07);
}
.conversion-strip strong { color: var(--charcoal); font-size: 1.1rem; }
.conversion-strip span { color: var(--muted); font-weight: 650; font-size: .92rem; }
.journey-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.journey-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: .45rem;
}
.journey-card span {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--soft);
  color: var(--gold-dark);
  font-weight: 900;
}
.journey-card h2 { font-size: 1.45rem; margin-bottom: .2rem; }
.platform-rail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.2rem; align-items: start; }
.rail-side { position: sticky; top: 100px; }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.loop-map {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 1.4rem;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.loop-map ol { display: grid; gap: .6rem; margin: 0; padding-left: 1.25rem; }
.loop-map li { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .65rem .75rem; font-weight: 750; }
.vault-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.vault-card {
  min-height: 220px;
  background: linear-gradient(150deg, rgba(28,26,23,.96), rgba(109,71,20,.92));
  color: white;
  border: 1px solid rgba(242,210,141,.25);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
}
.vault-card h2 { color: white; }
.vault-card p { color: #eee2d0; }
.vault-card .status { background: rgba(242,210,141,.2); color: #f8e7bd; }
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  padding: .7rem 1rem 0;
}
.quick-chips button {
  border: 1px solid rgba(242,210,141,.35);
  background: rgba(242,210,141,.12);
  color: #fff8ec;
  border-radius: 999px;
  padding: .45rem .65rem;
  font-weight: 800;
  cursor: pointer;
}
.console-chips { background: rgba(255,255,255,.06); padding-bottom: .8rem; }
.command-mode-label {
  display: grid;
  gap: .2rem;
  color: #e8dfd1;
  font-size: .78rem;
  font-weight: 800;
  min-width: 150px;
}
.command-mode-label select {
  border: 1px solid rgba(242,210,141,.45);
  border-radius: 999px;
  padding: .35rem .55rem;
  background: #fff;
  color: #111;
  font-weight: 800;
}
.arche-global-head > div { display: grid; gap: .12rem; }
@media (max-width: 1000px) {
  .conversion-strip, .vault-grid { grid-template-columns: repeat(2, 1fr); }
  .journey-grid { grid-template-columns: repeat(2, 1fr); }
  .platform-rail, .loop-map { grid-template-columns: 1fr; }
  .rail-side { position: static; }
}
@media (max-width: 700px) {
  .conversion-strip, .journey-grid, .mode-cards, .vault-grid { grid-template-columns: 1fr; }
}


/* v3.2.6 ArchĒ retention + personality engine */
.retention-hero h1 { max-width: 1040px; }
.retention-hero-small { background: radial-gradient(circle at 20% 20%, rgba(154,107,36,.22), transparent 34%), linear-gradient(135deg, rgba(255,250,241,.78), rgba(236,226,210,.88)); }
.retention-card { gap: .8rem; }
.mini-status, .arche-return-card {
  display: grid; gap: .25rem; border: 1px solid rgba(154,107,36,.28); border-radius: 18px; padding: .85rem; background: rgba(255,255,255,.76);
}
.arche-return-card { margin: .85rem 1rem 0; background: rgba(242,210,141,.12); color: #fff8ec; border-color: rgba(242,210,141,.25); }
.arche-return-card span { color: #e8dfd1; font-size: .9rem; }
.today-panel {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: 1.25rem; align-items: stretch;
  background: rgba(255,250,241,.55); border: 1px solid var(--line); border-radius: calc(var(--radius) + 8px); padding: 2rem;
}
.daily-card {
  background: var(--charcoal); color: white; border-radius: var(--radius); border: 1px solid rgba(242,210,141,.25); box-shadow: var(--shadow); padding: 1.25rem; display: grid; gap: .7rem; align-content: start;
}
.daily-card h3 { color: white; font-size: 1.55rem; }
.daily-card p { color: #eee2d0; }
.daily-card.large { min-height: 280px; align-content: center; }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }
.continue-panel {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 1.25rem; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: calc(var(--radius) + 8px); padding: 2rem; box-shadow: var(--shadow);
}
.arche-global-panel { max-height: min(76vh, 720px); overflow: auto; }
@media (max-width: 1000px) {
  .card-grid.four { grid-template-columns: repeat(2, 1fr); }
  .today-panel, .continue-panel { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .card-grid.four { grid-template-columns: 1fr; }
}


/* v3.2.7 ArchĒ focused answer space */
body.arche-session-active {
  overflow: hidden;
}
.arche-session-shell {
  position: fixed;
  inset: 0;
  z-index: 200;
  background:
    radial-gradient(circle at 12% 8%, rgba(154,107,36,.22), transparent 32%),
    linear-gradient(145deg, #fffaf1 0%, #f1e7d9 42%, #1c1a17 100%);
  color: var(--ink);
}
.arche-session-shell[hidden] { display: none; }
.arche-session-surface {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.arche-session-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .85rem clamp(1rem, 3vw, 2rem);
  background: rgba(255,250,241,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.arche-session-brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--ink);
  text-decoration: none;
}
.arche-session-brand span:last-child { display: grid; line-height: 1.1; }
.arche-session-brand small { color: var(--muted); font-weight: 700; font-size: .78rem; margin-top: .22rem; }
.arche-session-mark {
  width: 44px;
  height: 44px;
  border: 2px solid var(--gold-dark);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--gold-dark);
  font-weight: 950;
  letter-spacing: -.05em;
}
.arche-session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  justify-content: flex-end;
}
.arche-session-main {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2.2rem) 0 1rem;
}
.arche-session-intro {
  background: rgba(255,250,241,.80);
  border: 1px solid rgba(215,201,184,.82);
  border-radius: 26px;
  box-shadow: 0 18px 55px rgba(17,17,17,.12);
  padding: clamp(1rem, 3vw, 1.35rem);
}
.arche-session-intro h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  margin-bottom: .45rem;
}
.arche-session-intro p:last-child {
  color: var(--muted);
  max-width: 820px;
  margin-bottom: 0;
}
.arche-session-thread {
  display: grid;
  align-content: start;
  gap: .9rem;
  min-height: 0;
  overflow: auto;
  padding: .25rem .1rem 1rem;
}
.arche-session-bubble {
  width: fit-content;
  max-width: min(760px, 92%);
  border: 1px solid rgba(215,201,184,.9);
  border-radius: 22px;
  padding: .95rem 1.05rem;
  box-shadow: 0 14px 42px rgba(17,17,17,.09);
}
.arche-session-bubble p {
  margin: .18rem 0 0;
  color: inherit;
  white-space: pre-wrap;
}
.arche-session-speaker {
  font-size: .78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .12em;
  opacity: .78;
}
.arche-session-bubble.from-arche {
  background: rgba(255,250,241,.94);
  color: var(--charcoal);
}
.arche-session-bubble.from-user {
  justify-self: end;
  background: #1c1a17;
  color: #fff8ec;
  border-color: rgba(242,210,141,.32);
}
.arche-session-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: .85rem 0 1rem;
}
.arche-session-form input {
  border: 1px solid rgba(28,26,23,.26);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 12px 38px rgba(17,17,17,.10);
  padding: 1rem 1.15rem;
}
.arche-session-form button {
  border: 0;
  border-radius: 999px;
  padding: 1rem 1.25rem;
  font-weight: 950;
  background: var(--ink);
  color: white;
  cursor: pointer;
  box-shadow: 0 12px 35px rgba(17,17,17,.16);
}
@media (max-width: 760px) {
  .arche-session-topbar { align-items: flex-start; flex-direction: column; }
  .arche-session-actions { width: 100%; justify-content: stretch; }
  .arche-session-actions .button { flex: 1 1 auto; }
  .arche-session-main { width: min(100% - 24px, 980px); }
  .arche-session-form { width: min(100% - 24px, 980px); grid-template-columns: 1fr; }
  .arche-session-bubble { max-width: 96%; }
}

/* v3.2.8 ArchĒ chat bar hardening */
.arche-global-toggle { text-decoration: none; cursor: pointer; }
.arche-global-toggle:focus-visible,
.arche-global-form button:focus-visible,
.arche-session-form button:focus-visible,
.quick-chips button:focus-visible {
  outline: 3px solid #fff8ec;
  outline-offset: 3px;
}

/* v3.2.9 Internet Research Test Mode */
.research-hero {
  background:
    radial-gradient(circle at 80% 20%, rgba(154,107,36,.20), transparent 30%),
    linear-gradient(135deg, rgba(255,250,241,.86), rgba(236,226,210,.72));
}
.research-console {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 1.25rem;
  align-items: start;
}
.research-command-panel,
.research-output-panel {
  background: rgba(255,250,241,.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.research-command-panel form {
  display: grid;
  gap: .75rem;
}
.research-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: 1rem 0;
}
.research-chip-grid button {
  border: 1px solid var(--line);
  background: white;
  color: var(--charcoal);
  border-radius: 999px;
  padding: .55rem .75rem;
  font-weight: 850;
  cursor: pointer;
}
.research-chip-grid button:hover { background: var(--soft); }
.research-thread {
  min-height: 420px;
  max-height: 680px;
  overflow: auto;
  display: grid;
  gap: .8rem;
  align-content: start;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
}
.source-bubble ol { margin: .5rem 0 0; padding-left: 1.2rem; }
.source-bubble li { margin-bottom: .65rem; }
.source-bubble small { color: var(--muted); display: block; margin-top: .2rem; }
.research-status-list { display: grid; gap: .6rem; margin-top: .8rem; }
.research-status-list div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  padding: .75rem;
}
.research-status-list strong { display: block; }
.research-status-list span { color: var(--muted); }
@media (max-width: 820px) {
  .research-console { grid-template-columns: 1fr; }
  .research-thread { min-height: 320px; }
}


/* v3.2.10 Software license automation center */
.license-hero {
  background:
    radial-gradient(circle at 18% 18%, rgba(154,107,36,.20), transparent 30%),
    linear-gradient(135deg, rgba(20,25,32,.94), rgba(53,38,24,.88));
  color: #fff8ec;
}
.license-hero p { color: rgba(255,248,236,.82); }
.license-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .75rem;
  margin-top: 1rem;
}
.license-flow-step {
  border: 1px solid var(--line);
  background: rgba(255,250,241,.9);
  border-radius: 18px;
  padding: .9rem;
  min-height: 150px;
}
.license-flow-step strong { display: block; font-size: 1.05rem; margin-bottom: .35rem; }
.license-flow-step span { color: var(--muted); font-size: .94rem; }
.license-control-panel {
  background: rgba(255,250,241,.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.license-control-panel form { display: grid; gap: .8rem; }
.license-control-panel input,
.license-control-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .8rem .9rem;
  background: white;
  color: var(--charcoal);
  font: inherit;
}
.license-status-log {
  margin-top: .8rem;
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  padding: .75rem;
}
.license-status { border-bottom: 1px solid var(--line); padding: .55rem 0; color: var(--charcoal); }
.license-status:last-child { border-bottom: 0; }
.license-status.error { color: #8a2017; font-weight: 750; }
.env-table { width: 100%; border-collapse: collapse; margin-top: 1rem; background: white; border-radius: 18px; overflow: hidden; }
.env-table th, .env-table td { border: 1px solid var(--line); padding: .75rem; vertical-align: top; text-align: left; }
.env-table th { background: var(--soft); }
.code-card {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .9rem;
  background: #121820;
  color: #fff8ec;
  border-radius: 18px;
  padding: 1rem;
  overflow: auto;
}
@media (max-width: 980px) {
  .license-flow { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .license-flow { grid-template-columns: 1fr; }
}


/* v3.2.11 Research provider setup/status fix */
.research-provider-status {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  border-radius: 24px;
  padding: 24px;
  margin-top: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.14);
}
.research-provider-status.setup-needed {
  border-color: rgba(218,165,32,.52);
}
.research-provider-status.connected {
  border-color: rgba(111,207,151,.52);
}
.research-provider-status ol {
  margin: 16px 0 0 20px;
}
.research-provider-status li {
  margin: 8px 0;
}
.setup-code-block {
  display: block;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(0,0,0,.24);
  border: 1px solid rgba(255,255,255,.12);
  overflow-x: auto;
}


/* v3.2.12 ArchĒ persistent chat page repair */
body.arche-chat-page {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 10%, rgba(154,107,36,.20), transparent 28%),
    linear-gradient(145deg, #fffaf1 0%, #f1e7d9 48%, #1c1a17 100%);
}
body.arche-chat-page .site-header,
body.arche-chat-page .site-footer,
body.arche-chat-page .arche-global-bar { display: none !important; }
.arche-chat-app {
  min-height: 100vh;
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  color: var(--ink);
}
.arche-chat-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .85rem clamp(1rem, 3vw, 2rem);
  background: rgba(255,250,241,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(17,17,17,.06);
}
.arche-chat-brand {
  display: flex;
  gap: .75rem;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}
.arche-chat-brand .mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid var(--gold-dark);
  border-radius: 14px;
  color: var(--gold-dark);
  font-weight: 950;
}
.arche-chat-brand span:last-child { display: grid; line-height: 1.1; }
.arche-chat-brand small { color: var(--muted); font-weight: 750; font-size: .8rem; margin-top: .25rem; }
.arche-chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  justify-content: flex-end;
}
.arche-chat-main {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(1rem, 2.5vw, 1.75rem) 0 0;
}
.arche-chat-intro {
  background: rgba(255,250,241,.82);
  border: 1px solid rgba(215,201,184,.82);
  border-radius: 24px;
  box-shadow: 0 18px 55px rgba(17,17,17,.10);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.arche-chat-intro .eyebrow { margin-bottom: .25rem; }
.arche-chat-intro h1 { font-size: clamp(2rem, 4.5vw, 3.6rem); margin: 0 0 .3rem; }
.arche-chat-intro p { color: var(--muted); margin: 0; max-width: 850px; }
.arche-chat-thread {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: .9rem;
  padding: .25rem .15rem 1.25rem;
  scroll-behavior: smooth;
}
.arche-chat-message {
  width: fit-content;
  max-width: min(780px, 92%);
  border: 1px solid rgba(215,201,184,.90);
  border-radius: 22px;
  padding: .95rem 1.05rem;
  box-shadow: 0 14px 42px rgba(17,17,17,.09);
  white-space: normal;
}
.arche-chat-message p { margin: .18rem 0 0; white-space: pre-wrap; }
.arche-chat-speaker {
  font-size: .78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .12em;
  opacity: .78;
}
.arche-chat-message.from-arche { background: rgba(255,250,241,.95); color: var(--charcoal); }
.arche-chat-message.from-user {
  justify-self: end;
  background: #1c1a17;
  color: #fff8ec;
  border-color: rgba(242,210,141,.32);
}
.arche-chat-message.source-message { max-width: min(860px, 96%); }
.arche-chat-message ol { margin: .5rem 0 0 1.2rem; padding: 0; }
.arche-chat-message a { color: var(--gold-dark); font-weight: 800; }
.arche-chat-form-wrap {
  background: rgba(255,250,241,.94);
  border-top: 1px solid var(--line);
  box-shadow: 0 -14px 40px rgba(17,17,17,.08);
  padding: .8rem clamp(1rem, 3vw, 2rem) .95rem;
}
.arche-chat-form {
  width: min(1040px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
}
.arche-chat-form input {
  border: 1px solid rgba(28,26,23,.26);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 12px 38px rgba(17,17,17,.10);
  padding: 1rem 1.15rem;
  min-height: 52px;
}
.arche-chat-form button {
  border: 0;
  border-radius: 999px;
  padding: 1rem 1.25rem;
  min-height: 52px;
  font-weight: 950;
  background: var(--ink);
  color: white;
  cursor: pointer;
  box-shadow: 0 12px 35px rgba(17,17,17,.16);
}
.arche-chat-help {
  width: min(1040px, 100%);
  margin: .45rem auto 0;
  color: var(--muted);
  font-size: .84rem;
}
@media (max-width: 760px) {
  body.arche-chat-page { overflow: hidden; }
  .arche-chat-topbar { align-items: flex-start; flex-direction: column; }
  .arche-chat-actions { width: 100%; }
  .arche-chat-actions .button { flex: 1 1 auto; }
  .arche-chat-main { width: min(100% - 24px, 1040px); padding-top: .75rem; }
  .arche-chat-intro { padding: .85rem; }
  .arche-chat-message { max-width: 96%; }
  .arche-chat-form { grid-template-columns: 1fr; }
  .arche-chat-form-wrap { padding: .7rem .75rem .85rem; }
}

/* v3.2.13 safe research diagnostics */
.diagnostic-panel { margin: 1rem 0; padding: 1rem; border: 1px solid rgba(118, 91, 58, 0.25); border-radius: 18px; background: rgba(255,255,255,0.72); overflow-x: auto; }
.diagnostic-panel table { width: 100%; border-collapse: collapse; margin-top: .75rem; font-size: .92rem; }
.diagnostic-panel th, .diagnostic-panel td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid rgba(118, 91, 58, 0.18); vertical-align: top; }
.diagnostic-panel code { white-space: nowrap; }

/* v3.2.14: Tavily key-shape auto-normalizer status support. */

/* v3.2.16: Research function performance hardening, timed provider calls, short durable cache on public status checks, and actual search-endpoint provider test. */


/* v3.2.17: Research Answer Quality Repair — readable research briefs, source-quality labels, deduped sources, and official-source preference. */
.source-quality-pill {
  display: inline-flex;
  align-items: center;
  margin: 0 .35rem .2rem 0;
  padding: .16rem .42rem;
  border-radius: 999px;
  border: 1px solid rgba(108, 77, 26, .22);
  background: rgba(255, 250, 241, .78);
  color: var(--charcoal);
  font-size: .75rem;
  font-weight: 800;
}
.source-domain-line {
  display: block;
  margin: .18rem 0 .28rem;
  color: var(--muted);
  font-size: .85rem;
}
.source-message li,
.source-bubble li { margin-bottom: .7rem; }
.research-thread .source-bubble small,
.arche-chat-message.source-message small { display: block; margin-top: .18rem; line-height: 1.45; }

/* v3.2.20 ArchE AI OS backend/runtime status */
.arche-runtime-status {
  margin: 1rem 0 0;
  border: 1px solid var(--line, rgba(255,255,255,.14));
  border-radius: 1rem;
  padding: .9rem 1rem;
  background: rgba(255,255,255,.045);
  font-size: .95rem;
}
.arche-runtime-status strong { display: block; margin-bottom: .25rem; }
.arche-runtime-status small { display: block; opacity: .76; line-height: 1.45; }
.arche-runtime-status.connected { border-color: rgba(92, 214, 160, .55); }
.arche-runtime-status.partial { border-color: rgba(255, 205, 92, .55); }
.arche-runtime-status.offline { border-color: rgba(255, 120, 120, .5); }
.arche-chat-message .runtime-line { display:block; margin-top:.35rem; opacity:.72; font-size:.85rem; }


/* v3.2.20 ArchE OS Runtime Bridge */
.runtime-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.runtime-card { border: 1px solid rgba(255,255,255,.14); border-radius: 1rem; padding: 1rem; background: rgba(255,255,255,.045); }
.runtime-card strong { display:block; font-size: 1rem; margin-bottom:.35rem; }
.runtime-card .status-pill { display:inline-flex; align-items:center; gap:.4rem; margin:.35rem 0 .5rem; padding:.25rem .55rem; border-radius:999px; font-size:.83rem; border:1px solid rgba(255,255,255,.18); }
.status-pill.ready { background: rgba(62, 180, 137, .14); }
.status-pill.pending { background: rgba(235, 190, 84, .12); }
.status-pill.off { background: rgba(180, 80, 80, .12); }
.env-table { width:100%; border-collapse: collapse; margin-top:1rem; overflow:hidden; border-radius: 1rem; }
.env-table th, .env-table td { text-align:left; border-bottom:1px solid rgba(255,255,255,.12); padding:.75rem; vertical-align: top; }
.env-table th { font-size:.86rem; letter-spacing:.03em; text-transform:uppercase; opacity:.82; }
.env-table code { white-space: nowrap; }
.runtime-status-box { border: 1px solid rgba(255,255,255,.16); border-radius: 1rem; padding: 1rem; background: rgba(0,0,0,.16); margin-top: 1rem; }
.runtime-status-box pre { white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow:auto; }
.setup-steps li { margin: .45rem 0; }
.bridge-note { border-left:4px solid currentColor; padding:.75rem 1rem; background: rgba(255,255,255,.05); border-radius:.5rem; }
