@import url("https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Patrick+Hand&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --pencil: #3a3a3a;
  --pencil-light: #7a7a7a;
  --pencil-faint: #b8b8b8;
  --paper: #faf9f6;
  --paper-lines: #e8e6e0;
  --blue-pencil: #4a7fb5;
  --red-pencil: #c45c5c;
  --green-pencil: #5b9a6b;
  --yellow-highlight: #fff3b0;
  --orange-pencil: #d4883a;
  --sketch-font: "Architects Daughter", cursive;
  --hand-font: "Patrick Hand", cursive;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #f0efea;
  font-family: var(--sketch-font);
  color: var(--pencil);
  padding: 40px 20px;
}

.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-header h1 {
  font-family: var(--hand-font);
  font-size: 42px;
  color: var(--pencil);
  margin-bottom: 8px;
}

.page-header .journey-tag {
  display: inline-block;
  background: var(--blue-pencil);
  color: white;
  font-family: var(--hand-font);
  font-size: 14px;
  padding: 4px 14px;
  border-radius: 3px;
  margin-bottom: 8px;
}

.page-header p {
  font-size: 16px;
  color: var(--pencil-light);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

.variation {
  max-width: 1200px;
  margin: 0 auto 60px;
  background: var(--paper);
  border: 2px solid var(--pencil-faint);
  border-radius: 4px;
  padding: 40px;
  position: relative;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.05);
}

.variation::before {
  content: "";
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  bottom: 0;
  background: repeating-linear-gradient(
    transparent,
    transparent 31px,
    var(--paper-lines) 31px,
    var(--paper-lines) 32px
  );
  pointer-events: none;
  opacity: 0.4;
}

.variation-label {
  position: absolute;
  top: -18px;
  left: 30px;
  background: var(--blue-pencil);
  color: white;
  font-family: var(--hand-font);
  font-size: 16px;
  padding: 4px 16px;
  border-radius: 3px;
}

.variation h2 {
  font-family: var(--hand-font);
  font-size: 26px;
  margin-bottom: 6px;
  position: relative;
}

.variation .subtitle {
  font-size: 14px;
  color: var(--pencil-light);
  margin-bottom: 20px;
  line-height: 1.5;
  position: relative;
}

.annotation {
  font-size: 13px;
  color: var(--red-pencil);
  font-style: italic;
  position: relative;
  margin-top: 16px;
}

.variation-sep {
  text-align: center;
  margin: 20px 0 50px;
  color: var(--pencil-faint);
  font-size: 14px;
  letter-spacing: 4px;
}

/* Sketch UI primitives */
.sketch-box {
  border: 2px solid var(--pencil);
  border-radius: 3px;
  position: relative;
  background: transparent;
}

.sketch-label {
  font-family: var(--hand-font);
  font-size: 14px;
  color: var(--pencil);
  font-weight: 600;
}

.sketch-text {
  font-size: 12px;
  color: var(--pencil-light);
  line-height: 1.4;
}

.sketch-btn {
  display: inline-block;
  border: 2px solid var(--pencil);
  border-radius: 4px;
  padding: 5px 14px;
  font-family: var(--sketch-font);
  font-size: 12px;
  background: transparent;
  cursor: default;
}

.sketch-btn.primary {
  background: var(--pencil);
  color: var(--paper);
}
.sketch-btn.green {
  border-color: var(--green-pencil);
  color: var(--green-pencil);
}
.sketch-btn.red {
  border-color: var(--red-pencil);
  color: var(--red-pencil);
}
.sketch-btn.blue {
  border-color: var(--blue-pencil);
  color: var(--blue-pencil);
}
.sketch-btn.sm {
  font-size: 10px;
  padding: 3px 8px;
}

.tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border: 1px solid var(--pencil-faint);
  border-radius: 10px;
  color: var(--pencil-light);
}

.tag.blue {
  border-color: var(--blue-pencil);
  color: var(--blue-pencil);
}
.tag.green {
  border-color: var(--green-pencil);
  color: var(--green-pencil);
}
.tag.red {
  border-color: var(--red-pencil);
  color: var(--red-pencil);
}
.tag.orange {
  border-color: var(--orange-pencil);
  color: var(--orange-pencil);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-dot.green {
  background: var(--green-pencil);
}
.status-dot.yellow {
  background: #c9a840;
}
.status-dot.red {
  background: var(--red-pencil);
}
.status-dot.blue {
  background: var(--blue-pencil);
}
.status-dot.gray {
  background: var(--pencil-faint);
}

.placeholder-img {
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 8px,
    var(--paper-lines) 8px,
    var(--paper-lines) 9px
  );
  border: 1px solid var(--pencil-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pencil-light);
  font-size: 12px;
  border-radius: 3px;
}

.metric-box {
  text-align: center;
  padding: 8px;
}

.metric-box .number {
  font-family: var(--hand-font);
  font-size: 28px;
  color: var(--pencil);
  line-height: 1;
}

.metric-box .label {
  font-size: 11px;
  color: var(--pencil-light);
  margin-top: 2px;
}

