/* ==========================================================================
   js.17 — the workshop (dashboard.html)
   An app shell: a quiet sidebar, one composer, and the sites it has made.
   Formal and plain on purpose. One family (Geist), one weight for emphasis,
   colour only where it carries meaning (status, focus, the greeting's full stop).
   ========================================================================== */

:root {
  --bg: #f5f3ef;
  --side: #faf9f6;
  --card: #ffffff;
  --sunk: #efece6;

  --ink: #161514;
  --ink-2: #45413c;
  --muted: #6e6a63;        /* 4.8:1 on --bg, the floor for small text */
  --placeholder: #7f7a73;

  --line: #e7e3dc;
  --line-2: #d8d2c8;
  --hover: #efece6;
  --active: #e9e5de;

  --accent: #8b6b3d;       /* bronze: the greeting's full stop, focus, the plan mark */
  --accent-soft: #f3ece0;
  --live: #2f6b4f;
  --live-soft: #e3efe8;
  --draft: #7a5719;
  --draft-soft: #f6ecd9;
  --danger: #9f3b26;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-card: 0 1px 2px rgba(22, 21, 20, .04), 0 10px 30px -18px rgba(22, 21, 20, .22);
  --shadow-pop: 0 1px 2px rgba(22, 21, 20, .06), 0 16px 40px -12px rgba(22, 21, 20, .24);

  --font: "Geist", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --display: "Cormorant Garamond", "Iowan Old Style", Garamond, "Times New Roman", serif;   /* the greeting only */
  --side-w: 264px;
  --side-w-min: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
/* A component's own display rule outranks the browser's [hidden] { display: none }. */
[hidden] { display: none !important; }

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body { margin: 0; min-height: 100dvh; background: var(--bg); font-size: .9375rem; line-height: 1.5; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: fixed; top: 12px; left: 50%; z-index: 100;
  transform: translate(-50%, -160%);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 500; font-size: .875rem; transition: transform .2s var(--ease);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* The cloud transition from sign-in lands on this colour (js/transition.js). */
.nct-veil { position: fixed; inset: 0; z-index: 19999; background: var(--bg); }
html:not(.js) .nct-veil { display: none; }

/* Icons: one stroke weight everywhere */
.i {
  width: 20px; height: 20px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.i--sm { width: 16px; height: 16px; }

/* ==========================================================================
   Controls
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-size: .875rem; font-weight: 500; line-height: 1; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, opacity .15s;
}
.btn .i { width: 18px; height: 18px; }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #2c2a27; }
.btn--ghost { border-color: var(--line-2); color: var(--ink); background: var(--card); }
.btn--ghost:hover { background: var(--hover); }
.btn--sm { height: 32px; padding: 0 12px; font-size: .8125rem; }
.btn[aria-busy="true"] { cursor: progress; opacity: .75; }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .45; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: 9px; color: var(--ink-2); transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn--sm { width: 28px; height: 28px; }
.icon-btn--sm .i { width: 16px; height: 16px; }

.link-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .875rem; font-weight: 500; color: var(--ink);
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;
  transition: text-decoration-color .15s;
}
.link-btn:hover { text-decoration-color: currentColor; }

.eyebrow { font-size: .8125rem; color: var(--muted); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
  border-radius: 999px; background: var(--hover); color: var(--ink-2);
  font-size: .75rem; font-weight: 500; white-space: nowrap;
}
.badge--live { background: var(--live-soft); color: var(--live); }
.badge--live::before, .badge--draft::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.badge--draft { background: var(--draft-soft); color: var(--draft); }
.badge--sample { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }

.btn-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ==========================================================================
   Shell
   ========================================================================== */
.ws {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100dvh;
  transition: grid-template-columns .25s var(--ease);
}
html.side-collapsed .ws { grid-template-columns: var(--side-w-min) minmax(0, 1fr); }

.main { min-width: 0; display: flex; flex-direction: column; min-height: 100dvh; }
.views { flex: 1; display: flex; flex-direction: column; }

/* ==========================================================================
   Sidebar
   ========================================================================== */
.side {
  position: sticky; top: 0; height: 100dvh;
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 12px 12px;
  background: var(--side);
  border-right: 1px solid var(--line);
  overflow: hidden;
  z-index: 40;
}

.side__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 0 2px 0 6px; }
.side__close { display: none; }

.brand { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.brand__mark { display: inline-grid; place-items: center; width: 26px; height: 26px; color: var(--ink); flex-shrink: 0; }
.brand__mark svg { width: 26px; height: 26px; }
.brand__word { font-size: 1.125rem; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }

.side__new {
  display: flex; align-items: center; gap: 10px;
  height: 38px; margin: 10px 0 8px; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--card);
  font-size: .9375rem; font-weight: 500; white-space: nowrap;
  transition: background-color .15s, border-color .15s;
}
.side__new:hover { background: var(--hover); }

.side__nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px;
  height: 38px; padding: 0 12px; border-radius: 9px;
  font-size: .9375rem; color: var(--ink-2); white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.nav-item:hover { background: var(--hover); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--active); color: var(--ink); font-weight: 500; }
.nav-item__count { margin-left: auto; font-size: .75rem; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-item__dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--live); }

