/* ========================================================================
 * SkillsPanel — Atelier Architecture tab Skills view.
 * Matches docs/atelier-skills-architecture.html to within ~5% fidelity.
 * All colors reference the editorial chat tokens from index.css :root.
 * ======================================================================== */

.sk-page {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ---- Breadcrumb ---- */
.sk-crumb {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-4);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sk-crumb .sk-sep { color: var(--ink-5); }
.sk-crumb .sk-here { color: var(--red-1); }

/* ---- Title stack ---- */
.sk-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink-1);
  margin: 0;
}
.sk-title em { font-style: italic; }
.sk-sub {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 720px;
  margin-top: 10px;
}
.sk-meta {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-4);
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}
.sk-meta-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red-1);
  margin-right: 6px;
  font-weight: 500;
}

/* ---- Triangle section ---- */
.sk-triangle {
  background: var(--cream-1);
  border: 1px solid var(--rule-1);
  border-radius: 14px;
  padding: 28px 32px;
  position: relative;
}
.sk-triangle::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 32px;
  width: 28px;
  height: 1px;
  background: var(--red-1);
}
.sk-eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red-1);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sk-eyebrow::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red-1);
}
.sk-section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.015em;
  color: var(--ink-1);
  margin: 0 0 6px;
}
.sk-section-title em { font-style: italic; }
.sk-section-desc {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-3);
  margin-bottom: 22px;
  max-width: 640px;
}
.sk-tri-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 1100px) {
  .sk-tri-grid { grid-template-columns: 1fr; gap: 20px; }
}
.sk-tri-svg {
  width: 100%;
  max-width: 340px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.sk-tri-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.sk-tri-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid var(--rule-1);
}
.sk-tri-row:first-child {
  border-top: none;
  padding-top: 0;
}
.sk-tri-label {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--ink-1);
}
.sk-tri-key {
  font-family: var(--mono);
  font-size: 9.5px;
  font-style: normal;
  letter-spacing: 0.18em;
  color: var(--red-1);
  font-weight: 500;
  display: block;
  margin-bottom: 3px;
}
.sk-tri-text {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-3);
}
.sk-tri-text em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-1);
  font-size: 13.5px;
}
.sk-mono {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-1);
  background: var(--cream-2);
  padding: 1px 6px;
  border-radius: 3px;
}

/* ---- Layout: library + live log ---- */
.sk-layout {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 28px;
}
@media (max-width: 1100px) {
  .sk-layout { grid-template-columns: 1fr; }
}
.sk-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.sk-col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}
.sk-col-eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red-1);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sk-col-eyebrow::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red-1);
}
.sk-col-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-4);
}
.sk-col-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--ink-1);
  margin: 0 0 6px;
}
.sk-col-title em { font-style: italic; }
.sk-col-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-3);
  margin-bottom: 6px;
}

/* ---- Skill library cards ---- */
.sk-card {
  background: var(--cream-1);
  border: 1px solid var(--rule-1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 200ms ease;
}
.sk-card-active {
  border-color: var(--red-1);
  box-shadow: 0 0 0 1px var(--red-1), 0 8px 24px -8px rgba(168, 66, 58, 0.18);
}
.sk-card-head {
  padding: 14px 18px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.sk-card-head-left { flex: 1; min-width: 0; }
.sk-card-name-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.sk-card-name {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-1);
  font-weight: 500;
}
.sk-card-version {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.05em;
}
.sk-card-status {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}
.sk-status-active {
  background: var(--red-1);
  color: var(--cream-1);
}
.sk-status-considered {
  background: var(--cream-2);
  color: var(--ink-3);
  border: 1px solid var(--rule-2);
}
.sk-status-dormant {
  background: transparent;
  color: var(--ink-4);
  border: 1px solid var(--rule-1);
}
.sk-card-headline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--ink-1);
  margin-bottom: 6px;
}
.sk-card-desc {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
}
.sk-card-divider {
  height: 1px;
  background: var(--rule-1);
}
.sk-card-meta {
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-4);
  letter-spacing: 0.05em;
  background: var(--cream-2);
}
.sk-card-meta-left {
  display: flex;
  gap: 16px;
  align-items: center;
}
.sk-card-meta-num {
  color: var(--ink-1);
  font-weight: 500;
}
.sk-open-link {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--red-1);
  text-decoration: none;
  letter-spacing: 0;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.sk-open-link:hover { text-decoration: underline; }

