@import url('/materials/notebook-theme.css');

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.58; }
a { color: inherit; text-decoration: none; }

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 48px);
}
.brand { flex: 0 0 auto; font-weight: 800; }
.main-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.app-layout {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  width: min(1460px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 64px;
}
.rail {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 12px;
  padding: 16px;
}
.rail-title { margin: 0; font-size: 1.72rem; }
.rail-subtitle { margin: 8px 0 0; color: #71717a !important; font-size: .88rem; }
.tab-list { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; }
.content-stage { min-width: 0; }
.study-grid { display: grid; gap: 16px; }

.study-card,
.activity-card {
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 12px;
  background: rgba(24,24,27,.42);
  padding: clamp(17px, 2.4vw, 24px);
}
.study-card h2,
.activity-card h2 { margin: 4px 0 11px; font-size: clamp(1.42rem, 2vw, 1.82rem); }
.study-card h3,
.activity-card h3 { margin: 19px 0 8px; font-size: 1rem; }
.study-card p,
.activity-card p { margin: 8px 0; }
.study-card ul,
.activity-card ul { margin: 9px 0 0; padding-left: 1.22rem; }
.study-card li + li,
.activity-card li + li { margin-top: 7px; }

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.topic-check {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #71717a;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  white-space: nowrap;
}
.topic-check input { accent-color: #e11d48; }

.source-line {
  display: inline-block;
  color: #71717a;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .69rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  color: #a1a1aa;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 4px 9px;
  text-transform: uppercase;
}
.note-box {
  border: 1px solid rgba(225,29,72,.28);
  border-radius: 9px;
  background: rgba(225,29,72,.08);
  color: #f4f4f5;
  margin-top: 15px;
  padding: 13px 14px;
}
.note-box strong { color: #fff; }

.table-scroll { overflow-x: auto; margin-top: 14px; }
.compare-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.compare-table th,
.compare-table td {
  border: 1px solid rgba(255,255,255,.08);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.compare-table th { background: rgba(225,29,72,.12); color: #fff; }

.visual-stage { display: grid; gap: 12px; margin-top: 16px; }
.visual-canvas {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 11px;
  background:
    radial-gradient(circle at 18% 0%, rgba(127,29,29,.15), transparent 34%),
    radial-gradient(circle at 82% 76%, rgba(225,29,72,.10), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)),
    #0a0a0a;
  overflow: hidden;
  padding: clamp(14px, 2.2vw, 22px);
}
.visual-caption { border-left: 3px solid #e11d48; color: #d4d4d8; padding-left: 12px; }

/* No free-positioned text in the main diagrams: labels live inside responsive grid cells. */
.gulf-diagram {
  display: grid;
  grid-template-columns: minmax(150px,1fr) minmax(118px,.72fr) minmax(150px,1fr) minmax(118px,.72fr) minmax(150px,1fr);
  align-items: stretch;
  gap: 10px;
}
.gulf-node {
  display: flex;
  min-height: 152px;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  background: rgba(24,24,27,.62);
  padding: 15px;
  text-align: center;
}
.gulf-node b { color: #fff; font-size: .95rem; }
.gulf-node span { margin-top: 6px; color: #a1a1aa; font-size: .78rem; }
.gulf-bridge {
  position: relative;
  display: flex;
  min-height: 152px;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  color: #fb7185;
  text-align: center;
}
.gulf-bridge::before {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  border-top: 2px dashed rgba(225,29,72,.7);
}
.gulf-bridge span {
  position: relative;
  z-index: 1;
  max-width: 112px;
  border: 1px solid rgba(225,29,72,.26);
  border-radius: 999px;
  background: #0a0a0a;
  padding: 7px 9px;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .07em;
  line-height: 1.25;
  text-transform: uppercase;
}

.norman-cycle {
  display: grid;
  grid-template-columns: repeat(7, minmax(105px, 1fr));
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.norman-cycle > div {
  min-width: 105px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(10,10,10,.5);
  padding: 12px;
}
.norman-cycle span {
  display: block;
  color: #e11d48;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.8rem;
  line-height: 1;
}
.norman-cycle b {
  display: block;
  margin-top: 7px;
  color: #fff;
  font-size: .78rem;
}
.nielsen-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px 22px;
  margin-top: 12px !important;
  padding-left: 1.4rem !important;
}
.nielsen-grid li {
  break-inside: avoid;
}

.sign-grid,
.process-flow { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.sign-card,
.process-step {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 11px;
  background: rgba(24,24,27,.58);
  padding: 14px;
}
.sign-type { color: #fb7185; font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.sign-card b,
.process-step b { display: block; margin: 7px 0 5px; color: #fff; }
.sign-card p,
.process-step p { margin: 0; font-size: .84rem; }
.step-number { color: #e11d48; font-family: 'DM Serif Display', Georgia, serif; font-size: 2rem; line-height: 1; }
.process-loop { grid-column: 1 / -1; color: #a1a1aa; font-size: .8rem; text-align: center; }

.gestalt-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.gestalt-box {
  min-height: 172px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 11px;
  background: rgba(10,10,10,.56);
  padding: 15px;
}
.gestalt-demo { display: flex; min-height: 98px; align-items: center; justify-content: center; gap: 7px; }
.gestalt-label { color: #a1a1aa; font-size: .71rem; font-weight: 700; text-align: center; }
.dot { width: 17px; height: 17px; border-radius: 50%; background: #e11d48; }
.dot.square { border-radius: 4px; background: #d4d4d8; }
.proximity-groups { display: flex; gap: 30px; }
.proximity-group { display: flex; gap: 5px; }
.continuity-line { width: 116px; height: 62px; border-top: 4px solid #e11d48; border-radius: 50%; transform: rotate(10deg); }
.closure-shape { width: 74px; height: 74px; border: 10px solid #e11d48; border-right-color: transparent; border-radius: 50%; transform: rotate(-18deg); }

.affordance-demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.affordance-demo {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 11px;
  background: rgba(10,10,10,.5);
  padding: 16px;
}
.affordance-demo b {
  display: block;
  margin: 7px 0 12px;
  color: #fff;
}
.affordance-demo p {
  margin: 12px 0 0;
  color: #a1a1aa !important;
  font-size: .82rem;
}
.fake-button-like {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(225,29,72,.52);
  border-radius: 999px;
  background: rgba(225,29,72,.14);
  color: #fff;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .07em;
  padding: 0 18px;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
  user-select: none;
}
.fake-link-like {
  display: inline-block;
  color: #93c5fd !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  user-select: none;
}
.training-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.training-question {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(10,10,10,.48);
  padding: 14px;
}
.training-question h3 {
  margin: 0 0 8px;
  font-size: .94rem;
}
.training-options {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 1.15rem;
  color: #a1a1aa;
}

.activity-scenario {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(10,10,10,.5);
  margin-top: 12px;
  padding: 14px;
}
.activity-scenario strong { color: #fff; }

details.answer-card,
details.quiz-item {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(10,10,10,.48);
  margin-top: 12px;
  overflow: hidden;
}
details summary {
  cursor: pointer;
  list-style: none;
  padding: 13px 14px;
  color: #f4f4f5;
  font-weight: 700;
}
details summary::-webkit-details-marker { display: none; }
details summary::before { content: '+'; display: inline-block; width: 20px; color: #e11d48; }
details[open] summary::before { content: '–'; }
.answer-body { border-top: 1px solid rgba(255,255,255,.07); padding: 12px 14px 14px 34px; color: #a1a1aa; }

.review-section { margin-top: 16px; }
.review-section:first-child { margin-top: 0; }
.review-section h2 { margin-bottom: 8px; }
.quiz-bank { display: grid; gap: 8px; }

@media (max-width: 1040px) {
  .gulf-diagram { grid-template-columns: 1fr; }
  .gulf-bridge { min-height: 78px; }
  .gulf-bridge::before {
    left: 50%;
    right: auto;
    top: 6px;
    bottom: 6px;
    height: auto;
    border-top: 0;
    border-left: 2px dashed rgba(225,29,72,.7);
  }
  .sign-grid { grid-template-columns: 1fr; }
  .gestalt-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 920px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .main-nav { justify-content: flex-start; }
  .app-layout { grid-template-columns: 1fr; }
  .rail { position: relative; top: auto; max-height: none; }
  .process-flow { grid-template-columns: 1fr; }
  .process-loop { grid-column: 1; }
}
@media (max-width: 560px) {
  .nielsen-grid { grid-template-columns: 1fr; }
  .affordance-demo-grid { grid-template-columns: 1fr; }
  .gestalt-grid { grid-template-columns: 1fr; }
  .study-card, .activity-card { padding: 15px; }
  .notebook-shellbar__context { display: none; }
  .card-head { flex-direction: column; }
}
