/* ============================================================
   Format guides — editorial article layout on the v6 system.
   ============================================================ */
.fmt-page { background: var(--paper); padding-bottom: 20px; }
.fmt-shell { width: min(100% - (var(--gutter) * 2), var(--maxw)); }

.fmt-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 26px 0 0; font-size: 12.5px; color: var(--ink-faint); }
.fmt-crumbs a { color: var(--ink-faint); }
.fmt-crumbs a:hover { color: var(--accent); text-decoration: none; }
.fmt-crumbs .here { color: var(--ink-soft); }

.fmt-head { padding: 30px 0 40px; border-bottom: 1px solid var(--line); }
.fmt-kicker {
  display: inline-block; padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--accent-wash); color: var(--accent-dark);
  font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.fmt-head h1 {
  margin: 16px 0 0; max-width: 19ch;
  font-family: var(--display); font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.0; letter-spacing: -0.04em; font-weight: 500;
}
.fmt-answer {
  max-width: 68ch; margin: 22px 0 0; padding: 20px 24px;
  background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--ink-soft); font-size: 16px; line-height: 1.66;
  box-shadow: var(--shadow-sm);
}
.fmt-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 26px; }
.fmt-link { font-size: 14px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line-strong); padding-bottom: 3px; transition: color .25s var(--ease), border-color .25s var(--ease); }
.fmt-link:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

.fmt-body { display: grid; grid-template-columns: minmax(0, 1fr) clamp(280px, 26vw, 330px); gap: clamp(32px, 5vw, 64px); padding: 46px 0 20px; align-items: start; }
.fmt-main { min-width: 0; }
.fmt-lead { margin: 0 0 18px; font-size: 17.5px; line-height: 1.72; color: var(--ink-soft); max-width: 68ch; }
.fmt-block { margin-top: 48px; }
.fmt-block h2 {
  margin-bottom: 16px; font-family: var(--display);
  font-size: clamp(24px, 2.8vw, 30px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 600;
}
.fmt-block p { margin: 0 0 15px; font-size: 16px; line-height: 1.74; color: var(--ink-soft); max-width: 68ch; }
.fmt-list { margin: 0 0 8px; padding-left: 20px; }
.fmt-list li { margin-bottom: 10px; font-size: 16px; line-height: 1.66; color: var(--ink-soft); max-width: 68ch; }

.fmt-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.fmt-steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.fmt-step-n { font-family: var(--display); font-size: 14px; color: var(--ink-faint); padding-top: 3px; }
.fmt-steps strong { display: block; font-size: 15.5px; font-weight: 600; }
.fmt-steps p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.62; color: var(--ink-soft); }

.fmt-mistakes ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.fmt-mistakes li {
  position: relative; padding: 12px 0 12px 30px; border-bottom: 1px solid var(--line);
  font-size: 15.5px; line-height: 1.6; color: var(--ink-soft);
}
.fmt-mistakes li:before {
  content: "×"; position: absolute; left: 7px; top: 11px;
  color: var(--danger); font-size: 16px; font-weight: 700;
}

.fmt-faq details { border-bottom: 1px solid var(--line); }
.fmt-faq summary { list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative; font-size: 16.5px; font-weight: 600; }
.fmt-faq summary::-webkit-details-marker { display: none; }
.fmt-faq summary:after { content: "+"; position: absolute; right: 6px; top: 15px; font-size: 20px; font-weight: 400; color: var(--accent); }
.fmt-faq details[open] summary:after { content: "–"; }
.fmt-faq details p { margin: 0; padding: 0 0 20px; font-size: 15.5px; line-height: 1.72; color: var(--ink-soft); max-width: 66ch; }

/* Sidebar: tray with a nested preview, matching the gallery cards */
.fmt-side { position: sticky; top: calc(var(--hdr-h) + 24px); display: grid; gap: 16px; }
.fmt-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; background: var(--card); box-shadow: var(--shadow-sm); }
.fmt-card h3 { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 15px; }
.fmt-tpls { display: grid; gap: 10px; }
.fmt-tpl {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 8px; border: 1px solid var(--line); border-radius: var(--r-md); color: var(--ink);
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.fmt-tpl:hover { border-color: var(--line-strong); background: var(--wash); transform: translateY(-2px); text-decoration: none; }
.fmt-tpl-thumb { display: block; overflow: hidden; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line); }
.fmt-tpl-thumb iframe { border: 0; pointer-events: none; }
.fmt-tpl-meta b { display: block; font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.fmt-tpl-meta small { display: block; margin-top: 3px; font-size: 10px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.fmt-card-cta { width: 100%; margin-top: 18px; }
.fmt-card-note { margin-top: 13px; font-size: 12.5px; line-height: 1.58; color: var(--ink-faint); }
.fmt-related a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ink-soft); }
.fmt-related a:last-child { border-bottom: 0; }
.fmt-related a:hover { color: var(--accent); text-decoration: none; }

.fmt-cta {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 36px; align-items: center;
  margin: var(--sec-y) 0 calc(var(--sec-y) + 8px); padding: clamp(26px, 4vw, 40px);
  background: var(--wash-deep); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.fmt-cta h2 { font-family: var(--display); font-size: clamp(26px, 3vw, 32px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 600; max-width: 22ch; }
.fmt-cta p { margin-top: 11px; font-size: 15px; line-height: 1.64; color: var(--ink-soft); max-width: 60ch; }

/* Hub */
.fmt-hub-head { border-bottom: 0; }
.fmt-hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-top: 10px; }
.fmt-hub-card {
  display: grid; grid-template-columns: 156px minmax(0, 1fr); gap: 20px;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--card);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.fmt-hub-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.fmt-hub-thumb { display: block; overflow: hidden; border-radius: var(--r-md); background: #fff; border: 1px solid var(--line); }
.fmt-hub-thumb iframe { border: 0; pointer-events: none; }
.fmt-hub-body span { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.fmt-hub-body h2 { margin: 8px 0 0; font-family: var(--display); font-size: 23px; line-height: 1.14; font-weight: 600; letter-spacing: -0.028em; }
.fmt-hub-body h2 a { color: var(--ink); }
.fmt-hub-body h2 a:hover { color: var(--accent); text-decoration: none; }
.fmt-hub-body p { margin: 9px 0 13px; font-size: 14px; line-height: 1.6; color: var(--ink-soft); }

@media (max-width: 1000px) {
  .fmt-body { grid-template-columns: 1fr; gap: 40px; }
  .fmt-side { position: static; grid-template-columns: 1fr 1fr; }
  .fmt-hub-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .fmt-side { position: static; }
}
@media (max-width: 720px) {
  .fmt-side { grid-template-columns: 1fr; }
  .fmt-cta { grid-template-columns: 1fr; padding: 28px 24px; }
  .fmt-cta .btn { width: 100%; }
  .fmt-head h1 { font-size: clamp(31px, 8.5vw, 42px); }
  .fmt-answer { padding: 17px 19px; font-size: 15px; }
  .fmt-hub-card { grid-template-columns: 1fr; }
  .fmt-hub-thumb { max-width: 230px; }
  .fmt-block h2 { font-size: 23px; }
  .fmt-block p, .fmt-list li, .fmt-lead { font-size: 15.5px; }
  .fmt-steps li { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
  .fmt-tpl { grid-template-columns: 66px minmax(0, 1fr); }
}
@media (max-width: 430px) {
  .fmt-head h1 { font-size: clamp(28px, 9vw, 36px); }
  .fmt-answer { padding: 15px 16px; font-size: 14.5px; }
  .fmt-head-actions .btn { width: 100%; }
  .fmt-hub-body h2 { font-size: 20px; }
}
