/* Ideas board and admin console. Extends styles.css; no token is redefined
   here, so the two files cannot drift apart. */

[hidden] {
  display: none !important;
}

/* A quiet metrics rule under the intro — counts only, no claims. */
.band-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 52px);
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line-light);
}

.band-stat strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.band-stat span {
  display: block;
  margin-top: 7px;
  color: rgba(255, 253, 248, 0.6);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Layout ------------------------------------------------------------------ */

.board-layout {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
  gap: clamp(28px, 4vw, 60px);
  padding: clamp(44px, 6vw, 84px) var(--gutter);
}

.board-aside {
  position: sticky;
  top: 26px;
}

.board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.board-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
}

/* Panels ------------------------------------------------------------------ */

.panel {
  position: relative;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  box-shadow: var(--shadow-lg);
}

.panel::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  left: -1px;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--gold), var(--coral), var(--teal));
}

.panel + .panel {
  margin-top: 22px;
}

.panel h2 {
  margin-bottom: 10px;
  font-size: clamp(1.5rem, 2.2vw, 1.95rem);
}

.panel > p {
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.panel-foot {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 0.87rem;
}

/* Forms ------------------------------------------------------------------- */

.field {
  margin-bottom: 18px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 0.98rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-mute);
  opacity: 0.75;
}

input:hover,
textarea:hover,
select:hover {
  border-color: rgba(16, 25, 35, 0.34);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--paper-raised);
  box-shadow: 0 0 0 3px rgba(20, 119, 122, 0.16);
}

textarea {
  min-height: 165px;
  line-height: 1.6;
  resize: vertical;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--coral);
}

input[aria-invalid="true"]:focus,
textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(214, 95, 74, 0.18);
}

.hint {
  margin: 7px 0 0;
  color: var(--ink-mute);
  font-size: 0.79rem;
  line-height: 1.5;
}

.field-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 0 0;
  color: var(--coral-deep);
  font-size: 0.81rem;
  font-weight: 700;
}

.field-error:empty {
  display: none;
}

.field-error::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  font-size: 0.66rem;
  line-height: 1;
}

/* Word meter -------------------------------------------------------------- */

/* A bare number gives no sense of how close 75 words is. The track shows the
   accepted band, with a marker at the target, so the writer can aim. */
.meter {
  margin-top: 10px;
}

.meter-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--paper-sunk);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--coral);
  transition: width 0.35s var(--ease-out), background-color 0.35s var(--ease);
}

.meter-track[data-state="ok"] .meter-fill {
  background: var(--teal);
}

.meter-track[data-state="over"] .meter-fill {
  background: var(--coral);
}

/* Target marker at 75 of 100 words. */
.meter-target {
  position: absolute;
  top: -3px;
  left: 75%;
  width: 2px;
  height: 12px;
  background: var(--gold-deep);
  opacity: 0.85;
}

.meter-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--ink-mute);
  font-size: 0.78rem;
}

.counter {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.counter[data-state="ok"] {
  color: var(--teal-deep);
}

.counter[data-state="over"] {
  color: var(--coral-deep);
}

/* Buttons ----------------------------------------------------------------- */

button {
  font-family: var(--text);
}

.button.dark {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper-raised);
  box-shadow: 0 2px 0 #000;
}

.button.dark:hover {
  background: var(--ink-raised);
  transform: translateY(-2px);
  box-shadow: 0 4px 0 #000, var(--shadow-md);
}

.button.quiet {
  border-color: var(--line-strong);
  background: var(--paper-raised);
  color: var(--ink);
}

.button.quiet:hover {
  border-color: var(--ink);
  background: var(--paper);
  transform: translateY(-1px);
}

.button.small {
  min-height: 38px;
  padding: 8px 15px;
  font-size: 0.83rem;
}

.button.link {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--teal);
  font-size: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.button.link:hover {
  color: var(--teal-deep);
  transform: none;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none !important;
}

.button.is-busy {
  position: relative;
  color: transparent !important;
}

.button.is-busy::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: #17202a;
  animation: spin 0.7s linear infinite;
}

.button.dark.is-busy::after {
  color: var(--paper-raised);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Notices ----------------------------------------------------------------- */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius-sm);
  background: #eaf1ec;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.55;
  animation: noticeIn 0.4s var(--ease-out);
}

