/* Prompta — sito web (desktop-first).
   Design: ardesia fredda, inchiostro blu-notte, accento viola elettrico.
   Titoli in Space Grotesk, testo in Inter. Niente carta calda, niente serif. */

@font-face {
  font-family: 'InterLocal';
  src: url('../fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'GroteskLocal';
  src: url('../fonts/space-grotesk-var.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #f4f5fa;
  --bg-2: #e9ebf5;
  --surface: #ffffff;
  --surface-2: #f8f9fd;
  --ink: #0e1226;
  --ink-2: #333a58;
  --muted: #676e8c;
  --line: #e0e3ef;
  --line-2: #ccd1e3;
  --accent: #4f2ee8;
  --accent-2: #7c5cff;
  --accent-soft: #ece8ff;
  --ok: #0c6f63;
  --ok-soft: #ddf1ee;
  --warn: #8a5300;
  --warn-soft: #fdf0d6;
  --danger: #b02539;
  --shadow-s: 0 1px 2px rgba(14, 18, 38, .06), 0 1px 1px rgba(14, 18, 38, .04);
  --shadow-m: 0 12px 28px -12px rgba(14, 18, 38, .2), 0 2px 6px rgba(14, 18, 38, .05);
  --shadow-l: 0 32px 70px -30px rgba(20, 16, 70, .28), 0 4px 14px rgba(14, 18, 38, .05);
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;
  --r-xl: 26px;
  --serif: 'GroteskLocal', 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sans: 'InterLocal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  --nav-h: 68px;
  --max: 1180px;
}

html[data-theme='dark'] {
  --bg: #0a0c16;
  --bg-2: #11142a;
  --surface: #141830;
  --surface-2: #191d3a;
  --ink: #f1f3ff;
  --ink-2: #c6cbe6;
  --muted: #8b92b5;
  --line: #232a4a;
  --line-2: #2f3760;
  --accent: #9d86ff;
  --accent-2: #c2b3ff;
  --accent-soft: #1e1b40;
  --ok: #6ee0c8;
  --ok-soft: #12302c;
  --warn: #f0c274;
  --warn-soft: #2d2413;
  --danger: #ff8f9c;
  --shadow-s: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow-m: 0 14px 30px -14px rgba(0, 0, 0, .75), 0 2px 6px rgba(0, 0, 0, .35);
  --shadow-l: 0 34px 74px -32px rgba(0, 0, 0, .85);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }

::selection { background: var(--accent-soft); color: var(--ink); }

/* ---------------- tipografia ---------------- */

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -.028em; margin: 0; }
h1 { font-size: clamp(38px, 4.6vw, 66px); line-height: 1.03; }
h2 { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.12; }
h3 { font-size: 20px; line-height: 1.25; }
p { margin: 0; }

.eyebrow {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 600; color: var(--accent);
}
.lede { font-size: 19px; color: var(--muted); line-height: 1.5; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); font-size: 13px; }
.hidden { display: none !important; }

/* ---------------- struttura ---------------- */

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 780px; margin: 0 auto; }
section.block { padding: 74px 0; }
.stack-s > * + * { margin-top: 8px; }
.stack-m > * + * { margin-top: 16px; }
.stack-l > * + * { margin-top: 28px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

/* ---------------- barra superiore ---------------- */

.nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(155deg, var(--accent-2), var(--accent));
  color: #fff; font-family: var(--sans); font-size: 15px; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-link {
  padding: 8px 13px; border-radius: 999px; font-size: 14.5px; font-weight: 500;
  color: var(--ink-2); border: 1px solid transparent; transition: background .16s, color .16s, border-color .16s;
}
.nav-link:hover { background: var(--bg-2); color: var(--ink); }
.nav-link[aria-current='page'] { background: var(--surface); border-color: var(--line); color: var(--ink); box-shadow: var(--shadow-s); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: 13px; font-weight: 500; color: var(--ink-2); box-shadow: var(--shadow-s); cursor: pointer;
}
.pill:hover { border-color: var(--line-2); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pill.is-ready .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.pill.is-busy .dot { background: var(--accent); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink-2);
  box-shadow: var(--shadow-s);
}
.icon-btn:hover { border-color: var(--line-2); color: var(--ink); }

