/* AIT Learning — global styles */
:root {
  /* default palette: sage / olive */
  --paper: #eef0e8;
  --paper-2: #e1e4d8;
  --ink: #181d14;
  --ink-2: #3c4234;
  --ink-3: #6b6f5e;
  --line: rgba(24, 29, 20, 0.14);
  --line-2: rgba(24, 29, 20, 0.08);
  --accent: #6a8550;
  --accent-ink: #3d4f2c;
  --teal: #2a5560;
  --safe: #2a5560;
  --unsafe: #a64a3a;

  --serif: "Instrument Serif", "DM Serif Display", Georgia, serif;
  --sans: "DM Sans", "Manrope", -apple-system, Segoe UI, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --hero-font: "Bricolage Grotesque", "DM Sans", sans-serif;

  --r-sm: 6px;
  --r: 12px;
  --r-lg: 22px;
}

:root[data-palette="sand"] {
  --paper: #f4efe7;
  --paper-2: #ebe5da;
  --ink: #15110d;
  --ink-2: #3a322a;
  --ink-3: #6b5f51;
  --line: rgba(21, 17, 13, 0.14);
  --line-2: rgba(21, 17, 13, 0.08);
  --accent: #d97757;
  --accent-ink: #8a3a1f;
  --teal: #2c6a5b;
  --safe: #2c6a5b;
  --unsafe: #b14a3a;
}
:root[data-palette="cobalt"] {
  --paper: #eceef2;
  --paper-2: #dde1e8;
  --ink: #0f1620;
  --ink-2: #2d3849;
  --ink-3: #5d6b7e;
  --line: rgba(15, 22, 32, 0.14);
  --line-2: rgba(15, 22, 32, 0.08);
  --accent: #4263c2;
  --accent-ink: #1f3a85;
  --teal: #1a5560;
  --safe: #1a5560;
  --unsafe: #b14a3a;
}
:root[data-palette="plum"] {
  --paper: #f1ebe8;
  --paper-2: #e6dcd6;
  --ink: #1f1218;
  --ink-2: #443035;
  --ink-3: #7a6168;
  --line: rgba(31, 18, 24, 0.14);
  --line-2: rgba(31, 18, 24, 0.08);
  --accent: #8b3a5b;
  --accent-ink: #5a1f3a;
  --teal: #2a5560;
  --safe: #2a5560;
  --unsafe: #b14a3a;
}

:root[data-hero-font="instrument"] { --hero-font: "Instrument Serif", Georgia, serif; }
:root[data-hero-font="bodoni"] { --hero-font: "Bodoni Moda", "Instrument Serif", Georgia, serif; }
:root[data-hero-font="bricolage"] { --hero-font: "Bricolage Grotesque", "DM Sans", sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------------- topbar ---------------- */
.page { max-width: 1280px; margin: 0 auto; padding: 24px 32px 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 0; position: relative; z-index: 5; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-glyph { width: 36px; height: 36px; display: grid; place-items: center; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-ait { font-family: var(--serif); font-size: 22px; letter-spacing: 0.02em; }
.brand-learning { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; }

/* ---- lang switch ---- */
.lang-switch { position: relative; display: inline-flex; background: rgba(21,17,13,0.05); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px; }
.lang-btn { position: relative; z-index: 2; font-family: var(--mono); font-size: 11px; letter-spacing: 0.15em; padding: 7px 12px; border-radius: 999px; color: var(--ink-3); transition: color 0.25s; }
.lang-btn.is-active { color: var(--paper); }
.lang-pill { position: absolute; z-index: 1; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); background: var(--ink); border-radius: 999px; transition: transform 0.35s cubic-bezier(.7,.2,.2,1); }
.lang-pill[data-pos="0"] { transform: translateX(0); }
.lang-pill[data-pos="1"] { transform: translateX(100%); }
.lang-pill[data-pos="2"] { transform: translateX(200%); }

/* ---------------- hero ---------------- */
.hero { position: relative; padding: 56px 0 24px; isolation: isolate; }
.hero-canvas-wrap { position: absolute; top: -120px; left: -32px; right: -32px; bottom: 0; z-index: -1; opacity: 0.85; mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 50%, transparent 100%); -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 50%, transparent 100%); }
.hero-canvas { display: block; width: 100%; height: 100%; }
.hero-inner { max-width: 880px; }
.kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 28px; display: inline-flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 28px; height: 1px; background: var(--accent); }

