:root {
  --cream: #f3efe8;
  --cream-deep: #ebe4d9;
  --taupe: #8a7f72;
  --taupe-muted: #a39a8f;
  --ink: #2a3428;
  --ink-soft: #4a5548;
  --muted: #6b7568;
  --line: #ddd5c8;
  --line-soft: #e8e2d8;
  --wash: #eae6de;
  --card: #faf8f4;
  --accent: #2456b8;
  --accent-deep: #243d61;
  --accent-wash: #eef3fc;
  --warn: #916a25;
  --warn-bg: #f8f0df;
  --client-accent: #246e63;
  --client-wash: #eaf2ed;
  --shadow: 0 24px 70px rgb(42 52 40 / 0.08), 0 0 0 1px rgb(221 213 200 / 0.7);
  --radius: 14px;
  --radius-sm: 9px;
  --font-display: "Fraunces", "Georgia", serif;
  --font-ui: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { font-synthesis: none; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: linear-gradient(165deg, #f7f4ee 0%, var(--cream) 45%, #ebe8e0 100%);
  min-height: 100dvh;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; display: block; }
code { font-size: 0.92em; background: var(--wash); padding: 2px 6px; border-radius: 4px; }
svg {
  width: 20px; height: 20px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}

.concept-header {
  max-width: 1440px; margin: auto; padding: 24px 40px;
  display: flex; align-items: center; gap: 24px;
  border-bottom: 1px solid var(--line);
}
.wordmark { display: flex; align-items: center; gap: 10px; font-size: 17px; letter-spacing: -0.04em; }
.wordmark b { font-weight: 500; }
.edition { font-size: 10px; letter-spacing: 0.18em; color: var(--taupe); margin-left: auto; }
.site-link { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.site-link svg { width: 16px; height: 16px; }

.concept { max-width: 1380px; margin: auto; padding: 48px 40px 40px; }
.intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; margin-bottom: 28px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 10px; font-weight: 600; color: var(--taupe);
}
.intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500; letter-spacing: -0.03em;
  line-height: 1.12; margin-top: 12px;
}
.intro-copy { max-width: 340px; color: var(--muted); font-size: 14px; line-height: 1.75; }

.demo-controls {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
  margin-bottom: 28px;
}
.layout-picker {
  display: flex; gap: 4px; padding: 4px;
  background: var(--cream-deep); border-radius: var(--radius-sm);
}
.layout-picker button {
  font-size: 12px; padding: 8px 14px; border-radius: 7px; min-height: 36px;
}
.layout-picker button[aria-pressed="true"] {
  background: var(--card); box-shadow: 0 1px 4px rgb(42 52 40 / 0.06);
}
.demo-caption { font-size: 11px; color: var(--muted); }
.reset-demo {
  margin-left: auto; font-size: 11px; text-decoration: underline;
  text-underline-offset: 4px; color: var(--taupe);
}

.desktop-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
}
.desktop-stage[data-layout="studio"] .frame-wrap:last-child,
.desktop-stage[data-layout="client"] .frame-wrap:first-child {
  display: none;
}
.desktop-stage[data-layout="studio"],
.desktop-stage[data-layout="client"] {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
}

.frame-label {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 0 4px 12px; font-size: 13px;
}
.frame-label b { font-size: 10px; font-weight: 500; opacity: 0.55; margin-right: 8px; }
.frame-label small { font-size: 10px; color: var(--muted); }

.desktop-frame {
  --frame-accent: var(--accent);
  --frame-wash: var(--accent-wash);
  --frame-ink: var(--ink);
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-template-rows: auto minmax(420px, 520px);
  background: var(--card);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: var(--frame-ink);
}
.desktop-frame.studio {
  --frame-accent: var(--accent);
  --frame-wash: var(--accent-wash);
}
.desktop-frame.client {
  --frame-accent: var(--client-accent);
  --frame-wash: var(--client-wash);
}