/* ---- Live activation log ---- */
.sk-live-frame {
  background: var(--cream-1);
  border: 1px solid var(--rule-1);
  border-radius: 12px;
  padding: 20px 22px 18px;
  position: relative;
}
.sk-live-frame::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 22px;
  width: 24px;
  height: 1px;
  background: var(--red-1);
}
.sk-live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red-1);
  margin-bottom: 10px;
}
.sk-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-1);
  animation: sk-pulse 1.6s ease-in-out infinite;
}
@keyframes sk-pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.8); }
  50%      { opacity: 1;   transform: scale(1.1); }
}
.sk-quote-meta {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 6px;
}
.sk-user-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink-1);
  padding: 12px 16px;
  background: var(--cream-2);
  border-radius: 10px 10px 4px 10px;
  border: 1px solid var(--rule-1);
  margin-bottom: 18px;
}
.sk-user-quote::before {
  content: '"';
  color: var(--red-1);
  font-weight: 500;
  margin-right: 1px;
}
.sk-user-quote::after {
  content: '"';
  color: var(--red-1);
  font-weight: 500;
  margin-left: 1px;
}

.sk-routing {
  margin-top: 4px;
}
.sk-routing-eyebrow {
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 8px;
}
.sk-routing-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--rule-1);
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-3);
}
.sk-routing-step:last-child { border-bottom: none; }
.sk-check {
  font-family: var(--mono);
  color: var(--green-1);
  font-weight: 600;
  flex-shrink: 0;
  width: 12px;
}
.sk-x {
  font-family: var(--mono);
  color: var(--ink-4);
  font-weight: 500;
  flex-shrink: 0;
  width: 12px;
}
.sk-routing-name {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-1);
  font-weight: 500;
}
.sk-routing-verdict {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-1);
  font-size: 13px;
}
.sk-routing-reason {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0;
  margin-top: 2px;
  display: block;
}
.sk-routing-summary {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--cream-2);
  border-left: 2px solid var(--red-1);
  border-radius: 0 6px 6px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-1);
}
.sk-routing-summary .sk-num {
  font-style: normal;
  font-weight: 500;
  color: var(--red-1);
}
.sk-empty-log {
  padding: 28px 16px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-4);
}

/* ---- Before / After impact ---- */
.sk-impact {
  background: var(--cream-1);
  border: 1px solid var(--rule-1);
  border-radius: 14px;
  padding: 28px 32px;
  position: relative;
}
.sk-impact::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 32px;
  width: 28px;
  height: 1px;
  background: var(--red-1);
}
.sk-impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 20px;
}
@media (max-width: 900px) {
  .sk-impact-grid { grid-template-columns: 1fr; }
}
.sk-impact-card {
  border: 1px solid var(--rule-1);
  border-radius: 10px;
  overflow: hidden;
  background: var(--cream-elev);
}
.sk-impact-head {
  padding: 11px 16px;
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule-1);
}
.sk-impact-head-before {
  background: var(--cream-3);
  color: var(--ink-3);
}
.sk-impact-head-after {
  background: var(--ink-1);
  color: var(--cream-1);
}
.sk-impact-stamp {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.15em;
  font-weight: 500;
}
.sk-impact-head-before .sk-impact-stamp { color: var(--ink-4); }
.sk-impact-head-after .sk-impact-stamp { color: rgba(250, 243, 232, 0.65); }
.sk-impact-body {
  padding: 16px 18px;
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-1);
}
.sk-impact-body p { margin-bottom: 8px; }
.sk-impact-body p:last-child { margin-bottom: 0; }
.sk-impact-body em { font-style: italic; }
.sk-impact-body .sk-product {
  font-style: italic;
  border-bottom: 1px solid var(--red-1);
  padding-bottom: 1px;
}
.sk-impact-body .sk-price {
  font-family: var(--serif);
  font-weight: 500;
}
.sk-impact-callouts {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--cream-2);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-3);
}
.sk-impact-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red-1);
  font-weight: 500;
  margin-right: 6px;
}
.sk-impact-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-4);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule-1);
}

