:root {
  --black: #000;
  --ink: #171717;
  --muted: #777;
  --line: #e8e8e8;
  --panel: #fff;
  --panel-soft: #f6f6f4;
  --blue: #2684ff;
  --accent: #d45f43;
  --green: #35a700;
  --shadow-lg: 0 36px 120px rgba(0, 0, 0, .45);
  --shadow-md: 0 14px 42px rgba(0, 0, 0, .28);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--black);
  color: var(--ink);
  font-family: var(--font);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.clone-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 105%, rgba(255, 255, 255, .08), transparent 26%),
    #000;
}

.device-stage {
  position: relative;
  width: min(1940px, 100vw);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
}

.app-window {
  background: var(--panel);
  color: var(--ink);
  overflow: hidden;
}

.laptop-frame {
  position: absolute;
  left: 7.7vw;
  top: 7.3vh;
  width: min(980px, 54vw);
  height: min(690px, 72vh);
  padding: clamp(34px, 2.5vw, 52px) clamp(30px, 2.6vw, 58px) clamp(42px, 3vw, 60px);
  border-radius: 42px 42px 16px 16px;
  background: linear-gradient(#fbfbfb, #f4f4f4 72%, #ececec);
  box-shadow: var(--shadow-lg);
}

.laptop-frame::before {
  content: "";
  position: absolute;
  inset: clamp(34px, 2.5vw, 52px) clamp(30px, 2.6vw, 58px) clamp(42px, 3vw, 60px);
  border-radius: 6px;
  background: #aab0b1;
}

.laptop-frame::after {
  content: "";
  position: absolute;
  left: -6vw;
  right: -7vw;
  bottom: 0;
  height: 26px;
  border-radius: 4px 4px 18px 18px;
  background: linear-gradient(180deg, #f4f4f4, #d8d8d8 72%, #fbfbfb);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .38);
}

.laptop-screen {
  position: relative;
  z-index: 2;
  height: 100%;
  border-radius: 6px;
  border: 1px solid #cacaca;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

.tablet-frame {
  position: absolute;
  z-index: 4;
  left: min(920px, 45vw);
  top: 13.2vh;
  width: min(900px, 48vw);
  height: min(620px, 65vh);
  padding: clamp(18px, 1.1vw, 24px);
  border-radius: 34px;
  background: linear-gradient(135deg, #fff, #f5f5f5);
  box-shadow: var(--shadow-lg);
}

.tablet-frame::before {
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  top: 12px;
  height: 1px;
  background: rgba(0, 0, 0, .12);
}

.tablet-app {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  height: 100%;
  border: 1px solid #d7d7d7;
  border-radius: 22px;
}

.phone-frame {
  position: absolute;
  z-index: 6;
  right: 4.1vw;
  top: 20vh;
  width: min(294px, 15.6vw);
  height: min(520px, 55vh);
  padding: 14px 12px;
  border-radius: 36px;
  background: linear-gradient(#fff, #f6f6f6);
  box-shadow: var(--shadow-lg);
}

.phone-notch {
  position: absolute;
  top: 11px;
  left: 50%;
  width: 90px;
  height: 20px;
  transform: translateX(-50%);
  border-radius: 0 0 15px 15px;
  background: #fff;
  z-index: 3;
}

.phone-app {
  position: relative;
  height: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 28px;
}

.laptop-app {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  background: #f3f3f1;
}

.app-sidebar {
  background: #f7f7f5;
  border-right: 1px solid var(--line);
  padding: 16px 13px;
  min-width: 0;
}

.app-sidebar.faded {
  filter: saturate(.78);
  opacity: .9;
}

.app-brand,
.sidebar-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 28px;
  margin-bottom: 14px;
  color: #444;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}

.app-brand span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d9d9d9;
}

.sidebar-top button,
.app-toolbar button,
.app-toolbar a,
.phone-app header button {
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
}

.sidebar-top button {
  margin-left: auto;
  font-size: 24px;
  line-height: 1;
}

.gear {
  color: var(--blue);
}

.app-sidebar p,
.phone-app p {
  margin: 15px 0 8px;
  color: #8b8b8b;
  font-size: 12px;
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 9px;
  border-radius: 8px;
  color: #303030;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-row span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  font-size: 18px;
}

.nav-row b {
  margin-left: auto;
  color: #9b9b9b;
  font-size: 12px;
  font-weight: 600;
}

.nav-row:hover {
  background: #ededeb;
}

.nav-row.active {
  background: #ededeb;
}

.nav-row.selected {
  background: var(--accent);
  color: #fff;
}

.nav-row.selected b {
  color: rgba(255, 255, 255, .78);
}

.nav-row.indent {
  padding-left: 28px;
}

.mini-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  margin-bottom: 8px;
  padding: 0 10px;
  border-radius: 8px;
  background: #ececea;
  color: #9a9a9a;
}

.mini-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #333;
  font-size: 13px;
}

.app-main {
  position: relative;
  min-width: 0;
  background: #fff;
}

.app-toolbar {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 9px 15px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
}

.app-toolbar label,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border-radius: 3px;
  background: #f1f1ef;
  color: #a2a2a2;
}

.app-toolbar input,
.mobile-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #333;
  font-size: 15px;
}

.app-toolbar button {
  padding: 8px 12px;
  border-radius: 6px;
  background: #f0f6ff;
  font-size: 13px;
  font-weight: 700;
}

.app-toolbar a {
  color: #b65a44;
  font-size: 14px;
  font-weight: 700;
}

.toolbar.muted {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid #dedede;
  background: #f5f5f4;
  color: #979797;
  font-size: 13px;
}

.toolbar.muted button {
  border: 0;
  background: transparent;
  color: #777;
  font-weight: 700;
}