.frame-sidebar {
  grid-row: 1 / 3;
  background: linear-gradient(180deg, #faf7f2 0%, #f0ebe3 100%);
  border-right: 1px solid var(--line-soft);
  padding: 22px 14px 18px;
  display: flex; flex-direction: column;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 10px 20px; font-size: 14px; letter-spacing: -0.02em;
}
.sidebar-brand img { width: 26px; height: 26px; }
.sidebar-brand em { font-style: normal; font-weight: 600; color: var(--frame-accent); }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav button {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; border-radius: var(--radius-sm);
  font-size: 12px; color: var(--muted); text-align: left;
  position: relative;
}
.sidebar-nav button svg { width: 18px; height: 18px; opacity: 0.85; }
.sidebar-nav button[aria-current="page"] {
  background: var(--frame-wash); color: var(--frame-accent); font-weight: 500;
}
.sidebar-nav button[aria-current="page"]::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; background: var(--frame-accent); border-radius: 0 2px 2px 0;
}
.sidebar-nav .badge {
  margin-left: auto; font-size: 9px; font-weight: 600;
  background: var(--warn-bg); color: var(--warn);
  padding: 3px 6px; border-radius: 99px;
}

.sidebar-foot {
  margin-top: auto; padding: 18px 10px 4px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px; color: var(--muted); line-height: 1.65;
}
.live-dot {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; color: var(--frame-accent); margin-bottom: 8px;
}
.live-dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--frame-accent); opacity: 0.75;
}

.frame-main {
  grid-column: 2; grid-row: 1 / 3;
  display: flex; flex-direction: column; min-width: 0;
  background: #fdfbf7;
}
.client .frame-main { background: #fcfaf6; }

.frame-topbar {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid var(--line-soft);
  background: rgb(253 251 247 / 0.92);
}
.frame-topbar h2 {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 500; letter-spacing: -0.02em;
}
.frame-topbar p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--frame-wash); color: var(--frame-accent);
  font-size: 10px; font-weight: 600;
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center;
}
.icon-btn:hover { background: var(--wash); }

.frame-body {
  flex: 1; min-height: 0; overflow: auto;
  padding: 22px 22px 28px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}

.page-lead { margin-bottom: 20px; }
.page-lead h3 {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 500; letter-spacing: -0.03em;
}
.page-lead p { font-size: 12px; color: var(--muted); margin-top: 6px; }

.grid-2 {
  display: grid; grid-template-columns: minmax(0, 1fr) 240px;
  gap: 18px;
}
.panel {
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 16px 18px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.panel-head h4 { font-size: 13px; font-weight: 600; }
.panel-head .linkish { font-size: 11px; color: var(--frame-accent); }

.stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 18px;
}
.stat {
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 14px 16px;
}
.stat strong {
  display: block; font-family: var(--font-display);
  font-size: 1.65rem; font-weight: 500; letter-spacing: -0.03em;
}
.stat small { font-size: 10px; color: var(--muted); }

