/* =========================================================
   Stixiva — outils gratuits (/outils-gratuits et /fil)
   Mêmes repères que la page d’accueil (public/style.css) :
   couleurs, polices, boutons, en-tête, sections, FAQ, bandeau
   final et pied de page. Mobile d’abord, puis 640, 720, 900,
   1024 et 1080px. Les polices sont chargées par un <link>.
   ========================================================= */

:root {
  color-scheme: light;

  --wine: #702f48;
  --wine-dark: #542036;
  --wine-deep: #3d1727;
  --wine-soft: #f6ecf0;
  --wine-line: #ead7df;
  --rose: #bc4365;
  --petal: #e8879b;
  --sage: #5f7553;
  --sage-dark: #4f6446;
  --sage-soft: #e8efe3;
  --butter: #f2c14e;
  --hoop: #c8a677;
  --hoop-dark: #9c7747;
  --ink: #2a2326;
  --ink-soft: #4a3f44;
  --muted: #6a5e63;
  --paper: #fcfaf7;
  --linen: #f6f0e9;
  --aida: #faf7ef;
  --card: #ffffff;
  --line: #e9e1da;
  --line-strong: #d7cac1;
  --focus: #b8651b;

  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgb(42 35 38 / 6%);
  --shadow: 0 18px 40px -22px rgb(61 23 39 / 35%), 0 2px 6px rgb(42 35 38 / 5%);
  --shadow-lg: 0 40px 80px -40px rgb(61 23 39 / 45%), 0 4px 14px rgb(42 35 38 / 6%);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --aida-dots: radial-gradient(circle, rgb(112 47 72 / 24%) 1.2px, transparent 1.7px);
  --media: linear-gradient(150deg, #f8eef1 0%, #f4eee6 55%, #e9efe4 100%);
  --twist: repeating-linear-gradient(135deg, rgb(255 255 255 / 28%) 0 2px, transparent 2px 4.5px);

  --gutter: 20px;
  --header-h: 64px;
  --font-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.5 2.5 2.5L12 5.5' fill='none' stroke='%234f6446' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --icon-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3v10M3 8h10' stroke='%23702f48' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23702f48' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
figure,
ul,
ol,
dl,
dd {
  margin: 0;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: var(--wine);
  text-underline-offset: 3px;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* l’attribut hidden l’emporte toujours sur les display des composants */
[hidden] {
  display: none !important;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--wine);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Typographie ---------- */
h1,
h2 {
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 1.6rem + 2.8vw, 3.3rem);
  line-height: 1.08;
}

h1 em {
  color: var(--wine);
  font-style: italic;
}

h2 {
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.45rem);
  line-height: 1.14;
}

h3 {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

p {
  text-wrap: pretty;
}

.eyebrow {
  color: var(--wine);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead {
  max-width: 720px;
  color: var(--ink-soft);
  font-size: clamp(1.04rem, 1rem + 0.3vw, 1.16rem);
  line-height: 1.65;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.86rem;
}

.nowrap {
  white-space: nowrap;
}

.label,
.field > span,
.field legend {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- Boutons et liens ---------- */
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--wine);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.25s ease,
    transform 0.3s var(--ease-spring);
}

/* un reflet de fil satiné traverse le bouton au survol */
.button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 32%, rgb(255 255 255 / 30%) 47%, transparent 62%);
  transform: translateX(-120%);
  pointer-events: none;
}

.button:hover {
  transform: translateY(-1px);
}

.button:hover::after {
  transform: translateX(120%);
  transition: transform 0.8s var(--ease-out);
}

.button:active {
  transform: translateY(0) scale(0.98);
}

.button-lg {
  min-height: 54px;
  padding: 14px 28px;
  font-size: 1.04rem;
}

.button-sm {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 0.94rem;
}

.button-primary {
  background: var(--wine);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgb(112 47 72 / 75%);
}

.button-primary:hover {
  background: var(--wine-dark);
  box-shadow: 0 16px 28px -14px rgb(112 47 72 / 85%);
}

.button-secondary {
  background: var(--card);
  border-color: var(--line-strong);
  color: var(--ink);
}

.button-secondary::after {
  background: linear-gradient(110deg, transparent 32%, rgb(112 47 72 / 8%) 47%, transparent 62%);
}

.button-secondary:hover {
  background: var(--wine-soft);
  border-color: var(--wine);
  color: var(--wine);
}

.button-light {
  background: #fff;
  color: var(--wine-dark);
}

.button-light:hover {
  background: var(--wine-soft);
}

.button:disabled,
.button[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.text-link {
  display: inline-block;
  padding-block: 9px;
  color: var(--wine);
  font-weight: 600;
  text-decoration: none;
}

/* flèche collée au dernier mot, même quand le lien passe sur deux lignes */
.text-link::after {
  content: '→';
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.25s var(--ease-spring);
}

a.text-link:hover {
  text-decoration: underline;
}

.text-link:hover::after {
  transform: translateX(4px);
}

.cta-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* Coches vertes des listes */
.hero-points,
.prose ul {
  padding: 0;
  list-style: none;
}

.hero-points li,
.prose ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.hero-points li::before,
.prose ul li::before {
  content: '';
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--sage-soft) var(--icon-check) center / 13px no-repeat;
}

/* ---------- En-tête (le même que l’accueil) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgb(252 250 247 / 90%);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--wine);
  text-decoration: none;
}

.brand-mark {
  flex: none;
  width: 34px;
  height: 34px;
  transition: transform 0.6s var(--ease-spring);
}

.brand:hover .brand-mark {
  transform: rotate(-14deg) scale(1.06);
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.nav-link:hover,
.nav-link[aria-current='page'] {
  background: var(--wine-soft);
  color: var(--wine);
}

.nav-optional,
.nav-cta {
  display: none;
}

/* Fil d’avancement : un point avant brodé au rythme de la lecture (navigateurs qui lient une animation au défilement) */
.stitch-progress {
  display: none;
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 3px;
  pointer-events: none;
}

.stitch-progress-thread {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, var(--wine) 0 9px, transparent 9px 14px);
  opacity: 0.8;
}

@supports (animation-timeline: scroll()) {
  .site-header {
    border-bottom-color: transparent;
    animation: header-lift linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 48px;
  }

  .stitch-progress {
    display: block;
  }

  .stitch-progress-thread {
    animation: stitch-read linear both;
    animation-timeline: scroll(root block);
  }
}

@keyframes header-lift {
  to {
    border-bottom-color: var(--line);
    box-shadow: 0 8px 24px -20px rgb(42 35 38 / 45%);
  }
}

@keyframes stitch-read {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* ---------- Fil d’Ariane ---------- */
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 0;
  padding: 14px 0 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.84rem;
}

.crumbs li + li::before {
  content: '›';
  margin: 0 8px;
  color: var(--line-strong);
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--wine);
  text-decoration: underline;
}

/* ---------- En-tête de page (le hero de l’accueil) ---------- */
.page-hero {
  position: relative;
  padding-bottom: 44px;
  overflow-x: hidden;
  overflow-x: clip;
  background:
    radial-gradient(1000px 520px at 92% -8%, rgb(246 224 232 / 80%), transparent 62%),
    radial-gradient(760px 420px at -12% 30%, rgb(232 239 227 / 70%), transparent 62%);
}

/* toile Aïda qui affleure derrière l’en-tête */
.hero-fabric {
  position: absolute;
  inset: 0;
  background-image: var(--aida-dots);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(ellipse 55% 60% at 80% 40%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 55% 60% at 80% 40%, #000 0%, transparent 72%);
  opacity: 0.5;
  pointer-events: none;
}

.page-hero > .wrap {
  position: relative;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-top: 22px;
}

.page-hero-copy {
  display: grid;
  gap: 18px;
  justify-items: start;
  max-width: 780px;
}

/* le soulignement se brode sous la partie mise en valeur */
.page-hero h1 em {
  padding-bottom: 0.04em;
  background: repeating-linear-gradient(90deg, var(--petal) 0 11px, transparent 11px 17px) 0 100% / 100% 3px no-repeat;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--wine-line);
  border-radius: 999px;
  background: #fff;
  color: var(--wine);
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.pill-dot,
.live-dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5b9a55;
  box-shadow: 0 0 0 4px rgb(91 154 85 / 18%);
}