.side__sites { margin-top: 18px; min-height: 0; display: flex; flex-direction: column; flex: 1; }
.side__heading { padding: 0 12px 6px; font-size: .8125rem; color: var(--muted); }
.side__empty { padding: 2px 12px; font-size: .8125rem; color: var(--muted); }
.site-list { overflow-y: auto; min-height: 0; margin: 0 -4px; padding: 0 4px; }
.site-item { position: relative; display: flex; align-items: center; border-radius: 8px; transition: background-color .15s; }
.site-item:hover, .site-item:focus-within, .site-item.is-menu-open { background: var(--hover); }
.site-item[aria-current="page"] { background: var(--active); }
.site-item__link {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  height: 34px; padding: 0 4px 0 12px;
  font-size: .875rem; color: var(--ink-2);
}
.site-item:hover .site-item__link, .site-item[aria-current="page"] .site-item__link { color: var(--ink); }
.site-item__dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: var(--line-2); }
.site-item__dot.is-draft { background: var(--draft); }
.site-item__dot.is-live { background: var(--live); }
.site-item__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-item__more { opacity: 0; margin-right: 2px; }
.site-item:hover .site-item__more, .site-item:focus-within .site-item__more, .site-item.is-menu-open .site-item__more { opacity: 1; }
@media (hover: none) { .site-item__more { opacity: 1; } }
.site-item__rename {
  flex: 1; min-width: 0; height: 32px; margin: 1px 4px; padding: 0 9px;
  border: 1px solid var(--accent); border-radius: 7px; background: var(--card);
  font-size: .875rem; outline: none; box-shadow: 0 0 0 3px rgba(139, 107, 61, .14);
}
.site-item.is-new { animation: site-in .35s var(--ease); }
@keyframes site-in { from { opacity: 0; transform: translateY(-4px); } }

.side__end { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; }

.plan-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--card);
  transition: border-color .15s;
}
.plan-card:hover { border-color: var(--line-2); }
.plan-card__text { display: flex; flex-direction: column; min-width: 0; }
.plan-card__title { font-size: .875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-card__sub { font-size: .8125rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-card__icon { margin-left: auto; color: var(--accent); }

.account-wrap { position: relative; }
.account {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 8px; border-radius: 10px; text-align: left;
  transition: background-color .15s;
}
.account:hover, .account[aria-expanded="true"] { background: var(--hover); }
.avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 9px; background: #e6dfd2; color: var(--ink);
  font-size: .875rem; font-weight: 600;
}
.avatar__mark svg { width: 18px; height: 18px; }
.account__text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.account__name { font-size: .875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account__sub { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account__chev { color: var(--muted); width: 16px; height: 16px; }

.menu {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 50;
  min-width: 232px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  animation: pop .16s var(--ease);
}
.menu__head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu__name { font-size: .875rem; font-weight: 600; }
.menu__plan { font-size: .8125rem; color: var(--muted); }
.menu__list--end { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.menu__item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  height: 36px; padding: 0 10px; border-radius: 8px;
  font-size: .875rem; color: var(--ink-2); text-align: left;
}
.menu__item .i { width: 18px; height: 18px; color: var(--muted); }
.menu__item:hover, .menu__item:focus-visible { background: var(--hover); color: var(--ink); outline-offset: -2px; }
.menu__item--danger:hover, .menu__item--danger:focus-visible { color: var(--danger); }
.menu__item--danger:hover .i { color: var(--danger); }
.menu--site { position: fixed; left: 0; right: auto; bottom: auto; top: 0; width: 220px; min-width: 0; z-index: 70; }
.menu__confirm { padding: 8px 8px 6px; border-top: 1px solid var(--line); margin-top: 6px; }
.menu__confirm-text { font-size: .8125rem; color: var(--ink-2); margin-bottom: 10px; }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #86301e; }

@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.98); } }

