*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; overflow-x: hidden; }
    body {
      min-height: 100vh;
      overflow-x: hidden;
      background: #000;
      color: #e1e0cc;
      font-family: "Almarai", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }
    a { color: inherit; text-decoration: none; }
    button, input { font: inherit; }
    button { cursor: pointer; }
    a:focus-visible,
    button:focus-visible,
    input:focus-visible {
      outline: 2px solid rgba(222,219,200,.8);
      outline-offset: 4px;
    }

    .top {
      position: sticky;
      top: 0;
      z-index: 60;
      border-bottom: 1px solid rgba(222,219,200,.13);
      background: rgba(0,0,0,.9);
      backdrop-filter: blur(18px);
    }
    .top-inner {
      max-width: 1480px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: center;
      gap: 18px;
      padding: 14px clamp(16px, 3vw, 34px);
    }
    .brand {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      font-weight: 800;
      letter-spacing: -.04em;
    }
    .brand::before {
      content: "";
      width: 10px;
      height: 10px;
      border-radius: 999px;
      background: #b70000;
      box-shadow: 0 0 20px rgba(183,0,0,.75);
    }
    .back {
      color: rgba(225,224,204,.68);
      font-size: 13px;
    }
    .site-nav {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: clamp(14px, 4vw, 56px);
      color: rgba(225,224,204,.74);
      font-size: clamp(11px, 1.1vw, 14px);
      white-space: nowrap;
    }
    .site-nav a { transition: color .2s ease; }
    .site-nav a:hover,
    .site-nav a.active { color: #e1e0cc; }
    .lang-switch {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      padding: 3px;
      border: 1px solid rgba(222,219,200,.16);
      border-radius: 999px;
      background: rgba(255,255,255,.04);
    }
    .lang-switch button {
      min-width: 34px;
      height: 24px;
      border: 0;
      border-radius: 999px;
      background: transparent;
      color: rgba(225,224,204,.58);
      font-size: 11px;
      cursor: pointer;
    }
    .lang-switch button.active {
      background: #dedbc8;
      color: #050505;
    }
    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
      *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
      }
    }

    .hero {
      max-width: 1480px;
      margin: 0 auto;
      padding: clamp(34px, 6vw, 86px) clamp(16px, 3vw, 34px) 28px;
      display: grid;
      grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
      gap: clamp(24px, 5vw, 84px);
      align-items: end;
    }
    .label {
      display: block;
      margin-bottom: 14px;
      color: rgba(222,219,200,.56);
      font-size: 11px;
      letter-spacing: .08em;
      text-transform: uppercase;
    }
    h1 {
      color: #e1e0cc;
      font-size: clamp(40px, 6.7vw, 104px);
      line-height: .88;
      letter-spacing: -.07em;
    }
    .hero p {
      color: rgba(222,219,200,.72);
      font-size: 14px;
      line-height: 1.7;
    }
    .toolbox {
      max-width: 1480px;
      margin: 0 auto;
      padding: 0 clamp(16px, 3vw, 34px) 24px;
      display: grid;
      grid-template-columns: minmax(240px, .8fr) minmax(280px, 1.2fr) auto;
      gap: 14px;
      align-items: center;
    }
    .subject-input,
    .search-input {
      width: 100%;
      min-height: 44px;
      border: 1px solid rgba(222,219,200,.2);
      border-radius: 8px;
      background: rgba(255,255,255,.045);
      color: #e1e0cc;
      padding: 0 16px;
      outline: none;
    }
    .subject-input:focus,
    .search-input:focus { border-color: rgba(222,219,200,.62); }
    .count {
      color: rgba(222,219,200,.52);
      font-size: 12px;
      white-space: nowrap;
    }
    .intro-strip {
      max-width: 1480px;
      margin: 0 auto;
      padding: 0 clamp(16px, 3vw, 34px) 28px;
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
    }
    .intro-card {
      min-height: 104px;
      border: 1px solid rgba(222,219,200,.12);
      border-radius: 8px;
      background: rgba(255,255,255,.035);
      padding: 16px;
    }
    .intro-card strong {
      display: block;
      margin-bottom: 8px;
      color: #e1e0cc;
      font-size: 14px;
      letter-spacing: -.01em;
    }
    .intro-card span {
      color: rgba(222,219,200,.55);
      font-size: 12px;
      line-height: 1.55;
    }
    .workspace {
      max-width: 1480px;
      margin: 0 auto;
      padding: 0 clamp(16px, 3vw, 34px) 80px;
      display: grid;
      grid-template-columns: 260px minmax(0, 1fr);
      gap: 24px;
      align-items: start;
    }
    .sidebar {
      position: sticky;
      top: 74px;
      border: 1px solid rgba(222,219,200,.12);
      border-radius: 8px;
      background: #050505;
      padding: 14px;
    }
    .sidebar-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 12px;
      color: rgba(222,219,200,.48);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: .08em;
      text-transform: uppercase;
    }
    .filters {
      display: flex;
      flex-direction: column;
      flex-wrap: wrap;
      gap: 8px;
    }
    .filter {
      width: 100%;
      min-height: 34px;
      padding: 0 14px;
      border: 1px solid rgba(222,219,200,.18);
      border-radius: 5px;
      background: rgba(255,255,255,.035);
      color: rgba(222,219,200,.68);
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: .02em;
      text-align: left;
    }
    .filter.active,
    .filter:hover {
      background: rgba(222,219,200,.88);
      color: #050505;
    }
    .results {
      min-width: 0;
    }
    .category-section {
      margin-bottom: 34px;
      scroll-margin-top: 90px;
    }
    .section-head {
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 12px;
      padding-bottom: 12px;
      border-bottom: 1px solid rgba(222,219,200,.12);
    }
    .section-head h2 {
      color: #e1e0cc;
      font-size: clamp(26px, 3.2vw, 48px);
      line-height: .92;
      letter-spacing: -.055em;
    }
    .section-head span {
      color: rgba(222,219,200,.46);
      font-size: 12px;
      white-space: nowrap;
    }
    .library {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }
    .card {
      min-height: 100%;
      display: flex;
      flex-direction: column;
      border: 1px solid rgba(222,219,200,.12);
      border-radius: 8px;
      background:
        linear-gradient(180deg, rgba(222,219,200,.05), transparent 120px),
        #050505;
      overflow: hidden;
    }
    .card-head {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 12px;
      align-items: start;
      padding: 16px 16px 0;
    }
    .number {
      min-width: 34px;
      color: rgba(222,219,200,.44);
      font-size: 12px;
      font-weight: 800;
      letter-spacing: .08em;
    }
    .card h2 {
      color: #e1e0cc;
      font-size: 20px;
      line-height: 1.1;
      letter-spacing: -.035em;
      font-weight: 500;
    }
    .category {
      display: inline-flex;
      width: fit-content;
      margin: 10px 16px 0;
      padding: 6px 8px;
      border: 1px solid rgba(222,219,200,.18);
      color: rgba(222,219,200,.56);
      font-size: 11px;
      text-transform: uppercase;
    }
    .meta {
      display: block;
      padding: 10px 16px 0;
      color: rgba(222,219,200,.44);
      font-size: 11px;
      line-height: 1.45;
    }
    .desc {
      padding: 14px 16px 0;
      color: rgba(222,219,200,.62);
      font-size: 13px;
      line-height: 1.58;
    }
    .prompt {
      flex: 1;
      margin: 16px;
      padding: 14px;
      border-left: 2px solid #b70000;
      background: rgba(222,219,200,.055);
      color: rgba(225,224,204,.82);
      font-size: 12px;
      line-height: 1.62;
      overflow-wrap: anywhere;
    }
    .actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 0 16px 16px;
    }
    .copy {
      min-height: 34px;
      padding: 0 13px;
      border: 0;
      border-radius: 7px;
      background: rgba(222,219,200,.9);
      color: #050505;
      font-size: 12px;
      font-weight: 800;
    }
    .hint {
      color: rgba(222,219,200,.38);
      font-size: 11px;
      line-height: 1.4;
    }
    .empty {
      grid-column: 1 / -1;
      padding: 44px 16px;
      color: rgba(222,219,200,.55);
      text-align: center;
    }

    @media (max-width: 1120px) {
      .hero { grid-template-columns: 1fr; }
      .toolbox { grid-template-columns: 1fr 1fr; }
      .count { grid-column: 1 / -1; }
      .intro-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .workspace { grid-template-columns: 1fr; }
      .sidebar { position: static; }
      .filters { flex-direction: row; }
      .filter { width: auto; }
    }
    @media (max-width: 720px) {
      .top-inner,
      .toolbox {
        grid-template-columns: 1fr;
        align-items: stretch;
      }
      .top-inner { flex-direction: column; align-items: flex-start; }
      .site-nav { max-width: 100%; justify-content: flex-start; overflow-x: auto; }
      .intro-strip { grid-template-columns: 1fr; }
      .library { grid-template-columns: 1fr; }
      .card h2 { font-size: 20px; }
    }
