/* SQL Formatter landing page only (/tools/sql-formatter-beautifier).
   The live formatter sits in the hero; ids are shared with /assets/tools/sql-formatter-beautifier.js. */

.tp-sql{--sq-ink:#071b35;--sq-muted:#4d5f76;--sq-line:#d7e1ee;--sq-blue:#1f5cf0;--sq-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.tp-sql.mt-public{padding-top:clamp(20px,3.2vw,44px)}

.tp-sql-hero{display:grid;grid-template-columns:minmax(0,.78fr) minmax(0,1.22fr);gap:clamp(24px,4vw,56px);align-items:start}
.tp-sql-intro{min-width:0;padding-top:6px}
.tp-sql-intro h1{margin:10px 0 14px;font-size:clamp(2rem,3.4vw,3.2rem);line-height:1.04;letter-spacing:-.045em;overflow-wrap:anywhere}
.tp-sql-lede{margin:0 0 18px;color:var(--sq-muted);font-size:1.06rem;line-height:1.6}
.tp-sql-price{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;margin:0 0 18px;padding:10px 14px;border:1px solid var(--sq-line);border-radius:12px;background:#fff}
.tp-sql-price b{font-size:1.05rem}
.tp-sql-price span{color:var(--sq-muted);font-size:.9rem;font-weight:650}
.tp-sql-facts{margin:0 0 12px;padding:0;list-style:none;display:grid;gap:9px}
.tp-sql-facts li{position:relative;padding-left:22px;line-height:1.5;font-size:.95rem}
.tp-sql-facts li::before{content:"";position:absolute;left:4px;top:.55em;width:8px;height:8px;border-radius:2px;background:var(--sq-blue)}
.tp-sql-more{margin:0}
.tp-sql-more a{display:inline-flex;align-items:center;min-height:44px;color:var(--sq-blue);font-weight:800;text-underline-offset:3px}

/* formatter card */
.tp-sql-tool{min-width:0;border:1px solid #bfd0e5;border-radius:20px;background:#fff;box-shadow:0 22px 55px rgba(9,34,70,.12);padding:20px}
.tp-sql-inhead,.tp-sql-outhead{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 12px;margin:0 0 6px}
.tp-sql-tool label[for]{display:block;margin:0 0 6px;font-size:.76rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--sq-muted)}
.tp-sql-inhead label[for]{margin:0;font-size:.9rem;letter-spacing:0;text-transform:none;color:var(--sq-ink)}
.tp-sql-mini{display:flex;gap:4px}
.tp-sql-link{min-height:40px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:var(--sq-blue);font:inherit;font-size:.88rem;font-weight:800;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.tp-sql-link:hover{background:#eef3fb}
.tp-sql-tool textarea{display:block;width:100%;box-sizing:border-box;min-height:132px;max-height:40vh;resize:vertical;padding:10px 12px;border:1px solid var(--sq-line);border-radius:10px;background:#f7f9fc;color:var(--sq-ink);font-family:var(--sq-mono);font-size:.84rem;line-height:1.5}
.tp-sql-tool textarea:focus-visible,.tp-sql-opts select:focus-visible{outline:none;border-color:var(--sq-blue);box-shadow:0 0 0 3px rgba(31,92,240,.22)}
.tp-sql-unit{margin:6px 0 0;font-size:.78rem;color:var(--sq-muted)}

.tp-sql-opts{margin:12px 0 0;padding:0;border:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;min-width:0}
.tp-sql-opts>div{min-width:0}
.tp-sql-opts select{display:block;width:100%;min-height:44px;padding:0 10px;border:1px solid var(--sq-line);border-radius:10px;background:#fff;color:var(--sq-ink);font:inherit;font-size:.88rem}
.tp-sql-note{margin:8px 0 0;font-size:.8rem;line-height:1.45;color:var(--sq-muted)}

.tp-sql-outhead{margin-top:16px}
.tp-sql-outhead h2{margin:0;font-size:.9rem;letter-spacing:0;line-height:1.3}
.tp-sql-outhead span{font-size:.78rem;color:var(--sq-muted)}
.tp-sql-pre{margin:0;min-height:120px;max-height:340px;overflow:auto;padding:12px 14px;border-radius:10px;background:#0d1b33;color:#e6ecf7;font-family:var(--sq-mono);font-size:.82rem;line-height:1.6;white-space:pre;tab-size:4}
.tp-sql-pre:focus-visible{outline:2px solid var(--sq-blue);outline-offset:2px}
.tp-sql-error{margin:10px 0 0;padding:10px 12px;border-radius:9px;border:1px solid #f0b4b4;background:#fdf1f1;color:#8c2b2b;font-size:.86rem;overflow-wrap:anywhere}
.tp-sql-error[hidden]{display:none}

.tp-sql-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin-top:12px}
.tp-sql-btn{min-height:44px;padding:0 14px;border:1px solid var(--sq-line);border-radius:10px;background:#fff;color:var(--sq-ink);font:inherit;font-size:.88rem;font-weight:750;cursor:pointer}
.tp-sql-btn:hover{border-color:var(--sq-blue);color:var(--sq-blue)}
.tp-sql-btn--main{background:var(--sq-blue);border-color:var(--sq-blue);color:#fff}
.tp-sql-btn--main:hover{background:#1649c4;color:#fff}
.tp-sql-btn:focus-visible,.tp-sql-link:focus-visible,.tp-sql-more a:focus-visible,.tp-sql-read summary:focus-visible{outline:2px solid var(--sq-blue);outline-offset:2px}

.tp-sql-read{margin-top:12px;border-top:1px solid var(--sq-line);padding-top:4px}
.tp-sql-read summary{display:flex;align-items:center;min-height:40px;font-size:.86rem;font-weight:750;color:var(--sq-ink);cursor:pointer}
.tp-sql-read dl{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;margin:4px 0 0;font-size:.84rem}
.tp-sql-read dt{color:var(--sq-muted)}
.tp-sql-read dd{margin:0;font-weight:750;font-variant-numeric:tabular-nums;text-align:right}

/* what you get */
.tp-sql-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.tp-sql-cards>div{min-width:0;border:1px solid var(--sq-line);border-radius:14px;background:#fff;padding:16px}
.tp-sql-cards h3{margin:0 0 6px;font-size:1rem}
.tp-sql-cards p{margin:0;font-size:.9rem;line-height:1.55;color:var(--sq-muted)}
.tp-sql code{overflow-wrap:anywhere}

/* this page runs fully in the browser and stores no results */
.tp-sql-page .wt-foot-note{display:none}

@media (max-width:1100px){
  .tp-sql-opts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tp-sql-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:900px){
  .tp-sql-hero{grid-template-columns:minmax(0,1fr);gap:14px}
  .tp-sql-intro{display:contents}
  .tp-sql-intro>.mt-eyebrow{order:1;margin:0}
  .tp-sql-intro>h1{order:2;margin:0}
  .tp-sql-lede{order:3;margin:0;font-size:1rem}
  .tp-sql-tool{order:4}
  .tp-sql-price{order:5;margin:0}
  .tp-sql-facts{order:6;margin:4px 0 0}
  .tp-sql-more{order:7}
}
@media (max-width:560px){
  .tp-sql.mt-public{padding-top:16px}
  .tp-sql-intro h1{font-size:clamp(1.6rem,7.6vw,2.1rem);letter-spacing:-.035em}
  .tp-sql-lede{font-size:.95rem;line-height:1.5}
  .tp-sql-tool{padding:14px;border-radius:16px}
  .tp-sql-tool textarea{min-height:112px}
  .tp-sql-opts{gap:8px}
  .tp-sql-pre{max-height:300px;font-size:.78rem}
  .tp-sql-btn{flex:1 1 auto}
  .tp-sql-cards{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:340px){
  .tp-sql-opts{grid-template-columns:minmax(0,1fr)}
}
@media (prefers-reduced-motion:reduce){
  .tp-sql *{transition:none;scroll-behavior:auto}
}

.tp-sql-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.tp-sql-read summary{list-style:none;gap:8px}
.tp-sql-read summary::-webkit-details-marker{display:none}
.tp-sql-read summary::before{content:"+";display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border:1px solid var(--sq-line);border-radius:6px;font-weight:800;color:var(--sq-blue)}
.tp-sql-read[open] summary::before{content:"\2212"}
@media (min-width:901px){
  .tp-sql-pre{max-height:260px}
  .tp-sql-tool textarea{min-height:110px}
}
