/* sfztn.com — shared light theme (base44-like) */
:root{
  --bg:#f6f7fb;
  --surface:#ffffff;
  --surface-2:#fbfbfe;
  --text:#0f172a;
  --muted:#475569;
  --border:#e6e8f0;
  --shadow: 0 10px 30px rgba(2, 6, 23, .06);
  --shadow-sm: 0 6px 18px rgba(2, 6, 23, .06);
  --brand:#2563eb;
  --brand-2:#1d4ed8;
  --danger:#dc2626;
  --ok:#16a34a;
  --radius:18px;
  --radius-sm:14px;
  --container:1100px;
  --focus: 0 0 0 4px rgba(37, 99, 235, .18);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--sans);
  color:var(--text);
  background: radial-gradient(1200px 500px at 15% -10%, rgba(37,99,235,.08), transparent 60%),
              radial-gradient(900px 480px at 100% 0%, rgba(99,102,241,.08), transparent 55%),
              var(--bg);
  line-height:1.55;
}
a{color:inherit; text-decoration:none}
a:hover{color:var(--brand)}
.container{
  max-width:var(--container);
  margin:0 auto;
  padding:0 16px;
}
.skip-link{
  position:absolute; left:-999px; top:auto;
  width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  left:16px; top:16px; width:auto; height:auto;
  background:var(--surface); padding:10px 12px; border:1px solid var(--border);
  border-radius:12px; box-shadow:var(--shadow);
  z-index:9999;
}
.site-header{
  position:sticky; top:0; z-index:50;
  backdrop-filter:saturate(180%) blur(12px);
  background:rgba(246,247,251,.72);
  border-bottom:1px solid rgba(230,232,240,.8);
}
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0;
  gap:14px;
}
.brand{
  display:flex; align-items:center; gap:10px;
  font-weight:750;
  letter-spacing:-.02em;
}
.brand-badge{
  width:36px; height:36px;
  border-radius:12px;
  background: linear-gradient(135deg, rgba(37,99,235,.95), rgba(99,102,241,.92));
  box-shadow: 0 10px 20px rgba(37,99,235,.18);
  display:grid; place-items:center;
  color:#fff; font-weight:800;
}
.nav{
  display:flex; align-items:center; gap:6px;
}
.nav a, .nav button{
  font:inherit;
  background:transparent;
  border:1px solid transparent;
  padding:8px 10px;
  border-radius:12px;
  color:var(--muted);
  cursor:pointer;
}
.nav a:hover, .nav button:hover{
  background:rgba(255,255,255,.7);
  border-color:rgba(230,232,240,.9);
  color:var(--text);
}
.nav .active{
  color:var(--text);
  background:rgba(255,255,255,.78);
  border-color:rgba(230,232,240,.9);
}
.nav-right{display:flex; align-items:center; gap:8px}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(230,232,240,.95);
  background:rgba(255,255,255,.82);
  color:var(--muted);
  box-shadow:0 10px 25px rgba(2,6,23,.03);
}
.icon-btn{
  display:inline-grid; place-items:center;
  width:40px; height:40px;
  border-radius:14px;
  border:1px solid rgba(230,232,240,.95);
  background:rgba(255,255,255,.82);
  box-shadow:0 10px 25px rgba(2,6,23,.03);
  cursor:pointer;
}
.icon-btn:hover{border-color:rgba(37,99,235,.25); box-shadow:var(--shadow-sm)}
/* Dropdown */
.dropdown{position:relative}
.menu{
  position:absolute; top:46px; right:0;
  min-width:280px;
  background:rgba(255,255,255,.98);
  border:1px solid rgba(230,232,240,.95);
  border-radius:16px;
  box-shadow:var(--shadow);
  padding:10px;
  display:none;
}
.menu.open{display:block}
.menu a{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 10px;
  border-radius:12px;
  color:var(--text);
}
.menu a:hover{background:rgba(37,99,235,.06)}
.menu small{color:var(--muted)}
.menu-sep{
  height:1px; background:var(--border); margin:8px 6px;
}
main{padding:28px 0 46px}
.hero{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:18px;
  align-items:stretch;
}
@media (max-width: 920px){
  .hero{grid-template-columns:1fr}
  .menu{right:auto; left:0}
}
.card{
  background:rgba(255,255,255,.92);
  border:1px solid rgba(230,232,240,.95);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  padding:18px;
}

