/* =========
   Base
   ========= */
:root {
  --bg: #fafafa;
  --text: #222;
  --muted: #555;
  --border: #e5e5e5;
  --card: #f2f2f2;
  --link: #0066cc;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}


h1 {
  font-size: 2.2rem;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

h2 {
  margin: 2.2rem 0 0.6rem 0;
  line-height: 1.25;
}

h3 {
  margin: 1.4rem 0 0.4rem 0;
  line-height: 1.3;
}

p {
  margin: 0.75rem 0;
  line-height: 1.6;
  font-size: 1.05rem;
}


a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

nav {
  margin: 16px 0 22px 0;
}

nav a {
  margin-right: 14px;
}


a.back {
  display: inline-block;
  margin-bottom: 24px;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 26px 0;
}


.meta {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0 20px 0;
  line-height: 1.5;
  font-size: 0.98rem;
}


.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}


.pdf-frame {
  width: 100%;
  height: calc(100vh - 260px); /* adjust if needed */
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: white;
}

.pdf-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.small-note {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}
#pcb-viewer{
  width: 100%;
  max-width: 980px;
  height: min(78vh, 820px);
  margin: 24px auto 0;
  background: var(--bg);   
  border: none;           
  border-radius: 0;    
  overflow: hidden;
  position: relative;      
}

#pcb-viewer canvas{
  width: 100% !important;
  height: 100% !important;
  display: block;
}
#pcb-viewer{
  position: relative; 
}


.rotate-hint{
  position: absolute;
  left: 12px;
  top: 12px;              
  padding: 8px 10px;
  border-radius: 10px;
  font: 600 12px/1 system-ui, -apple-system, Segoe UI, sans-serif;
  background: rgba(0,0,0,0.65);
  color: #fff;
  letter-spacing: 0.2px;
  pointer-events: none;
  opacity: 0;
  animation: rotateHintPulse 2.6s ease-in-out 0.8s 3;
}


@keyframes rotateHintPulse{
  0%   { opacity: 0; transform: translateY(6px); }
  20%  { opacity: 1; transform: translateY(0); }
  70%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(6px); }
}
.section-link{
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2.2rem 0 0.6rem 0;
  line-height: 1.25;

  color: var(--muted);          
  text-decoration: none;

  transform: translateX(0px);  
  transition: transform 360ms ease, color 160ms ease;
  will-change: transform;
}

.section-link:hover{
  color: #777;                 
  text-decoration: none;
}

.section-link.is-selected{
  color: var(--muted) !important;
}
.section-link.is-selected:hover{
  color: #777 !important;
}

.drop-panel{
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 380ms ease, opacity 220ms ease, transform 380ms ease;
}


.drop-panel.is-open{
  opacity: 1;
  transform: translateY(0);
}


.drop-inner{
  padding-top: 10px;
}