@keyframes noticeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.notice::before {
  content: "✓";
  flex: none;
  margin-top: 1px;
  color: var(--teal);
  font-weight: 700;
}

.notice[data-tone="error"] {
  border-left-color: var(--coral);
  background: #fdeeea;
}

.notice[data-tone="error"]::before {
  content: "!";
  color: var(--coral-deep);
}

.notice[data-tone="info"] {
  border-left-color: var(--gold);
  background: #fbf4e4;
}

.notice[data-tone="info"]::before {
  content: "i";
  color: var(--gold-deep);
  font-style: italic;
}

.notice:empty {
  display: none;
}

/* Idea cards -------------------------------------------------------------- */

.idea-list {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.idea-card {
  position: relative;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
    border-color 0.35s var(--ease);
}

.idea-card::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--gold);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.idea-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.idea-card:hover::before {
  opacity: 1;
}

.idea-card h3 {
  margin-bottom: 12px;
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.1vw, 1.75rem);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.idea-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.idea-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

.idea-meta.flush {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.idea-author {
  font-weight: 700;
}

.idea-meta span:not(.idea-author):not(.tag) {
  color: var(--ink-mute);
}

/* Status pills ------------------------------------------------------------ */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.tag[data-status="pending"] {
  background: #fbf4e4;
  color: #7d5f18;
}

.tag[data-status="approved"],
.tag[data-status="active"] {
  background: #e2efe9;
  color: var(--teal-deep);
}

.tag[data-status="rejected"],
.tag[data-status="suspended"] {
  background: #fdeeea;
  color: var(--coral-deep);
}

/* Empty and loading states ------------------------------------------------ */

.empty {
  padding: 52px 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-mute);
  text-align: center;
}

.empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 500;
}

/* Skeletons read as "content is coming" rather than "nothing is here". */
.skeleton {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
}

.skeleton-line {
  height: 12px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--paper-sunk) 25%,
    rgba(255, 253, 248, 0.9) 50%,
    var(--paper-sunk) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

.skeleton-line.title {
  height: 22px;
  width: 52%;
  margin-bottom: 20px;
}

.skeleton-line.short {
  width: 68%;
  margin-bottom: 0;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.pager {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

/* Admin console ----------------------------------------------------------- */

.admin-shell {
  padding: clamp(28px, 4vw, 52px) var(--gutter) clamp(48px, 6vw, 80px);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}

.stat {
  position: relative;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--line-strong);
}

.stat[data-accent="attention"]::before {
  background: var(--gold);
}
.stat[data-accent="good"]::before {
  background: var(--teal);
}
.stat[data-accent="warn"]::before {
  background: var(--coral);
}

.stat strong {
  display: block;
  font-family: var(--display);
  font-size: 2.3rem;
  font-weight: 500;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.stat span {
  display: block;
  margin-top: 4px;
  color: var(--ink-mute);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 12px 20px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--ink-mute);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected="true"] {
  border-bottom-color: var(--gold);
  color: var(--ink);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.toolbar input[type="search"] {
  flex: 1 1 260px;
  width: auto;
}

.toolbar select {
  width: auto;
  flex: 0 0 auto;
}

.result-count {
  margin: 0 0 16px;
  color: var(--ink-mute);
  font-size: 0.87rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--paper-sunk);
  color: var(--ink-soft);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr {
  transition: background-color 0.2s var(--ease);
}

tbody tr:hover {
  background: #fffaf0;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td .stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.muted {
  color: var(--ink-mute);
}

.nowrap {
  white-space: nowrap;
}

.admin-idea {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  box-shadow: var(--shadow-sm);
}

.admin-idea + .admin-idea {
  margin-top: 14px;
}

.admin-idea h3 {
  margin-bottom: 10px;
  font-family: var(--display);
  font-size: 1.28rem;
  font-weight: 500;
}

.admin-idea .body {
  margin: 14px 0 18px;
  color: var(--ink-soft);
  line-height: 1.66;
  white-space: pre-wrap;
}

/* Admin sign-in ----------------------------------------------------------- */

.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px 20px;
  background: var(--ink);
}

.login-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 80% at 20% 15%, rgba(20, 119, 122, 0.3), transparent 60%),
    radial-gradient(60% 80% at 85% 90%, rgba(197, 154, 70, 0.22), transparent 62%);
  pointer-events: none;
}