/* ---- Three-layer cheat sheet ---- */
.sk-distinction {
  padding-top: 22px;
  border-top: 1px solid var(--rule-2);
}
.sk-distinction-eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red-1);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sk-distinction-eyebrow::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red-1);
}
.sk-distinction-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
  color: var(--ink-1);
}
.sk-distinction-title em { font-style: italic; }
.sk-distinction-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--rule-1);
  border-radius: 10px;
  overflow: hidden;
}
@media (max-width: 900px) {
  .sk-distinction-grid { grid-template-columns: 1fr; }
}
.sk-dist-cell {
  padding: 20px 22px;
  background: var(--cream-1);
  border-right: 1px solid var(--rule-1);
}
.sk-dist-cell:last-child { border-right: none; }
@media (max-width: 900px) {
  .sk-dist-cell {
    border-right: none;
    border-bottom: 1px solid var(--rule-1);
  }
  .sk-dist-cell:last-child { border-bottom: none; }
}
.sk-dist-key {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--red-1);
  font-weight: 500;
  margin-bottom: 8px;
}
.sk-dist-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--ink-1);
  margin-bottom: 6px;
}
.sk-dist-q {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.sk-dist-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-1);
}
.sk-dist-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.sk-dist-list li::before {
  content: '·';
  color: var(--red-1);
  font-weight: 600;
  flex-shrink: 0;
}
.sk-dist-list em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-3);
}

/* ---- SKILL.md modal ---- */
.sk-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 20, 16, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sk-modal {
  background: var(--cream-1);
  border: 1px solid var(--rule-1);
  border-radius: 14px;
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(31, 20, 16, 0.18);
}
.sk-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px 14px;
  border-bottom: 1px solid var(--rule-1);
  flex-shrink: 0;
}
.sk-modal-title {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-1);
}
.sk-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
}
.sk-modal-close:hover { color: var(--ink-1); }
.sk-modal-body {
  padding: 20px 26px 26px;
  overflow-y: auto;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-1);
}
.sk-modal-body h1,
.sk-modal-body h2,
.sk-modal-body h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink-1);
  margin-top: 18px;
  margin-bottom: 8px;
}
.sk-modal-body h1 { font-size: 22px; letter-spacing: -0.01em; }
.sk-modal-body h2 { font-size: 18px; }
.sk-modal-body h3 { font-size: 15px; }
.sk-modal-body p { margin-bottom: 10px; }
.sk-modal-body ul,
.sk-modal-body ol {
  padding-left: 20px;
  margin-bottom: 12px;
}
.sk-modal-body li { margin-bottom: 4px; }
.sk-modal-body code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--cream-2);
  padding: 1px 5px;
  border-radius: 3px;
}
.sk-modal-body blockquote {
  border-left: 2px solid var(--red-1);
  padding: 4px 0 4px 14px;
  margin: 10px 0;
  font-style: italic;
  color: var(--ink-3);
}
.sk-modal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}
.sk-modal-body th,
.sk-modal-body td {
  border: 1px solid var(--rule-1);
  padding: 8px 10px;
  text-align: left;
}
.sk-modal-body th {
  background: var(--cream-2);
  font-weight: 500;
}