.pill-dot::after,
.live-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: beacon 2.6s ease-out infinite;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.hero-points li::before {
  margin-top: 1px;
}

/* Échevettes de l’en-tête, sur la toile à points des illustrations de l’accueil */
.hero-shelf {
  display: grid;
  place-items: center;
  padding: 44px 16px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    var(--aida-dots) 0 0 / 12px 12px,
    var(--media);
  box-shadow: var(--shadow);
}

/* ---------- Échevettes (le ruban de fils de l’accueil) ---------- */
.skein {
  position: relative;
  display: inline-block;
  flex: none;
  width: 2.75em;
  height: 7.75em;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  transform: rotate(var(--r, 0deg));
  transition: transform 0.4s var(--ease-spring);
}

a.skein:hover,
a.skein:focus-visible {
  z-index: 1;
  transform: translateY(-0.6em) scale(1.06);
}

.skein-hank {
  position: absolute;
  inset: 0 0.3125em;
  border-radius: 1.125em / 1.875em;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 18%), transparent 28%, rgb(255 255 255 / 20%) 48%, transparent 68%, rgb(0 0 0 / 20%)),
    repeating-linear-gradient(72deg, rgb(0 0 0 / 13%) 0 0.0625em, transparent 0.0625em 0.2125em, rgb(255 255 255 / 22%) 0.2125em 0.2625em, transparent 0.2625em 0.4125em),
    var(--c);
  box-shadow: 0 0.75em 1.125em -0.75em rgb(61 23 39 / 55%);
}

/* le pli de l’échevette */
.skein-hank::after {
  content: '';
  position: absolute;
  bottom: 0.5em;
  left: 50%;
  width: 0.1875em;
  height: 22%;
  border-radius: 0.125em;
  background: var(--d);
  opacity: 0.55;
  transform: translateX(-50%);
}

/* la bague de papier : marque et référence (tailles en em de la bague) */
.skein-band {
  position: absolute;
  top: 28%;
  inset-inline: 0.087em;
  padding: 0.35em 0 0.43em;
  border-radius: 0.26em;
  background: #fffdf8;
  box-shadow: 0 0.087em 0.174em rgb(42 35 38 / 25%);
  color: var(--ink);
  font-size: 0.72em;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
}

.skein-band small {
  display: block;
  color: var(--wine);
  font-size: 0.667em;
  letter-spacing: 0.14em;
}

.skein-band small.long {
  font-size: 0.5em;
  letter-spacing: 0.04em;
}

.skein-name {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  pointer-events: none;
}

a.skein:hover .skein-name,
a.skein:focus-visible .skein-name {
  opacity: 1;
  transform: translate(-50%, 0);
}

.skein-sm {
  font-size: 11px;
}

.skein-lg {
  font-size: 30px;
}

.skein-fan {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.5em;
}

.hero-shelf {
  container-type: inline-size;
}

/* sept échevettes : 22,25 em de large, toujours dans le cadre */
.hero-shelf .skein {
  font-size: 13px;
  font-size: min(4cqi, 19px);
}

/* Fils voisins : une étagère d’échevettes, chacune avec sa référence */
.skein-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 28px 12px;
  margin: 0;
  padding: 18px 0 0;
  list-style: none;
}

.skein-shelf li {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.skein-shelf p {
  display: grid;
  gap: 1px;
  line-height: 1.3;
}

.skein-shelf b {
  font-size: 1.02rem;
}

.skein-shelf small {
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------- Sections ---------- */
.section {
  padding-block: 56px;
}

.section-tight {
  padding-block: 40px;
}

.section-linen {
  border-block: 1px solid var(--line);
  background: var(--linen);
}

.section-head {
  display: grid;
  gap: 14px;
  max-width: 720px;
  margin-bottom: 32px;
}

.section-head > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
}

.section-head-center {
  justify-items: center;
  margin-inline: auto;
  text-align: center;
}

.section-head-split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: none;
}

.section-head-split > div {
  display: grid;
  gap: 14px;
  max-width: 720px;
}

.tag {
  display: inline-block;
  justify-self: start;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--wine-soft);
  color: var(--wine);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag-sage {
  background: var(--sage-soft);
  color: var(--sage-dark);
}

/* Chiffres clés (accueil des outils), comme la bande de chiffres de l’accueil */
.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  list-style: none;
}

.facts li {
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 18px 20px;
  background: rgb(255 255 255 / 88%);
  transition: background-color 0.3s ease;
}

.facts li:hover {
  background: #fff;
}

.facts strong {
  color: var(--wine);
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 1.35rem + 1vw, 2.05rem);
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1.1;
}

.facts span {
  color: var(--muted);
  font-size: 0.9rem;
}

.facts-band {
  position: relative;
  margin-top: -12px;
}

/* ---------- Cartes illustrées de l’accueil des outils ---------- */
.tool-grid {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.45s var(--ease-out),
    box-shadow 0.45s var(--ease-out),
    border-color 0.3s ease;
}

.tool-card:hover {
  border-color: var(--wine-line);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.tool-card:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.tool-scene {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  margin: 12px 12px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    var(--aida-dots) 0 0 / 12px 12px,
    linear-gradient(160deg, #fbf4f1, #f3ebe3);
}

.tool-scene > svg {
  width: 100%;
  height: 100%;
}

.tool-scene {
  container-type: inline-size;
}

.tool-scene .skein {
  font-size: 13px;
  font-size: min(5.6cqi, 16px);
}

.tool-scene .skein-fan .skein {
  font-size: 11px;
  font-size: min(4.9cqi, 14px);
}

.tool-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 18px 22px 22px;
}

.tool-meta {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 500;
}

.tool-card h3,
.eq-card h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.tool-card h3 a,
.mini-feature h3 a {
  color: var(--ink);
  text-decoration: none;
}

/* toute la carte est cliquable */
.tool-card h3 a::after,
.mini-feature h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.tool-card h3 a:focus-visible,
.mini-feature h3 a:focus-visible {
  outline: none;
}

.tool-card:hover h3 a,
.mini-feature:hover h3 a {
  color: var(--wine);
}

.tool-card-body > p:not(.tool-meta) {
  color: var(--muted);
}

.tool-card .text-link {
  align-self: flex-start;
  padding-block: 2px 0;
}

.tool-card:hover .text-link::after {
  transform: translateX(4px);
}

/* Scènes des cartes */
.scene-skeins {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.scene-arrow {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--wine-line);
  border-radius: 50%;
  background: #fff;
  color: var(--wine);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.scene-picker {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 100%;
}

.scene-photo {
  position: relative;
  width: 62%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 35%, rgb(232 135 155 / 85%), transparent 45%),
    radial-gradient(circle at 70% 60%, rgb(242 193 78 / 75%), transparent 45%),
    linear-gradient(160deg, #e8efe3, #cfdcc5);
  box-shadow: var(--shadow);
}

.scene-dot {
  position: absolute;
  top: 35%;
  left: 30%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 4px 10px rgb(0 0 0 / 30%);
}

.thread-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.thread-chips li {
  display: inline-grid;
  grid-template-columns: 18px auto;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.2;
}

.thread-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--twist), var(--c);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 10%);
}

