/* wiserwork-ext-v1 — shared styling for the /extensions/ pages.
   Everything is written against the site palette tokens (--surface, --border,
   --text-primary, --text-muted, --accent) so light mode works through the same
   overrides in theme.css, which is linked after this file. */

.ext-hero {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin: 0.4rem 0 1.6rem;
}
.ext-hero-icon {
  width: 76px;
  height: 76px;
  border-radius: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 10px 26px rgba(88, 46, 173, 0.32);
}
.ext-hero-text {
  flex: 1;
  min-width: 260px;
}
.ext-hero h1 {
  font-size: clamp(1.55rem, 4vw, 2.1rem);
  font-weight: 700;
  margin: 0 0 0.35rem;
  line-height: 1.18;
  color: var(--text-primary);
}
.ext-hero .ext-tag {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin: 0 0 1rem;
  line-height: 1.6;
}
.ext-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.1rem;
}
.ext-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
}
.ext-badge i {
  color: var(--accent);
  font-size: 0.72rem;
}

/* --- install button --- */
.ext-cta-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.ext-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.72rem 1.25rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #7c5cfc, #a855f7);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.96rem;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(124, 92, 252, 0.32);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.ext-cta:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(124, 92, 252, 0.42);
  color: #ffffff !important;
}
.ext-cta svg {
  flex-shrink: 0;
}
.ext-cta.is-pending {
  background: var(--surface-light);
  color: var(--text-primary) !important;
  border: 1px solid var(--border);
  box-shadow: none;
}
.ext-cta.is-pending:hover {
  color: var(--text-primary) !important;
  filter: none;
}
.ext-secondary {
  color: var(--accent);
  font-size: 0.88rem;
  text-decoration: none;
  font-weight: 600;
}
.ext-secondary:hover {
  text-decoration: underline;
}
.ext-pending-note {
  margin: 0.8rem 0 0;
  padding: 0.7rem 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}
.ext-pending-note i {
  color: #fbbf24;
  margin-right: 0.35rem;
}

/* --- hub cards --- */
.ext-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.4rem 0 0.4rem;
}
.ext-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  padding: 1.2rem;
  text-decoration: none;
  transition: border-color 0.18s, transform 0.18s;
}
.ext-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.ext-card-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.7rem;
}
.ext-card-top img {
  width: 52px;
  height: 52px;
  border-radius: 0.9rem;
  flex-shrink: 0;
}
.ext-card-top h2,
.ext-card-top h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
}
.ext-card-top p {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.ext-card > p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0 0 0.9rem;
}
.ext-card ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.ext-card ul li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.ext-card ul li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0.05rem;
  font-size: 0.7rem;
  color: var(--accent);
}
.ext-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

/* "more coming soon" — a full-width dashed placeholder under the real cards, so
   the list reads as a growing set rather than a finished one */
.ext-card.is-soon {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  background: transparent;
  border-style: dashed;
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
  padding: 1rem 1.2rem;
}
.ext-card.is-soon:hover {
  transform: none;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}
.ext-soon-icon {
  width: 46px;
  height: 46px;
  border-radius: 0.9rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
}
.ext-soon-text {
  flex: 1;
  min-width: 190px;
}
.ext-soon-text b {
  display: block;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
}
.ext-soon-text span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 0.15rem;
}
.ext-soon-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.ext-soon-cta:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  color: var(--accent);
}

/* --- feature grid --- */
.ext-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 0.9rem;
  margin: 1rem 0 0;
}
/* four features read better as 2x2 than as a row of three and an orphan */
.ext-feature-grid.is-two {
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
}
.ext-feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem 1.05rem;
}
.ext-feature .fi {
  width: 36px;
  height: 36px;
  border-radius: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-size: 0.9rem;
}
.ext-feature h3 {
  margin: 0 0 0.3rem;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-primary);
}
.ext-feature p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* --- screenshots --- */
.ext-shots {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 0;
}
.ext-shot figure {
  margin: 0;
}
.ext-shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.9rem;
  border: 1px solid var(--border);
}
.ext-shot figcaption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* --- steps --- */
.ext-steps {
  counter-reset: extstep;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}
.ext-steps li {
  counter-increment: extstep;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 0.85rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}
.ext-steps li::before {
  content: counter(extstep);
  position: absolute;
  left: 0;
  top: -0.05rem;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.82rem;
}
.ext-steps li b {
  color: var(--text-primary);
}

/* --- permission table --- */
.ext-perms {
  width: 100%;
  border-collapse: collapse;
  margin: 0.9rem 0 0;
  font-size: 0.86rem;
}
.ext-perms th,
.ext-perms td {
  text-align: left;
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-muted);
  line-height: 1.55;
}
.ext-perms th {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ext-perms td code {
  color: var(--accent);
  font-size: 0.82rem;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  padding: 0.1rem 0.35rem;
  border-radius: 0.3rem;
}

/* --- privacy callout --- */
.ext-privacy {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  margin: 1.2rem 0 0;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid color-mix(in srgb, #22c55e 35%, var(--border));
  background: color-mix(in srgb, #22c55e 8%, transparent);
}
.ext-privacy i {
  color: #22c55e;
  font-size: 1.1rem;
  margin-top: 0.15rem;
}
.ext-privacy p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-muted);
}
.ext-privacy strong {
  color: var(--text-primary);
}

@media (max-width: 560px) {
  .ext-hero-icon {
    width: 60px;
    height: 60px;
  }
  .ext-perms {
    font-size: 0.8rem;
  }
}