.card > :first-child{ margin-top:0; }
.card h2, .card h3{ margin-top:0; }
.card.pad{padding:18px}
.card h1, .card h2, .card h3{margin:0 0 10px}
.kicker{
  display:inline-flex; align-items:center; gap:8px;
  font-size:13px;
  color:var(--muted);
  background:rgba(255,255,255,.72);
  border:1px solid rgba(230,232,240,.95);
  padding:8px 10px;
  border-radius:999px;
}
h1{font-size:28px; letter-spacing:-.03em}
h2{font-size:20px; letter-spacing:-.02em}
p{margin:0 0 12px; color:var(--muted)}
.grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
@media (max-width: 640px){
  .grid-2{grid-template-columns:1fr}
}
.field{
  display:flex; flex-direction:column; gap:6px;
}
label{font-size:13px; color:var(--muted)}
.input, select, textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(230,232,240,.95);
  background:rgba(255,255,255,.96);
  color:var(--text);
  outline:none;
}
textarea{min-height:160px; font-family:var(--mono); font-size:13px; line-height:1.45}
.input:focus, select:focus, textarea:focus{box-shadow:var(--focus); border-color:rgba(37,99,235,.35)}
.row{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
}
.hint{font-size:12px; color:var(--muted)}
.chips{display:flex; flex-wrap:wrap; gap:8px}
.chip{
  display:flex; align-items:center; gap:8px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(230,232,240,.95);
  background:rgba(255,255,255,.9);
  color:var(--text);
}
.chip input{width:18px; height:18px}
.actions{
  display:flex; flex-wrap:wrap; gap:10px; margin-top:12px
}
.btn{
  border:1px solid rgba(230,232,240,.95);
  background:rgba(255,255,255,.92);
  color:var(--text);
  padding:12px 14px;
  border-radius:14px;
  cursor:pointer;
  font-weight:650;
  letter-spacing:-.01em;
}
.btn.primary{
  background:linear-gradient(135deg, rgba(37,99,235,.95), rgba(99,102,241,.92));
  border-color:rgba(37,99,235,.35);
  color:#fff;
}
.btn:hover{box-shadow:var(--shadow-sm)}
.btn:focus{outline:none; box-shadow:var(--focus)}
.btn.danger{border-color:rgba(220,38,38,.25); color:var(--danger)}
.progress{
  height:10px;
  width:100%;
  background:rgba(15,23,42,.06);
  border-radius:999px;
  overflow:hidden;
  border:1px solid rgba(230,232,240,.95);
}
.progress > div{
  height:100%;
  width:0%;
  background:linear-gradient(90deg, rgba(220,38,38,.95), rgba(245,158,11,.95), rgba(22,163,74,.95));
  transition:width .2s ease;
}
.range-wrap{
  display:grid;
  grid-template-columns: 1fr 92px;
  gap:10px;
  align-items:center;
}
@media (max-width: 420px){
  .range-wrap{grid-template-columns: 1fr 84px}
}
input[type="range"]{
  width:100%;
  accent-color: var(--brand);
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(230,232,240,.95);
  background:rgba(255,255,255,.9);
  color:var(--muted);
  font-size:13px;
}
.hr{height:1px; background:var(--border); margin:14px 0}
.ad-slot{
  border:1px dashed rgba(148,163,184,.9);
  background:rgba(255,255,255,.7);
  border-radius:18px;
  padding:18px;
  color:var(--muted);
  text-align:center;
}
.faq details{
  border:1px solid rgba(230,232,240,.95);
  border-radius:16px;
  background:rgba(255,255,255,.92);
  padding:12px 14px;
}
.faq details + details{margin-top:10px}
.faq summary{
  cursor:pointer;
  font-weight:700;
  color:var(--text);
}
.faq p{margin:8px 0 0}
.site-footer{
  border-top:1px solid rgba(230,232,240,.9);
  padding:22px 0 30px;
  background:rgba(246,247,251,.7);
}
.footer-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  align-items:start;
}
@media (max-width: 820px){
  .footer-grid{grid-template-columns:1fr}
}
.footer-links{
  display:flex; flex-wrap:wrap; gap:10px;
  color:var(--muted);
}
.footer-links a{
  border:1px solid rgba(230,232,240,.95);
  background:rgba(255,255,255,.85);
  padding:8px 10px;
  border-radius:12px;
}
.footer-links a:hover{border-color:rgba(37,99,235,.25)}
.small{font-size:12px; color:var(--muted)}