/* ---------- Petites cartes d’outils (bas de page) ---------- */
.mini-features {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mini-feature {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition:
    transform 0.45s var(--ease-out),
    box-shadow 0.45s var(--ease-out),
    border-color 0.3s ease;
}

.mini-feature:hover {
  border-color: var(--wine-line);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.mini-feature:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.mini-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: var(--wine-soft);
  color: var(--wine);
}

.mini-icon svg {
  width: 22px;
  height: 22px;
}

.mini-feature h3 {
  font-size: 1.05rem;
}

.mini-feature p {
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---------- Panneau d’outil (la carte « aperçu en direct » de l’accueil) ---------- */
.tool-section {
  position: relative;
  padding-bottom: 16px;
}

.panel {
  position: relative;
  display: grid;
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgb(255 255 255 / 94%);
  box-shadow: var(--shadow-lg);
}

.panel-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px 12px;
  border-bottom: 1px dashed var(--line-strong);
  color: var(--wine);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.live-dot {
  background: #d0435f;
  box-shadow: none;
}

.tool-layout {
  display: grid;
  gap: 24px;
}

.fields {
  display: grid;
  gap: 16px;
  align-content: start;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field small {
  color: var(--muted);
  font-size: 0.82rem;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
  margin-bottom: 6px;
}

input[type='text'],
input[type='number'],
input[type='search'],
input[type='date'],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

select {
  padding-right: 40px;
  -webkit-appearance: none;
  appearance: none;
  background: #fff var(--icon-chevron) right 14px center / 14px no-repeat;
  cursor: pointer;
}

input[type='text']:hover,
input[type='number']:hover,
input[type='search']:hover,
input[type='date']:hover,
select:hover,
textarea:hover {
  border-color: var(--wine-line);
}

input[type='text']:focus-visible,
input[type='number']:focus-visible,
input[type='search']:focus-visible,
input[type='date']:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--wine);
  outline: none;
  box-shadow: 0 0 0 4px rgb(112 47 72 / 14%);
}

textarea {
  min-height: 120px;
  line-height: 1.5;
  resize: vertical;
}

textarea.short {
  min-height: 76px;
}

input[type='color'] {
  width: 64px;
  height: 48px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

input[type='range'] {
  width: 100%;
  height: 28px;
  accent-color: var(--wine);
  cursor: pointer;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--wine);
}

/* Choix exclusifs : les onglets de la carte de l’accueil */
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seg label {
  position: relative;
}

.seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}

.seg span:hover {
  border-color: var(--wine-line);
  color: var(--wine);
}

.seg input:checked + span {
  border-color: var(--wine);
  background: #fff;
  color: var(--wine);
  box-shadow: 0 8px 18px -12px rgb(112 47 72 / 70%);
}

.seg input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.results {
  display: grid;
  gap: 14px;
}

.error {
  padding: 10px 14px;
  border-left: 3px solid #b3261e;
  border-radius: 0 10px 10px 0;
  background: #fbeceb;
  color: #7b1c16;
  font-size: 0.95rem;
}

.note {
  padding: 12px 14px;
  border-left: 3px solid var(--wine);
  border-radius: 0 10px 10px 0;
  background: var(--wine-soft);
  font-size: 0.95rem;
}

/* Chiffres d’un résultat : la bande de chiffres de l’accueil, le principal en bordeaux */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.stats:empty {
  display: none;
}

/* Sur téléphone, deux colonnes : avec un nombre impair de chiffres, le principal prend toute la largeur. */
.stats > .stat:first-child:nth-last-child(odd) {
  grid-column: 1 / -1;
}

.stat {
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 16px 18px;
  background: #fff;
}

.stat dt {
  order: 2;
  color: var(--muted);
  font-size: 0.88rem;
}

.stat dd {
  order: 1;
  margin: 0;
  color: var(--wine);
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 1.25rem + 0.8vw, 1.9rem);
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1.1;
}

/* dans un outil à deux colonnes, les chiffres restent sur une ligne */
.tool-layout .stat dd {
  font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.6rem);
}

.stat.main {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='m8 8 6 6m0-6-6 6' stroke='%23fff' stroke-opacity='.08' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"),
    var(--wine-dark);
}

.stat.main dt {
  color: #f1e3e9;
}

.stat.main dd {
  color: #fff;
}