.hero-strip {
  background: linear-gradient(135deg, var(--accent-deep) 0%, #1d314c 100%);
  color: #f5f2eb; border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 18px;
  display: grid; grid-template-columns: 1fr auto; gap: 12px 20px; align-items: end;
}
.studio .hero-strip.studio-spotlight {
  background: linear-gradient(135deg, #243d61 0%, #1d314c 100%);
}
.client .hero-strip {
  background: linear-gradient(135deg, #234e43 0%, #246e63 100%);
}
.segment-bar {
  display: flex; gap: 20px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
.segment-bar button {
  font-size: 11px; color: var(--muted); padding: 10px 0 12px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.segment-bar button.active {
  color: var(--frame-accent); border-bottom-color: var(--frame-accent); font-weight: 500;
}
.hero-strip .overline {
  grid-column: 1 / -1; font-size: 9px; letter-spacing: 0.12em;
  text-transform: uppercase; opacity: 0.75;
}
.hero-strip h3 {
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 500; letter-spacing: -0.02em;
  max-width: 280px;
}
.hero-strip p { font-size: 12px; opacity: 0.88; line-height: 1.65; max-width: 320px; }
.hero-strip .btn-light {
  grid-row: 2 / 4; grid-column: 2; align-self: end;
  background: #faf8f4; color: var(--accent-deep);
  padding: 10px 16px; border-radius: 8px; font-size: 11px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}

.queue-list, .bookmark-list { list-style: none; margin: 0; padding: 0; }
.queue-item, .bookmark-item {
  width: 100%; text-align: left;
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
}
.queue-item:last-child, .bookmark-item:last-child { border-bottom: 0; }
.queue-item strong, .bookmark-item strong { font-size: 12px; font-weight: 500; display: block; }
.queue-item p, .bookmark-item p { font-size: 11px; color: var(--muted); margin-top: 3px; }
.queue-item time, .bookmark-item .meta { margin-left: auto; font-size: 9px; color: var(--taupe-muted); white-space: nowrap; }
.tag {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 4px 7px; border-radius: 5px; background: var(--frame-wash);
  color: var(--frame-accent);
}
.tag.new { background: var(--warn-bg); color: var(--warn); }

.project-row {
  width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 16px 18px;
  margin-bottom: 10px; transition: border-color 0.2s, transform 0.2s;
}
.project-row:hover { border-color: var(--frame-accent); transform: translateY(-1px); }
.project-row-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.project-row h4 {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 500; margin: 10px 0 8px;
}
.status-pill {
  font-size: 9px; display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px; border-radius: 99px; background: var(--frame-wash); color: var(--frame-accent);
}
.status-pill.waiting { background: var(--warn-bg); color: var(--warn); }
.status-pill::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }

.progress { display: flex; gap: 4px; margin-top: 8px; }
.progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--line-soft); }
.progress .done { background: var(--frame-accent); }
.progress .current { background: var(--frame-accent); opacity: 0.45; }

.project-detail .detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 10px 16px; border-radius: 8px;
  font-size: 12px; font-weight: 500;
}
.btn-primary { background: var(--frame-accent); color: #fff; }
.btn-primary:hover { filter: brightness(0.94); }
.btn-secondary { background: #fff; border: 1px solid var(--line); color: var(--frame-accent); }

.timeline { list-style: none; padding: 0; margin: 16px 0 0; }
.timeline li {
  display: flex; gap: 12px; padding-bottom: 18px; position: relative;
}
.timeline li:not(:last-child)::before {
  content: ""; position: absolute; left: 13px; top: 28px; bottom: 0;
  width: 1px; background: var(--line-soft);
}
.step-dot {
  width: 28px; height: 28px; flex: none; border-radius: 8px;
  border: 1px solid var(--line-soft); background: #fff;
  display: grid; place-items: center; font-size: 10px; color: var(--muted);
}
.step-dot svg { width: 14px; height: 14px; }
.timeline .complete .step-dot { background: var(--frame-wash); color: var(--frame-accent); border-color: transparent; }
.timeline .active .step-dot { background: var(--frame-accent); color: #fff; border-color: transparent; }
.step-copy strong { font-size: 12px; }
.step-copy p { font-size: 11px; color: var(--muted); margin-top: 3px; }

.decision-card {
  background: var(--warn-bg); border: 1px solid #e8dcc4;
  border-radius: var(--radius-sm); padding: 18px; margin-top: 16px;
}
.decision-card.approved { background: var(--frame-wash); border-color: var(--line-soft); }
.decision-card .overline { font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--warn); }
.decision-card.approved .overline { color: var(--frame-accent); }
.decision-card h4 { font-family: var(--font-display); font-size: 1.1rem; margin: 8px 0; }
.decision-card p { font-size: 12px; color: var(--ink-soft); line-height: 1.65; }
.decision-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.decision-actions .btn { flex: 1; min-width: 120px; }
.btn-decline { background: #fff; border: 1px solid var(--line); color: var(--muted); }

.cover {
  height: 140px; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--wash); margin-bottom: 14px; position: relative;
}
.cover img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.65); }
.cover span {
  position: absolute; left: 12px; bottom: 10px; font-size: 10px; color: #fff;
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.4);
}

