/* The Site Studio: the page itself fills the screen, with a thin bar over it
   and panels that slide in from the sides. */
:root {
  color-scheme: dark;
  --bg: #0B0F14; --surface: #131A22; --raised: #1A232E; --text: #E8EDF2; --dim: #93A1B0;
  --accent: #05C3DE; --border: #223040; --red: #FF4757; --green: #2ED573;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 6px; --bar: 50px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.mono { font: 13px/1.4 ui-monospace, "SF Mono", Menlo, monospace; }
.error { color: var(--red); font-size: 14px; }
button, input, textarea { font: inherit; color: inherit; }
button, a.button { background: var(--raised); border: 1px solid var(--border); border-radius: var(--r); padding: 8px 12px; cursor: pointer; color: var(--text); text-decoration: none; display: inline-block; white-space: nowrap; }
button:hover, a.button:hover { border-color: var(--dim); }
button:disabled { opacity: 0.5; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #04121A; font-weight: 600; }
button[aria-pressed=true] { border-color: var(--accent); color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 10px 12px; font-size: 16px;
}
textarea { resize: vertical; line-height: 1.45; }

/* ---- signing in and choosing how to start */
.signin, .start { min-height: 100%; display: grid; place-items: center; padding: 16px; }
.card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 24px; display: grid; gap: 14px; }
.card h1 { font-size: 24px; letter-spacing: -0.01em; }
.card label { display: grid; gap: 6px; font-size: 13px; color: var(--dim); }
.card input { color: var(--text); }
.back-link { font-size: 13px; color: var(--dim); text-decoration: none; }
.start-inner { width: 100%; max-width: 980px; display: grid; gap: 16px; }
.start-inner h1 { font-size: 28px; letter-spacing: -0.01em; }
.start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.start-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; display: grid; gap: 12px; align-content: start; }
.start-card h2 { font-size: 18px; }
.looks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.looks button { display: grid; gap: 6px; text-align: left; padding: 10px; white-space: normal; }
.look-chip { height: 34px; border-radius: 4px; border: 1px solid var(--border); display: flex; align-items: center; padding: 0 8px; font-weight: 800; font-size: 13px; }

