/* ============================================================
   TOOLYARD — GENERATED TOOL LANDING PAGES
   Layout for the pages produced by scripts/build-tool-pages.js.
   Loaded after design-system.css and the category stylesheet, so
   it can rely on both.
============================================================ */

body { padding-top: var(--header-h); }

/* ── header (matches the rest of the site) ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h); z-index: 200;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .site-header { background: rgba(248,248,252,0.9); }
.site-header-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; gap: 24px;
}
.logo-text {
  font-family: var(--font-display); font-size: 20px; font-weight: 800;
  background: linear-gradient(135deg, var(--accent2), var(--accent3));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hnav {
  padding: 7px 14px; border-radius: var(--r); font-size: 14px;
  font-weight: 500; color: var(--text2); transition: all var(--t);
}
.hnav:hover { background: var(--surface); color: var(--text); }
.theme-btn {
  width: 36px; height: 36px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); cursor: pointer; transition: all var(--t);
}
.theme-btn:hover { border-color: var(--accent); }

/* ── breadcrumb ── */
.breadcrumb {
  padding: 22px 24px 0; font-size: 13px; color: var(--text3);
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.breadcrumb a { color: var(--text3); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent2); text-decoration: underline; }
.breadcrumb span[aria-current] { color: var(--text2); }

/* ── hero ── */
.tp-hero { padding: 26px 24px 30px; text-align: center; }
.tp-hero-icon { font-size: 44px; line-height: 1; margin-bottom: 12px; }
.tp-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 40px); font-weight: 800;
  line-height: 1.12; margin-bottom: 12px;
}
.tp-lede {
  font-size: 16.5px; color: var(--text2); line-height: 1.65;
  max-width: 640px; margin: 0 auto;
}
.tp-badges {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin-top: 20px; font-size: 12.5px; color: var(--text3);
}
.tp-badges span {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 99px; padding: 5px 13px;
}

/* ── the live tool ── */
.tp-workspace { padding: 0 24px; }
.tool-panel-standalone {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl, 24px);
  padding: 28px;
}
.tp-nopanel {
  text-align: center; padding: 56px 24px; color: var(--text2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl, 24px);
}
.tp-nopanel p { margin-bottom: 18px; }

/* ── article + sidebar ── */
.tp-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px; padding: 56px 24px 80px; align-items: start;
}
.tp-article { min-width: 0; }
.tp-intro {
  font-size: 17px; line-height: 1.75; color: var(--text2);
  padding-bottom: 8px;
}
.tp-article h2 {
  font-family: var(--font-display);
  font-size: 23px; font-weight: 800;
  margin: 38px 0 14px; padding-top: 4px;
}
.tp-article p { font-size: 15.5px; line-height: 1.78; color: var(--text2); margin-bottom: 14px; }
.tp-article ul, .tp-article ol { margin: 0 0 16px 20px; }
.tp-article li { font-size: 15.5px; line-height: 1.75; color: var(--text2); margin-bottom: 8px; }
.tp-article strong { color: var(--text); font-weight: 650; }
.tp-article code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 13.5px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px;
}
.tp-article pre {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-md, 14px); padding: 16px;
  overflow-x: auto; margin-bottom: 16px;
}
.tp-article pre code { background: none; border: none; padding: 0; }

.tp-steps { counter-reset: s; list-style: none; margin-left: 0; }
.tp-steps li {
  counter-increment: s; position: relative;
  padding-left: 38px; margin-bottom: 12px;
}
.tp-steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: 1px;
  width: 25px; height: 25px; border-radius: 50%;
  background: rgba(124,108,255,0.14); color: var(--accent2);
  font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ── FAQ ── */
.tp-faq details {
  border: 1px solid var(--border); border-radius: var(--r-md, 14px);
  margin-bottom: 10px; background: var(--surface); overflow: hidden;
}
.tp-faq summary {
  padding: 15px 18px; cursor: pointer;
  font-weight: 650; font-size: 15px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.tp-faq summary::-webkit-details-marker { display: none; }
.tp-faq summary::after { content: '+'; color: var(--text3); font-size: 19px; flex-shrink: 0; }
.tp-faq details[open] summary::after { content: '−'; }
.tp-faq details[open] summary { border-bottom: 1px solid var(--border); }
.tp-faq p { padding: 14px 18px 16px; margin: 0; font-size: 15px; line-height: 1.7; color: var(--text2); }

/* ── sidebar ── */
.tp-aside { position: sticky; top: calc(var(--header-h) + 22px); display: flex; flex-direction: column; gap: 16px; }
.tp-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg, 20px); padding: 20px;
}
.tp-card h3 {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text3); margin-bottom: 14px;
}
.tp-related { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 3px; }
.tp-related a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r, 10px);
  font-size: 14px; color: var(--text2); text-decoration: none;
  transition: all var(--t);
}
.tp-related a:hover { background: var(--surface2); color: var(--text); }
.tp-meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13.5px; }
.tp-meta dt { color: var(--text3); }
.tp-meta dd { color: var(--text2); margin: 0; text-align: right; }
.tp-meta dd a { color: var(--accent2); text-decoration: none; }
.tp-meta dd a:hover { text-decoration: underline; }

/* ── footer ── */
.tp-footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 30px 0; text-align: center;
}
.tp-footer p { font-size: 13px; color: var(--text3); }
.tp-footer a { color: var(--accent2); text-decoration: none; }
.tp-footer a:hover { text-decoration: underline; }

/* ── responsive ── */
@media (max-width: 900px) {
  .tp-body { grid-template-columns: 1fr; gap: 36px; }
  .tp-aside { position: static; }
}
@media (max-width: 640px) {
  .hide-mobile { display: none; }
  .tool-panel-standalone { padding: 18px; }
  .tp-body { padding: 40px 18px 60px; }
}