.material-grid { display: grid; gap: 10px; }
.material {
  width: 100%; text-align: left; display: flex; gap: 12px; align-items: center;
  padding: 14px 16px; background: #fff; border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}
.material-icon {
  width: 42px; height: 46px; border-radius: 8px;
  background: var(--frame-wash); color: var(--frame-accent);
  display: grid; place-items: center;
}
.material strong { font-size: 12px; }
.material p { font-size: 10px; color: var(--muted); margin-top: 4px; }
.material > svg { margin-left: auto; width: 16px; color: var(--taupe); }

.chat-thread { max-width: 100%; }
.thread-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: var(--frame-wash);
  border-radius: 8px; font-size: 11px; color: var(--frame-accent); margin-bottom: 14px;
}
.message { margin: 14px 0; display: flex; flex-direction: column; align-items: flex-start; }
.message.mine { align-items: flex-end; }
.message .who { font-size: 9px; color: var(--muted); margin-bottom: 4px; }
.bubble {
  max-width: 88%; padding: 12px 14px; font-size: 12px; line-height: 1.6;
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: 12px 12px 12px 4px;
}
.message.mine .bubble {
  background: var(--frame-wash); border-color: transparent;
  border-radius: 12px 12px 4px 12px;
}
.message time { font-size: 9px; color: var(--muted); margin-top: 4px; }

.composer {
  margin-top: 16px; padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.composer-box {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 8px; background: #fff; border: 1px solid var(--line-soft);
  border-radius: 12px;
}
.composer textarea {
  flex: 1; border: 0; resize: none; background: none;
  font-size: 12px; min-height: 44px; padding: 8px 6px;
}
.composer .send {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--frame-accent); color: #fff;
  display: grid; place-items: center;
}
.form-hint { font-size: 9px; color: var(--muted); margin-top: 6px; }

.empty { text-align: center; padding: 32px 16px; color: var(--muted); font-size: 12px; }

.back-bar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-size: 12px; color: var(--frame-accent);
}

.walkthrough {
  margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.walkthrough > .eyebrow { grid-column: 1 / -1; }
.walkthrough p { font-size: 12px; color: var(--muted); line-height: 1.75; }
.walkthrough b { display: block; font-size: 10px; margin-bottom: 6px; color: var(--accent); }

.prototype-note { font-size: 10px; color: var(--taupe); line-height: 1.75; margin-top: 16px; max-width: 720px; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 12px);
  opacity: 0; pointer-events: none; z-index: 30;
  background: var(--accent-deep); color: #f5f2eb;
  padding: 12px 18px; border-radius: 10px; font-size: 12px;
  box-shadow: 0 12px 40px rgb(42 52 40 / 0.2);
  transition: opacity 0.25s, transform 0.25s;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

dialog {
  width: min(480px, calc(100% - 28px)); border: 0; padding: 24px;
  border-radius: 16px; background: var(--card); color: var(--ink);
  box-shadow: 0 30px 80px rgb(42 52 40 / 0.25);
}
dialog::backdrop { background: rgb(42 52 40 / 0.45); backdrop-filter: blur(4px); }
.sheet-head { display: flex; gap: 12px; margin-bottom: 16px; }
.sheet-head h2 { font-family: var(--font-display); font-size: 1.35rem; }
.sheet-copy { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 12px 0 18px; }
.preview-img { width: 100%; border-radius: 8px; border: 1px solid var(--line-soft); }

@media (max-width: 1100px) {
  .desktop-stage[data-layout="both"] {
    grid-template-columns: 1fr;
  }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .concept-header { padding: 16px 18px; }
  .edition { display: none; }
  .concept { padding: 24px 18px; }
  .intro { flex-direction: column; align-items: flex-start; gap: 16px; }
  .demo-controls { gap: 10px; }
  .reset-demo { margin-left: 0; }
  .desktop-frame {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(360px, 1fr);
  }
  .frame-sidebar {
    grid-row: 3; grid-column: 1;
    flex-direction: row; flex-wrap: wrap; align-items: center;
    padding: 8px 10px; border-right: 0; border-top: 1px solid var(--line-soft);
  }
  .sidebar-brand, .sidebar-foot { display: none; }
  .sidebar-nav { flex-direction: row; flex: 1; overflow-x: auto; }
  .sidebar-nav button { flex: 1; flex-direction: column; font-size: 9px; padding: 8px 4px; gap: 4px; }
  .sidebar-nav button[aria-current="page"]::before {
    top: 0; left: 50%; transform: translateX(-50%); width: 20px; height: 2px;
  }
  .frame-main { grid-column: 1; grid-row: 1 / 3; }
  .walkthrough { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .screen-enter { animation: fade-up 0.35s ease; }
  @keyframes fade-up {
    from { opacity: 0.2; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
  }
}