.login-shell .panel {
  position: relative;
  width: min(100%, 430px);
  animation: rise 0.6s var(--ease-out);
}

.login-shell .section-label {
  color: var(--gold-deep);
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 980px) {
  .board-layout {
    grid-template-columns: 1fr;
  }

  .board-aside {
    position: static;
  }
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .band-stats {
    gap: 18px 32px;
  }

  .tabs {
    overflow-x: auto;
  }

  .panel-foot {
    line-height: 1.8;
  }
}

/* Stage badge (public board) ----------------------------------------------- */

.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  margin-bottom: 14px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-sunk);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stage-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-mute);
}

.stage-badge[data-stage="design"]::before,
.stage-badge[data-stage="development"]::before {
  background: var(--teal);
}

.stage-badge[data-stage="investment"]::before,
.stage-badge[data-stage="marketing"]::before {
  background: var(--gold);
}

.stage-badge[data-stage="launched"] {
  border-color: rgba(20, 119, 122, 0.4);
  background: rgba(20, 119, 122, 0.08);
  color: var(--teal-deep);
}

.stage-badge[data-stage="launched"]::before {
  background: var(--teal-deep);
}

.stage-badge[data-stage="on_hold"]::before,
.stage-badge[data-stage="archived"]::before {
  background: var(--coral);
}

/* Pipeline (admin dashboard) ----------------------------------------------- */

.pipeline {
  margin: 26px 0 8px;
}

.pipeline-title {
  margin: 0 0 4px;
  font-family: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.pipeline-hint {
  margin: 0 0 14px;
  color: var(--ink-mute);
  font-size: 0.86rem;
}

/* Scrolls rather than wraps: the order of the stages is the information, and
   a wrapped row reads as two pipelines rather than one. */
.pipeline-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.pipeline-step {
  display: grid;
  gap: 3px;
  flex: 1 0 118px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), transform 0.2s var(--ease),
    background-color 0.25s var(--ease);
}

.pipeline-step:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.pipeline-step strong {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pipeline-step span {
  color: var(--ink-mute);
  font-size: 0.78rem;
  line-height: 1.3;
}

.pipeline-step[data-filled="true"] {
  border-color: rgba(20, 119, 122, 0.38);
  background: rgba(20, 119, 122, 0.06);
}

/* On-hold and archived are not progress, so they never take the accent. */
.pipeline-step[data-off="true"][data-filled="true"] {
  border-color: rgba(214, 95, 74, 0.34);
  background: rgba(214, 95, 74, 0.06);
}

.pipeline-step[data-off="true"] strong {
  color: var(--ink-mute);
}

/* Stage control (admin idea card) ------------------------------------------ */

.stage-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.stage-control label {
  margin: 0;
  color: var(--ink-mute);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stage-control select {
  width: auto;
  min-width: 165px;
}

.stage-moved {
  color: var(--ink-mute);
  font-size: 0.82rem;
}

/* Testimonial submission --------------------------------------------------- */

.testimonial-form-section {
  background: var(--paper-sunk);
  border-block: 1px solid var(--line);
}

.testimonial-form-head {
  max-width: 68ch;
  margin-bottom: clamp(24px, 3.4vw, 38px);
}

.testimonial-form-head h2 {
  margin-bottom: 16px;
}

.testimonial-form-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.35vw, 1.14rem);
  line-height: 1.68;
}

.testimonial-form-panel {
  max-width: 820px;
}

.page-notice {
  margin: 0 var(--gutter);
  transform: translateY(-50%);
}

/* Team (admin console) ------------------------------------------------------ */

.team-form-panel {
  max-width: 900px;
  margin-bottom: 26px;
}

.team-form-panel h3 {
  margin-bottom: 4px;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.team-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.team-row-photo {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-sunk);
}

.team-row-main {
  min-width: 0;
}

@media (max-width: 560px) {
  .team-row {
    grid-template-columns: 1fr;
  }

  .team-row-photo {
    width: 84px;
    height: 84px;
  }
}