.sketch-search {
  border: 1.5px solid var(--pencil-faint);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--pencil-light);
  font-family: var(--sketch-font);
}

/* Layout helpers */
.flex {
  display: flex;
}
.flex-col {
  display: flex;
  flex-direction: column;
}
.gap-4 {
  gap: 4px;
}
.gap-8 {
  gap: 8px;
}
.gap-12 {
  gap: 12px;
}
.gap-16 {
  gap: 16px;
}
.gap-20 {
  gap: 20px;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-center {
  justify-content: center;
}
.flex-1 {
  flex: 1;
}
.w-full {
  width: 100%;
}

/* Topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px solid var(--pencil);
  border-radius: 4px;
  padding: 10px 16px;
  margin-bottom: 16px;
}

/* Sidebar */
.sidebar {
  width: 220px;
  border: 2px solid var(--pencil);
  border-radius: 4px;
  padding: 12px 0;
  flex-shrink: 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--pencil-light);
}

.sidebar-item.active {
  background: var(--yellow-highlight);
  color: var(--pencil);
  font-weight: 600;
  border-left: 3px solid var(--pencil);
}

.sidebar-section {
  font-size: 10px;
  font-weight: 600;
  color: var(--pencil-faint);
  padding: 8px 16px 4px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Table */
.sketch-table {
  border: 2px solid var(--pencil);
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
}

.sketch-table-header {
  display: flex;
  padding: 8px 12px;
  background: var(--pencil);
  color: var(--paper);
  font-family: var(--hand-font);
  font-size: 12px;
  gap: 8px;
}

.sketch-table-row {
  display: flex;
  padding: 8px 12px;
  border-bottom: 1px solid var(--paper-lines);
  font-size: 12px;
  gap: 8px;
  align-items: center;
}

.sketch-table-row:hover {
  background: rgba(74, 127, 181, 0.03);
}

/* Card */
.sketch-card {
  border: 2px solid var(--pencil-faint);
  border-radius: 6px;
  padding: 16px;
  background: transparent;
}

/* Mobile frame */
.mobile-frame {
  width: 375px;
  border: 2px solid var(--pencil);
  border-radius: 24px;
  padding: 12px;
  background: var(--paper);
  margin: 0 auto;
  position: relative;
}

.mobile-frame .status-bar {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px 8px;
  font-size: 12px;
  font-weight: 600;
}

.mobile-frame .mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px 12px;
}

.mobile-frame .bottom-nav {
  display: flex;
  justify-content: space-around;
  padding: 12px 0 4px;
  border-top: 1px solid var(--paper-lines);
  margin-top: auto;
}

.mobile-frame .nav-item {
  text-align: center;
  font-size: 10px;
  color: var(--pencil-light);
}

.mobile-frame .nav-item.active {
  color: var(--green-pencil);
  font-weight: 600;
}

/* Desktop frame */
.desktop-frame {
  border: 2px solid var(--pencil);
  border-radius: 6px;
  overflow: hidden;
  min-height: 500px;
}

.desktop-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 2px solid var(--pencil);
  background: transparent;
}

.desktop-body {
  display: flex;
  min-height: 460px;
}

.desktop-sidebar {
  width: 200px;
  border-right: 1.5px solid var(--pencil-faint);
  padding: 12px 0;
  flex-shrink: 0;
}

.desktop-main {
  flex: 1;
  padding: 16px;
}

/* Wizard steps */
.wizard-steps {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
}

.wizard-step .step-num {
  width: 22px;
  height: 22px;
  border: 2px solid var(--pencil);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.wizard-step.done .step-num {
  background: var(--green-pencil);
  border-color: var(--green-pencil);
  color: white;
}
.wizard-step.active .step-num {
  background: var(--pencil);
  color: white;
}
.wizard-step.active {
  background: var(--yellow-highlight);
  font-weight: 600;
}
.wizard-step.upcoming {
  color: var(--pencil-faint);
}
.wizard-step.upcoming .step-num {
  border-color: var(--pencil-faint);
}

/* Form fields */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-family: var(--hand-font);
  font-size: 13px;
  font-weight: 600;
}

.form-input {
  border: 1.5px solid var(--pencil-faint);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--pencil-light);
  font-family: var(--sketch-font);
}

.form-select {
  border: 1.5px solid var(--pencil-faint);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Navigation */
.back-link {
  font-size: 13px;
  color: var(--blue-pencil);
}

/* Index page */
.screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.screen-card {
  background: var(--paper);
  border: 2px solid var(--pencil-faint);
  border-radius: 6px;
  padding: 20px;
  transition: border-color 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.screen-card:hover {
  border-color: var(--blue-pencil);
}

.screen-card h3 {
  font-family: var(--hand-font);
  font-size: 18px;
  margin-bottom: 4px;
}

.screen-card .journey {
  font-size: 11px;
  color: var(--blue-pencil);
  margin-bottom: 8px;
}

.screen-card p {
  font-size: 13px;
  color: var(--pencil-light);
  line-height: 1.4;
}
