/* ==========================================================================
   V1: Spotlight Search Portal & Asymmetric Bento Grid
   No traditional top header bar; floating corner controls + centered search stage + 3-col Bento cards
   ========================================================================== */

.v1-corner-bar {
  position: fixed;
  top: calc(14px + var(--safe-top));
  right: 18px;
  z-index: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background-color: var(--fx-base-50);
  border: 1px solid var(--fx-base-200);
  border-radius: 999px;
  box-shadow: var(--fx-shadow);
}

.v1-pill-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fx-base-800);
  font-family: inherit;
  font-size: 13px;
  font-weight: 560;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.v1-pill-btn:hover {
  background-color: var(--fx-base-100);
  color: var(--fx-ink);
}

.v1-pill-btn.is-active,
.v1-pill-accent {
  background-color: var(--fx-orange);
  color: var(--fx-on-accent);
  font-weight: 640;
}

.v1-role-tag {
  font-size: 13px;
  color: var(--fx-base-600);
  padding: 0 8px;
  white-space: nowrap;
}

/* Centered Search Stage */
.v1-stage {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px clamp(12px, 3vw, 36px) 72px;
}

.v1-search-hero {
  max-width: 760px;
  margin: 0 auto 14px;
  text-align: left;
}

.v1-search-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.v1-search-hero .v1-sub {
  margin: 0 auto 22px;
  font-size: 15px;
  color: var(--fx-base-600);
  max-width: 52ch;
}

.v1-spotlight-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--fx-base-50);
  border: 1.5px solid var(--fx-base-200);
  border-radius: 16px;
  padding: 7px 8px 7px 16px;
  box-shadow: var(--fx-shadow);
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}

.v1-spotlight-box:focus-within {
  border-color: var(--fx-accent);
  background-color: var(--fx-paper);
}

.v1-spotlight-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--fx-ink);
  font-family: inherit;
  font-size: 16px;
  padding: 8px 0;
  outline: none;
}

.v1-spotlight-select {
  border: 1px solid var(--fx-base-200);
  background-color: var(--fx-paper);
  color: var(--fx-base-800);
  font-family: inherit;
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 10px;
  outline: none;
}

.v1-spotlight-submit {
  appearance: none;
  border: 0;
  background-color: var(--fx-accent);
  color: #FFFCF0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
  padding: 10px 18px;
  border-radius: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms var(--ease-out), transform 140ms var(--ease-out);
}

html[data-theme="dark"] .v1-spotlight-submit {
  background-color: #1B7269;
  color: #FFFCF0;
}

.v1-spotlight-submit:hover {
  background-color: var(--fx-accent-hover);
}

html[data-theme="dark"] .v1-spotlight-submit:hover {
  background-color: #22877C;
}

.v1-kw-cloud {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.v1-kw-chip {
  appearance: none;
  border: 1px solid var(--fx-base-200);
  background-color: var(--fx-paper);
  color: var(--fx-base-800);
  font-family: inherit;
  font-size: 13px;
  font-weight: 540;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.v1-kw-chip:hover {
  background-color: var(--fx-base-50);
}

.v1-kw-chip.is-active {
  background-color: var(--fx-ink);
  border-color: var(--fx-ink);
  color: var(--fx-paper);
}

/* Integrated Paper Compliance Note under Spotlight */
.v1-compliance-card {
  margin-top: 18px;
  padding: 11px 16px;
  border-radius: 12px;
  background-color: var(--fx-yellow-soft);
  border: 1px solid var(--fx-base-200);
  font-size: 13px;
  line-height: 1.5;
  color: var(--fx-base-800);
  text-align: left;
}

.v1-compliance-card strong {
  color: var(--fx-yellow);
}

.v1-guest-badge-bar {
  margin-top: 8px;
  font-size: 13px;
  color: var(--fx-cyan);
  font-weight: 600;
}

/* 3-Column Bento Results Grid */
.v1-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--fx-base-600);
}

.v1-bento-articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 18px;
}

.v1-bento-articles[data-v1-layout="wide-2"] {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 500px), 1fr));
  gap: 20px;
}

.v1-bento-articles[data-v1-layout="wide-2"] .v1-card-digest {
  -webkit-line-clamp: 4;
}

