:root {
  --ink: #202124;
  --muted: #70757a;
  --line: #e2e5e9;
  --page: #f7f7f5;
  --card: #ffffff;
  --blue: #1a73e8;
  --blue-soft: #e8f0fe;
  --green: #188038;
  --green-soft: #e6f4ea;
  --orange: #e96b36;
  --shadow: 0 18px 55px rgba(32, 33, 36, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: "DM Sans", system-ui, sans-serif; line-height: 1.45; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
.topbar { width: min(1180px, calc(100% - 32px)); margin: 0 auto; height: 68px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 14px Manrope, sans-serif; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-size: 10px; }
.quiet-button { padding: 8px 12px; border: 0; background: transparent; color: var(--muted); font-weight: 600; border-radius: 10px; }
.quiet-button:hover { background: #ececea; color: var(--ink); }
main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.intro { max-width: 720px; margin: 70px auto 38px; text-align: center; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.7); color: var(--muted); font-size: 11px; font-weight: 600; }
.status i, .live i { width: 6px; height: 6px; border-radius: 50%; background: #34a853; box-shadow: 0 0 0 4px rgba(52,168,83,.12); }
.intro h1 { margin: 16px 0 8px; font: 800 clamp(2.6rem, 7vw, 5.3rem)/1 Manrope, sans-serif; letter-spacing: -.065em; }
.intro p { margin: 0; color: var(--muted); font-size: 16px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(350px, .75fr); align-items: start; gap: 16px; }
.builder, .result { border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.builder { overflow: hidden; }
.prompt-box { min-height: 82px; padding: 16px 20px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); background: #fbfbfb; }
.prompt-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: var(--blue); color: white; }
.prompt-copy span, .prompt-copy strong { display: block; }
.prompt-copy span { color: var(--muted); font-size: 11px; }
.prompt-copy strong { font-size: 14px; }
.saved { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.saved::before { content: "✓"; color: var(--green); font-weight: 800; }
.section-block { padding: 27px 28px; border-top: 1px solid var(--line); }
.first-block { border-top: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.section-title > div { display: flex; align-items: center; gap: 10px; }
.number { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #f0f1f2; color: var(--muted); font-size: 10px; font-weight: 700; }
.section-title h2 { margin: 0; font: 700 16px Manrope, sans-serif; letter-spacing: -.02em; }
.section-title small { color: var(--muted); font-size: 10px; }
.preset-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.preset { min-height: 70px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--ink); text-align: left; transition: border-color 150ms ease, background 150ms ease, transform 150ms ease; }
.preset:hover { transform: translateY(-1px); border-color: #bdc1c6; }
.preset.active { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.preset strong, .preset span { display: block; }
.preset strong { font-size: 12px; }
.preset span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.sentence-card { padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: #fafafa; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #4e5155; font-size: 13px; }
.inline-input { display: inline-flex; align-items: center; height: 36px; min-width: 58px; padding: 0 9px; border: 1px solid #c9cdd2; border-radius: 9px; background: white; color: var(--muted); }
.inline-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,115,232,.1); }
.inline-input input { width: 45px; border: 0; outline: 0; background: transparent; color: var(--ink); text-align: center; font-weight: 700; }
.money-input input { width: 58px; text-align: left; }
.mini-fields { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini-fields > label, .settings-grid > label { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 11px; }
.small-input { min-width: 72px; display: flex; align-items: center; justify-content: flex-end; gap: 4px; color: var(--muted); }
.small-input input { width: 54px; border: 0; outline: 0; background: transparent; color: var(--ink); text-align: right; font-weight: 700; }
.small-input b { font-weight: 500; }
.addon-list { display: grid; }
.addon-row { min-height: 68px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 184px 68px; gap: 11px; align-items: center; padding: 11px 4px; border-top: 1px solid var(--line); }
.addon-row:first-child { border-top: 0; }
.addon-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #f0f1f2; color: #4e5155; font-size: 9px; font-weight: 800; }
.addon-row > div strong, .addon-row > div small { display: block; }
.addon-row > div strong { font-size: 12px; }
.addon-row > div small { color: var(--muted); font-size: 9px; }
.billing-toggle { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: #f4f5f6; }
.billing-toggle button { min-height: 30px; padding: 0 7px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 700; transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease; }
.billing-toggle button:hover { color: var(--ink); }
.billing-toggle button.active { background: white; color: var(--ink); box-shadow: 0 1px 5px rgba(32,33,36,.12); }
.billing-toggle button.active[data-value="included"] { background: var(--blue-soft); color: #174ea6; }
.billing-toggle button.active[data-value="charged"] { background: var(--ink); color: white; }
.addon-row > b { text-align: right; font-size: 11px; }
.settings { border-top: 1px solid var(--line); }
.settings summary { padding: 20px 28px; display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; font-size: 12px; font-weight: 700; }
.settings summary::-webkit-details-marker { display: none; }
.settings summary small { color: var(--muted); font-size: 10px; font-weight: 500; }
.settings summary b { display: inline-block; margin-left: 6px; transition: transform 160ms ease; }
.settings[open] summary b { transform: rotate(45deg); }
.settings-grid { padding: 0 28px 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.result { position: sticky; top: 16px; padding: 26px; }
.result-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.live { display: inline-flex; align-items: center; gap: 7px; }
.package-name { margin: 34px 0 0; color: var(--muted); font-size: 12px; }
.grand-total { display: block; margin: 2px 0 0; font: 800 clamp(3.3rem, 7vw, 5.2rem)/1 Manrope, sans-serif; letter-spacing: -.07em; }
.per-video { margin: 7px 0 24px; color: var(--muted); font-size: 11px; }
.breakdown { padding: 17px 0; display: grid; gap: 10px; border-block: 1px solid var(--line); }
.breakdown div { display: flex; align-items: center; justify-content: space-between; gap: 18px; font-size: 11px; }
.breakdown span { color: var(--muted); }
.includes { padding: 20px 0; border-bottom: 1px solid var(--line); }
.includes > span, .payments > p { display: block; margin: 0 0 10px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.includes ul { margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.includes li { padding: 6px 9px; border-radius: 999px; background: #f1f3f4; color: #4e5155; font-size: 9px; }
.includes li::before { content: "✓"; margin-right: 5px; color: var(--green); font-weight: 800; }
.payments { padding-top: 20px; }
.payment { min-height: 48px; padding: 8px 11px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-radius: 12px; font-size: 11px; }
.payment.featured { background: var(--green-soft); }
.payment span, .payment small { display: block; }
.payment small { margin-top: 1px; color: var(--muted); font-size: 9px; }
.payment b { font-size: 12px; }
.actions { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions button { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); font-weight: 700; font-size: 11px; }
.actions button.primary { border-color: var(--blue); background: var(--blue); color: white; }
footer { width: min(1180px, calc(100% - 32px)); margin: 24px auto 50px; display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 20; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: white; font-size: 11px; font-weight: 700; opacity: 0; transform: translate(-50%, 20px); transition: .18s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .result { position: static; }
}
@media (max-width: 600px) {
  .topbar, main, footer { width: min(100% - 20px, 1180px); }
  .intro { margin: 42px auto 26px; }
  .intro h1 { font-size: clamp(2.7rem, 14vw, 4.3rem); }
  .intro p { font-size: 13px; }
  .builder, .result { border-radius: 19px; }
  .prompt-box { grid-template-columns: 38px 1fr; }
  .saved { display: none; }
  .section-block { padding: 23px 18px; }
  .section-title { align-items: flex-start; }
  .section-title small { text-align: right; max-width: 110px; }
  .preset-row { grid-template-columns: 1fr 1fr; }
  .mini-fields, .settings-grid { grid-template-columns: 1fr; }
  .addon-row { grid-template-columns: 34px minmax(0, 1fr) 52px; padding-block: 14px; }
  .addon-row > b { grid-column: 3; grid-row: 1; font-size: 9px; }
  .addon-row > div:not(.billing-toggle) { grid-row: 1; }
  .billing-toggle { grid-column: 2 / 4; grid-row: 2; }
  .settings summary, .settings-grid { padding-left: 18px; padding-right: 18px; }
  .result { padding: 22px; }
  footer { display: block; }
  footer span { display: block; margin-top: 3px; }
}
@media print {
  body { background: white; }
  .topbar, .intro, .builder, footer, .actions { display: none !important; }
  main, .workspace { width: 100%; display: block; }
  .result { box-shadow: none; border: 1px solid #ccc; }
}
