/*
Theme Name: ToolAtlas
Theme URI: https://ai.coderao.com/
Author: CodeRao
Description: AI tools directory theme — ToolAtlas.
Version: 1.0.3
Text Domain: toolatlas
*/

      :root {
        --bg: #f6f5f0;
        --bg-soft: #efece4;
        --surface: #ffffff;
        --surface-2: #faf9f5;
        --ink: #17150f;
        --ink-2: #45413a;
        --muted: #7a756a;
        --line: #e3e0d5;
        --line-strong: #cfcaba;
        --accent: #e4572e;
        --accent-dark: #c2431f;
        --accent-soft: #fdeee7;
        --green: #1e7d4f;
        --green-soft: #e4f2ea;
        --amber: #9a6a00;
        --amber-soft: #faf0d7;
        --radius: 14px;
        --shadow: 0 1px 2px rgba(23,21,15,.05), 0 8px 24px -12px rgba(23,21,15,.18);
        --shadow-lg: 0 24px 60px -18px rgba(23,21,15,.35);
      }
      @media (prefers-color-scheme: dark) {
        :root {
          --bg: #121110;
          --bg-soft: #171614;
          --surface: #1c1b18;
          --surface-2: #22211d;
          --ink: #f2efe7;
          --ink-2: #cfccc2;
          --muted: #9d988c;
          --line: #2c2a25;
          --line-strong: #3d3a32;
          --accent: #ff6b3d;
          --accent-dark: #ff8059;
          --accent-soft: #33201a;
          --green: #4cc284;
          --green-soft: #173527;
          --amber: #e3b34c;
          --amber-soft: #33290f;
          --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
          --shadow-lg: 0 24px 60px -18px rgba(0,0,0,.8);
        }
      }
      * { box-sizing: border-box; }
      html { scroll-behavior: smooth; }
      body {
        margin: 0;
        background: var(--bg);
        color: var(--ink);
        font-family: "Inter", system-ui, -apple-system, sans-serif;
        font-size: 16px;
        line-height: 1.55;
        -webkit-font-smoothing: antialiased;
      }
      h1, h2, h3, .display { font-family: "Bricolage Grotesque", "Inter", sans-serif; letter-spacing: -0.01em; }
      a { color: inherit; }
      button { font-family: inherit; cursor: pointer; }
      .wrap { max-width: 1220px; margin: 0 auto; padding: 0 20px; }

      /* ---------- Top bar ---------- */
      .topbar {
        position: sticky; top: 0; z-index: 40;
        background: color-mix(in srgb, var(--bg) 88%, transparent);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--line);
      }
      .topbar-in { display: flex; align-items: center; gap: 28px; height: 62px; }
      .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
      .brand-mark {
        width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: var(--bg);
        display: grid; place-items: center; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 15px;
      }
      .brand-name { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 19px; line-height: 1; }
      .brand-name em { font-style: normal; color: var(--accent); }
      .brand-sub { display: block; font-family: "Inter", sans-serif; font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: .04em; margin-top: 3px; }
      .nav { display: flex; gap: 22px; margin-left: auto; }
      .nav a { text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
      .nav a:hover { color: var(--accent); }
      .btn {
        display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent;
        border-radius: 10px; padding: 9px 16px; font-size: 14.5px; font-weight: 600; text-decoration: none;
        transition: background .15s, border-color .15s, transform .1s;
      }
      .btn:active { transform: translateY(1px); }
      .btn-accent { background: var(--accent); color: #fff; }
      .btn-accent:hover { background: var(--accent-dark); }
      .btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
      .btn-ghost:hover { border-color: var(--ink); }
      .topbar .btn { flex-shrink: 0; }
      @media (max-width: 760px) { .nav { display: none; } .topbar-in { gap: 14px; } .brand-sub { display: none; } }

      /* ---------- Hero ---------- */
      .hero { border-bottom: 1px solid var(--line); background:
        radial-gradient(720px 320px at 88% -60px, var(--accent-soft), transparent 65%),
        linear-gradient(var(--bg), var(--bg)); }
      .hero-in { padding: 56px 0 46px; max-width: 780px; }
      .hero h1 { font-size: clamp(34px, 5.2vw, 52px); line-height: 1.04; font-weight: 800; margin: 0 0 14px; }
      .hero h1 .hl { color: var(--accent); }
      .hero p.lede { font-size: 18px; color: var(--ink-2); margin: 0 0 26px; max-width: 620px; }
      .searchbar {
        display: flex; align-items: center; gap: 10px; background: var(--surface);
        border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 7px 7px 7px 16px;
        box-shadow: var(--shadow);
      }
      .searchbar:focus-within { border-color: var(--accent); }
      .searchbar svg { flex-shrink: 0; color: var(--muted); }
      .searchbar input {
        flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink);
        font-size: 16.5px; font-family: inherit;
      }
      .searchbar input::placeholder { color: var(--muted); }
      .searchbar .btn { padding: 11px 20px; border-radius: 10px; }
      .quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }
      .quick span { font-size: 13px; color: var(--muted); font-weight: 500; }
      .quick button {
        border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
        border-radius: 999px; padding: 5px 13px; font-size: 13px; font-weight: 500;
      }
      .quick button:hover { border-color: var(--accent); color: var(--accent); }
      .stats { display: flex; flex-wrap: wrap; gap: 12px 38px; margin-top: 34px; }
      .stat b { font-family: "Bricolage Grotesque", sans-serif; font-size: 24px; font-weight: 800; display: block; line-height: 1; }
      .stat span { font-size: 13px; color: var(--muted); }

      /* ---------- Sections ---------- */
      section { padding: 44px 0 8px; }
      .sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; }
      .sec-head h2 { font-size: 26px; font-weight: 800; margin: 0; }
      .sec-head p { margin: 0; color: var(--muted); font-size: 14.5px; }
      .sec-head a.more { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }

      /* ---------- Categories ---------- */
      .cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
      @media (max-width: 980px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
      @media (max-width: 560px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
      .cat-tile {
        display: flex; align-items: center; gap: 12px; text-align: left;
        background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
        padding: 14px 16px; transition: border-color .15s, box-shadow .15s;
        color: var(--ink); font-family: inherit; cursor: pointer;
      }
      .cat-tile:hover { border-color: var(--accent); box-shadow: var(--shadow); }
      .cat-tile.active { border-color: var(--accent); background: var(--accent-soft); }
      .cat-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
      .cat-tile b { display: block; font-size: 15px; line-height: 1.2; }
      .cat-tile span { font-size: 12.5px; color: var(--muted); }

      /* ---------- Featured ---------- */
      .feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
      @media (max-width: 900px) { .feat-grid { grid-template-columns: 1fr; } }
      .feat {
        background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
        padding: 22px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow);
      }
      .feat .pick { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
      .feat h3 { margin: 0; font-size: 21px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
      .feat p { margin: 0; color: var(--ink-2); font-size: 14.5px; flex: 1; }
      .feat .row { display: flex; align-items: center; gap: 10px; }

      /* ---------- Tool cards ---------- */
      .mono {
        width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
        color: #fff; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 19px;
      }
      .mono.sm { width: 38px; height: 38px; border-radius: 10px; font-size: 16px; }
      .mono.lg { width: 60px; height: 60px; border-radius: 16px; font-size: 26px; }
      .stars { color: #e8a020; font-size: 13px; letter-spacing: 1px; white-space: nowrap; }
      .stars b { color: var(--ink); font-size: 13.5px; letter-spacing: 0; margin-right: 4px; }
      .price { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
      .price.free { background: var(--green-soft); color: var(--green); }
      .price.freemium { background: var(--amber-soft); color: var(--amber); }
      .price.paid { background: var(--accent-soft); color: var(--accent-dark); }
      .tag { font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
      .new-badge { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; background: var(--accent); color: #fff; padding: 2px 7px; border-radius: 5px; }
      .ours-badge { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; background: var(--ink); color: var(--bg); padding: 2px 7px; border-radius: 5px; }

      .toolbar {
        position: sticky; top: 62px; z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent);
        backdrop-filter: blur(10px); padding: 14px 0 12px; border-bottom: 1px solid var(--line);
      }
      .chips { display: flex; flex-wrap: wrap; gap: 8px; }
      .chip {
        border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
        border-radius: 999px; padding: 7px 15px; font-size: 14px; font-weight: 500;
      }
      .chip:hover { border-color: var(--ink); }
      .chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
      .toolbar-2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
      .seg { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
      .seg button { border: 0; background: transparent; color: var(--ink-2); font-size: 13.5px; font-weight: 600; padding: 6px 13px; border-radius: 8px; }
      .seg button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
      .toolbar select {
        font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink);
        background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 10px;
      }
      .count { margin-left: auto; font-size: 13.5px; color: var(--muted); }
      .saved-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

      .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 22px 0 10px; }
      @media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } }
      @media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }
      .card {
        background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
        padding: 18px; display: flex; flex-direction: column; gap: 10px; text-align: left; width: 100%;
        transition: border-color .15s, box-shadow .15s, transform .15s;
      }
      .card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
      .card-top { display: flex; gap: 12px; align-items: flex-start; }
      .card h3 { margin: 0; font-size: 17.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
      .card .cat { font-size: 12.5px; color: var(--muted); font-weight: 500; }
      .card p { margin: 0; font-size: 14px; color: var(--ink-2); flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
      .card-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
      .visit { margin-left: auto; font-size: 13.5px; font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap; }
      .visit:hover { text-decoration: underline; }
      .save-btn {
        margin-left: auto; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line);
        background: var(--surface-2); color: var(--muted); display: grid; place-items: center; flex-shrink: 0;
      }
      .save-btn.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
      .card-top .save-btn { margin-left: auto; }
      .empty { text-align: center; padding: 56px 20px; color: var(--muted); }
      .empty b { display: block; font-family: "Bricolage Grotesque", sans-serif; font-size: 20px; color: var(--ink); margin-bottom: 6px; }

      /* ---------- New this week ---------- */
      .new-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
      @media (max-width: 760px) { .new-list { grid-template-columns: 1fr; } }
      .new-item {
        display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line);
        border-radius: var(--radius); padding: 14px 16px; text-align: left; width: 100%;
        color: var(--ink); font-family: inherit; cursor: pointer;
      }
      .new-item:hover { border-color: var(--accent); }
      .new-item b { font-size: 15.5px; }
      .new-item p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
      .new-item .when { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; text-align: right; }

      /* ---------- Studio band ---------- */
      .studio {
        background: var(--ink); color: var(--bg); border-radius: 20px; padding: 30px;
        display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; margin-top: 14px;
      }
      @media (max-width: 860px) { .studio { grid-template-columns: 1fr; padding: 24px; } }
      .studio h2 { margin: 0 0 8px; font-size: 25px; font-weight: 800; }
      .studio p { margin: 0; opacity: .75; font-size: 14.5px; }
      .studio-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
      @media (max-width: 560px) { .studio-list { grid-template-columns: 1fr; } }
      .studio-item {
        display: flex; gap: 12px; align-items: center; padding: 13px 14px; border-radius: 12px;
        background: rgba(127,127,127,.14); text-decoration: none; color: inherit;
      }
      .studio-item:hover { background: rgba(127,127,127,.24); }
      .studio-item b { display: block; font-size: 14.5px; line-height: 1.25; }
      .studio-item span { font-size: 12.5px; opacity: .7; }
      .studio-item .arr { margin-left: auto; opacity: .6; }

      /* ---------- CTA / footer ---------- */
      .cta {
        margin: 46px 0 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface);
        padding: 34px; display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: space-between;
      }
      .cta h2 { margin: 0 0 6px; font-size: 24px; font-weight: 800; }
      .cta p { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 520px; }
      .cta form { display: flex; gap: 8px; flex-wrap: wrap; }
      .cta input {
        font-family: inherit; font-size: 15px; padding: 11px 14px; border-radius: 10px; min-width: min(260px, 100%);
        border: 1.5px solid var(--line-strong); background: var(--surface-2); color: var(--ink); outline: 0;
      }
      .cta input:focus { border-color: var(--accent); }
      .cta .ok { font-size: 14px; color: var(--green); font-weight: 600; display: none; }
      footer { border-top: 1px solid var(--line); margin-top: 54px; padding: 34px 0 44px; }
      .foot { display: flex; flex-wrap: wrap; gap: 26px 60px; }
      .foot h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
      .foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
      .foot a { text-decoration: none; font-size: 14px; color: var(--ink-2); }
      .foot a:hover { color: var(--accent); }
      .foot-base { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 22px; }

      /* ---------- Modal ---------- */
      .overlay {
        position: fixed; inset: 0; background: rgba(12,10,6,.55); z-index: 60;
        display: none; align-items: flex-end; justify-content: center; padding: 0;
      }
      .overlay.open { display: flex; }
      @media (min-width: 700px) { .overlay { align-items: center; padding: 24px; } }
      .modal {
        background: var(--surface); width: 100%; max-width: 620px; max-height: 88vh; overflow-y: auto;
        border-radius: 20px 20px 0 0; padding: 26px; box-shadow: var(--shadow-lg);
      }
      @media (min-width: 700px) { .modal { border-radius: 20px; } }
      .modal-head { display: flex; gap: 16px; align-items: flex-start; }
      .modal-head h3 { margin: 0; font-size: 24px; font-weight: 800; display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
      .modal-head .cat { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
      .x { margin-left: auto; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-size: 17px; flex-shrink: 0; }
      .modal p.desc { color: var(--ink-2); font-size: 15px; margin: 16px 0 0; }
      .kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
      @media (max-width: 480px) { .kv { grid-template-columns: 1fr; } }
      .kv div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
      .kv span { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
      .kv b { font-size: 14.5px; }
      .modal h4 { margin: 22px 0 10px; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
      .similar { display: grid; gap: 8px; }
      .sim-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--ink); font-family: inherit; cursor: pointer; }
      .sim-item:hover { border-color: var(--accent); }
      .sim-item b { font-size: 14.5px; }
      .sim-item span { font-size: 12.5px; color: var(--muted); display: block; }
      .sim-item .arr { margin-left: auto; color: var(--muted); }
      .modal-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
      .modal-actions .btn { flex: 1; justify-content: center; padding: 13px 18px; }
    
/* ---------- Single tool + archive additions ---------- */
.crumbs { margin: 22px 0 0; color: var(--muted); font-size: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.detail-body { max-width: 760px; }
.detail-body h2 { margin-top: 26px; }
.detail-body p { color: var(--ink-2); line-height: 1.7; }