.v1-bento-articles[data-v1-layout="list-1"] {
  grid-template-columns: minmax(0, 1fr);
  max-width: 920px;
  margin: 0 auto;
  gap: 10px;
}

.v1-bento-articles[data-v1-layout="list-1"] .v1-card {
  padding: 13px 18px;
  border-radius: 12px;
  gap: 8px;
}

.v1-bento-articles[data-v1-layout="list-1"] .v1-card-title {
  font-size: 16.5px;
  margin-bottom: 4px;
}

.v1-bento-articles[data-v1-layout="list-1"] .v1-card-digest {
  -webkit-line-clamp: 2;
  font-size: 13.5px;
}

.v1-bento-articles[data-v1-layout="list-1"] .v1-card-foot {
  padding-top: 8px;
}

.v1-card {
  background-color: var(--fx-base-50);
  border: 1px solid var(--fx-base-150);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: transform 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

.v1-card:hover {
  transform: translateY(-2px);
  border-color: var(--fx-accent-border);
}

.v1-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.v1-card-acc {
  font-weight: 620;
  color: var(--fx-base-800);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v1-card-age {
  color: var(--fx-base-600);
  flex-shrink: 0;
}

.v1-card-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 670;
  line-height: 1.38;
  color: var(--fx-ink);
  overflow-wrap: anywhere;
}

.v1-card-digest {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fx-base-600);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.v1-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--fx-base-150);
  font-size: 13px;
}

.v1-card-kw {
  color: var(--fx-orange);
  font-weight: 600;
}

.v1-card-open {
  color: var(--fx-blue);
  font-weight: 600;
  text-decoration: none;
}

.v1-card-open:hover {
  text-decoration: underline;
}

/* Asymmetric Bento Admin Matrix (Zero traditional tables!) */
.v1-bento-admin {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.v1-tile {
  background-color: var(--fx-base-50);
  border: 1px solid var(--fx-base-200);
  border-radius: 18px;
  padding: 22px;
}

.v1-tile-6 {
  grid-column: span 6;
}

.v1-tile-4 {
  grid-column: span 4;
}

.v1-tile-8 {
  grid-column: span 8;
}

.v1-tile-12 {
  grid-column: span 12;
}

.v1-tile h2 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 700;
}

.v1-tile-desc {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--fx-base-600);
}

.v1-power-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.v1-power-btn {
  flex: 1 1 140px;
  appearance: none;
  border: 1px solid var(--fx-base-200);
  background-color: var(--fx-paper);
  color: var(--fx-ink);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}

.v1-power-btn.is-on {
  background-color: var(--fx-green-soft);
  border-color: var(--fx-green);
}

.v1-power-btn strong {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}

.v1-power-btn span {
  font-size: 13px;
  color: var(--fx-base-600);
}

.v1-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.v1-acc-chip {
  background-color: var(--fx-paper);
  border: 1px solid var(--fx-base-150);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}

.v1-feed-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 12px;
}

.v1-feed-item {
  background-color: var(--fx-paper);
  border: 1px solid var(--fx-base-150);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
}

@media (max-width: 920px) {
  .v1-tile-6,
  .v1-tile-4,
  .v1-tile-8 {
    grid-column: span 12;
  }
}

@media (max-width: 768px) {
  .v1-stage {
    padding-bottom: calc(82px + var(--safe-bottom));
  }
}

@media (max-width: 680px) {
  .v1-corner-bar {
    left: 12px;
    right: 12px;
    justify-content: space-between;
  }
  .v1-stage {
    padding-top: 12px;
  }
  .v1-spotlight-box {
    flex-wrap: wrap;
    padding: 10px;
  }
  .v1-spotlight-input {
    flex: 1 1 100%;
    border-bottom: 1px solid var(--fx-base-150);
    margin-bottom: 6px;
  }
  .v1-spotlight-select {
    flex: 1 1 auto;
    font-size: 16px;
  }
  .v1-spotlight-submit {
    flex: 1 1 auto;
  }
  .v1-kw-cloud {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .v1-kw-cloud::-webkit-scrollbar {
    display: none;
  }
  .v1-kw-chip {
    flex-shrink: 0;
  }
}