.hero-title { font-family: var(--hero-font); font-weight: 500; font-size: clamp(40px, 5.2vw, 72px); line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
:root[data-hero-font="instrument"] .hero-title,
:root[data-hero-font="bodoni"] .hero-title { font-weight: 400; letter-spacing: -0.015em; line-height: 1.1; }
.hero-line em { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; letter-spacing: -0.01em; }
.hero-line { display: block; opacity: 0; transform: translateY(18px); animation: rise 0.8s cubic-bezier(.2,.7,.2,1) forwards; }
.hero-line em { font-style: italic; color: var(--accent-ink); }
:root[data-hero-font="bricolage"] .hero-line em { font-size: 1.05em; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.hero-lede { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 620px; margin: 32px 0 0; text-wrap: pretty; }
.hero-ctas { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 56px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.stat-value { font-family: var(--serif); font-size: 34px; line-height: 1; color: var(--ink); }
.stat-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; font-weight: 500; font-size: 15px; transition: transform 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(21,17,13,0.18); }
.btn-primary.is-sent { background: var(--teal); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-ghost { background: transparent; border: 1px solid var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-tiny { padding: 9px 14px; font-size: 13px; border: 1px solid var(--line); }
.btn-tiny.btn-primary { border-color: var(--ink); }
.btn-arrow { transition: transform 0.2s; display: inline-block; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------------- tabs ---------------- */
.tabs { position: sticky; top: 0; z-index: 10; margin: 32px -32px 0; padding: 8px 32px; background: color-mix(in oklab, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tabs-inner { display: flex; gap: 8px; max-width: 1280px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.tabs-inner::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 0; color: var(--ink-3); border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; flex-shrink: 0; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.tab-num { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: var(--accent-ink); opacity: 0.7; }
.tab-label { font-size: 15px; font-weight: 500; }

/* ---------------- sections ---------------- */
.tab-section { padding: 64px 0 80px; }
.tab-panel { animation: fadeUp 0.5s cubic-bezier(.2,.7,.2,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.section-head { max-width: 760px; margin-bottom: 48px; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 16px; }
.section-title { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5.5vw, 68px); line-height: 1.02; letter-spacing: -0.01em; margin: 0; }
.section-lede { font-size: 18px; line-height: 1.55; color: var(--ink-2); margin: 20px 0 0; text-wrap: pretty; }
.subheader { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 0 0 24px; }
.subheader-spaced { margin-top: 64px; }
.card { background: rgba(255,255,255,0.55); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.card-title { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 0 0 6px; }
.muted { color: var(--ink-3); font-size: 14px; margin: 0; }

/* ---------------- safety ---------------- */
.safety-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; }
.promises .checklist { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 14px; }
.promises .checklist li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.45; opacity: 0; animation: rise 0.5s forwards; }
.check { width: 22px; height: 22px; border-radius: 999px; background: var(--accent); color: var(--paper); display: grid; place-items: center; flex-shrink: 0; margin-top: 2px; }

.game-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.score { font-family: var(--serif); display: flex; align-items: baseline; gap: 2px; }
.score-num { font-size: 36px; line-height: 1; color: var(--accent-ink); }
.score-of { font-size: 18px; color: var(--ink-3); }

.buckets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.bucket { min-height: 130px; border-radius: var(--r); border: 1.5px dashed var(--line); padding: 14px; display: flex; flex-direction: column; gap: 12px; transition: border-color 0.2s, background 0.2s; }
.bucket-safe { border-color: color-mix(in oklab, var(--safe) 40%, transparent); background: color-mix(in oklab, var(--safe) 5%, transparent); }
.bucket-unsafe { border-color: color-mix(in oklab, var(--unsafe) 40%, transparent); background: color-mix(in oklab, var(--unsafe) 5%, transparent); }
.bucket-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; }
.bucket-safe .bucket-label { color: var(--safe); }
.bucket-unsafe .bucket-label { color: var(--unsafe); }
.bucket-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 999px; background: currentColor; color: var(--paper) !important; font-size: 11px; }
.bucket-safe .bucket-icon { background: var(--safe); }
.bucket-unsafe .bucket-icon { background: var(--unsafe); }
.bucket-chips { display: flex; flex-direction: column; gap: 6px; }
.sorted-chip { font-size: 12px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); background: rgba(255,255,255,0.6); animation: chipLand 0.35s cubic-bezier(.2,.7,.2,1); }
.sorted-chip.is-correct { border-color: color-mix(in oklab, var(--safe) 45%, transparent); background: color-mix(in oklab, var(--safe) 10%, white); color: var(--safe); }
.sorted-chip.is-wrong { border-color: color-mix(in oklab, var(--unsafe) 45%, transparent); background: color-mix(in oklab, var(--unsafe) 10%, white); color: var(--unsafe); }
@keyframes chipLand { from { opacity: 0; transform: translateY(-6px) scale(0.96); } to { opacity: 1; transform: none; } }

.chips-tray { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.chip { user-select: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 8px 10px 14px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); font-size: 14px; transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s; }
.chip:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.05); border-color: var(--ink-3); }
.chip-text { flex: 1; }
.chip-actions { display: flex; gap: 6px; flex-shrink: 0; }
.chip-act { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(255,255,255,0.6); font-size: 14px; transition: all 0.15s; cursor: pointer; }
.chip-act:hover { transform: translateY(-1px); }
.chip-act-safe { color: var(--safe); }
.chip-act-safe:hover { background: var(--safe); color: var(--paper); border-color: var(--safe); }
.chip-act-unsafe { color: var(--unsafe); }
.chip-act-unsafe:hover { background: var(--unsafe); color: var(--paper); border-color: var(--unsafe); }
.tray-empty { color: var(--ink-3); text-align: center; padding: 18px; letter-spacing: 0.4em; }

.game-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.game-msg { font-size: 14px; color: var(--ink-3); min-height: 20px; }
.game-msg.is-win { color: var(--safe); font-weight: 500; }
.game-msg.is-fail { color: var(--unsafe); }

/* ---------------- training ---------------- */
.modules { display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; align-items: start; }
.module-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.module-tab { width: 100%; display: flex; align-items: center; gap: 14px; padding: 18px 18px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(255,255,255,0.4); text-align: left; transition: background 0.2s, border-color 0.2s, transform 0.15s; }
.module-tab:hover { background: rgba(255,255,255,0.85); border-color: var(--ink-3); }
.module-tab.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.module-num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.15em; opacity: 0.55; }
.module-name { flex: 1; font-size: 15px; font-weight: 500; }
.module-arrow { opacity: 0.4; transition: transform 0.2s, opacity 0.2s; }
.module-tab.is-active .module-arrow { opacity: 1; transform: translateX(4px); color: var(--accent); }

.module-panel { background: var(--ink); color: var(--paper); border-radius: var(--r-lg); padding: 36px; min-height: 380px; position: relative; overflow: hidden; }
.module-panel::before { content: ""; position: absolute; right: -100px; top: -100px; width: 360px; height: 360px; background: radial-gradient(circle, color-mix(in oklab, var(--accent) 45%, transparent), transparent 70%); pointer-events: none; }
.module-meta { display: flex; gap: 36px; margin-bottom: 28px; }
.meta-k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.55; }
.meta-v { font-family: var(--serif); font-size: 22px; margin-top: 4px; }
.module-title { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3vw, 40px); line-height: 1.1; margin: 0 0 28px; max-width: 80%; }
.module-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; position: relative; }
.module-points li { display: flex; gap: 14px; align-items: flex-start; opacity: 0; transform: translateX(-8px); animation: slideIn 0.5s forwards; }
@keyframes slideIn { to { opacity: 1; transform: translateX(0); } }
.point-dash { color: var(--accent); font-family: var(--serif); }