/* ---- the studio frame */
.studio { height: 100%; display: flex; flex-direction: column; }
.bar { height: var(--bar); display: flex; align-items: center; gap: 10px; padding: 0 12px; border-bottom: 1px solid var(--border); background: var(--surface); overflow-x: auto; }
.bar strong { font-size: 15px; white-space: nowrap; }
.bar strong .dim { font-weight: 400; margin-left: 4px; }
.bar strong a.home { color: var(--text); text-decoration: none; }
.bar button { padding: 6px 10px; font-size: 14px; }
.pages-nav { display: flex; gap: 4px; align-items: center; padding-left: 8px; border-left: 1px solid var(--border); }
.pages-nav button { background: none; border-color: transparent; color: var(--dim); }
.pages-nav button[aria-current=true] { color: var(--text); border-color: var(--border); background: var(--raised); }
.bar-tools { display: flex; gap: 4px; padding-left: 8px; border-left: 1px solid var(--border); }
.bar-actions { display: flex; gap: 6px; margin-left: auto; }
.banner { padding: 10px 16px; background: #0C2530; border-bottom: 1px solid #12485A; }
.banner.problem { background: #2B1216; border-color: #5C1F27; }
.banner.demo, .banner.team { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.banner.team input { flex: 1; min-width: 200px; width: auto; padding: 8px 10px; font-size: 15px; }
.banner-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }

.work { flex: 1; min-height: 0; position: relative; display: flex; }
.stage { flex: 1; min-width: 0; overflow-y: auto; background: #06090D; }
.panel { position: absolute; top: 0; bottom: 0; width: 320px; max-width: 90vw; background: var(--surface); border-color: var(--border); z-index: 3; overflow-y: auto; padding: 14px 16px 40px; display: grid; gap: 12px; align-content: start; box-shadow: 0 0 24px rgba(0, 0, 0, 0.5); }
.panel.left { left: 0; border-right: 1px solid var(--border); }
.panel.right { right: 0; border-left: 1px solid var(--border); }
.panel-head { display: flex; justify-content: space-between; align-items: center; }
.panel .close { padding: 4px 8px; }
.palette { display: grid; gap: 6px; }
.palette h4 { margin: 8px 0 2px; font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
.palette button { display: grid; gap: 2px; text-align: left; white-space: normal; cursor: grab; }
.palette button:active { cursor: grabbing; }
.palette button span { color: var(--dim); font-size: 12px; }
.controls section { display: grid; gap: 10px; padding-bottom: 14px; }
.controls h3 { font-size: 13px; color: var(--dim); font-weight: 600; margin-top: 6px; }
.controls label { display: grid; gap: 6px; font-size: 13px; color: var(--dim); }
.controls label.inline { display: flex; align-items: center; gap: 10px; }
.controls input, .controls textarea { color: var(--text); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches button { width: 32px; height: 32px; padding: 0; border-radius: 50%; }
.swatches button[aria-checked=true], .chips button[aria-checked=true] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
input[type=color] { width: 44px; height: 32px; padding: 2px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); }

.page-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 16px; background: var(--surface); border-bottom: 1px solid var(--border); color: var(--dim); position: sticky; top: 0; z-index: 2; }
.page-strip-actions { display: flex; gap: 6px; }
.page-strip button { padding: 4px 8px; font-size: 13px; }
.ours-note { max-width: 560px; margin: 60px auto; display: grid; gap: 12px; text-align: center; color: var(--dim); justify-items: center; padding: 0 16px; }
.ours-note h2 { color: var(--text); font-size: 22px; }

/* ---- the page. Its colours belong to the design, not to this tool. */
.pv { position: relative; min-height: calc(100vh - var(--bar) - 36px);
      --pv-accent: #05C3DE; --pv-on-accent: #06121A; --pv-bg: #0B0F14; --pv-text: #F2F5F8; --pv-head: var(--font); --pv-btn-r: 999px; --pv-card-r: 12px; --pv-wide: 1100px;
      --pv-soft: color-mix(in srgb, var(--pv-text) 6%, var(--pv-bg)); --pv-line: color-mix(in srgb, var(--pv-text) 16%, var(--pv-bg));
      background: var(--pv-bg); color: var(--pv-text); font: 16px/1.55 var(--font); }
.pv.font-classic { --pv-head: Georgia, "Times New Roman", serif; }
.pv.font-technical { --pv-head: ui-monospace, "SF Mono", Menlo, monospace; }
.pv.shape-soft { --pv-btn-r: 8px; --pv-card-r: 8px; }
.pv.shape-square { --pv-btn-r: 0; --pv-card-r: 0; }
.pv.width-narrow { --pv-wide: 820px; }
.pv.width-full { --pv-wide: 100%; }
.pv h1, .pv h2, .pv h3 { font-family: var(--pv-head); margin: 0; overflow-wrap: anywhere; }
.pv.font-racing h1, .pv.font-racing h2 { font-style: italic; text-transform: uppercase; letter-spacing: 0.02em; }
.pv-in { max-width: var(--pv-wide); margin: 0 auto; }
.pv-top { border-bottom: 1px solid var(--pv-line); }
.pv-top .pv-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 24px; flex-wrap: wrap; }
.pv-top b { font-family: var(--pv-head); font-size: 18px; overflow-wrap: anywhere; }
.pv-menu { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.pv-menu button { background: none; border: 0; border-radius: var(--pv-btn-r); padding: 6px 10px; color: var(--pv-text); opacity: 0.8; font: inherit; font-size: 14px; }
.pv-menu button[aria-current=true] { background: var(--pv-soft); opacity: 1; }
.pv-menu button.add { opacity: 0.6; border: 1px dashed var(--pv-line); }
.pv-btn { display: inline-block; justify-self: start; background: var(--pv-accent); color: var(--pv-on-accent); font-weight: 700; padding: 10px 18px; border-radius: var(--pv-btn-r); font-size: 15px; min-width: 60px; }
.pv-btn.ghost { background: transparent; color: var(--pv-text); border: 1px solid var(--pv-line); }
.pv-block { position: relative; border-top: 1px solid var(--pv-line); }
.pv-block > .pv-in { padding: 40px 24px; display: grid; gap: 16px; }
.pv-block.hero > .pv-in { padding: 72px 24px; gap: 18px; }
.pv-block.hero { background: linear-gradient(135deg, var(--pv-soft), var(--pv-bg)); }
.pv-block.hero h1 { font-size: clamp(32px, 6vw, 60px); line-height: 1.02; font-weight: 800; max-width: 18ch; }
.pv-block.hero p { font-size: 20px; opacity: 0.85; max-width: 46ch; }
.pv-block.banner { background: var(--pv-accent); color: var(--pv-on-accent); font-weight: 600; text-align: center; }
.pv-block.banner > .pv-in { padding: 12px 24px; }
.pv-block.cta { background: var(--pv-soft); }
.pv-block.cta > .pv-in { text-align: center; justify-items: center; padding: 56px 24px; }
.pv-block h2 { font-size: 28px; }
.pv-block h3 { font-size: 17px; }
.pv-block p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pv-block.divider > .pv-in { padding: 0 24px; }
.pv-block.divider hr { border: 0; border-top: 2px solid var(--pv-line); margin: 0; }
.pv-block.spacer > .pv-in { padding: 30px; }
.pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pv-grid.wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.pv-item { position: relative; background: var(--pv-soft); border: 1px solid var(--pv-line); border-radius: var(--pv-card-r); padding: 16px; display: grid; gap: 6px; }
.pv-item .price { font-size: 22px; font-weight: 700; }
.pv-item .muted { opacity: 0.75; }
.pv-row { display: flex; justify-content: space-between; gap: 10px; }
.pv-photo { aspect-ratio: 4 / 3; background: var(--pv-soft); border: 1px dashed var(--pv-line); border-radius: var(--pv-card-r); display: grid; place-items: center; font-size: 12px; opacity: 0.7; }
.pv-photo.wide { aspect-ratio: 16 / 9; }
.pv-photo.round { aspect-ratio: 1; border-radius: 50%; width: 96px; }
.pv-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.pv-split.flip > :first-child { order: 2; }
.pv-quote { font-size: 24px; line-height: 1.35; font-family: var(--pv-head); font-style: italic; }
.pv-foot { border-top: 1px solid var(--pv-line); font-size: 14px; opacity: 0.7; }
.pv-foot .pv-in { padding: 22px 24px; }
.pv-fixed { opacity: 0.6; font-style: italic; }
.pv-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.pv-faq details { border-top: 1px solid var(--pv-line); padding: 10px 0; }
.pv-faq summary { cursor: default; font-weight: 600; list-style: none; }
@media (max-width: 700px) { .pv-split { grid-template-columns: 1fr; } .pv-split.flip > :first-child { order: 0; } }

/* Words that can be typed straight onto the page. */
.pv [contenteditable] { outline: 1px dashed transparent; outline-offset: 4px; border-radius: 3px; min-width: 40px; cursor: text; }
.pv [contenteditable]:hover { outline-color: color-mix(in srgb, var(--pv-text) 35%, transparent); }
.pv [contenteditable]:focus { outline: 2px solid var(--pv-accent); }
.pv [contenteditable]:empty::before { content: attr(data-placeholder); opacity: 0.45; font-style: italic; }
.pv-btn[contenteditable]:empty::before { opacity: 0.7; }

/* The tools on each block belong to the Studio, so they look like it. */
.pv-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity 0.12s; z-index: 1; }
.pv-block:hover > .pv-tools, .pv-block:focus-within > .pv-tools { opacity: 1; }
.pv-tools button, .pv-mini { font: 600 12px/1 var(--font); background: #1A232E; color: #E8EDF2; border: 1px solid #334456; border-radius: 6px; padding: 6px 8px; cursor: pointer; }
.pv-tools .grip { cursor: grab; }
.pv-tools button:disabled { opacity: 0.35; cursor: default; }
.pv-mini { justify-self: start; }
.pv-item .pv-mini { position: absolute; top: -8px; right: -8px; padding: 3px 6px; opacity: 0; }
.pv-item:hover .pv-mini, .pv-item:focus-within .pv-mini { opacity: 1; }
.pv-block.dragging { opacity: 0.4; }
.pv-block.drop-before { box-shadow: inset 0 4px 0 var(--pv-accent); }
.pv-block.drop-after { box-shadow: inset 0 -4px 0 var(--pv-accent); }
.pv-empty { padding: 80px 24px; text-align: center; opacity: 0.7; border: 2px dashed var(--pv-line); margin: 24px; border-radius: var(--pv-card-r); }
.pv-empty.over { border-color: var(--pv-accent); opacity: 1; }
.pv-add-end { display: flex; justify-content: center; padding: 18px 24px; border-top: 1px dashed var(--pv-line); }
@media (hover: none) {
  .pv-tools, .pv-item .pv-mini { opacity: 1; }
  .pv-tools .grip { display: none; }
}
@media (max-width: 760px) {
  .bar { gap: 6px; }
  .bar-actions #restart, .bar-actions #signout { display: none; }
  .panel { width: 100%; max-width: none; }
}

/* ---- the layout review: the page as it will be, with everything movable */
.banner.review { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pv.reviewing [data-part], .pv.reviewing .pv-photo { cursor: grab; touch-action: none; }
.pv.reviewing [data-part]:hover, .pv.reviewing .pv-photo:hover { outline: 2px dashed var(--pv-accent); outline-offset: 4px; }
.pv.reviewing .nudged { outline: 2px solid var(--pv-accent); outline-offset: 4px; }
.pv.reviewing .pv-tools { opacity: 1; }
.pv.reviewing .pv-tools button:not(.grip) { display: none; }
.pv.reviewing .pv-tools .grip { font-size: 13px; padding: 8px 10px; }
.pv.reviewing .pv-tools .grip::after { content: " Drag section"; }
.pv.reviewing.noting, .pv.reviewing.noting * { cursor: crosshair !important; }
.pin { position: absolute; z-index: 2; transform: translate(-50%, -100%); background: #FFC542; color: #1A1300; font: 600 12px/1.2 var(--font); padding: 6px 8px; border-radius: 8px 8px 8px 0; max-width: 220px; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.pin::after { content: ""; position: absolute; left: 0; bottom: -8px; border: 4px solid transparent; border-top-color: #FFC542; border-left-color: #FFC542; }
.pin button { margin-left: 6px; padding: 0 4px; font-size: 11px; background: none; border: 0; color: #1A1300; }