/* ---------- Fils : pastilles torsadées comme la légende de l’accueil ---------- */
.sw {
  display: inline-block;
  flex: none;
  border-radius: 50%;
  background: var(--twist), var(--c, #ccc);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 10%);
}

.sw-small {
  width: 34px;
  height: 34px;
}

.sw-big {
  width: 88px;
  height: 88px;
  box-shadow:
    inset 0 0 0 1px rgb(0 0 0 / 10%),
    var(--shadow);
}

.thread-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 16px 5px 5px;
  border: 1px solid var(--wine-line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}

.thread-pill:hover {
  border-color: var(--wine);
  color: var(--wine);
}

.chosen {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.1rem;
}

.match-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.match-list li {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.match-list li:hover {
  border-color: var(--wine-line);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.match-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  color: var(--ink);
  text-decoration: none;
}

.match-list a > span:last-child {
  display: grid;
  min-width: 0;
  line-height: 1.35;
}

.match-list a:hover b {
  color: var(--wine);
}

.match-list small {
  color: var(--muted);
  font-size: 0.82rem;
}

.match-meta em {
  color: var(--sage-dark);
  font-style: normal;
  font-weight: 700;
}

.eq-grid {
  display: grid;
  gap: 16px;
}

.eq-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.eq-card .tag {
  margin-top: 6px;
}

.eq-none {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Conversion d’une liste */
.batch {
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
}

.batch summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--wine);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.batch summary::-webkit-details-marker {
  display: none;
}

.batch summary::before {
  content: '';
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--wine-soft) var(--icon-plus) center / 13px no-repeat;
  transition: transform 0.35s var(--ease-spring);
}

.batch[open] summary::before {
  transform: rotate(45deg);
}

.batch .fields {
  margin-top: 12px;
}

/* ---------- Tableaux ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.table-wrap:empty {
  display: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--paper);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tr.current td {
  background: var(--wine-soft);
  color: var(--wine-dark);
  font-weight: 700;
}

tr.current td:first-child {
  box-shadow: inset 3px 0 0 var(--wine);
}

.batch-table a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
  vertical-align: middle;
}

.batch-table .sw {
  width: 22px;
  height: 22px;
}

.batch-table small {
  margin-left: 4px;
  vertical-align: middle;
}

.batch-table td {
  white-space: nowrap;
}

/* Liste de fils : le nom sous la référence, trois colonnes qui tiennent sur un téléphone. */
.shopping-table td:first-child small {
  display: block;
  margin: 2px 0 0 30px;
  color: var(--muted);
  white-space: normal;
}

.shopping-table th:not(:first-child),
.shopping-table td:not(:first-child) {
  text-align: right;
}

/* ---------- Aperçus, photo, légende ---------- */
.preview {
  display: grid;
  place-items: center;
  min-height: 220px;
  overflow: auto;
  padding: clamp(12px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--media);
}

.preview > svg,
.preview > canvas {
  height: auto;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  image-rendering: pixelated;
}

.preview-empty {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.drop {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 170px;
  padding: 22px;
  border: 2px dashed var(--wine-line);
  border-radius: 20px;
  background:
    var(--aida-dots) 0 0 / 12px 12px,
    linear-gradient(160deg, #fbf4f1, #f3ebe3);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.drop:hover,
.drop.over {
  border-color: var(--wine);
  box-shadow: var(--shadow);
}

.drop:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: #fff;
  color: var(--wine);
  box-shadow: var(--shadow-sm);
}

.drop b {
  color: var(--wine);
  font-size: 1.05rem;
}

.picker-stage {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: var(--shadow);
  cursor: crosshair;
  touch-action: none;
}

.picker-stage canvas {
  width: 100%;
  height: auto;
}

.picker-dot {
  position: absolute;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 45%),
    0 4px 10px rgb(0 0 0 / 30%);
  pointer-events: none;
}

.legend {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
}

.legend li:last-child {
  border-bottom: 0;
}

.legend .sw {
  width: 22px;
  height: 22px;
}

.legend span:last-child {
  margin-left: auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.legend .button {
  margin-top: 10px;
}

/* ---------- Palettes : dégradé et accords de couleurs ---------- */
.palette-compare {
  display: grid;
  gap: 8px;
}

.palette-bar {
  display: flex;
  height: 34px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgb(42 35 38 / 10%);
}

.palette-bar span {
  flex: 1;
  background: var(--twist), var(--c);
}

.palette-bar-smooth {
  height: 22px;
}

.results .skein-shelf {
  padding-top: 26px;
}

/* ---------- Scènes des nouvelles cartes ---------- */
.scene-skeins-tight {
  gap: 6px;
}

.scene-motifs {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
}

.scene-motifs svg {
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

/* ---------- Petits motifs ---------- */
.motif-media {
  display: grid;
  place-items: center;
  gap: 14px;
  margin: 0;
  padding: 28px 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    var(--aida-dots) 0 0 / 12px 12px,
    var(--media);
  box-shadow: var(--shadow);
}

.motif-media svg {
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.motif-media figcaption {
  color: var(--muted);
  font-size: 0.85rem;
}

.tool-card .tool-scene > svg:only-child {
  width: auto;
  height: auto;
  max-width: 88%;
  max-height: 88%;
  border-radius: 6px;
}

.motif-legend td {
  white-space: nowrap;
}

/* le nom du fil passe à la ligne : la légende tient sur un téléphone */
.motif-legend td:nth-child(3) {
  white-space: normal;
}

.motif-legend a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
}

.motif-legend .sw {
  width: 22px;
  height: 22px;
}

.legend-symbol {
  display: block;
  padding: 2px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgb(42 35 38 / 12%);
}

/* ---------- Bordures ---------- */
.border-choices {
  display: grid;
  /* 3 × 3 sur téléphone, 5 + 4 sur tablette, les neuf sur une rangée sur ordinateur. */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

/* Les cartes d’une rangée ont la même hauteur, même avec un nom sur deux lignes. */
.border-choice {
  position: relative;
  display: grid;
}

.border-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.border-choice span {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 6px;
  padding: 10px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.86rem;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.border-choice svg {
  width: 100%;
  max-width: 120px;
  height: auto;
  border-radius: 4px;
}

.border-choice span:hover {
  border-color: var(--wine-line);
}

.border-choice input:checked + span {
  border-color: var(--wine);
  background: #fff;
  color: var(--wine);
  box-shadow: 0 8px 18px -12px rgb(112 47 72 / 70%);
}

.border-choice input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.scene-border svg {
  width: 150px;
  height: auto;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.scene-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  list-style: none;
  font-size: 0.8rem;
}

.scene-list li {
  display: grid;
  grid-template-columns: 18px auto 1fr;
  align-items: center;
  gap: 8px;
}

.scene-list li span:last-child {
  color: var(--muted);
  text-align: right;
}

tfoot td {
  border-bottom: 0;
  font-weight: 700;
}

/* ---------- Alphabet ---------- */
.alphabet-sheet svg {
  width: 100%;
  max-width: 720px;
}

.sheet-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sheet-label {
  font-size: 15px;
  font-weight: 600;
}

/* ---------- Page d’un fil ---------- */
.thread-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-top: 22px;
}

.thread-media {
  display: grid;
  place-items: center;
  gap: 18px;
  margin: 0;
  padding: 44px 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    var(--aida-dots) 0 0 / 12px 12px,
    var(--media);
  box-shadow: var(--shadow);
}

.thread-media figcaption {
  color: var(--muted);
  font-size: 0.85rem;
}

.thread-copy {
  display: grid;
  gap: 18px;
  justify-items: start;
  min-width: 0;
}

.facts-list {
  display: grid;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.facts-list div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}

.facts-list div:first-child {
  border-top: 0;
}

.facts-list dt {
  color: var(--muted);
  font-size: 0.9rem;
}

.facts-list dd {
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ---------- Nuanciers ---------- */
.chart-tools {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgb(255 255 255 / 94%);
  box-shadow: var(--shadow-sm);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chips button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 600;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.chips button:hover {
  border-color: var(--wine-line);
  color: var(--wine);
}

.chips button[aria-pressed='true'] {
  border-color: var(--wine);
  background: #fff;
  color: var(--wine);
  box-shadow: 0 8px 18px -12px rgb(112 47 72 / 70%);
}

.chart-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chart-count {
  color: var(--muted);
  font-size: 0.9rem;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chart-grid a {
  display: grid;
  gap: 6px;
  align-content: start;
  height: 100%;
  padding: 8px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out),
    border-color 0.2s ease;
}

.chart-grid a:hover {
  border-color: var(--wine-line);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.chart-grid .tile {
  height: 72px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(135deg, rgb(255 255 255 / 10%) 0 2px, transparent 2px 6px),
    var(--c);
  box-shadow: inset 0 0 0 1px rgb(42 35 38 / 10%);
}

.chart-grid b,
.chart-grid small {
  padding-inline: 4px;
}

.chart-grid b {
  font-size: 1.02rem;
}

.chart-grid small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

/* ---------- Textes ---------- */
.section-prose {
  padding-top: 40px;
}

.prose {
  display: grid;
  gap: 14px;
}

.prose > * {
  max-width: 760px;
}

.prose h2 {
  margin-top: 22px;
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
}

.prose h2:first-child {
  margin-top: 0;
}

/* un point avant brodé au-dessus de chaque titre */
.prose h2::before {
  content: '';
  display: block;
  width: 56px;
  height: 3px;
  margin-bottom: 16px;
  background: repeating-linear-gradient(90deg, var(--petal) 0 11px, transparent 11px 17px);
}

.prose p {
  color: var(--ink-soft);
  font-size: 1.04rem;
}

/* illustration en tête de texte (accueil des outils) */
.prose-figure {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.prose-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 24px 48px -32px rgb(61 23 39 / 45%);
}

.prose-figure figcaption {
  color: var(--muted);
  font-size: 0.92rem;
}

.prose ul {
  display: grid;
  gap: 10px;
  color: var(--ink-soft);
}

/* ---------- Questions fréquentes (celles de l’accueil) ---------- */
.faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.faq .section-head {
  margin-bottom: 28px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.faq details[open] {
  border-color: var(--wine-line);
  box-shadow: var(--shadow-sm);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 14px 18px 14px 20px;
  border-radius: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}

.faq summary:hover {
  color: var(--wine);
}

.faq summary::-webkit-details-marker {
  display: none;
}

/* le « + » devient une croix à l’ouverture */
.faq summary::after {
  content: '';
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--wine-soft) var(--icon-plus) center / 14px no-repeat;
  transition: transform 0.35s var(--ease-spring);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding: 0 20px 20px;
  color: var(--muted);
}

/* ---------- Bandeau final (le dernier bandeau de l’accueil) ---------- */
.final-cta {
  position: relative;
  padding-block: 64px;
  overflow: hidden;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='m10 10 8 8m0-8-8 8' stroke='%23fff' stroke-opacity='.07' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"),
    radial-gradient(900px 420px at 18% 0%, rgb(255 255 255 / 12%), transparent 60%),
    var(--wine-dark);
  color: #fff;
}

.final-cta-inner {
  position: relative;
}

.final-cta-copy {
  display: grid;
  gap: 16px;
  justify-items: center;
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.final-cta h2 {
  color: #fff;
}

.final-cta p {
  color: #f1e3e9;
  font-size: 1.08rem;
}

.final-cta .button {
  margin-top: 6px;
}

.final-cta .final-cta-note {
  color: #e2c6d1;
  font-size: 0.88rem;
}

.final-cta :focus-visible {
  outline-color: #f3c27a;
}

/* ---------- Pied de page (celui de l’accueil) ---------- */
.site-footer {
  padding-block: 56px;
  border-top: 1px solid var(--line);
  background: var(--card);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 24px;
}

.footer-brand {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
  align-content: start;
  justify-items: start;
  max-width: 340px;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.94rem;
}

.footer-col {
  display: grid;
  align-content: start;
  justify-items: start;
}

.footer-title {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--muted);
  font-size: 0.94rem;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--wine);
  text-decoration: underline;
}

.footer-bottom {
  display: grid;
  gap: 6px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

@keyframes beacon {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }
  80%,
  100% {
    opacity: 0;
    transform: scale(3);
  }
}

/* =========================================================
   ≥ 640px
   ========================================================= */
@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .stats > .stat:first-child:nth-last-child(odd) {
    grid-column: auto;
  }

  .mini-features,
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta-row {
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
  }
}

/* =========================================================
   Tablette (≥ 720px)
   ========================================================= */
@media (min-width: 720px) {
  .border-choices {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  :root {
    --gutter: 32px;
    --header-h: 72px;
  }

  .nav-cta {
    display: inline-flex;
    margin-left: 6px;
  }

  .page-hero {
    padding-bottom: 56px;
  }

  .section {
    padding-block: 80px;
  }

  .section-tight {
    padding-block: 56px;
  }

  .section-prose {
    padding-top: 56px;
  }

  .panel {
    gap: 22px;
    padding: 20px 28px 28px;
  }

  .fields.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fields.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .eq-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .eq-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facts {
    grid-template-columns: repeat(4, 1fr);
  }

  .facts li {
    padding: 22px 26px;
  }

  .skein-lg {
    font-size: 40px;
  }

  .chart-tools {
    position: sticky;
    top: calc(var(--header-h) + 10px);
    z-index: 5;
    padding: 16px 18px;
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
  }

  .chart-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .final-cta {
    padding-block: 88px;
  }

  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* =========================================================
   ≥ 900px
   ========================================================= */
@media (min-width: 900px) {
  .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .thread-hero {
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    gap: 56px;
  }
}

/* =========================================================
   Ordinateur (≥ 1024px / 1080px)
   ========================================================= */
@media (min-width: 1024px) {
  .border-choices {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }

  .page-hero-grid.has-aside {
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
    gap: 56px;
  }

  .tool-layout {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
  }

  .faq {
    grid-template-columns: 1fr 1.7fr;
    gap: 64px;
    align-items: start;
  }

  .faq .section-head {
    position: sticky;
    top: calc(var(--header-h) + 32px);
  }

  .footer-grid {
    grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    grid-template-columns: auto 1fr;
    gap: 24px;
  }

  .footer-bottom p:last-child {
    text-align: right;
  }
}

@media (min-width: 1080px) {
  .nav-optional {
    display: inline-flex;
  }

  .mini-features,
  .tool-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* =========================================================
   Impression
   Toutes les pages : ni en-tête ni pied, rien qui défile, les couleurs des fils gardées.
   Feuilles (body.print-sheet : prénom, alphabet, bordure, motifs, liste, nuanciers) : le titre,
   les réglages choisis, la grille à l’échelle de la page, la légende et l’adresse de l’outil.
   ========================================================= */
@page {
  margin: 12mm;
}

.print-settings,
.print-source {
  display: none;
}

@media print {
  .skip-link,
  .site-header,
  .crumbs,
  .pill,
  .hero-points,
  .hero-fabric,
  .page-hero-aside,
  .panel-bar,
  .section-linen,
  .section-related,
  .final-cta,
  .site-footer,
  .no-print,
  .chart-tools {
    display: none !important;
  }

  html,
  body,
  .page-hero {
    background: #fff !important;
  }

  .wrap {
    max-width: none;
    padding-inline: 0;
  }

  .page-hero {
    padding-bottom: 5mm;
  }

  .page-hero-grid {
    display: block;
    margin-top: 0;
  }

  .page-hero h1 {
    font-size: 22pt;
    line-height: 1.15;
  }

  .panel {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  /* Rien ne défile sur le papier : les barres de défilement s’imprimeraient. */
  .preview,
  .table-wrap {
    overflow: visible !important;
    max-height: none !important;
  }

  .preview {
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    break-inside: avoid;
  }

  .preview > svg,
  .preview > canvas {
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  .table-wrap {
    border: 0;
  }

  /* Le fond vineux du chiffre principal ne s’imprime pas : son texte blanc disparaîtrait. */
  .stat.main {
    background: #fff;
  }

  .stat.main dt {
    color: var(--muted);
  }

  .stat.main dd {
    color: var(--wine);
  }

  .stat,
  tr,
  .chart-grid a {
    break-inside: avoid;
  }

  /* La couleur des fils est l’information : elle s’imprime même sans « graphiques d’arrière-plan ». */
  .sw,
  .legend-symbol,
  .chart-grid .tile {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ---------- Feuilles ---------- */
  .print-sheet main > section:not(.page-hero):not(.tool-section),
  .print-sheet .page-hero .lead,
  .print-sheet .field,
  .print-sheet .error {
    display: none !important;
  }

  .print-sheet .panel,
  .print-sheet .tool-layout {
    display: flex;
    flex-direction: column;
    gap: 5mm;
  }

  .print-sheet .preview {
    order: -1;
  }

  .print-sheet .print-settings {
    display: flex;
    flex-wrap: wrap;
    gap: 1mm 6mm;
    order: -2;
    margin: 0;
    font-size: 10pt;
  }

  .print-sheet .print-settings:empty {
    display: none;
  }

  .print-sheet .print-settings b {
    color: var(--muted);
    font-weight: 600;
  }

  .print-sheet .print-source {
    display: block;
    margin: 6mm 0 0;
    color: var(--muted);
    font-size: 9pt;
  }

  /* La grille tient sur la page, sa légende dessous. */
  .print-sheet .preview > svg {
    width: 100%;
    height: auto;
    max-height: 175mm;
  }

  .print-sheet .motif-chart > svg {
    max-height: 140mm;
  }

  .print-sheet .alphabet-sheet svg {
    max-width: 100%;
    max-height: 200mm;
  }

  .print-sheet th,
  .print-sheet td {
    padding-block: 1.6mm;
  }

  .print-sheet .stat {
    padding: 2mm 3mm;
  }

  .print-sheet .stat dd {
    font-size: 15pt;
  }

  /* Nuancier : huit teintes par rangée. */
  .print-sheet .chart-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 2mm;
  }

  .print-sheet .chart-grid a {
    gap: 1mm;
    padding: 1mm 1mm 1.5mm;
    border-radius: 2mm;
  }

  .print-sheet .chart-grid .tile {
    height: 9mm;
    border-radius: 1.5mm;
  }

  .print-sheet .chart-grid b {
    font-size: 8pt;
  }

  .print-sheet .chart-grid small {
    font-size: 6.5pt;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }

  .pill-dot::after,
  .live-dot::after {
    animation: none;
  }

  /* le fil d’avancement suit le défilement : il reste */
  .site-header,
  .stitch-progress-thread {
    animation-duration: auto !important;
  }
}

/* ---------- Comparatif des logiciels (/comparatif) ---------- */
.chooser {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 28px;
  padding: 24px;
}

.chooser-title {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--wine-dark);
}

.chooser-group {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.chooser-group legend {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chooser-need {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  font-size: 0.95rem;
  cursor: pointer;
}

.chooser-need input {
  width: 18px;
  height: 18px;
  accent-color: var(--wine);
}

.chooser-figure {
  margin: 0 0 18px;
}

.chooser-figure figcaption {
  color: var(--muted);
  font-size: 0.9rem;
}

.chooser-plot {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--font-sans);
}

.plot-band {
  fill: var(--aida);
}

.plot-grid {
  stroke: var(--line);
  stroke-dasharray: 3 5;
}

.plot-tick {
  fill: var(--muted);
  font-size: 12px;
}

.plot-axis {
  fill: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.plot-point circle {
  fill: var(--card);
  stroke: var(--ink-soft);
  stroke-width: 2;
  transition: opacity 0.2s, r 0.2s;
}

.plot-point text {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 600;
  paint-order: stroke;
  stroke: var(--card);
  stroke-width: 4px;
  stroke-linejoin: round;
  transition: opacity 0.2s;
}

.plot-point.is-us circle {
  fill: var(--wine);
  stroke: var(--wine-dark);
}

.plot-point.is-us text {
  fill: var(--wine-dark);
  font-size: 13px;
}

.plot-point.is-match circle {
  fill: var(--sage);
  stroke: var(--sage-dark);
}

.plot-point.is-us.is-match circle {
  fill: var(--wine);
  stroke: var(--sage-dark);
  stroke-width: 4;
}

.plot-point.is-faded circle,
.plot-point.is-faded text {
  opacity: 0.22;
}

.plot-point.is-hover circle,
.plot-point:focus-visible circle {
  stroke: var(--focus);
  stroke-width: 4;
}

.chooser-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chooser-card {
  position: relative;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: opacity 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.chooser-card h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.chooser-card h3 a {
  color: inherit;
  text-decoration: none;
}

.chooser-card h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.chooser-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.chooser-card .chooser-price {
  margin-top: 6px;
  color: var(--ink-soft);
}

.chooser-card .chooser-match:not(:empty) {
  margin-top: 8px;
  color: var(--wine-dark);
  font-weight: 700;
}

.chooser-card.is-us {
  border-color: var(--wine-line);
  background: var(--wine-soft);
}

.chooser-card.is-match {
  border-color: var(--sage);
  box-shadow: inset 3px 0 0 var(--sage);
}

.chooser-card.is-match .chooser-match {
  color: var(--sage-dark);
}

.chooser-card.is-faded {
  opacity: 0.5;
}

.chooser-card.is-hover {
  box-shadow: var(--shadow);
}

.chooser-reset {
  margin-top: 4px;
}

.compare-table-wrap {
  position: relative; /* contient les textes pour lecteurs d’écran (positionnés), sinon la page déborde */
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  font-size: 0.9rem;
}

.compare-table thead th {
  min-width: 92px;
  text-align: center;
  vertical-align: bottom;
  line-height: 1.3;
}

.compare-table thead th:first-child {
  text-align: left;
}

.compare-table thead th a {
  color: inherit;
}

.compare-table th[scope='row'],
.compare-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 200px;
  max-width: 240px;
  background: var(--card);
  box-shadow: 1px 0 0 var(--line);
}

.compare-table thead th:first-child {
  background: var(--paper);
}

.compare-table th[scope='row'] {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.compare-table th[scope='row'] small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.78rem;
  line-height: 1.35;
}

.compare-table tr.group th {
  padding: 0;
  background: var(--linen);
  color: var(--wine-dark);
}

/* le titre du groupe reste visible quand le tableau défile sur le côté */
.compare-table tr.group th span {
  position: sticky;
  left: 0;
  display: inline-block;
  padding: 10px 14px;
}

.compare-table td.text {
  min-width: 150px;
  font-size: 0.84rem;
  vertical-align: top;
}

.compare-table td.mark {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
}

.compare-table .is-us {
  background: var(--wine-soft);
}

.compare-table thead th.is-us {
  color: var(--wine-dark);
}

.mark-yes {
  color: var(--sage-dark);
}

.mark-partial {
  color: var(--hoop-dark);
}

.mark-no {
  color: var(--rose);
}

.mark-unknown {
  color: var(--muted);
}

.compare-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.compare-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.compare-side {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.compare-side.is-us {
  border-color: var(--wine-line);
  background: var(--wine-soft);
}

.compare-side h2 {
  margin: 4px 0 8px;
  font-size: 1.4rem;
}

.compare-side .muted,
.compare-list .muted {
  color: var(--muted);
}

.prose h3 {
  margin: 8px 0 0;
  font-size: 1.2rem;
}

.compare-list,
.compare-others {
  display: grid;
  gap: 10px;
}

@media (max-width: 860px) {
  .chooser,
  .compare-duo {
    grid-template-columns: minmax(0, 1fr);
  }

  .chooser {
    padding: 18px;
  }

  .chooser-needs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 12px;
  }

  .chooser-title,
  .chooser-reset {
    grid-column: 1 / -1;
  }

  .compare-table th[scope='row'],
  .compare-table thead th:first-child {
    min-width: 128px;
    max-width: 150px;
    padding: 8px 10px;
  }

  .compare-table th[scope='row'] small {
    display: none;
  }

  .compare-table thead th {
    min-width: 76px;
    padding: 8px 6px;
    font-size: 0.68rem;
  }

  .compare-table td {
    padding: 8px 6px;
  }

  .compare-pair .compare-table td.text {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .chooser-figure {
    overflow-x: auto;
  }

  .chooser-plot {
    min-width: 620px;
  }
}

@media (max-width: 520px) {
  .chooser-needs {
    grid-template-columns: 1fr;
  }
}

/* ---------- Weeks Dye Works → DMC ---------- */
.wk-table td:first-child b {
  font-weight: 700;
}

.wk-num {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.wk-dmcs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.wk-dmc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

a.wk-dmc:hover b {
  color: var(--wine);
}

.wk-dmc small {
  color: var(--muted);
  font-weight: 400;
}

.wk-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 640px) {
  .wk-dmc small {
    display: none;
  }
}

.wk-dmc .sw {
  width: 22px;
  height: 22px;
}

#wk-tool .chart-count {
  margin: 4px 0 12px;
}

.scene-variegated {
  width: 30px;
  height: 92px;
  border-radius: 15px;
  background:
    repeating-linear-gradient(135deg, rgb(255 255 255 / 16%) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, #2f7f8c, #6cc0c4 30%, #3f9aa5 55%, #9bd6d2 78%, #2f7f8c);
  box-shadow: inset 0 0 0 1px rgb(42 35 38 / 12%);
  transform: rotate(-6deg);
}

/* ---------- Nuanciers : mes fils, familles ---------- */
.chart-stash {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.chart-stash .muted {
  margin: 0;
  font-size: 0.86rem;
}

.chart-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chart-grid li {
  position: relative;
}

.chart-grid li.owned::after {
  content: '✓';
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sage, #5f7553);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 0 0 2px #fff;
  pointer-events: none;
}

.chart-grid.marking a {
  cursor: copy;
  border-style: dashed;
}

.chart-grid.marking li.owned a {
  border-style: solid;
  border-color: var(--sage, #5f7553);
}

.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.family-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.family-card h3 {
  margin: 0;
  font-size: 1.08rem;
}

.family-card h3 small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.family-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.family-chips a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px 0 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.family-chips a:hover {
  border-color: var(--wine-line);
  color: var(--wine);
}

.family-chips .sw {
  width: 20px;
  height: 20px;
}

@media print {
  .chart-grid li.owned::after {
    display: none;
  }
}

/* ---------- Créer une grille ---------- */
.creator-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.creator-steps li {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.creator-steps h3,
.creator-steps p {
  margin: 0;
}

.creator-steps p {
  color: var(--muted);
}

.creator-step-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--wine);
  color: #fff;
  font-weight: 700;
}

.creator-starts .text-link {
  margin-top: 6px;
}

.creator-table td:first-child {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .creator-table td:first-child {
    white-space: normal;
  }
}

/* La table entière reste dans la page (moteurs, impression) mais défile dans son cadre. */
#wk-tool .table-wrap {
  max-height: min(70vh, 640px);
  overflow-y: auto;
}

#wk-tool thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.creator-hero-figure {
  margin: 0;
}

.creator-hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.creator-hero-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

/* ---------- Nuanciers : les fils comme dans le sélecteur de l'atelier (src/components/thread-catalog.css) ---------- */
.site-catalog {
  --cat-wine: #702f48;
  --cat-wine-soft: #f6ecf0;
  --cat-petal: #e8879b;
  --cat-sage: #5f7553;
  --cat-sage-dark: #4f6446;
  --cat-sage-soft: #e8efe3;
  --cat-ink: #2a2326;
  --cat-ink-soft: #4a3f44;
  --cat-muted: #6a5e63;
  --cat-paper: #fcfaf7;
  --cat-linen: #f6f0e9;
  --cat-line: #e9e1da;
  --cat-line-strong: #d7cac1;
  --cat-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 22px 24px;
  border: 1px solid var(--cat-line);
  border-radius: 24px;
  background: var(--cat-paper);
  box-shadow: var(--shadow-sm);
}

.site-catalog .catalog-ribbon-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.site-catalog .catalog-ribbon-head p { margin: 0; font-size: 13px; font-weight: 600; color: var(--cat-ink-soft); }
.site-catalog .catalog-ribbon-head .catalog-window { font: italic 500 16px var(--font-serif, 'Playfair Display', Georgia, serif); }
.site-catalog .catalog-ribbon-track { display: flex; min-width: 0; padding: 4px 0; }
.site-catalog .catalog-ribbon-column { position: relative; display: block; flex: 1 1 0; min-width: 0; height: 36px; }
.site-catalog .catalog-ribbon-bars { display: flex; height: 100%; overflow: hidden; transition: opacity .25s; }
.site-catalog .catalog-ribbon-bars > span { flex: 1; transition: opacity .25s; }
.site-catalog .catalog-ribbon-bars > .is-dim { opacity: .14; }
.site-catalog .catalog-ribbon-column + .catalog-ribbon-column .catalog-ribbon-bars { border-left: 2px solid var(--cat-paper); }
.site-catalog .catalog-ribbon-column:first-child .catalog-ribbon-bars { border-radius: 999px 0 0 999px; }
.site-catalog .catalog-ribbon-column:last-child .catalog-ribbon-bars { border-radius: 0 999px 999px 0; }
.site-catalog .catalog-ribbon-column:hover .catalog-ribbon-bars { opacity: .8; }

.site-catalog .catalog-filters { display: flex; align-items: center; gap: 14px; min-width: 0; }
.site-catalog .catalog-search { display: flex; flex: 0 0 300px; align-items: center; gap: 10px; min-height: 46px; padding: 0 18px; border: 1px solid var(--cat-line-strong); border-radius: 999px; background: #fff; color: var(--cat-muted); }
.site-catalog .catalog-search:focus-within { border-color: var(--cat-wine); box-shadow: 0 0 0 4px var(--cat-wine-soft); }
.site-catalog .catalog-search input { flex: 1; min-width: 0; height: 42px; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none; font-size: 14.5px; color: var(--cat-ink); }
.site-catalog .catalog-families { display: flex; flex: 1; min-width: 0; gap: 6px; padding: 2px 40px 2px 2px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); }
.site-catalog .catalog-families::-webkit-scrollbar { display: none; }
.site-catalog .catalog-families button { display: inline-flex; flex: none; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px 0 10px; border: 1px solid var(--cat-line); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; color: var(--cat-ink-soft); white-space: nowrap; }
.site-catalog .catalog-families button:hover { border-color: var(--cat-line-strong); background: var(--cat-paper); }
.site-catalog .catalog-families button[aria-pressed='true'] { background: var(--cat-wine-soft); border-color: var(--cat-wine); color: var(--cat-wine); }
.site-catalog .catalog-family-dot { flex: none; width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(42 35 38 / 18%); }
.site-catalog .catalog-family-dot.is-all { background: conic-gradient(#c72b3b, #ff8313, #fddc59, #7f8f43, #4772a5, #8c6798, #c72b3b); }

.site-catalog .chart-stash { justify-content: flex-start; }
.site-catalog .chart-stash .chart-buttons { margin-left: auto; }
.site-catalog .catalog-segments { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--cat-line); border-radius: 999px; background: var(--cat-linen); }
.site-catalog .catalog-segments button { border: 0; background: transparent; cursor: pointer; min-height: 34px; padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--cat-muted); white-space: nowrap; }
.site-catalog .catalog-segments button[aria-pressed='true'] { background: #fff; color: var(--cat-wine); box-shadow: 0 1px 2px rgb(42 35 38 / 8%), 0 6px 14px -8px rgb(61 23 39 / 30%); }

.site-catalog .catalog-columns { display: flex; flex-direction: column; gap: 10px; }
.site-catalog .catalog-column { display: flex; align-items: stretch; gap: 16px; padding: 10px 16px 10px 12px; border: 1px solid var(--cat-line); border-radius: 20px; background: #fff; scroll-margin-top: 90px; }
.site-catalog .catalog-column[hidden] { display: none; }
.site-catalog .catalog-column-label { display: flex; flex: none; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 56px; padding-right: 12px; background: repeating-linear-gradient(180deg, var(--cat-petal) 0 7px, transparent 7px 12px) 100% 0 / 2px 100% no-repeat; }
.site-catalog .catalog-column-label small { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cat-muted); }
.site-catalog .catalog-column-label strong { font: italic 500 32px/.95 var(--font-serif, 'Playfair Display', Georgia, serif); color: var(--cat-wine); }
.site-catalog .catalog-skeins { display: flex; flex: 1; min-width: 0; gap: 5px; padding-top: 8px; }
.site-catalog .catalog-color { position: relative; flex: 1 1 0; min-width: 0; border-radius: 10px; color: var(--cat-ink); text-decoration: none; container-type: inline-size; }
.site-catalog .catalog-color[hidden] { display: none; }
.site-catalog .catalog-skein { position: relative; display: block; width: 100%; height: 104px; transition: transform .4s var(--cat-spring); }
.site-catalog .catalog-color:hover .catalog-skein,
.site-catalog .catalog-color:focus-visible .catalog-skein { transform: translateY(-7px) scale(1.06); }
.site-catalog .catalog-color:focus-visible { outline: 2px solid var(--cat-wine); outline-offset: 4px; }
.site-catalog .catalog-hank { position: absolute; inset: 0 3px; border-radius: 14px / 24px; box-shadow: 0 12px 18px -12px rgb(61 23 39 / 55%); }
.site-catalog .catalog-hank::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, rgb(0 0 0 / 18%), transparent 28%, rgb(255 255 255 / 20%) 48%, transparent 68%, rgb(0 0 0 / 20%)), repeating-linear-gradient(72deg, rgb(0 0 0 / 13%) 0 1px, transparent 1px 3.4px, rgb(255 255 255 / 22%) 3.4px 4.2px, transparent 4.2px 6.6px); }
.site-catalog .catalog-hank::after { content: ''; position: absolute; bottom: 6px; left: 50%; width: 3px; height: 22%; border-radius: 2px; background: rgb(0 0 0 / 45%); opacity: .55; transform: translateX(-50%); }
.site-catalog .catalog-band { position: absolute; top: 30%; inset-inline: 1px; padding: 3px 0 4px; overflow: hidden; border-radius: 3px; background: #fffdf8; box-shadow: 0 1px 2px rgb(42 35 38 / 25%); color: var(--cat-ink); font-size: clamp(7px, 30cqi, 10.5px); font-weight: 700; line-height: 1.05; letter-spacing: -.02em; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.site-catalog .catalog-color.is-added .catalog-hank { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--cat-sage), 0 12px 18px -12px rgb(61 23 39 / 55%); }
.site-catalog .catalog-color-badge { position: absolute; top: -8px; left: 50%; z-index: 1; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--cat-sage); color: #fff; box-shadow: 0 0 0 2px #fff; transform: translateX(-50%); }
.site-catalog .catalog-columns.marking .catalog-color { cursor: copy; }
.site-catalog .empty-search { margin: 0; padding: 50px 10px; text-align: center; font: 500 22px var(--font-serif, 'Playfair Display', Georgia, serif); color: var(--cat-ink-soft); }

.site-catalog .catalog-tray { position: sticky; bottom: 12px; z-index: 2; display: flex; align-items: center; gap: 16px; padding: 10px 12px 10px 16px; border: 1px solid var(--cat-line); border-radius: 22px; background: #fff; box-shadow: 0 18px 40px -22px rgb(61 23 39 / 35%), 0 2px 6px rgb(42 35 38 / 5%); }
.site-catalog .catalog-skein.is-large { flex: none; width: 36px; height: 62px; rotate: -4deg; }
.site-catalog .catalog-skein.is-large .catalog-hank { inset: 0 2px; border-radius: 13px / 20px; background-color: var(--cat-line); }
.site-catalog .catalog-focus-text { display: flex; flex: 1; flex-direction: column; gap: 5px; min-width: 0; }
.site-catalog .catalog-focus-text p { display: flex; align-items: baseline; gap: 10px; min-width: 0; margin: 0; }
.site-catalog .catalog-focus-text strong { flex: none; font: 500 20px/1.1 var(--font-serif, 'Playfair Display', Georgia, serif); color: var(--cat-ink); }
.site-catalog .catalog-focus-text p > span { overflow: hidden; font-size: 14px; color: var(--cat-ink-soft); white-space: nowrap; text-overflow: ellipsis; }
.site-catalog .catalog-focus-meta { flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.site-catalog .catalog-focus-meta > span { font-size: 12px; color: var(--cat-muted); }
.site-catalog .catalog-focus-meta > .catalog-state { padding: 3px 10px; border-radius: 999px; background: var(--cat-wine-soft); color: var(--cat-wine); font-weight: 700; }
.site-catalog .catalog-focus-meta > .catalog-state.is-in { background: var(--cat-sage-soft); color: var(--cat-sage-dark); }

/* Nuanciers et convertisseur : le sélecteur prend toute la largeur de l'écran (jusqu'à 1 680 px). */
.tool-section .wrap:has(> .site-catalog), .tool-section .wrap:has(> #eq-tool) { max-width: 1680px; }
.site-catalog .catalog-skeins { gap: 7px; }
.site-catalog .catalog-band { font-size: clamp(8px, 30cqi, 12.5px); }
.site-catalog .catalog-band.is-long { font-size: clamp(6px, 19cqi, 11px); letter-spacing: -.04em; }

/* Sélecteur du convertisseur : le même nuancier, en boutons, dans une boîte qui défile. */
.site-catalog button.catalog-color { display: block; padding: 0; border: 0; background: transparent; font: inherit; cursor: pointer; }
.site-catalog .catalog-color.is-picked .catalog-skein { transform: translateY(-7px) scale(1.06); }
.site-catalog .catalog-color.is-picked .catalog-hank { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--cat-wine), 0 12px 18px -12px rgb(61 23 39 / 55%); }
.eq-picker { margin: 18px 0; padding: 16px 18px; }
@media (max-width: 760px) { .eq-picker { padding: 12px 10px; } }
.eq-picker .catalog-families { flex: none; }
.eq-picker .catalog-column { padding-block: 6px; }

@media (prefers-reduced-motion: reduce) {
  .site-catalog .catalog-skein { transition: none; }
}

@media (max-width: 760px) {
  .site-catalog { padding: 14px 12px; }
  .site-catalog .catalog-filters { flex-wrap: wrap; }
  .site-catalog .catalog-search { flex: 1 1 100%; }
  .site-catalog .catalog-skeins { overflow-x: auto; padding-bottom: 6px; }
  .site-catalog .catalog-color { flex: 0 0 40px; }
  .site-catalog .catalog-skein { height: 84px; }
  .site-catalog .catalog-column { gap: 10px; padding: 8px 10px 8px 8px; }
  .site-catalog .catalog-column-label { width: 40px; padding-right: 8px; }
  .site-catalog .catalog-column-label strong { font-size: 24px; }
  .site-catalog .chart-stash { flex-wrap: wrap; }
  .site-catalog .catalog-segments { flex-wrap: wrap; }
  .site-catalog .chart-stash .chart-buttons { margin-left: 0; }
  .site-catalog .catalog-tray .button { display: none; }
}

@media print {
  .site-catalog { padding: 0; border: 0; box-shadow: none; }
  .site-catalog .catalog-filters,
  .site-catalog .chart-stash,
  .site-catalog .catalog-tray { display: none; }
  .site-catalog .catalog-column { break-inside: avoid; padding: 4px 6px; border-radius: 8px; }
  .site-catalog .catalog-skein { height: 56px; }
  .site-catalog .catalog-hank { box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* Menus de marques avec l'icône de la matière (client/brand-picker.ts) : le <select> natif reste dessous. */
.brand-picker-native { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.brand-picker { position: relative; }
.brand-picker-button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 40px 8px 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff var(--icon-chevron) right 14px center / 14px no-repeat; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease; }
.brand-picker-button:hover { border-color: var(--wine-line); }
.brand-picker-button:focus-visible, .brand-picker-button[aria-expanded='true'] { border-color: var(--wine); outline: none; box-shadow: 0 0 0 4px rgb(112 47 72 / 14%); }
/* Panneau des marques (même menu que le nuancier de l'atelier) : recherche, marques rangées par matière, feuille montante sur téléphone. */
.brand-menu-scrim { display: none; }
.brand-menu { position: absolute; top: calc(100% + 10px); left: 0; z-index: 30; display: flex; flex-direction: column; gap: 14px; width: min(1080px, calc(100vw - 32px)); max-height: min(560px, 70vh); box-sizing: border-box; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 2px 4px rgb(42 35 38 / 6%), 0 24px 48px -16px rgb(61 23 39 / 28%); text-align: left; }
.brand-menu[hidden], .brand-menu [hidden], .brand-menu-scrim[hidden] { display: none !important; }
.brand-menu-search { display: flex; align-items: center; gap: 8px; flex: none; height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--paper); color: var(--muted); cursor: text; }
.brand-menu-search:focus-within { border-color: var(--wine); box-shadow: 0 0 0 4px rgb(112 47 72 / 12%); }
.brand-menu-search input { flex: 1; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none; font: inherit; font-size: 15px; color: var(--ink); }
.brand-menu-search input:focus, .brand-menu-search input:focus-visible { border: 0; outline: 0; box-shadow: none; }
.brand-menu-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 16px 14px; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.brand-menu-group { grid-column: span var(--brand-columns, 1); min-width: 0; }
.brand-menu-list { columns: var(--brand-columns, 1); column-gap: 14px; }
.brand-menu-group h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; padding: 4px 8px 8px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; line-height: 1.3; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.brand-menu-group h3 .brand-icon { width: 24px; height: 24px; }
.brand-menu button[data-value] { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; margin: 0; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; break-inside: avoid; color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 600; text-align: left; cursor: pointer; }
@media (hover: hover) { .brand-menu button[data-value]:hover { background: var(--linen); } }
.brand-menu button[data-value]:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.brand-menu button[aria-pressed='true'] { background: var(--wine-soft); color: var(--wine); }
.brand-menu button[data-value] small { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 12px; font-weight: 500; color: var(--muted); }
.brand-menu button[data-value] small svg { color: var(--wine); }
.brand-menu .brand-menu-all { justify-content: flex-start; flex: none; border: 1px solid var(--line); }
.brand-menu .brand-menu-all .brand-icon { width: 24px; height: 24px; box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 6px var(--line); }
.brand-menu .brand-menu-all small { margin-left: auto; }
.brand-menu-none { margin: 0; padding: 8px 10px; font-size: 13px; color: var(--muted); }
@media (max-width: 640px) {
  .brand-menu-scrim { display: block; position: fixed; inset: 0; z-index: 29; background: rgb(42 35 38 / 40%); }
  .brand-menu { position: fixed; inset: auto 0 0; width: auto; max-height: 82vh; padding: 10px 16px 24px; border-radius: 24px 24px 0 0; }
  .brand-menu::before { content: ''; align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); }
  .brand-menu-groups { grid-template-columns: minmax(0, 1fr); scrollbar-width: none; }
  .brand-menu-group { grid-column: auto; }
  .brand-menu-list { columns: 1; }
  .brand-menu button[data-value] { min-height: 48px; font-size: 16px; }
}
.brand-icon { display: inline-grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 50%; }
.brand-icon.is-floss { background: #f6ecf0; color: #702f48; }
.brand-icon.is-bead { background: #e3f1ef; color: #2b6e66; }
.brand-icon.is-drill { background: #ece6f6; color: #5d3f96; }
.brand-icon.is-yarn { background: #f8ecdc; color: #9a5418; }
.brand-icon.is-all { background: conic-gradient(#c72b3b, #ff8313, #fddc59, #7f8f43, #4772a5, #8c6798, #c72b3b); box-shadow: inset 0 0 0 7px #fff, inset 0 0 0 8px var(--line); }

/* ---------- Créer mon alphabet (page alphabet) ---------- */
.alphabet-maker {
  display: grid;
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.alphabet-maker h2 {
  margin: 0;
}

.ac-intro,
.ac-hint,
.ac-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.ac-label {
  color: var(--ink-soft);
  font-weight: 600;
}

.ac-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.ac-labelled {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.ac-labelled input,
.ac-labelled select {
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-weight: 500;
}

.ac-labelled[hidden] {
  display: none;
}

.ac-grow {
  flex: 1 1 220px;
}

.ac-tabs,
.ac-chars,
.ac-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ac-tab,
.ac-char {
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ac-char {
  padding: 0 6px;
}

.ac-tab.active,
.ac-char.active {
  border-color: var(--wine);
  color: var(--wine);
  background: #fff;
}

.ac-char.drawn {
  color: var(--ink);
  background: var(--wine-soft);
}

.ac-work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}

.ac-glyph,
.ac-side {
  display: grid;
  gap: 8px;
}

.ac-glyph {
  justify-items: center;
}

.ac-grid {
  display: flex;
  justify-content: center;
  width: 100%;
  touch-action: none;
  user-select: none;
  cursor: crosshair;
}

.ac-grid svg {
  width: auto;
  max-width: 100%;
  height: min(340px, 50vh);
}

.ac-preview svg {
  display: block;
  width: 100%;
  max-height: 180px;
  background: #faf7ef;
  border: 1px solid var(--line);
  border-radius: 8px;
}

@media (max-width: 760px) {
  .ac-work {
    grid-template-columns: 1fr;
  }
}