.laptop-columns {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  height: calc(100% - 44px);
  min-height: 0;
}

.compact-list {
  overflow: hidden;
  border-right: 1px solid #e2e2e2;
}

.compact-list article {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  padding: 11px 10px;
  border-bottom: 1px solid #ededed;
}

.compact-list i {
  width: 34px;
  height: 34px;
  border-radius: 4px;
}

.compact-list strong,
.compact-list small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-list strong {
  font-size: 12px;
}

.compact-list small {
  color: #8b8b8b;
  font-size: 11px;
}

.red {
  background: #ff443d;
}

.yellow {
  background: #ffd255;
}

.green {
  background: #73c16b;
}

.blue {
  background: #6ca9ff;
}

.preview-card {
  padding: 0 0 26px;
  overflow: hidden;
}

.preview-art {
  display: grid;
  height: 36%;
  min-height: 140px;
  place-items: center;
  background: #ff433d;
  color: #fff;
  font-size: 72px;
}

.preview-card h2 {
  margin: 42px 26px 10px;
  font-size: clamp(24px, 2.4vw, 42px);
  line-height: 1.08;
  font-weight: 500;
}

.preview-card p {
  margin: 0 26px;
  color: #777;
  font-size: 15px;
  line-height: 1.6;
}

.resource-list {
  height: calc(100% - 54px);
  overflow: auto;
}

.resource-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #ededed;
  background: #fff;
}

.resource-row:hover {
  background: #fafafa;
}

.thumb {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 6px;
  font-size: 24px;
}

.paper {
  background: #ffe8bc;
}

.pakistan {
  background: #dff6e7;
}

.science {
  background: #e6f1ff;
}

.code {
  background: #e9e8ff;
}

.tools {
  background: #fff1d9;
}

.learning {
  background: #e7f5ff;
}

.academic {
  background: #f0ebff;
}

.resource-row strong,
.resource-row small,
.resource-row em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-row strong {
  margin-top: 2px;
  color: #292929;
  font-size: 15px;
  line-height: 1.3;
}

.resource-row small {
  margin-top: 4px;
  color: #777;
  font-size: 13px;
}

.resource-row em {
  margin-top: 5px;
  color: #9a9a9a;
  font-size: 12px;
  font-style: normal;
}

.search-popover {
  position: absolute;
  z-index: 8;
  top: 58px;
  left: 15px;
  right: 15px;
  max-height: min(420px, 68vh);
  overflow: auto;
  border: 1px solid #dedede;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .18);
}

.hub-result {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
}

.hub-result:last-child {
  border-bottom: 0;
}

.hub-result:hover {
  background: #f7f7f6;
}

.hub-result strong,
.hub-result small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-result strong {
  color: #222;
  font-size: 14px;
}

.hub-result small {
  margin-top: 4px;
  color: #8a8a8a;
  font-size: 12px;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  padding: 13px 20px 6px;
  font-size: 11px;
  font-weight: 700;
}

.phone-app header,
.mobile-head {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 42px;
  border-bottom: 1px solid #eee;
  font-size: 15px;
}

.phone-app header button,
.mobile-head a {
  position: absolute;
  right: 18px;
  color: var(--blue);
}

.phone-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  color: #303030;
  font-size: 13px;
}

.phone-row span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #f2f2f2;
}

.phone-row b {
  color: #aaa;
  font-size: 12px;
}

.phone-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 52px;
  border-top: 1px solid #ededed;
  background: rgba(255, 255, 255, .96);
}

.phone-tabs a {
  display: grid;
  place-items: center;
  color: #aaa;
  font-size: 10px;
  font-weight: 600;
}

.phone-tabs a.active {
  color: var(--blue);
}

.mobile-clone {
  display: none;
}

.mobile-panel {
  width: min(420px, calc(100vw - 28px));
  min-height: calc(100vh - 28px);
  margin: 14px auto;
  border-radius: 28px;
  border: 1px solid #d8d8d8;
  box-shadow: var(--shadow-md);
}

.mobile-search {
  height: 46px;
  margin: 14px;
}

.mobile-search button {
  border: 0;
  border-radius: 7px;
  background: #2b7fff;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
}

.mobile-results {
  position: static;
  margin: 0 14px 12px;
  max-height: 300px;
}

.mobile-collections {
  padding-bottom: 18px;
}

.mobile-collections a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 20px;
  border-bottom: 1px solid #eee;
}

.mobile-collections span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #f4f4f3;
}

.mobile-collections strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.mobile-collections b {
  color: #aaa;
  font-size: 13px;
}

@media (max-width: 1280px) {
  .tablet-frame {
    left: 40vw;
    width: 53vw;
  }

  .phone-frame {
    right: 2vw;
    width: 17vw;
  }
}

@media (max-width: 1080px) {
  .laptop-frame {
    left: 4vw;
    width: 60vw;
  }

  .tablet-frame {
    left: 32vw;
    width: 62vw;
  }

  .tablet-app {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .phone-frame {
    display: none;
  }
}

@media (max-width: 820px) {
  .device-stage {
    min-height: 100vh;
    overflow: visible;
  }

  .laptop-frame,
  .tablet-frame,
  .phone-frame {
    display: none;
  }

  .mobile-clone {
    display: block;
    min-height: 100vh;
    padding: 14px 0;
  }
}

@media (max-height: 720px) and (min-width: 821px) {
  .device-stage {
    min-height: 720px;
  }

  .laptop-frame {
    top: 42px;
    height: 560px;
  }

  .tablet-frame {
    top: 74px;
    height: 500px;
  }

  .phone-frame {
    top: 128px;
    height: 430px;
  }
}