/* ---------------- pulsanti ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 14.5px; font-weight: 550;
  cursor: pointer; transition: transform .12s, box-shadow .16s, background .16s, border-color .16s;
  box-shadow: var(--shadow-s); white-space: nowrap;
}
.btn:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--shadow-m); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border-color: transparent; color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 10px 22px -12px rgba(79, 46, 232, .55);
}
html[data-theme='dark'] .btn-primary { color: #23180f; }
.btn-primary:hover { filter: saturate(1.06) brightness(1.03); box-shadow: 0 12px 26px -12px rgba(79, 46, 232, .65); }
.btn-lg { height: 50px; padding: 0 24px; font-size: 15.5px; }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13px; }
.btn-ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-danger { color: var(--danger); }

/* ---------------- hero ---------------- */

.hero { position: relative; overflow: hidden; padding: 64px 0 46px; }
.hero::before {
  content: ''; position: absolute; inset: -30% -10% auto -10%; height: 720px; z-index: -1;
  background:
    radial-gradient(52% 60% at 18% 18%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(46% 58% at 84% 6%, color-mix(in srgb, #12b5a4 22%, transparent), transparent 72%),
    radial-gradient(40% 40% at 60% 60%, color-mix(in srgb, #4f2ee8 10%, transparent), transparent 70%);
  filter: blur(10px);
}
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--accent); background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  font-size: 12.5px; font-weight: 550; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; box-shadow: var(--shadow-s);
}

/* compositore della home */
.composer {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-l); padding: 18px; position: relative;
}
.composer::after {
  content: ''; position: absolute; inset: auto 18px -14px 18px; height: 26px; z-index: -1;
  background: radial-gradient(60% 100% at 50% 0%, rgba(79, 46, 232, .22), transparent 75%);
  filter: blur(10px);
}
.composer textarea {
  width: 100%; border: 0; outline: 0; resize: none; background: transparent; color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.5; min-height: 74px; padding: 8px 6px;
}
.composer textarea::placeholder { color: var(--muted); }
.composer-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 6px 12px; }
.example-chip {
  border: 1px dashed var(--line-2); background: transparent; color: var(--muted);
  font-size: 12.5px; padding: 5px 10px; border-radius: 999px; cursor: pointer;
}
.example-chip:hover { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }
.composer-bar {
  display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line);
  padding-top: 12px; flex-wrap: wrap;
}
.composer-bar .spacer { flex: 1; }

/* menu a tendina personalizzato (mai select nativi) */
.dd { position: relative; }
.dd-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2);
  font-size: 13.5px; font-weight: 550; cursor: pointer; color: var(--ink-2);
}
.dd-btn:hover { border-color: var(--line-2); color: var(--ink); }
.dd-btn .caret { font-size: 10px; color: var(--muted); }
.dd-menu {
  position: absolute; z-index: 70; top: calc(100% + 8px); left: 0; min-width: min(260px, calc(100vw - 24px));
  max-height: 380px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: var(--shadow-l); padding: 6px; touch-action: pan-y;
}
.dd-menu[hidden] { display: none; }
.dd-item {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; padding: 9px 10px;
  border: 0; background: transparent; border-radius: var(--r-s); cursor: pointer; font-size: 14px;
}
.dd-item:hover { background: var(--bg-2); }
.dd-logo { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.dd-item[aria-selected='true'] { background: var(--accent-soft); }
.dd-item .t { font-weight: 550; }
.dd-item .d { font-size: 12.5px; color: var(--muted); }

/* ---------------- sezioni ---------------- */

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }

.role-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.role-tab {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 500; cursor: pointer;
}
.role-tab:hover { border-color: var(--line-2); }
.role-tab[aria-pressed='true'] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l);
  padding: 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-s);
  transition: transform .16s, box-shadow .2s, border-color .2s; text-align: left; cursor: pointer;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); border-color: var(--line-2); }
.card h3 { font-size: 17.5px; }
.card p { font-size: 14px; color: var(--muted); }
.card .tag { align-self: flex-start; }
.card .card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 8px; }
.tag {
  font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 6px;
}

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { padding: 22px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); }
.step .n {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; margin-bottom: 12px;
}

.model-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.origin-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; box-shadow: var(--shadow-s);
}
.origin-chip b { font-weight: 600; }

.cta {
  border-radius: var(--r-xl); padding: 44px; border: 1px solid var(--line);
  background:
    radial-gradient(70% 120% at 12% 10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    var(--surface);
  display: flex; align-items: center; justify-content: space-between; gap: 30px; box-shadow: var(--shadow-m);
}

/* ---------------- studio ---------------- */

.studio { padding: 30px 0 70px; }
.studio-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.studio-grid { display: grid; grid-template-columns: 430px minmax(0, 1fr); gap: 24px; align-items: start; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l);
  box-shadow: var(--shadow-s); overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.panel-title { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-weight: 650; color: var(--muted); }
.panel-body { padding: 18px; }

.field { display: block; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; display: block; }
.input, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-2);
  color: var(--ink); font-family: var(--sans); font-size: 15px; padding: 11px 13px; outline: 0;
  transition: border-color .16s, box-shadow .16s;
}
.textarea { min-height: 180px; resize: vertical; line-height: 1.55; }
.input:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.counter { font-size: 12px; color: var(--muted); text-align: right; margin-top: 6px; }

.result {
  font-family: var(--sans); font-size: 16.5px; line-height: 1.66; white-space: pre-wrap;
  word-break: break-word; padding: 26px 28px;
  min-height: min(70vh, 720px); max-height: none; overflow: auto;
}
/* schermo intero: il prompt si legge come un documento */
.studio-pane { position: relative; }
#suggestPanel { margin-top: 0; }
#suggestPane { max-height: 52vh; overflow: auto; }
#suggestPanel.is-busy { opacity: .6; pointer-events: none; }
#suggestPanel .suggest:last-child { margin-bottom: 0; }

.panel.is-expanded {
  position: fixed; inset: 16px; z-index: 120; display: flex; flex-direction: column;
  box-shadow: var(--shadow-l); border-radius: var(--r-l); background: var(--surface);
}
.panel.is-expanded [data-pane='prompt'] { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.panel.is-expanded .result { flex: 1; max-height: none; min-height: 0; overflow: auto; }
.result:empty::before { content: attr(data-empty); color: var(--muted); font-family: var(--sans); font-size: 14.5px; }

.tabs { display: flex; gap: 4px; padding: 6px; background: var(--bg-2); border-radius: 999px; }
.tab {
  border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  font-size: 13.5px; font-weight: 550; color: var(--muted);
}
.tab[aria-selected='true'] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-s); }
.tab-badge { font-size: 11px; background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 6px; margin-left: 6px; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

.meter { height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .3s; }

.suggest {
  display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--surface-2); margin-bottom: 10px;
}
.suggest .why { font-size: 13px; color: var(--muted); }
.suggest .do { font-size: 13.5px; }
.grav { width: 3px; border-radius: 999px; background: var(--line-2); flex: none; }
.grav[data-g='3'] { background: var(--accent); }
.grav[data-g='2'] { background: #d9863a; }
.grav[data-g='1'] { background: var(--line-2); }

.log {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--ink-2);
  background: var(--surface-2); border-radius: var(--r-m); padding: 14px; max-height: 40vh; overflow: auto;
  white-space: pre-wrap; border: 1px solid var(--line);
}

.status-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.spinner {
  width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--line-2);
  border-top-color: var(--accent); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- pagina modelli ---------------- */