/* Collapsed: an icon rail. Labels leave the layout but stay in the accessibility tree. */
html.side-collapsed .side { padding-left: 10px; padding-right: 10px; }
html.side-collapsed .side__label {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
html.side-collapsed .side__top { flex-direction: column; padding: 0; gap: 10px; }
html.side-collapsed .brand__word { display: none; }
html.side-collapsed .side__collapse .i { transform: scaleX(-1); }
html.side-collapsed .side__new,
html.side-collapsed .nav-item { justify-content: center; padding: 0; }
html.side-collapsed .nav-item__count { display: none; }
html.side-collapsed .nav-item__dot { position: absolute; top: 8px; right: 12px; margin: 0; }
html.side-collapsed .side__sites { display: none; }
html.side-collapsed .plan-card { justify-content: center; padding: 10px 0; }
html.side-collapsed .plan-card__text { display: none; }
html.side-collapsed .plan-card__icon { margin: 0; }
html.side-collapsed .account { justify-content: center; padding: 7px 0; }
html.side-collapsed .menu { right: auto; width: 240px; }

.scrim { display: none; }

/* ==========================================================================
   Topbar (below 900px only) and notice
   ========================================================================== */
.topbar {
  display: none; position: sticky; top: 0; z-index: 30;
  align-items: center; justify-content: space-between; gap: 8px;
  height: 56px; padding: 0 12px;
  background: rgba(245, 243, 239, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.notice {
  display: flex; align-items: center; gap: 10px;
  width: fit-content; max-width: calc(100% - 32px);
  margin: 18px auto 0; padding: 7px 7px 7px 10px;
  border-radius: var(--radius); background: var(--accent-soft); border: 1px solid #e8dcc8;
}
.notice__text { display: flex; align-items: center; gap: 10px; font-size: .875rem; color: var(--ink-2); }
.notice__tag {
  flex-shrink: 0; padding: 2px 8px; border-radius: 6px; background: var(--card);
  font-size: .75rem; font-weight: 600; color: #6b5230;
}

/* ==========================================================================
   Home
   ========================================================================== */
.view { flex: 1; }
.home { display: flex; flex-direction: column; }

.home__hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(56px, 14vh, 150px) 24px 32px;
}

.greet {
  display: flex; flex-direction: column;
  margin-bottom: clamp(28px, 4.2vh, 44px);
  font-family: var(--display);
  font-size: clamp(2.75rem, 5.2vw, 4.75rem);
  font-weight: 500; line-height: 1.02; letter-spacing: -.015em;
  font-kerning: normal; font-feature-settings: "liga", "kern";
  outline: none;
}
.greet__name { font-style: italic; font-weight: 500; }
.greet__dot { color: var(--accent); }
.greet__line--ask { color: var(--ink); }

/* Composer */
.composer {
  position: relative; width: min(100%, 780px); text-align: left;
  padding: 16px 14px 12px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: border-color .2s, box-shadow .2s;
}
.composer:focus-within { border-color: #cdbfa6; box-shadow: 0 0 0 4px rgba(139, 107, 61, .10), var(--shadow-card); }
.composer.is-invalid { border-color: var(--danger); }

.composer__input {
  display: block; width: 100%; min-height: 56px; max-height: 232px;
  padding: 2px 4px 0 0; border: 0; resize: none; background: transparent;
  font-size: 1.0625rem; line-height: 1.55; color: var(--ink);
  outline: none;
}
.composer__input::placeholder { color: var(--placeholder); }

.composer__hint:empty, .composer__error:empty { display: none; }
.composer__hint { margin-top: 6px; font-size: .8125rem; color: var(--muted); }
.composer__error { margin-top: 6px; font-size: .8125rem; color: var(--danger); }

.composer__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.composer__start, .composer__end { display: flex; align-items: center; gap: 6px; min-width: 0; }
.composer__rule { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.composer__source {
  display: inline-flex; align-items: center; gap: 6px; max-width: 240px;
  font-size: .8125rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.composer__source .i { width: 15px; height: 15px; }

.tool {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; min-width: 36px; padding: 0 8px; border-radius: 10px;
  color: var(--ink-2); font-size: .9375rem; font-weight: 500;
  transition: background-color .15s, color .15s;
}
.tool:hover, .tool[aria-expanded="true"] { background: var(--hover); color: var(--ink); }
.tool--text { padding: 0 10px 0 12px; }

.send {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--ink); color: #fff;
  transition: background-color .15s, transform .15s;
}
.send:hover:not(:disabled) { background: #2c2a27; }
.send:active:not(:disabled) { transform: scale(.96); }
.send:disabled { background: #ece8e1; color: #9d978e; cursor: not-allowed; }
.send .i { width: 18px; height: 18px; stroke-width: 1.9; }

/* Kind picker */
.pick { position: relative; }
.pick__menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 20;
  width: 272px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  animation: pop .16s var(--ease);
}
.pick__item {
  display: grid; grid-template-columns: 20px 1fr 18px; align-items: center; gap: 12px;
  width: 100%; padding: 9px 10px; border-radius: 8px; text-align: left;
}
.pick__item:hover, .pick__item:focus-visible { background: var(--hover); outline-offset: -2px; }
.pick__item > .i:first-child { color: var(--ink-2); }
.pick__title { display: block; font-size: .875rem; font-weight: 500; }
.pick__desc { display: block; font-size: .8125rem; color: var(--muted); }
.pick__check { width: 18px; height: 18px; color: var(--ink); visibility: hidden; }
.pick__item[aria-checked="true"] .pick__check { visibility: visible; }

/* Building */
.composer[data-state="building"] { padding: 18px 18px 16px; }
.build__head { display: flex; align-items: center; gap: 12px; }
.build__title { flex: 1; display: flex; flex-direction: column; min-width: 0; font-size: 1rem; font-weight: 500; }
.build__from { font-size: .8125rem; font-weight: 400; color: var(--muted); }
.build__spinner {
  width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%;
  border: 2px solid var(--line-2); border-top-color: var(--ink);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.build__track { height: 3px; margin: 16px 0 14px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.build__fill { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 3px; transition: width .8s var(--ease); }
.build__steps { display: grid; gap: 8px; }
.build__step { display: flex; align-items: center; gap: 10px; font-size: .875rem; color: var(--muted); }
.build__step .i { width: 16px; height: 16px; }
.build__step-mark { display: inline-grid; place-items: center; width: 18px; height: 18px; }
.build__step-mark::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.build__step.is-current { color: var(--ink); }
.build__step.is-current .build__step-mark::before { background: var(--ink); box-shadow: 0 0 0 4px rgba(22, 21, 20, .08); }
.build__step.is-done { color: var(--ink-2); }
.build__step.is-done .build__step-mark::before { display: none; }

/* Suggestions */
.suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; width: min(100%, 780px); }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .55);
  font-size: .875rem; color: var(--ink-2);
  transition: background-color .15s, border-color .15s, color .15s;
}
.chip .i { width: 16px; height: 16px; color: var(--muted); }
.chip:hover { background: var(--card); border-color: var(--line-2); color: var(--ink); }

/* Newest draft */
.ready {
  display: flex; align-items: center; gap: 16px;
  width: min(calc(100% - 48px), 780px); margin: 0 auto 28px; padding: 12px 12px 12px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-card);
  animation: rise .5s var(--ease) both;
}
.ready__thumb { width: 64px; height: 76px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: var(--sunk); }
.ready__thumb .cover { height: 100%; }
.ready__body { flex: 1; min-width: 0; }
.ready__title { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; outline: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ready__line { font-size: .8125rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ready__actions { display: flex; align-items: center; gap: 4px; }

/* Getting started */
.steps {
  width: min(calc(100% - 48px), 1040px); margin: 0 auto;
  padding: 18px 20px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.steps__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.steps__title { font-size: .9375rem; font-weight: 600; }
.steps__count { font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.steps__meter { width: 72px; height: 4px; border-radius: 4px; background: var(--sunk); overflow: hidden; }
.steps__meter span { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 4px; transition: width .6s var(--ease); }

.steps__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step {
  display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto 1fr; column-gap: 12px; row-gap: 14px;
  padding: 14px; border-radius: var(--radius); background: var(--bg);
  border: 1px solid transparent;
}
.step.is-current { background: var(--card); border-color: var(--line-2); }
.step__mark {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--card);
  font-size: .75rem; font-weight: 600; color: var(--muted);
}
.step__tick { display: none; width: 15px; height: 15px; stroke-width: 2; }
.step.is-done .step__mark { background: var(--ink); border-color: var(--ink); color: #fff; }
.step.is-done .step__num { display: none; }
.step.is-done .step__tick { display: block; }
.step.is-current .step__mark { border-color: var(--ink); color: var(--ink); }
.step__title { font-size: .9375rem; font-weight: 500; }
.step.is-done .step__title { color: var(--ink-2); }
.step__text { font-size: .8125rem; color: var(--muted); margin-top: 2px; }
.step__meta { font-size: .75rem; color: var(--muted); margin-top: 6px; }
.step__meta:empty { display: none; }
.step__action { grid-column: 2; align-self: end; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.step__action:empty { display: none; }
.step__reason { font-size: .75rem; color: var(--muted); }

.launched {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0 auto; font-size: .875rem; color: var(--ink-2);
}
.launched > .i { width: 16px; height: 16px; color: var(--live); }

/* Shelf: the recent sites, Base44-style strip along the foot of home */
.shelf {
  margin-top: 40px; padding: 22px clamp(20px, 3vw, 40px) 36px;
  border-top: 1px solid var(--line);
}
.shelf__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.shelf__title { font-size: .9375rem; font-weight: 600; }

/* Site cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.site-card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  transition: border-color .15s, box-shadow .2s, transform .2s var(--ease);
}
.site-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-card); transform: translateY(-1px); }
.site-card:focus-within { border-color: var(--line-2); }
.site-card__thumb { padding: 12px 12px 0; background: var(--sunk); }
.mini {
  border-radius: 8px 8px 0 0; overflow: hidden; background: var(--card);
  box-shadow: 0 0 0 1px rgba(22, 21, 20, .06);
}
.mini__bar { display: flex; align-items: center; gap: 4px; height: 16px; padding: 0 8px; background: #f7f5f1; border-bottom: 1px solid var(--line); }
.mini__bar i { width: 5px; height: 5px; border-radius: 50%; background: #d6d0c6; }
/* height: auto, or the img's height attribute outranks the aspect ratio */
.mini__img { aspect-ratio: 16 / 10; width: 100%; height: auto; object-fit: cover; object-position: 50% 55%; }

/* A site's cover: its own palette, its first photograph and its name, drawn small. No
   screenshot is stored; the card is rebuilt from the plan's tokens every time. */
.cover {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
  aspect-ratio: 16 / 10; background: var(--c-paper, #f4f1ea); color: var(--c-ink, #1a1a1a); overflow: hidden;
}
.cover__img { width: 100%; height: 100%; object-fit: cover; }
.cover__img--none { background: repeating-linear-gradient(135deg, rgba(0,0,0,.035) 0 8px, transparent 8px 16px); }
.cover__text { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 10px 12px; min-width: 0; }
.cover__name { font-family: var(--c-display, var(--display)); font-size: 1.05rem; line-height: 1.1; letter-spacing: -.01em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.cover__bar { width: 44px; height: 12px; border-radius: 3px; background: var(--c-accent, var(--ink)); }
.cover--setup { grid-template-columns: 1fr; place-items: center; background: var(--sunk); color: var(--muted); }
.cover--setup .cover__text { align-items: center; text-align: center; font-size: .75rem; }
.cover--photo { display: block; background: var(--sunk); }
.cover__img--setup { width: 100%; height: 100%; object-fit: cover; display: block; }
.ready__thumb .cover--setup .cover__text { display: flex; }
.ready__thumb .cover { aspect-ratio: auto; grid-template-columns: 1fr; }
.ready__thumb .cover__text { display: none; }
.site-card__body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 4px; min-width: 0; }
.site-card__open {
  font-size: .9375rem; font-weight: 500; text-align: left; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* The whole card opens the preview; the footer action sits above the stretched target. */
.site-card__open::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.site-card__open:focus-visible { outline: none; }
.site-card__open:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 14px; }
.site-card__meta { font-size: .8125rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px 14px; margin-top: auto; }
.site-card__tags { display: flex; gap: 6px; }
.site-card__action { position: relative; z-index: 2; }

.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 36px 20px; border: 1px dashed var(--line-2); border-radius: 14px;
}
.empty__icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--muted); margin-bottom: 12px; }
.empty__title { font-size: .9375rem; font-weight: 500; }
.empty__text { max-width: 36ch; font-size: .8125rem; color: var(--muted); margin-top: 2px; }

/* ==========================================================================
   Inner pages: Sites, Store, Atelier
   ========================================================================== */
.page { width: min(calc(100% - 48px), 1080px); margin: 0 auto; padding: 44px 0 64px; }
.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page__title { font-size: 1.75rem; font-weight: 600; letter-spacing: -.028em; line-height: 1.15; outline: none; }
.page__lede { margin-top: 4px; font-size: .9375rem; color: var(--muted); max-width: 60ch; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.stat dt { font-size: .8125rem; color: var(--muted); }
.stat dd { margin-top: 4px; font-size: 1.625rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .stat__text { font-size: 1rem; font-weight: 500; letter-spacing: 0; padding-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.search {
  position: relative; display: flex; align-items: center; flex: 1; max-width: 340px;
}
.search .i { position: absolute; left: 12px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 38px; padding: 0 12px 0 38px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--card);
  font-size: .875rem; outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--placeholder); }
.search input:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139, 107, 61, .14); }

.segment { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--sunk); }
.segment button { height: 32px; padding: 0 14px; border-radius: 8px; font-size: .875rem; color: var(--ink-2); transition: background-color .15s, color .15s; }
.segment button:hover { color: var(--ink); }
.segment button[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(22, 21, 20, .08); }

.store-card { display: flex; align-items: center; gap: 16px; padding: 20px; margin-bottom: 16px; }
.store-card__logo { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); flex-shrink: 0; }
.store-card__logo svg { width: 24px; height: 24px; }
.store-card__body { flex: 1; min-width: 0; }
.store-card__title { font-size: 1rem; font-weight: 600; }
.store-card__status { margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .875rem; color: var(--muted); }

.notes { padding: 8px 20px; }
.notes__row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; font-size: .875rem; color: var(--ink-2); }
.notes__row + .notes__row { border-top: 1px solid var(--line); }
.notes__row > .i { width: 18px; height: 18px; margin-top: 1px; color: var(--live); }
.notes__row--muted { color: var(--muted); }
.notes__row--muted > .i { color: var(--accent); }
.notes__row a { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }

.rows { padding: 6px; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--radius); transition: background-color .15s; }
.row:hover { background: var(--hover); }
.row__icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); flex-shrink: 0; }
.row__text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.row__title { font-size: .9375rem; font-weight: 500; }
.row__desc { font-size: .8125rem; color: var(--muted); }
.row__arrow { color: var(--muted); }