/* ---------------- automation builder ---------------- */
.builder { background: rgba(255,255,255,0.55); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.builder-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.builder-actions { display: flex; gap: 10px; }
.builder-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }

.pipeline { background: var(--paper-2); border-radius: var(--r); padding: 22px; min-height: 360px; position: relative; }
.pipeline-label { color: var(--ink-3); margin-bottom: 14px; display: block; }
.pipeline-empty { color: var(--ink-3); padding: 60px 12px; text-align: center; border: 1.5px dashed var(--line); border-radius: var(--r); }
.pipeline-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.pl-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 8px 0; position: relative; animation: rise 0.35s; }
.pl-rail { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; min-height: 56px; }
.pl-dot { width: 36px; height: 36px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--ink); display: grid; place-items: center; font-size: 16px; transition: all 0.3s; z-index: 2; }
.pl-line { width: 1.5px; flex: 1; background: var(--ink); opacity: 0.25; margin-top: -2px; margin-bottom: -2px; }
.pl-body { display: flex; flex-direction: column; gap: 2px; }
.pl-name { font-weight: 500; font-size: 15px; }
.pl-desc { color: var(--ink-3); }
.pl-x { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink-3); display: grid; place-items: center; transition: all 0.2s; font-size: 16px; }
.pl-x:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pl-active .pl-dot { background: var(--accent); color: var(--paper); border-color: var(--accent); box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 25%, transparent); animation: pulse 0.9s infinite; }
.pl-done .pl-dot { background: var(--teal); color: var(--paper); border-color: var(--teal); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 25%, transparent); } 50% { box-shadow: 0 0 0 12px color-mix(in oklab, var(--accent) 0%, transparent); } }