.model-card {
  display: grid; grid-template-columns: 1fr 220px; gap: 18px; align-items: center;
  padding: 20px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface);
  box-shadow: var(--shadow-s); margin-bottom: 14px;
}
.model-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-s); }
.model-name { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.model-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* ---------------- avvisi, modale, toast ---------------- */

.note {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-m);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  font-size: 14px; color: var(--ink-2);
}
.note.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.note.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }

.modal-back {
  position: fixed; inset: 0; z-index: 100; background: rgba(20, 17, 12, .45);
  backdrop-filter: blur(3px); display: grid; place-items: center; padding: 24px;
}
.modal {
  width: min(560px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-l); box-shadow: var(--shadow-l); overflow: hidden;
}
.modal-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; z-index: 120; transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- piè di pagina ---------------- */

.footer { border-top: 1px solid var(--line); padding: 40px 0 54px; margin-top: 20px; background: var(--surface-2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.footer h4 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-family: var(--sans); font-weight: 650; margin-bottom: 10px; }
.footer a { font-size: 14px; color: var(--ink-2); display: block; padding: 3px 0; }
.footer a:hover { color: var(--accent); }

/* ---------------- adattamenti ---------------- */

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .studio-grid { grid-template-columns: 1fr; }
  .grid-3, .card-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .nav-links { display: none; }
  .nav-inner { gap: 12px; }
  .nav-right .btn-primary { display: none; }
  .pill { padding: 0 10px; font-size: 12px; height: 32px; }
  .brand { font-size: 19px; }
  h1 { font-size: 34px; }
  .hero { padding: 34px 0 26px; }
  .hero-grid { gap: 24px; }
  .composer { padding: 14px; border-radius: var(--r-l); }
  .example-chip:nth-child(n+3) { display: none; }
  .studio-head { flex-direction: column; align-items: flex-start; }
  .studio-head .input { max-width: none !important; width: 100%; }
  .composer-bar .btn-primary { width: 100%; justify-content: center; }
  .grid-3, .card-grid, .steps, .grid-4 { grid-template-columns: 1fr; }
  .model-card { grid-template-columns: 1fr; }
  .model-side { align-items: flex-start; }
  .cta { flex-direction: column; align-items: flex-start; padding: 28px; }
  section.block { padding: 52px 0; }
}

/* ---------------- linguette "aggiungi alla richiesta" ---------------- */

.quick-chips { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.quick-chips[hidden] { display: none; }
.chip-add {
  border: 1px dashed var(--line-2); background: var(--surface-2); color: var(--ink-2);
  font-family: var(--sans); font-size: 12.5px; font-weight: 500; border-radius: 999px;
  padding: 5px 11px; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.chip-add:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip-add::before { content: '+ '; font-weight: 700; }

/* ---------------- domande di chiarimento in sovraimpressione ---------------- */

.suggest { position: relative; }
.suggest.is-open { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.suggest .answer { font-size: 12.5px; color: var(--accent); font-weight: 600; margin-top: 6px; }

.clarity {
  position: fixed; z-index: 200; width: min(430px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-l);
  box-shadow: var(--shadow-l); padding: 16px;
}
.clarity-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.clarity-q { font-family: var(--serif); font-size: 16px; font-weight: 600; }
.clarity-x { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 4px; }
.clarity-x:hover { color: var(--ink); }
.clarity-opts { display: flex; flex-direction: column; gap: 2px; margin: 12px 0; }
.clarity-opt {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-s);
  font-size: 14px; color: var(--ink-2); cursor: pointer; border: 1px solid transparent;
}
.clarity-opt:hover { background: var(--bg-2); }
.clarity-opt input { width: 16px; height: 16px; accent-color: var(--accent); }
.clarity-free { width: 100%; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-2); padding: 9px 11px; font-family: var(--sans); font-size: 14px; color: var(--ink); outline: 0; }
.clarity-free:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.clarity-actions { display: flex; gap: 8px; margin-top: 12px; }
