:root {
  --bg: #f3efe7;
  --bg-deep: #e0d7c8;
  --panel: rgba(251, 248, 241, 0.88);
  --panel-strong: rgba(255, 252, 246, 0.96);
  --panel-dark: #17211b;
  --ink: #17211b;
  --muted: #607068;
  --muted-strong: #45544d;
  --line: rgba(23, 33, 27, 0.11);
  --line-strong: rgba(23, 33, 27, 0.18);
  --accent: #c75a24;
  --accent-strong: #8f3814;
  --accent-soft: rgba(199, 90, 36, 0.12);
  --teal: #1f7d69;
  --teal-soft: rgba(31, 125, 105, 0.12);
  --shadow-lg: 0 28px 70px rgba(55, 41, 19, 0.14);
  --shadow-md: 0 14px 36px rgba(31, 24, 12, 0.09);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: 'Sora', sans-serif;
  background:
    radial-gradient(circle at 0% 0%, rgba(199, 90, 36, 0.18), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(31, 125, 105, 0.16), transparent 24%),
    linear-gradient(180deg, #f7f2e9 0%, var(--bg) 56%, #ede5d7 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 33, 27, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 33, 27, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 88%);
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 54px;
}

.hero,
.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.85fr);
  gap: 24px;
  padding: 34px;
  border-radius: var(--radius-xl);
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.hero::before {
  inset: auto auto -120px -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(199, 90, 36, 0.22), transparent 66%);
}

.hero::after {
  inset: -70px -30px auto auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 125, 105, 0.18), transparent 68%);
}

.hero-main,
.hero-side {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.73rem;
  font-weight: 700;
}

.hero h1,
.hero h2,
.section-heading h2,
.detail-header h3,
.context-card h4,
.code-card h4,
.repo-section-heading h4,
.repo-overview-card h4,
.repo-issue-card h4,
.repo-issue-card h5 {
  margin: 0;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  line-height: 0.95;
}

.hero-copy,
.section-copy {
  color: var(--muted-strong);
  line-height: 1.75;
}

.hero-copy {
  max-width: 680px;
  margin: 18px 0 0;
  font-size: 1rem;
}

.hero-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.hero-chip,
.panel-banner {
  border: 1px solid rgba(23, 33, 27, 0.08);
  background: rgba(255, 253, 249, 0.72);
  box-shadow: var(--shadow-md);
}

.hero-chip {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 22px;
}

.hero-chip-label,
.panel-banner-kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.hero-chip strong {
  font-size: 0.95rem;
  line-height: 1.45;
}

.hero-command-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  min-height: 100%;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(22, 31, 26, 0.97) 0%, rgba(29, 40, 34, 0.94) 100%);
  color: #f4efe5;
  box-shadow: 0 18px 50px rgba(19, 20, 17, 0.28);
}

.hero-command-card .eyebrow {
  color: rgba(244, 239, 229, 0.65);
}

.hero-command-card h2 {
  font-size: 1.5rem;
  line-height: 1.2;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.hero-command-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-command-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(244, 239, 229, 0.84);
  font-size: 0.84rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0 18px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff8f1;
  background: linear-gradient(135deg, #ca5922 0%, #ef8f3a 100%);
  box-shadow: 0 16px 34px rgba(199, 90, 36, 0.28);
}

.button-secondary {
  color: var(--ink);
  background: rgba(23, 33, 27, 0.05);
  border: 1px solid rgba(23, 33, 27, 0.08);
}

.status-pill,
.storage-badge,
.save-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: rgba(23, 33, 27, 0.06);
  color: var(--muted-strong);
  font-size: 0.86rem;
  border: 1px solid rgba(23, 33, 27, 0.08);
}

.dashboard {
  margin-top: 24px;
  display: grid;
  gap: 24px;
}

.panel {
  border-radius: 30px;
  padding: 24px;
}

.section-heading,
.repo-form,
.pager,
.repo-results-header,
.list-item-header,
.detail-header,
.detail-actions,
.code-card-header,
.repo-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading {
  align-items: flex-start;
  margin-bottom: 22px;
}

.section-copy {
  margin: 10px 0 0;
  max-width: 700px;
  font-size: 0.95rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-card,
.ops-card,
.watchlist-panel,
.repo-overview-card,
.repo-issue-card,
.context-card,
.code-card,
.list-item,
.repo-insight-block,
.repo-comment {
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.metric-card,
.ops-card,
.repo-overview-card,
.repo-issue-card,
.context-card,
.code-card,
.detail-panel,
.watchlist-panel,
.list-item {
  box-shadow: var(--shadow-md);
}

.metric-card {
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96) 0%, rgba(247, 241, 231, 0.96) 100%);
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  display: block;
  margin-top: 14px;
  font-size: 2.25rem;
  line-height: 1;
}

.ops-grid {
  margin-top: 18px;
}

.ops-card {
  border-radius: 26px;
  padding: 20px;
}

.repo-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.repo-form {
  flex-wrap: wrap;
  align-items: end;
}

.repo-input {
  flex: 1 1 340px;
}