/* Responsive navigation */
.nav-toggle{
  display:none;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  font-size:20px;
  line-height:1;
}

@media (max-width: 860px){
  .header-inner{
    gap:12px;
  }
  .nav-toggle{
    display:inline-flex;
    margin-left:auto;
  }
  .nav{
    display:none;
    position:absolute;
    left:12px;
    right:12px;
    top:72px;
    z-index:50;
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    padding:12px;
    border:1px solid var(--border);
    border-radius:16px;
    background:var(--surface);
    box-shadow: 0 20px 50px rgba(0,0,0,.08);
    max-height: calc(100vh - 96px);
    overflow:auto;
  }
  .nav.open{ display:flex; }

  .nav > a,
  .nav .dropdown > button{
    width:100%;
    justify-content:space-between;
    padding:12px 12px;
    border-radius:12px;
  }

  .dropdown{
    width:100%;
  }

  /* Dropdown becomes accordion on mobile */
  .dropdown .menu{
    position:static;
    width:100%;
    border-radius:14px;
    margin-top:6px;
    box-shadow:none;
    display:none;
  }
  .dropdown .menu.open{
    display:block;
  }
  .dropdown .menu a{
    padding:10px 12px;
  }
}


/* HTML editor */
.editor-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-top:14px;
}

.toggle{
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:14px;
  background: var(--surface);
  user-select:none;
}

.toggle input{ width:18px; height:18px; }

.controls-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  margin-top:14px;
}

@media (max-width: 860px){
  .controls-grid{ grid-template-columns: 1fr; }
}

.editor-tabs{
  display:none;
  margin-top:14px;
  gap:10px;
}

.tab{
  flex:1;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: var(--surface);
  font-weight:600;
}

.tab.active{
  border-color: rgba(60, 94, 255, .35);
  box-shadow: 0 10px 30px rgba(60, 94, 255, .12);
}

.editor-split{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  margin-top:14px;
}

.pane{
  border:1px solid var(--border);
  border-radius:16px;
  background: var(--surface);
  overflow:hidden;
}

.pane-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  padding:12px 12px 10px;
  border-bottom:1px solid var(--border);
}

.pane-title{ font-weight:700; }
.pane-meta{ font-size: 13px; }

.codearea{
  width:100%;
  display:block;
  resize: vertical;
  border:0;
  outline:0;
  padding:12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  line-height: 1.5;
  background: transparent;
}

.preview{
  width:100%;
  border:0;
  display:block;
  background: #fff;
}

.note{
  margin-top:12px;
  padding:12px 12px;
  border-radius:16px;
  border:1px dashed var(--border);
  background: rgba(0,0,0,.02);
}

/* Mobile: tabs switch panes */
@media (max-width: 860px){
  .editor-tabs{ display:flex; }
  .editor-split{ grid-template-columns: 1fr; }
  .editor-split[data-mode="edit"] .pane:nth-child(2){ display:none; }
  .editor-split[data-mode="preview"] .pane:nth-child(1){ display:none; }
}


/* Card content spacing */
.card p{ margin: 10px 0; }
.card ol, .card ul{ margin: 10px 0 0; padding-left: 20px; }
