:root {
  color-scheme: light;
  --navy: #16324f;
  --navy-deep: #07131f;
  --ink: #10283f;
  --muted: #60758a;
  --ice: #eef3f8;
  --paper: #ffffff;
  --line: #cad7e3;
  --pink: #ef5da8;
  --violet: #8c74e8;
  --cyan: #38b7cb;
  --green: #55c985;
  --warning: #f3a64a;
  --danger: #ee6577;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 84% 7%, rgba(140,116,232,.14), transparent 24rem),
    linear-gradient(180deg, #f7fafd 0, var(--ice) 38rem, #e7eef5 100%);
  color: var(--ink);
  min-height: 100vh;
}
button, input { font: inherit; }
button { cursor: pointer; }
code, pre, .terminal-card { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.site-header, main, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 12px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--navy); text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -.025em; }
.brand-mark { font-size: 1.45rem; filter: drop-shadow(0 4px 8px rgba(22,50,79,.18)); }
.maker { color: var(--muted); font-size: .875rem; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .75fr);
  align-items: end;
  gap: 44px;
  padding: 72px 0 34px;
}
.eyebrow, .step-label { margin: 0 0 10px; color: var(--violet); text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 800; }
h1 { margin: 0; color: var(--navy); font-size: clamp(3.1rem, 7vw, 6.4rem); line-height: .93; letter-spacing: -.068em; max-width: 800px; }
.lede { margin: 26px 0 0; max-width: 720px; color: #3e566d; font-size: 1.15rem; line-height: 1.65; }
.scope-note { border-left: 3px solid var(--pink); padding: 4px 0 4px 19px; display: grid; gap: 5px; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.scope-note strong { color: var(--navy); }

.builder { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(420px, .96fr); gap: 18px; align-items: start; }
.controls-panel, .preview-panel, .output-section, .install-section, .boundary {
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(162,182,201,.66);
  box-shadow: 0 20px 50px rgba(30,57,82,.08);
}
.controls-panel, .preview-panel { border-radius: 24px; padding: 28px; }
.preview-panel { position: sticky; top: 18px; }
.panel-heading, .output-heading, .projects-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
h2 { margin: 0; color: var(--navy); letter-spacing: -.035em; font-size: 1.55rem; }
.text-button { border: 0; background: transparent; color: var(--violet); font-weight: 750; padding: 5px 0; }
.text-button:hover, .text-button:focus-visible { color: var(--pink); }

fieldset { border: 0; padding: 0; margin: 27px 0 0; }
legend, .legend-like, .field > span { color: var(--navy); font-size: .83rem; font-weight: 800; margin-bottom: 9px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: #edf3f8; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 10px 13px; border-radius: 9px; text-align: center; color: var(--muted); font-weight: 700; }
.segmented input:checked + span { background: white; color: var(--navy); box-shadow: 0 3px 12px rgba(22,50,79,.1); }
.segmented input:focus-visible + span { outline: 3px solid rgba(56,183,203,.3); }

.two-up { display: grid; grid-template-columns: 1fr 112px; gap: 12px; margin-top: 22px; }
.field { display: grid; }
input {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 11px;
  padding: 11px 12px;
  min-height: 44px;
}
input:focus { outline: 3px solid rgba(56,183,203,.23); border-color: var(--cyan); }
.emoji-field input { text-align: center; font-size: 1.3rem; }
.emoji-choices { display: flex; gap: 7px; margin: 10px 0 0; flex-wrap: wrap; }
.emoji-choices button { width: 39px; height: 39px; border-radius: 10px; border: 1px solid var(--line); background: #f8fbfd; font-size: 1.15rem; }
.emoji-choices button:hover, .emoji-choices button:focus-visible { transform: translateY(-1px); border-color: var(--violet); outline: none; }

.palette-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.palette-option { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: white; }
.palette-option input { position: absolute; opacity: 0; }
.palette-option:has(input:checked) { border-color: var(--violet); box-shadow: 0 0 0 2px rgba(140,116,232,.14); }
.palette-name { font-size: .86rem; font-weight: 750; }
.swatches { display: flex; }
.swatches i { width: 14px; height: 14px; border-radius: 50%; margin-left: -3px; border: 2px solid white; background: var(--pink); }
.swatches i:nth-child(2) { background: var(--violet); }
.swatches i:nth-child(3) { background: var(--cyan); }
.ocean .swatches i:nth-child(1) { background: #3c86e8; }.ocean .swatches i:nth-child(2) { background: #00a7ba; }.ocean .swatches i:nth-child(3) { background: #66e0e5; }
.citrus .swatches i:nth-child(1) { background: #ff8a3d; }.citrus .swatches i:nth-child(2) { background: #f5c542; }.citrus .swatches i:nth-child(3) { background: #47b881; }
.mono .swatches i:nth-child(1) { background: #e5e7eb; }.mono .swatches i:nth-child(2) { background: #9ca3af; }.mono .swatches i:nth-child(3) { background: #4b5563; }

.status-inputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.status-inputs label { display: grid; gap: 6px; color: var(--muted); font-size: .76rem; }
.status-inputs input { text-align: center; font-size: 1.2rem; }

.projects-heading { margin-top: 28px; align-items: center; }
.projects-heading p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; }
.small-button { border: 1px solid var(--line); background: white; color: var(--navy); padding: 8px 10px; border-radius: 9px; font-size: .8rem; font-weight: 750; }
.project-list { display: grid; gap: 8px; margin-top: 11px; }
.project-row { display: grid; grid-template-columns: 1.12fr 1fr 58px 34px; gap: 7px; align-items: center; }
.project-row input { min-height: 40px; padding: 8px 10px; font-size: .84rem; }
.project-row .project-emoji { text-align: center; font-size: 1.05rem; }
.remove-project { border: 0; background: transparent; color: #8a9baa; font-size: 1.25rem; line-height: 1; border-radius: 7px; width: 32px; height: 32px; }
.remove-project:hover, .remove-project:focus-visible { color: var(--danger); background: #fff0f2; }

.preview-heading { align-items: center; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; color: #2f7650; background: #e7f8ee; border: 1px solid #c3ead2; padding: 6px 9px; border-radius: 999px; font-size: .75rem; font-weight: 750; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(85,201,133,.17); }
.terminal-card { margin-top: 21px; overflow: hidden; border-radius: 17px; background: var(--navy-deep); box-shadow: 0 22px 45px rgba(7,19,31,.25); border: 1px solid #294157; }
.terminal-bar { min-height: 42px; display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; padding: 0 13px; background: #132435; color: #aab9c7; font-size: .7rem; text-align: center; }
.window-dots { display: flex; gap: 6px; }.window-dots i { width: 9px; height: 9px; border-radius: 50%; background: #ff6b73; }.window-dots i:nth-child(2){background:#f7c34f}.window-dots i:nth-child(3){background:#58c983}
.terminal-screen { min-height: 255px; padding: 23px 22px; color: #dce7ef; font-size: clamp(.72rem, 1.4vw, .9rem); line-height: 1.75; overflow-x: auto; }
.terminal-history { display: grid; margin-bottom: 37px; opacity: .72; }.terminal-history .muted { color: #718598; }
.terminal-prompt { white-space: nowrap; font-weight: 650; }
.term-machine { color: var(--preview-machine, #f5a5d1); }.term-host { color: var(--preview-host, #b7a8ff); }.term-project { color: var(--preview-project, #69d7e6); }.term-branch { color: var(--preview-branch, #7ee1a7); }.term-dirty, .term-fail { color: #ff8390; }.term-env { color: #8fd8ff; }
.cursor-line { display: flex; align-items: center; gap: 10px; margin-top: 1px; }.arrow { color: var(--preview-machine, #f5a5d1); font-weight: 900; }.cursor { width: 8px; height: 17px; background: #cdd9e2; animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.state-switcher { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 17px; }
.state-switcher button { border: 1px solid var(--line); background: rgba(255,255,255,.7); color: var(--muted); border-radius: 999px; padding: 7px 10px; font-size: .76rem; font-weight: 700; }
.state-switcher button.active { color: white; background: var(--navy); border-color: var(--navy); }
.translation { display: grid; grid-template-columns: 45px 1fr; gap: 12px; align-items: center; margin-top: 15px; padding: 14px; border-radius: 13px; background: #edf4fa; border: 1px solid #d6e1ea; }
.translation-symbol { font-size: 1.55rem; text-align: center; }.translation strong { color: var(--navy); font-size: .88rem; }.translation p { color: var(--muted); font-size: .8rem; margin: 3px 0 0; line-height: 1.4; }
.principle { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; color: var(--muted); font-size: .73rem; line-height: 1.4; }.principle span { padding-right: 10px; }.principle span + span { border-left: 1px solid var(--line); padding-left: 10px; }

.output-section { margin-top: 18px; border-radius: 24px; overflow: hidden; }
.output-heading { padding: 28px; align-items: end; }
.output-heading p:not(.step-label) { color: var(--muted); margin: 8px 0 0; font-size: .9rem; }
.copy-button { border: 0; background: var(--navy); color: white; padding: 11px 16px; border-radius: 10px; font-weight: 800; box-shadow: 0 8px 18px rgba(22,50,79,.18); }
.copy-button:hover, .copy-button:focus-visible { background: #0d243b; transform: translateY(-1px); }
.code-output { margin: 0; padding: 25px 28px 32px; max-height: 510px; overflow: auto; background: #081521; color: #cfe0ec; font-size: .78rem; line-height: 1.62; white-space: pre; border-top: 1px solid #294157; }

.install-section { margin-top: 18px; border-radius: 24px; padding: 30px; display: grid; grid-template-columns: .72fr 1.28fr; gap: 28px; }
.install-section > div > p:not(.step-label) { color: var(--muted); line-height: 1.58; font-size: .92rem; }
.install-steps { margin: 0; padding: 0; list-style: none; counter-reset: steps; display: grid; gap: 10px; }
.install-steps li { counter-increment: steps; display: grid; grid-template-columns: 28px 1fr; gap: 9px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: #f8fbfd; font-size: .84rem; }
.install-steps li::before { content: counter(steps); width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: white; font-size: .68rem; font-weight: 800; }
.install-steps code { display: block; margin-top: 4px; color: var(--violet); overflow-wrap: anywhere; }
details { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 17px; color: var(--muted); }
summary { color: var(--navy); font-weight: 800; cursor: pointer; } details p { font-size: .85rem; line-height: 1.55; }
.boundary { margin-top: 18px; border-radius: 24px; padding: 29px 32px; display: flex; align-items: center; gap: 22px; }.boundary-face { font-size: 2.4rem; }.boundary p { color: var(--muted); margin: 7px 0 0; line-height: 1.55; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 34px 0 44px; color: var(--muted); font-size: .79rem; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--navy); color: white; padding: 10px 15px; border-radius: 999px; font-size: .83rem; font-weight: 750; opacity: 0; pointer-events: none; transition: .2s ease; box-shadow: 0 10px 30px rgba(7,19,31,.25); }.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; gap: 24px; padding-top: 52px; }
  .builder { grid-template-columns: 1fr; }
  .preview-panel { position: static; grid-row: 1; }
  .install-section { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .site-header, main, footer { width: min(100% - 24px, 1180px); }
  .site-header { padding-top: 17px; }.maker { display: none; }
  .intro { padding: 42px 2px 25px; }.lede { font-size: 1rem; }
  .controls-panel, .preview-panel { padding: 20px; border-radius: 18px; }
  .panel-heading { display: grid; }.text-button { justify-self: start; }
  .terminal-screen { padding: 19px 16px; min-height: 230px; font-size: .72rem; }
  .terminal-bar { grid-template-columns: 58px 1fr 58px; }
  .principle { grid-template-columns: 1fr; gap: 8px; }.principle span + span { border-left: 0; padding-left: 0; }
  .palette-grid { grid-template-columns: 1fr; }
  .status-inputs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project-row { grid-template-columns: 1fr 54px 32px; }.project-row .project-display { grid-column: 1 / 2; }.project-row .project-repo { grid-column: 1 / -1; grid-row: 1; }.project-row .project-display { grid-row: 2; }.project-row .project-emoji { grid-row: 2; }.project-row .remove-project { grid-row: 2; }
  .output-heading { display: grid; padding: 22px; }.copy-button { justify-self: start; }.code-output { padding: 20px; }
  .install-section, .boundary { border-radius: 18px; padding: 22px; }.boundary { align-items: flex-start; }
  footer { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