.filters label,
.detail-form label,
.repo-input {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(23, 33, 27, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  padding: 13px 14px;
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(199, 90, 36, 0.36);
  box-shadow: 0 0 0 4px rgba(199, 90, 36, 0.1);
  background: rgba(255, 255, 255, 0.94);
}

textarea {
  resize: vertical;
}

.watchlist-panel,
.detail-panel {
  border-radius: 28px;
}

.watchlist-panel {
  padding: 16px;
}

.watchlist-list,
.repo-results,
.repo-section,
.repo-issues-list,
.opportunities-list,
.detail-form,
.repo-comment-list {
  display: grid;
  gap: 12px;
}

.watchlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.95) 0%, rgba(248, 243, 235, 0.95) 100%);
  border: 1px solid rgba(23, 33, 27, 0.08);
}

.watchlist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.watchlist-item p,
.repo-overview-card p,
.repo-issue-card p,
.context-card p,
.detail-empty,
.detail-repo {
  margin: 0;
}

.watchlist-item p,
.repo-overview-card p,
.repo-issue-card p,
.context-card p,
.repo-plan-list,
.repo-comment span {
  color: var(--muted-strong);
}

.repo-results {
  margin-top: 18px;
}

.repo-overview-card,
.repo-issue-card {
  padding: 18px;
  border-radius: 24px;
}

.repo-overview-card {
  background:
    linear-gradient(135deg, rgba(255, 252, 246, 0.98) 0%, rgba(244, 238, 227, 0.98) 100%);
}

.repo-issue-card p {
  margin-top: 10px;
  line-height: 1.65;
}

.repo-section-heading h4,
.repo-overview-card h4,
.repo-issue-card h4 {
  font-size: 1.08rem;
}

.repo-issue-card h5 {
  font-size: 0.88rem;
}

.repo-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.repo-insight-block,
.repo-comment {
  border-radius: 18px;
  padding: 14px;
  background: rgba(23, 33, 27, 0.035);
}

.repo-plan-list {
  margin: 10px 0 0;
  padding-left: 20px;
  line-height: 1.65;
}

.repo-comment strong,
.repo-comment span {
  display: inline-block;
  margin-right: 8px;
}

.repo-comment span {
  font-size: 0.8rem;
}

.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.board {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.list-panel,
.detail-panel {
  min-height: 780px;
}

.panel-banner {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 18px;
}

.detail-banner {
  margin-bottom: 18px;
}

.pager {
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pagination-summary {
  color: var(--muted);
  font-size: 0.92rem;
}

.history-divider {
  margin: 8px 4px 4px;
  color: var(--accent-strong);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.list-item {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 24px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.list-item:hover,
.list-item.active {
  transform: translateY(-2px);
  border-color: rgba(199, 90, 36, 0.34);
  box-shadow: 0 18px 34px rgba(42, 31, 13, 0.12);
}

.list-item-header h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.45;
}

.list-item p {
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.list-meta,
.list-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: rgba(23, 33, 27, 0.06);
  color: var(--muted-strong);
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid rgba(23, 33, 27, 0.05);
}

.tag.priority-high,
.tag.status-in-progress,
.tag.fit-high-fit {
  background: rgba(199, 90, 36, 0.12);
  color: var(--accent-strong);
}

.tag.status-done,
.tag.fit-medium-fit,
.tag.complexity-quick-win {
  background: rgba(31, 125, 105, 0.12);
  color: var(--teal);
}

.tag.fit-low-fit,
.tag.complexity-complex {
  background: rgba(23, 33, 27, 0.08);
  color: var(--muted);
}

.tag.complexity-medium {
  background: rgba(199, 90, 36, 0.1);
  color: var(--accent-strong);
}

.detail-panel {
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.98) 0%, rgba(246, 240, 231, 0.98) 100%);
  border: 1px solid rgba(23, 33, 27, 0.08);
}

.detail-empty {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 32px;
  border-radius: 24px;
  text-align: center;
  border: 1.5px dashed rgba(23, 33, 27, 0.14);
  background: rgba(255, 255, 255, 0.44);
}

.hidden {
  display: none;
}

.detail-form {
  gap: 16px;
}

.detail-repo {
  color: var(--accent-strong);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.detail-grid,
.context-grid {
  display: grid;
  gap: 14px;
}

.detail-grid,
.context-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.context-card {
  border-radius: 22px;
  padding: 16px;
}

.context-card p {
  margin-top: 10px;
  line-height: 1.7;
}

.code-card {
  overflow: hidden;
  border-radius: 24px;
}

.code-card-header {
  padding: 16px 18px 0;
}

pre {
  margin: 0;
  padding: 18px;
  overflow: auto;
  font-size: 0.84rem;
  line-height: 1.6;
  color: #f8f2e8;
  background: #18201b;
  font-family: 'IBM Plex Mono', monospace;
}

@media (max-width: 1220px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-rail {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .section-heading,
  .detail-header,
  .repo-overview-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .repo-admin-grid,
  .filters,
  .board,
  .detail-grid,
  .context-grid,
  .repo-insight-grid {
    grid-template-columns: 1fr;
  }

  .list-panel,
  .detail-panel {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1480px);
    padding-top: 16px;
  }

  .hero,
  .panel {
    border-radius: 24px;
  }

  .hero,
  .panel,
  .detail-panel {
    padding: 18px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 13vw, 3.4rem);
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .watchlist-item,
  .hero-command-meta,
  .repo-form,
  .pager {
    align-items: stretch;
  }

  .watchlist-item,
  .list-item-header,
  .detail-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions,
  .watchlist-actions {
    width: 100%;
  }
}
