/*
 * Author: Hariram S <ramhari4090@gmail.com>
 *
 * Drawings for the Dotwave Forms page and the Forms band on the home page:
 * the form-to-dashboard flow, the builder and question coach, the
 * clean-at-entry examples, the response quality list, the responses view,
 * the text insights and the PDF report pages. Everything is HTML text in
 * boxes, with SVG only for icons and marks, so labels stay real text, wrap
 * on a phone and never shrink below 12px with a viewBox.
 *
 * Colours follow site.css (near-black ground, #ededed and #a1a1aa text, the
 * violet accent) plus the colour-blind-safe chart colours the dashboards
 * use. A state is never shown by colour alone: every flag and chip carries
 * its word.
 *
 * Used by:
 *     landing/features/forms.html, landing/index.html (the Forms band)
 *
 * Depends on:
 *     landing/assets/site.css (tokens: --surface, --line, --muted, --accent)
 */

.fm-ok { --c: #33c29a; }
.fm-warn { --c: #f5b942; }
.fm-bad { --c: #ff9a8a; }
.fm-info { --c: #56b4e9; }

/* A drawn window: the frame every mock sits in. */
.fm-win { position: relative; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); padding: 18px; text-align: left; font-size: 14px; line-height: 1.5; color: #d4d4d8; min-width: 0; }
.fm-win-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.fm-win-h b { color: #fff; font-weight: 600; font-size: 14px; }
.fm-win-h span { font: 500 12px/1.3 var(--mono); color: var(--muted); }
.fm-cap { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* Flag chips: a coloured dot plus the word, so colour is never the only signal. */
.fm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); font-size: 12px; line-height: 1.4; color: #e4e4e7; white-space: nowrap; }
.fm-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--accent)); flex: none; }
.fm-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Form fields as a respondent sees them. */
.fm-field + .fm-field { margin-top: 14px; }
.fm-lbl { display: block; font-size: 13px; font-weight: 500; color: #fff; margin-bottom: 6px; }
.fm-in { display: block; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #0c0c0e; font: 400 13px/1.4 var(--mono); color: #fff; overflow-wrap: anywhere; }
.fm-hint { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; font-size: 12px; line-height: 1.45; color: #d4d4d8; }
.fm-hint::before { content: ""; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--c, var(--accent)); flex: none; }
.fm-scale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 3px; }
.fm-scale span { display: grid; place-items: center; height: 26px; border: 1px solid var(--line-2); border-radius: 6px; font: 500 12px/1 var(--mono); color: var(--muted); }
.fm-scale span.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.fm-scale-ends { display: flex; justify-content: space-between; margin-top: 4px; font-size: 12px; color: var(--muted); }
.fm-submit { display: inline-flex; margin-top: 16px; padding: 7px 16px; border-radius: 999px; background: #fff; color: #0a0a0b; font-size: 13px; font-weight: 600; }
.fm-progress { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); margin-bottom: 14px; overflow: hidden; }
.fm-progress i { display: block; height: 100%; width: var(--p, 50%); background: var(--accent); }

/* Hero: form → live dataset → dashboard. */
.fm-flow { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1.05fr) 40px minmax(0, 1fr); align-items: center; gap: 0; }
.fm-arrow { display: grid; place-items: center; color: var(--accent-ink); }
.fm-arrow svg { width: 28px; height: 28px; }
.fm-rows { width: 100%; border-collapse: collapse; font: 400 12px/1.4 var(--mono); color: #d4d4d8; }
.fm-rows th { text-align: left; font-weight: 500; color: var(--muted); padding: 0 8px 6px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fm-rows td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fm-rows tr:last-child td { border-bottom: 0; }
.fm-rows .new td { color: #fff; }
.fm-live { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--mono); color: #33c29a; }
.fm-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #33c29a; }
.fm-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fm-kpi { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .02); }
.fm-kpi p { font-size: 12px; color: var(--muted); }
.fm-kpi b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -0.03em; color: #fff; line-height: 1.15; }
.fm-kpi.acc { border-color: rgba(124, 92, 255, .55); background: rgba(124, 92, 255, .12); }
.fm-hbars { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 7px; }
.fm-hbars li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) 3em; align-items: center; gap: 8px; font-size: 12px; color: #d4d4d8; }
.fm-hbars i { display: block; height: 10px; width: var(--v); border-radius: 3px; background: var(--c, #a99bea); }
.fm-hbars span:last-child { text-align: right; font-family: var(--mono); color: #fff; }

/* Building the form */
.fm-ways { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: clamp(32px, 4vw, 48px); }
.fm-ways li { padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.fm-ways .ic-box { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); display: grid; place-items: center; background: rgba(255, 255, 255, .03); margin-bottom: 14px; }
.fm-ways .ic-box .ic { width: 18px; height: 18px; color: var(--accent-ink); }
.fm-ways b { display: block; font-size: 17px; font-weight: 600; color: #fff; letter-spacing: -0.015em; }
.fm-ways p { margin-top: 6px; font-size: var(--t5); color: var(--muted); }
.fm-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); margin-top: clamp(24px, 3vw, 40px); align-items: start; }
.fm-q { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #0c0c0e; color: #fff; font-size: 14px; }
.fm-q small { display: block; margin-bottom: 4px; font: 500 12px/1.4 var(--mono); color: var(--muted); }
.fm-coach { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.fm-coach li { padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 4px 12px 12px 4px; font-size: 13px; line-height: 1.5; }
.fm-coach li b { display: block; color: #fff; font-weight: 600; margin-bottom: 2px; }
.fm-coach .try { margin-top: 6px; font-family: var(--mono); font-size: 12px; color: #fff; }
.fm-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.fm-meta b { color: #fff; font-weight: 600; }

/* Sharing */
.fm-share { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: clamp(32px, 4vw, 48px); }
.fm-share li { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.fm-share .pic { height: 92px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #0c0c0e; }
.fm-share .pic svg { height: 64px; width: auto; }
.fm-share b { color: #fff; font-size: 16px; font-weight: 600; }
.fm-share p { font-size: var(--t5); color: var(--muted); }
.fm-code { margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #0c0c0e; font: 400 13px/1.65 var(--mono); color: #d4d4d8; overflow-x: auto; white-space: pre; }
.fm-code .k { color: #b4a3ff; }
.fm-code .s { color: #7fd8bd; }
.fm-list { padding-left: 1.2em; display: grid; gap: 8px; }
.fm-list li::marker { color: var(--accent-ink); }

/* Clean at entry: typed → stored */
table.fm-entry td:nth-child(2), table.fm-entry td:nth-child(3) { font-family: var(--mono); font-size: 13px; color: #fff; }
table.fm-entry { min-width: 760px; }

/* Response quality list */
.fm-qual { list-style: none; padding: 0; margin: 0; display: grid; }
.fm-qual li { display: grid; grid-template-columns: 4.2em minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.fm-qual li:last-child { border-bottom: 0; }
.fm-qual .id { font: 500 12px/1 var(--mono); color: var(--muted); }
.fm-qual .ans { color: #fff; overflow-wrap: anywhere; }
.fm-qual .ans small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.fm-meter { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: #e4e4e7; white-space: nowrap; }
.fm-meter i { display: block; width: 54px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); position: relative; overflow: hidden; }
.fm-meter i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v); background: var(--c); border-radius: 6px; }
.fm-toggle { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: #fff; }
.fm-toggle::before { content: ""; width: 30px; height: 18px; border-radius: 999px; background: var(--accent) radial-gradient(circle at 21px 9px, #fff 6px, transparent 6.5px); flex: none; }

/* Responses view */
.fm-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; width: max-content; max-width: 100%; margin-bottom: 14px; }
.fm-tabs span { padding: 5px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); }
.fm-tabs span.on { background: #fff; color: #0a0a0b; font-weight: 600; }
.fm-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fm-btn { display: inline-flex; padding: 5px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; color: #fff; }

/* Text insights */
.fm-themes { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.fm-themes li { display: grid; grid-template-columns: minmax(0, 9em) 3em minmax(0, 1fr); gap: 4px 10px; align-items: center; font-size: 13px; }
.fm-themes b { color: #fff; font-weight: 500; }
.fm-themes .n { font-family: var(--mono); color: #fff; text-align: right; }
.fm-sent { display: flex; height: 12px; border-radius: 4px; overflow: hidden; gap: 2px; }
.fm-sent i { display: block; width: var(--v); background: var(--c); }
.fm-themes .why { grid-column: 3; font-size: 12px; color: var(--muted); }
.fm-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.fm-key span { display: inline-flex; align-items: center; gap: 6px; }
.fm-key span::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.fm-quote { margin: 0; padding: 14px 16px; border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; background: rgba(124, 92, 255, .08); color: #fff; font-size: 14px; }
.fm-quote cite { display: block; margin-top: 6px; font-style: normal; font-size: 12px; color: var(--muted); }
.fm-mask { font-family: var(--mono); font-size: 13px; color: #d4d4d8; }
.fm-mask mark { background: rgba(86, 180, 233, .18); color: #fff; border: 1px dashed rgba(86, 180, 233, .7); border-radius: 4px; padding: 0 4px; }

/* PDF report pages */
.fm-pages { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: clamp(32px, 4vw, 48px); }
.fm-page { aspect-ratio: 210 / 297; padding: 14px; border-radius: 6px; background: #fbfbfd; color: #12131a; display: flex; flex-direction: column; gap: 8px; font-size: 12px; line-height: 1.4; overflow: hidden; }
.fm-page .pg { margin-top: auto; display: flex; justify-content: space-between; font: 500 12px/1 var(--mono); color: #5d606e; }
.fm-page h3 { color: #12131a; font-size: 15px; line-height: 1.2; }
.fm-page p { color: #3c3f4c; }
.fm-page .big { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; color: #12131a; line-height: 1; }
.fm-page .tag { font: 600 12px/1 var(--mono); color: #4b2fd6; }
.fm-page .hb { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; }
.fm-page .hb li { display: grid; grid-template-columns: 6.6em minmax(0, 1fr); gap: 6px; align-items: center; color: #3c3f4c; }
.fm-page .hb i { display: block; height: 8px; width: var(--v); border-radius: 2px; background: #5b3df5; }
.fm-page .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fm-page .stats div { padding: 6px 8px; border-radius: 6px; background: #efecff; }
.fm-page .stats b { display: block; font-size: 17px; color: #12131a; }
.fm-pages figcaption, .fm-pages .lbl { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* Home page band */
.fm-band { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(24px, 4vw, 44px); border: 1px solid rgba(124, 92, 255, .45); border-radius: 24px; background: radial-gradient(70% 120% at 100% 0%, rgba(124, 92, 255, .2), transparent 70%), var(--surface); }
.fm-band h2 { font-size: clamp(28px, 3.2vw, 44px); }
.fm-band .lead { margin-top: 16px; }
.fm-band .hero-actions { justify-content: flex-start; margin-top: 24px; }
.fm-band-pic { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, .8fr); align-items: center; }
.fm-band-pic .fm-win { padding: 14px; }

@media (max-width: 1100px) {
  .fm-share, .fm-pages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .fm-flow { grid-template-columns: minmax(0, 1fr); gap: 4px; max-width: 520px; margin-inline: auto; }
  .fm-arrow svg { transform: rotate(90deg); }
  .fm-ways, .fm-two, .fm-band { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .fm-share, .fm-pages { grid-template-columns: minmax(0, 1fr); }
  .fm-pages { max-width: 300px; }
  .fm-band-pic { grid-template-columns: minmax(0, 1fr); }
  .fm-band-pic .fm-arrow { display: none; }
  .fm-band-pic .fm-win + .fm-arrow + .fm-win { margin-top: 10px; }
  .fm-themes li { grid-template-columns: minmax(0, 1fr) 3em; }
  .fm-themes .fm-sent, .fm-themes .why { grid-column: 1 / -1; }
  .fm-qual li { grid-template-columns: 3.6em minmax(0, 1fr); }
  .fm-qual li > :last-child { grid-column: 2; }
}
