/* Base */
:root{
  --bg: #f3f0ec;
  --card: #ffffff;
  --text: #1b1b1b;
  --muted: #5a5a5a;
  --border: rgba(0,0,0,0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.06);
  --radius: 18px;
  --radius-sm: 12px;
  --focus: rgba(0,0,0,0.25);
  --accent: #c81f2d;
}

/* Fonts: Urbanist */
@font-face{
  font-family: 'Urbanist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/urbanist/v10/L0x-DF02iFML4hGCyMqrbS10ig.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+0304-0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
  size-adjust: 104%;
}
@font-face{
  font-family: 'Urbanist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/urbanist/v10/L0x-DF02iFML4hGCyMqlbS0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304-0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
  size-adjust: 104%;
}
@font-face{
  font-family: 'Urbanist';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/urbanist/v10/L0x-DF02iFML4hGCyMqrbS10ig.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+0304-0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
  size-adjust: 104%;
}
@font-face{
  font-family: 'Urbanist';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/urbanist/v10/L0x-DF02iFML4hGCyMqlbS0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304-0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
  size-adjust: 104%;
}

/* Global */
*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  font-family: "Urbanist", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{ color: inherit; }

.container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Header */
.site-header{
  padding: 26px 0 16px;
}

.header-inner{
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.brand h1{
  margin: 0 0 6px;
  font-size: clamp(2.2rem, 3.5vw, 3.4rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sub-headline{
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
  font-size: 1.05rem;
  font-weight: 400;
}

.header-actions{
  padding-top: 6px;
  flex: 0 0 auto;
}

/* Buttons */
.btn{
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.92rem;
  background: var(--card);
  cursor: pointer;
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover{ box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.btn:active{ transform: translateY(1px); }

.btn:focus-visible{
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.btn-primary{
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}

.btn-secondary{
  background: var(--card);
  font-weight: 600;
}

.btn-ghost{
  background: transparent;
  font-weight: 600;
}

/* Filters */
.filters-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin: 10px 0 18px;
}

.filters-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.toggle-row{
  display: inline-flex;
  background: #f7f7f7;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.toggle-pill{
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.toggle-pill.is-active{
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  font-weight: 700;
}

.filters-row{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.field{
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}

.field.grow{
  flex: 1 1 280px;
  min-width: 240px;
}

label{
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}

select,
input[type="search"]{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: #fff;
  font-weight: 500;
}

input[type="search"]{ width: 100%; }

.filters-actions{
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f7f7f7;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.chip button{
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  padding: 0;
}

/* Swiper */
.listing-panel{
  margin-bottom: 26px;
}

.swiper-shell{
  background: transparent;
}

#appsSwiper{
  width: 100%;
  padding-bottom: 18px;
}

.swiper-wrapper{
  align-items: stretch;
}

.swiper-slide{
  height: auto;
  width: 340px;
}

@media (max-width: 560px){
  .swiper-slide{ width: 86vw; }
}

.swiper-nav{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.swiper-button-prev,
.swiper-button-next{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
}

.swiper-button-prev::after,
.swiper-button-next::after{
  font-size: 14px;
  font-weight: 800;
}

/* Card */
.app-card{
  height: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.badges{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #f7f7f7;
  border: 1px solid var(--border);
  color: #333;
}

.badge.recommended{
  background: #fff1f2;
  border-color: rgba(200,31,45,0.25);
  color: #8a0f1a;
  font-weight: 700;
}

.app-title{
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.01em;
}

.meta{
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-weight: 500;
}

.meta b{
  color: #333;
  font-weight: 600;
}

.app-summary{
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
  margin: 0;
  font-weight: 400;
}

.tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.tag{
  font-size: 0.78rem;
  color: #444;
  background: #f7f7f7;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 500;
}

.card-actions{
  margin-top: auto;
  display: flex;
  gap: 10px;
}

.card-actions a{
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

/* Footer */
.listing-footer{
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 4px;
}

.listing-hint{
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 400;
}

/* FAQ */
.faq-wrap{ padding: 10px 0 40px; }

.faq-heading{
  margin: 10px 0 14px;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.faq-section{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.accordion-item{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.accordion-header{
  width: 100%;
  border: 0;
  background: transparent;
  padding: 16px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 700;
  text-align: left;
}

.accordion-chevron{
  font-size: 1.6rem;
  transform: rotate(0deg);
  transition: transform .2s ease;
}

.accordion-item.is-open .accordion-chevron{ transform: rotate(90deg); }

.accordion-content{
  display: none;
  padding: 0 16px 16px;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 400;
}

.accordion-item.is-open .accordion-content{ display: block; }

/* Site footer */
.site-footer{
  padding: 22px 0 28px;
}

.footer-inner{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 400;
}

.footer-links a{
  color: var(--muted);
  font-weight: 500;
}

/* Modal */
.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
}

.modal{
  position: fixed;
  z-index: 1001;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(740px, calc(100vw - 28px));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,0.25);
  overflow: hidden;
}

.modal-header{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.modal-title{
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.modal-subtitle{
  color: var(--muted);
  margin-top: 4px;
  font-size: 0.95rem;
  font-weight: 400;
}

.modal-close{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  font-weight: 600;
}

.modal-body{
  padding: 16px 18px 18px;
}

.survey-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 640px){
  .survey-grid{ grid-template-columns: 1fr; }
  .header-inner{ flex-direction: column; align-items: stretch; }
  .header-actions{ padding-top: 0; }
  .filters-actions{ margin-left: 0; }
  .filters-top{ flex-direction: column; align-items: flex-start; }
}

.survey-help{
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 400;
}

.modal-footer{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

/* Prevent scroll when modal open */
body.is-modal-open{
  overflow: hidden;
}

/* Skeleton shimmer */
.skeleton{
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer{
  0%{ background-position: 200% 0; }
  100%{ background-position: -200% 0; }
}

/* Skeleton card layout */
.skeleton-card{
  min-height: 420px;
}

.skeleton-title{
  height: 22px;
  border-radius: 10px;
  width: 80%;
}

.skeleton-line{
  height: 14px;
  border-radius: 10px;
  display: inline-block;
}

.skeleton-paragraph{
  height: 14px;
  border-radius: 10px;
  width: 100%;
  margin-top: 2px;
}

.skeleton-pill{
  height: 18px;
  border-radius: 999px;
}

.skeleton-btn{
  height: 40px;
  border-radius: 999px;
  flex: 1;
  display: inline-block;
}