.pipeline-done { margin-top: 18px; padding: 14px 16px; background: rgba(44,106,91,0.08); color: var(--teal); border-radius: var(--r); font-size: 14px; animation: rise 0.5s; }

.palette { background: var(--paper-2); border-radius: var(--r); padding: 22px; }
.palette-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.block { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); text-align: left; transition: all 0.2s; }
.block:hover:not(:disabled) { border-color: var(--ink); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(21,17,13,0.06); }
.block:disabled { opacity: 0.5; cursor: default; }
.block-icon { font-size: 22px; line-height: 1; }
.block-name { font-size: 13px; font-weight: 500; }
.block-desc { color: var(--ink-3); }

/* ---- offer cards ---- */
.offer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.offer-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: rgba(255,255,255,0.55); position: relative; transition: transform 0.25s, box-shadow 0.25s; }
.offer-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(21,17,13,0.07); }
.offer-card-feat { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.offer-num { color: var(--ink-3); margin-bottom: 18px; }
.offer-card-feat .offer-num { color: rgba(244,239,231,0.5); }
.offer-title { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 0 0 8px; }
.offer-desc { font-size: 14px; line-height: 1.5; color: var(--ink-2); margin: 0; }
.offer-card-feat .offer-desc { color: rgba(244,239,231,0.75); }
.offer-badge { position: absolute; top: 16px; right: 16px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em; padding: 5px 10px; border-radius: 999px; background: var(--accent); color: var(--paper); }

/* ---------------- contact ---------------- */
.contact-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 18px; position: relative; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
.field input, .field textarea {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: var(--sans);
  resize: vertical;
}
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(21,17,13,0.06); }
.chips-radio { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-radio { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 13px; transition: all 0.2s; display: inline-flex; align-items: center; gap: 4px; }
.chip-radio:hover { border-color: var(--ink-3); }
.chip-radio.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip-radio-check { font-size: 11px; }
.section-contact .section-title { font-size: clamp(28px, 4.2vw, 52px); white-space: nowrap; }
@media (max-width: 720px) {
  .section-contact .section-title { font-size: clamp(24px, 7vw, 36px); white-space: normal; }
}
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 6px; position: relative; }
.or-row { color: var(--ink-3); }
.or-row a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.ink-burst { position: absolute; pointer-events: none; left: 0; top: -40px; width: 240px; height: 120px; opacity: 0; }
.ink-burst.is-active { opacity: 1; }