.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px;
  padding: 20px 24px 24px; font-size: .75rem; color: var(--muted);
}

/* ==========================================================================
   Dialogs
   ========================================================================== */
.dialog {
  width: min(920px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: var(--radius-lg);
  background: var(--card); color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(22, 21, 20, .35), 0 0 0 1px rgba(22, 21, 20, .06);
  overflow: auto;
}
.dialog[open] { animation: dialog-in .22s var(--ease); }
.dialog.is-closing { animation: dialog-out .2s var(--ease) forwards; }
.dialog::backdrop { background: rgba(22, 21, 20, .34); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.dialog[open]::backdrop { animation: fade .22s var(--ease); }
.dialog.is-closing::backdrop { animation: fade .2s var(--ease) reverse forwards; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes dialog-out { to { opacity: 0; transform: translateY(6px) scale(.985); } }
@keyframes fade { from { opacity: 0; } }

.dialog--store { width: min(520px, calc(100vw - 32px)); }

.dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 20px 14px 24px; }
.dialog__title { font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; outline: none; }
.dialog__lede { padding: 0 24px; font-size: .9375rem; color: var(--ink-2); }
.dialog__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 20px 20px 24px; }
.dialog__foot--flush { padding: 20px 0 0; }
[data-store-connected-view] .dialog__foot--flush { padding: 4px 20px 20px 24px; }
.dialog__note { font-size: .8125rem; color: var(--muted); max-width: 46ch; }

.browser { margin: 0 24px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.browser__bar { display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 12px; background: #f6f4f0; border-bottom: 1px solid var(--line); }
.browser__dots { display: flex; gap: 6px; }
.browser__dots i { width: 9px; height: 9px; border-radius: 50%; background: #dcd6cc; }
.browser__url {
  flex: 1; max-width: 420px; margin: 0 auto; padding: 3px 12px; border-radius: 7px;
  background: var(--card); border: 1px solid var(--line);
  font-size: .75rem; color: var(--muted); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser__page { background: #fdfcfa; }

.mock { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; padding: 28px; }
.mock__media { border-radius: 8px; overflow: hidden; background: var(--sunk); aspect-ratio: 4 / 5; }
.mock__media img { width: 100%; height: 100%; object-fit: cover; }
.mock__body { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.mock__kicker { font-size: .75rem; color: var(--muted); }
.mock__title { font-size: 1.625rem; font-weight: 600; letter-spacing: -.025em; line-height: 1.15; }
.mock__price { font-size: .875rem; color: var(--muted); }
.mock__buy {
  display: grid; place-items: center; height: 42px; margin: 6px 0 4px; border-radius: 8px;
  background: var(--ink); color: #fff; font-size: .875rem; font-weight: 500;
}
.mock__opening { font-size: .9375rem; color: var(--ink-2); }
.mock__details { display: grid; gap: 0; margin-top: 6px; border-top: 1px solid var(--line); }
.mock__details div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.mock__details dt { font-size: .8125rem; font-weight: 500; }
.mock__details dd { font-size: .8125rem; color: var(--muted); margin-top: 2px; }

/* Store form */
.store-form { padding: 16px 24px 20px; }
.field-label { display: block; font-size: .8125rem; font-weight: 500; margin-bottom: 6px; }
.field {
  display: flex; align-items: center; height: 42px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--card); overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139, 107, 61, .14); }
.field.is-invalid { border-color: var(--danger); }
.field input { flex: 1; min-width: 0; height: 100%; padding: 0 12px; border: 0; background: transparent; outline: none; font-size: .9375rem; }
.field input::placeholder { color: var(--placeholder); }
.field__suffix { padding: 0 12px; height: 100%; display: grid; place-items: center; background: var(--bg); border-left: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.field-error { min-height: 1.2em; margin-top: 6px; font-size: .8125rem; color: var(--danger); }
.field-error:empty { min-height: 0; margin: 0; }
.field-success { margin-top: 8px; font-size: .875rem; color: var(--live); }

/* ==========================================================================
   Entrance: the greeting and composer rise once, after the cloud parts
   ========================================================================== */
html.js:not(.is-revealed) [data-enter] { opacity: 0; }
html.js.is-revealed [data-enter] { animation: rise .7s var(--ease) both; }
html.js.is-revealed .composer[data-enter] { animation-delay: .08s; }
html.js.is-revealed .suggest[data-enter] { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.view.is-entering { animation: view-in .28s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .steps__list { grid-template-columns: 1fr; }
  .step { grid-template-columns: 26px 1fr auto; grid-template-rows: auto; align-items: center; }
  .step__action { grid-column: 3; grid-row: 1; align-items: flex-end; }
}

@media (max-width: 899px) {
  .ws, html.side-collapsed .ws { grid-template-columns: minmax(0, 1fr); }

  .side {
    position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); height: 100dvh;
    transform: translateX(-102%); transition: transform .28s var(--ease);
    box-shadow: var(--shadow-pop); z-index: 60;
  }
  html.side-open .side { transform: none; }
  .side__collapse { display: none; }
  .side__close { display: inline-grid; }

  /* The collapsed rail is a desktop preference; the drawer always shows labels. */
  html.side-collapsed .side { padding: 14px 12px 12px; }
  html.side-collapsed .side__label { position: static !important; width: auto; height: auto; overflow: visible; clip: auto; }
  html.side-collapsed .side__top { flex-direction: row; padding: 0 2px 0 6px; }
  html.side-collapsed .brand__word { display: inline; }
  html.side-collapsed .side__new, html.side-collapsed .nav-item { justify-content: flex-start; padding: 0 12px; }
  html.side-collapsed .nav-item__count { display: inline; }
  html.side-collapsed .nav-item__dot { position: static; margin-left: auto; }
  html.side-collapsed .side__sites { display: flex; }
  html.side-collapsed .plan-card { justify-content: flex-start; padding: 12px 14px; }
  html.side-collapsed .plan-card__text { display: flex; }
  html.side-collapsed .plan-card__icon { margin-left: auto; }
  html.side-collapsed .account { justify-content: flex-start; padding: 7px 8px; }
  html.side-collapsed .menu { right: 0; width: auto; }

  .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(22, 21, 20, .3); animation: fade .2s var(--ease); }
  .topbar { display: flex; }
  .brand--top .brand__word { font-size: 1.0625rem; }

  .notice { margin-top: 14px; }
  .home__hero { padding: clamp(40px, 9vh, 80px) 16px 24px; }
  .page { width: calc(100% - 32px); padding: 28px 0 48px; }
  .steps, .ready { width: calc(100% - 32px); }
  .shelf { padding: 20px 16px 28px; }
}

@media (max-width: 640px) {
  .greet { font-size: clamp(2rem, 9.5vw, 2.5rem); }
  .composer { padding: 14px 10px 10px 14px; }
  .composer__source { display: none; }
  .tool--text span { font-size: .875rem; }
  .suggest { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .suggest::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; }
  .step { grid-template-columns: 26px 1fr; }
  .step__action { grid-column: 2; grid-row: auto; align-items: flex-start; }
  .page__head { flex-direction: column; align-items: stretch; }
  .page__head .btn { align-self: flex-start; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:last-child { grid-column: 1 / -1; }
  .search { max-width: none; flex-basis: 100%; }
  .store-card { flex-wrap: wrap; }
  .store-card .btn { width: 100%; }
  .mock { grid-template-columns: 1fr; gap: 20px; padding: 18px; }
  .browser, .dialog__lede { margin-left: 16px; margin-right: 16px; }
  .dialog__lede { padding: 0; }
  .dialog__head { padding: 16px 12px 12px 16px; }
  .dialog__foot { padding: 14px 16px 16px; }
  .store-form { padding: 14px 16px 16px; }
  .ready { flex-wrap: wrap; }
  .ready__actions { width: 100%; }
  .ready__actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .build__spinner { animation: none; border-top-color: var(--line-2); }
}
