:root {
  --ink: #151923;
  --muted: #5e6676;
  --line: #d9dee8;
  --paper: #fbfcfe;
  --panel: #ffffff;
  --accent: #2f6fed;
  --accent-2: #0f9f8f;
  --accent-3: #f2b84b;
  --soft: #eef4ff;
  --soft-2: #eaf8f5;
  --danger: #d94444;
  --shadow: 0 20px 55px rgba(26, 38, 72, .12);
}
* {
  box-sizing: border-box;
}
textarea {
    width: 100%;
}
html {
  scroll-behavior: smooth;
}
body {
    font-family: system-ui, Arial, sans-serif;
    margin: 0;
    color: #111;
     background:
    radial-gradient(circle at 14% 0%, rgba(47, 111, 237, .12), transparent 28rem),
    linear-gradient(180deg, #f7f9fd 0%, #ffffff 45%, #f6f9fb 100%);
    min-height: 100vw;
}
a {
  color: inherit;
  text-decoration: none;
}
.topbar {
 display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 0 clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(217, 222, 232, .82);
  background: rgba(251, 252, 254, .9);
  backdrop-filter: blur(16px);
  gap: 10px;
    padding-block: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: .82rem;
  letter-spacing: 0;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  color: var(--muted);
  font-size: .94rem;
  font-weight: 750;
}

nav a:hover {
  color: var(--ink);
}
/* Button style */
button {
    background: #2563eb;
    color: white;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 16px;
    box-sizing: border-box;
}

button:hover {
    background: #1d4ed8;
}

nav a {
    text-decoration: none;
    color: black;
    padding: 8px 10px;
}
#menu {
    z-index: 1000;
}
.menu-item {
    display: block;
    padding: 8px 10px;
    text-decoration: none;
    color: #333;
    border-radius: 8px;
}

.menu-item:hover {
    background: #f2f4ff;
}

.menu-item.active {
    background: #2563eb;
    color: white;
    font-weight: 600;
}
/* hide button on desktop */
.dropdown {
    width: 100%;
}

.dropdown-content {
    position: static;   /* IMPORTANT for mobile */
    display: none;
    padding-left: 10px;
}

.dropdown:hover .dropdown-content {
    display: block;
}
.hamburger {
    font-size: 28px;
    border: none;
    cursor: pointer;
    width: 90px;
}
/* overlay background */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 999;
}

#overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;

    background: white;
    padding: 20px;
    box-shadow: 5px 0 30px rgba(0,0,0,0.1);

    display: flex;
    flex-direction: column;
    gap: 10px;

    transition: 0.3s ease;
    z-index: 1000;

    overflow-y: auto;
}
.sidebar.open {
    left: 0;
}
main {
  overflow: hidden;
}
#search{
    width:100%;
    max-width:600px;
    padding:12px;
    font-size:16px;
}

#searchResults {
    width: 100%;
    padding: 20px 0;
}

.search-item {
    display: block;
}
.search-item.active {
    border-color: #2563eb;
    background: #eff6ff;
}
section {
    margin:20px
}
.search-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    padding: 14px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 10px;

    text-decoration: none;
    color: inherit;

    transition: all .15s ease;
}

.search-item:hover {
    background: #f7f7f7;
}

.search-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.search-content h4 {
    margin: 0 0 4px;
}

.search-content p {
    margin: 0;
}
#suggestions {
    position: absolute;
    width: 100%;
    max-width: 700px;

    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;

    margin-top: 4px;

    display: none;

    z-index: 1000;
}

.suggestion {
    padding: 12px 16px;
    cursor: pointer;

    display: flex;
    gap: 10px;
    align-items: center;
}

.suggestion:hover,
.suggestion.active {
    background: #f5f7fa;
}

.suggestion-name {
    font-weight: 600;
}

.suggestion-category {
    opacity: .6;
    font-size: .9rem;
}
.suggestion-footer {

    padding: 12px 16px;

    border-top: 1px solid #eee;

    font-weight: 600;

    cursor: pointer;
}

.suggestion-footer:hover {
    background: #f5f7fa;
}
footer {
    background: #111;
    color: #fff;
    padding: 3rem 1.5rem;
    margin-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 2rem;
    max-width: 1100px;
    margin: auto;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 0.8rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #888;
}
/* Mobile responsiveness */
@media (max-width: 768px) {
 .hamburger {
        display: block;   /* IMPORTANT */
        z-index: 1001;
    }
    #menu {
        display: none;
        position: absolute;
        top: 0; /* adjust based on header height */
        left: 0;
        right: 0;

        background: white;
        flex-direction: column;

        padding: 10px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);

        z-index: 999;
        max-height: 100vh;
        overflow-y: auto;
    }

    #menu.open {
        display: flex;
    }

    /* prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
}
@media (max-width: 900px) {
 

  nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .workspace,
  .cards,
  .image-tools,
  .split-tools,
  .growth-band,
  .color-lab,
  .writing-hero,
  .writer-workbench,
  .writer-grid,
  .generator-grid {
    grid-template-columns: 1fr;
  }

  .workspace {
    min-height: 0;
  }

  .intro-panel,
  .tool-shell {
    min-height: auto;
  }

  .intro-panel::after {
    width: 190px;
    height: 132px;
    opacity: .62;
  }

  .fields,
  .result-grid,
  .image-stats,
  .metrics {
    grid-template-columns: 1fr;
  }

  .image-inspector {
    grid-column: auto;
  }

  .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .writer-controls {
    grid-template-columns: 1fr 1fr;
  }

  footer {
    flex-direction: column;
  }
}