.contact-side { display: flex; flex-direction: column; gap: 12px; }
.side-card { background: rgba(255,255,255,0.55); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.side-k { color: var(--ink-3); margin-bottom: 4px; }
.side-v { font-family: var(--serif); font-size: 22px; }
.side-mail { font-family: var(--serif); font-size: 22px; text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.side-glyph { width: 100%; aspect-ratio: 1; opacity: 0.85; color: var(--ink); }

/* ---------------- footer ---------------- */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 32px 0 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
.footer-rights { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ink-3); }

/* ---------------- responsive ---------------- */
/* ---------------- tweaks panel custom controls ---------------- */
.twk-palettes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.twk-pal { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid rgba(0,0,0,0.1); border-radius: 8px; background: rgba(255,255,255,0.5); cursor: default; transition: all 0.15s; }
.twk-pal:hover { background: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.2); }
.twk-pal.is-on { border-color: #29261b; background: #fff; box-shadow: 0 0 0 1px #29261b inset; }
.twk-pal-sw { position: relative; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.1); overflow: hidden; flex-shrink: 0; }
.twk-pal-sw i { position: absolute; display: block; }
.twk-pal-sw i:first-child { left: 0; top: 0; width: 50%; height: 100%; }
.twk-pal-sw i:last-child { right: 0; top: 50%; bottom: 0; width: 50%; height: 50%; }
.twk-pal-l { font-size: 11px; font-weight: 500; }

.twk-fonts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.twk-fnt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 1px solid rgba(0,0,0,0.1); border-radius: 8px; background: rgba(255,255,255,0.5); cursor: default; transition: all 0.15s; }
.twk-fnt:hover { background: rgba(255,255,255,0.85); }
.twk-fnt.is-on { border-color: #29261b; background: #fff; box-shadow: 0 0 0 1px #29261b inset; }
.twk-fnt-prev { font-size: 22px; line-height: 1; }
.twk-fnt-l { font-size: 10px; color: rgba(41,38,27,0.65); }

@media (max-width: 960px) {
  .page { padding: 20px 20px 0; }
  .tabs { margin: 24px -20px 0; padding: 8px 20px; }
  .hero-canvas-wrap { left: -20px; right: -20px; top: -100px; }
  .safety-grid, .modules, .builder-grid, .contact-grid { grid-template-columns: 1fr; }
  .offer-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 32px; }
  .module-panel { min-height: 0; padding: 28px; }
  .module-title { max-width: 100%; }
  .palette-grid { grid-template-columns: repeat(3, 1fr); }
  /* Automation builder on mobile: palette first, pipeline below */
  .builder-grid { display: flex; flex-direction: column; gap: 16px; }
  .palette { order: 1; }
  .pipeline { order: 2; }
  .builder-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .builder-actions { justify-content: flex-end; }
  .pl-item { grid-template-columns: 36px 1fr auto; gap: 10px; }
  .pl-dot { width: 30px; height: 30px; font-size: 14px; }
  .pl-name { font-size: 14px; }
}
@media (max-width: 640px) {
  .hero { padding-top: 32px; }
  .hero-title { font-size: 38px; line-height: 1.1; }
  .section-title { font-size: 34px; }
  .offer-grid { grid-template-columns: 1fr; }
  .palette-grid { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .tab { padding: 12px 14px; }
  .tab-label { font-size: 13px; }
  .builder { padding: 20px 16px; }
  .pipeline, .palette { padding: 16px; }
  .pl-item { padding: 6px 0; }
  .pl-body { min-width: 0; }
  .pl-name { word-break: break-word; }
  .pl-desc { font-size: 10px; }
}
