:root{
    --bg: #ffffff;
    --bg-soft: #f6f7fb;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e5e7eb;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --success: #16a34a;
  
    --radius: 16px;
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  
    font-synthesis: style;
  }
  
  *{ box-sizing: border-box; }
  body{
    margin:0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
  }
  
  a{ color: inherit; text-decoration: none; }
  
  .container{
    width: min(1100px, 92vw);
    margin: 0 auto;
  }
  
  /* =========================
     HEADER
  ========================= */
  .site-header{
    position: sticky;
    top:0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--border);
  }
  
  .header-inner{
    display:flex;
    align-items:center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 12px;
  }
  
  .logo{
    font-weight: 800;
    letter-spacing: .2px;
    font-size: 20px;
    color: var(--text);
    white-space: nowrap;
  }
  .logo span{ color: var(--accent); }
  
  .nav{
    display:flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  
  .nav a{
    font-size: 14px;
    color: var(--muted);
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: .15s ease;
  }
  .nav a:hover{
    color: var(--text);
    background: var(--bg-soft);
    border-color: var(--border);
  }
  .nav a.active{
    color: var(--accent);
    background: #eef2ff;
    border-color: #e0e7ff;
    font-weight: 700;
  }
  
  /* Mobile header layout:
     Logo centered on top,
     menu below in 2 columns */
  @media (max-width: 720px){
    .header-inner{
      flex-direction: column;
      align-items: center;
      padding: 10px 0;
    }
    .logo{
      text-align: center;
      font-size: 19px;
    }
    .nav{
      width: 100%;
      justify-content: center;
      gap: 6px;
    }
    .nav a{
      flex: 1 1 calc(50% - 6px);
      text-align: center;
      border-radius: 10px;
      background: #fff;
      border: 1px solid var(--border);
      padding: 9px 6px;
      font-size: 13px;
    }
  }
  
  /* =========================
     HOME HERO + CARDS
  ========================= */
  .hero{
    padding: 38px 0 18px;
  }
  
  h1{
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
    margin: 0 0 8px;
  }
  .sub{
    color: var(--muted);
    line-height: 1.7;
    max-width: 70ch;
    margin: 0;
  }
  
  .tool-grid{
    margin-top: 18px;
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
  }
  
  .tool-card{
    background: var(--card);
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform .12s ease, box-shadow .12s ease;
  }
  .tool-card:hover{
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  }
  .tool-card h2{
    margin: 0 0 6px;
    font-size: 18px;
  }
  .tool-card p{
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
  }
  
  /* =========================
     TOOL PAGE LAYOUT
  ========================= */
  .tool-page{
    padding: 24px 0 48px;
  }
  
  .tool-box{
    margin-top: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    display:flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: var(--shadow);
  }
  
  .tool-box input{
    flex: 1;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 12px;
    border-radius: 12px;
    outline: none;
    font-size: 15px;
    transition: border .12s ease, box-shadow .12s ease;
  }
  .tool-box input:focus{
    border-color: #c7d2fe;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
  }
  
  .tool-box button{
    background: var(--accent);
    border: none;
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .12s ease, transform .05s ease;
  }
  .tool-box button:hover{ background: var(--accent-hover); }
  .tool-box button:active{ transform: translateY(1px); }
  
  .status{
    width: 100%;
    margin-top: 8px;
    background: var(--bg-soft);
    border: 1px dashed var(--border);
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    color: var(--muted);
  }
  .hidden{ display:none; }
  
  .result{
    width: 100%;
    margin-top: 10px;
    display:grid;
    gap: 10px;
  }
  
  .result video{
    width: 100%;
    max-height: 420px;
    border-radius: 14px;
    background: #000;
    border: 1px solid var(--border);
  }
  
  .btn-secondary{
    display:inline-block;
    width:max-content;
    background: #e8f7ed;
    color: #0b3b1c;
    font-weight: 800;
    padding: 10px 14px;
    border-radius: 12px;
    border:1px solid #b7e4c7;
  }
  
  /* =========================
     CONTENT SECTIONS UNDER TOOL
  ========================= */
  .content{
    margin-top: 18px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
  }
  
  .content h2{
    margin: 0 0 8px;
    font-size: 18px;
  }
  .content p, .content li{
    color: var(--muted);
    line-height: 1.7;
    font-size: 15px;
  }
  .content ol, .content ul{
    padding-left: 18px;
    margin: 8px 0 0;
  }
  
  /* FAQ on home */
  .faq{
    margin-top: 18px;
  }
  .faq details{
    background: #fff;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 8px;
  }
  .faq summary{
    cursor:pointer;
    font-weight: 700;
  }
  .divider{
    margin: 22px 0;
    border-color: var(--border);
  }
  
  /* =========================
     FOOTER
  ========================= */
  .footer{
    border-top: 1px solid var(--border);
    padding: 16px 0;
    color: var(--muted);
    font-size: 14px;
    background:#fff;
  }
  