:root {
    --bg: #f5f7f4;
    --surface: #ffffff;
    --surface-2: #eef4f2;
    --ink: #18242f;
    --muted: #61706d;
    --line: #d8e1dd;
    --accent: #0f766e;
    --accent-2: #2f6fed;
    --accent-3: #c2410c;
    --deep: #102b33;
    --soft: #e4f3ef;
    --warn: #fff7ed;
    --warn-line: #fed7aa;
    --shadow: 0 18px 40px rgba(16, 43, 51, .10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, #eef4f2 0, #f7f8f5 360px, var(--bg) 100%);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, sans-serif;
    line-height: 1.5;
}

a {
    color: var(--accent);
}

.hero,
.top {
    background: var(--deep);
    color: #ffffff;
}

.hero {
    display: grid;
    gap: 32px;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .86fr);
    padding: 24px max(22px, 7vw) 42px;
    position: relative;
}

.hero nav,
.top {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero nav {
    grid-column: 1 / -1;
    justify-content: space-between;
}

.site-brand { align-items: center; display: inline-flex; gap: 10px; margin-right: auto; }
.site-brand-mark { color: #5eead4; display: block; width: 44px; }
.site-brand-mark svg { display: block; width: 100%; }
.site-brand-mark path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 4; }
.site-brand > span:last-child { display: grid; line-height: 1.1; }
.site-brand strong { font-size: 16px; }
.site-brand small { color: #bcd2ce; font-size: 10px; margin-top: 4px; }
.site-nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.hero a,
.top a {
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 999px;
    color: inherit;
    padding: 10px 14px;
    text-decoration: none;
}

.hero-copy {
    align-self: center;
}

.hero h1 {
    font-size: clamp(38px, 5.4vw, 64px);
    letter-spacing: 0;
    line-height: .98;
    margin: 14px 0 16px;
    max-width: 780px;
}

.hero p {
    color: #d8ebe8;
    font-size: 20px;
    margin: 0;
    max-width: 690px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.button-link,
button {
    background: var(--accent);
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
    padding: 12px 18px;
    text-decoration: none;
}

.button-link.secondary {
    background: #ffffff;
    color: var(--deep);
}

.hero-board {
    align-self: stretch;
    background:
        linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,.08) 1px, transparent 1px),
        #173f3a;
    background-size: 34px 34px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(0,0,0,.22);
    min-height: 300px;
    overflow: hidden;
    padding: 24px;
    position: relative;
}

.hero-board::before,
.hero-board::after {
    background: #facc15;
    content: "";
    height: 6px;
    left: 34px;
    position: absolute;
    right: 80px;
    top: 86px;
}

.hero-board::after {
    background: #38bdf8;
    left: 120px;
    right: 42px;
    top: 220px;
}

.chip {
    background: #111827;
    border: 1px solid #334155;
    border-radius: 8px;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.05);
    color: #e5f5f2;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-weight: 800;
    left: 50%;
    padding: 38px 34px;
    position: absolute;
    text-align: center;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.chip span {
    color: #5eead4;
    display: block;
    font-size: 12px;
    margin-top: 6px;
}

.node {
    background: #ffffff;
    border: 6px solid #facc15;
    border-radius: 50%;
    height: 34px;
    position: absolute;
    width: 34px;
}

.node.one { left: 28px; top: 72px; }
.node.two { right: 60px; top: 204px; border-color: #38bdf8; }
.node.three { bottom: 36px; left: 82px; border-color: #fb923c; }

.meter {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    bottom: 22px;
    color: #ffffff;
    display: grid;
    gap: 3px;
    padding: 12px;
    position: absolute;
    right: 22px;
    width: 150px;
}

.meter strong {
    font-size: 22px;
}

/* Elementos avanzados de la escena Arduino; el tema Aurora los activa. */
.hero-board-scan,
.hero-board-ring,
.hero-board-usb,
.hero-board-pins,
.hero-board-logo,
.hero-board-led,
.hero-board-float { display: none; }

.top {
    padding: 16px max(18px, 7vw);
}

.top strong {
    margin-left: auto;
}

.wrap {
    margin: 0 auto;
    max-width: 1220px;
    padding: 28px 18px;
}

.narrow {
    max-width: 560px;
}

.pill,
.tag {
    background: var(--soft);
    border-radius: 999px;
    color: var(--accent);
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    padding: 7px 11px;
}

.hero .pill {
    background: rgba(255,255,255,.12);
    color: #b6fff2;
}

.ad-strip {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 22px 0 28px;
}

.ad-slot {
    background: linear-gradient(135deg, #ffffff, #eef7f4);
    border: 1px dashed #a7bbb5;
    border-radius: 8px;
    min-height: 118px;
    padding: 18px;
    position: relative;
}

.ad-slot::after {
    background: var(--accent-3);
    border-radius: 999px;
    content: "";
    height: 10px;
    position: absolute;
    right: 18px;
    top: 18px;
    width: 42px;
}

.ad-slot span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ad-slot strong {
    display: block;
    font-size: 20px;
    margin: 8px 0 5px;
}

.ad-slot small {
    color: var(--muted);
}

.searchbox {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-top: -34px;
    padding: 18px;
    position: relative;
    z-index: 4;
}

.searchbox form {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 220px 170px 120px;
}

.searchbox input,
.searchbox select,
.adminform input,
.adminform select,
.adminform textarea,
.inline select {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 15px;
    padding: 13px;
    width: 100%;
}

.section-title {
    align-items: end;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin: 30px 0 14px;
}

.section-title h2,
.section-title h1 {
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.05;
    margin: 0;
}

.section-title p {
    color: var(--muted);
    margin: 6px 0 0;
    max-width: 620px;
}

.modules,
.quick-guide {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 22px;
}

.module,
.quick-guide article,
.card,
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(24, 36, 47, .06);
}

.module,
.quick-guide article {
    color: var(--ink);
    display: block;
    min-height: 128px;
    padding: 18px;
    text-decoration: none;
}

.module b,
.quick-guide h2 {
    display: block;
    font-size: 19px;
    margin: 0 0 8px;
}

.module span,
.quick-guide p,
.meta,
.card p,
small,
.aliases {
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    margin-top: 18px;
}

.card,
.panel {
    padding: 20px;
}

.card {
    min-height: 230px;
}

.card h2 {
    font-size: 30px;
    margin: 12px 0 4px;
}

.card h2 a {
    color: var(--ink);
    text-decoration: none;
}

.card h3 {
    color: #334155;
    margin: 0 0 12px;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-card h2 {
    font-size: 24px;
    line-height: 1.12;
    margin-bottom: 0;
}

.project-excerpt {
    margin: 0;
}

.text-link {
    color: var(--accent);
    font-weight: 900;
    margin-top: auto;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

.example-panel {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.example-head {
    align-items: end;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.example-head h2 {
    font-size: 22px;
    margin: 0 0 4px;
}

.example-head p {
    color: var(--muted);
    margin: 0;
}

#example-search {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 14px;
    padding: 11px 12px;
    width: 100%;
}

.example-count {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.example-list {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    padding: 10px;
}

.show-more-examples {
    justify-self: center;
}

.example-card {
    background: #ffffff;
    border: 1px solid #d6e3df;
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: 4px;
    min-height: 68px;
    padding: 10px;
    text-align: left;
}

.example-card:hover,
.example-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(13, 148, 136, .12);
}

.example-card span {
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.example-card strong {
    font-size: 13px;
    line-height: 1.2;
}

.example-card small {
    font-size: 11px;
}

.example-detail {
    background: #f8fbf9;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.example-detail h3 {
    font-size: 20px;
    margin: 8px 0;
}

.example-detail h4 {
    margin: 12px 0 0;
}

.project-detail-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
}

.project-detail-block {
    background: #ffffff;
    border: 1px solid #dbe7e3;
    border-radius: 8px;
    padding: 14px;
}

.project-detail-main {
    grid-column: 1 / -1;
}

.project-detail-block h4 {
    color: var(--ink);
    font-size: 14px;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.project-detail-block p {
    color: #475569;
    line-height: 1.55;
    margin: 0 0 10px;
}

.project-detail-block p:last-child {
    margin-bottom: 0;
}

.example-detail ul,
.example-detail ol {
    display: grid;
    gap: 6px;
    grid-template-columns: 1fr;
    margin: 8px 0 0;
    padding-left: 20px;
}

.example-detail li {
    line-height: 1.4;
}

.list {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}

.detail h1 {
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
    margin: 14px 0;
}

.lead {
    font-size: 18px;
}

.cols {
    display: grid;
    gap: 18px;
    grid-template-columns: 1.1fr .9fr;
    margin: 18px 0;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

th {
    color: #334155;
}

small {
    display: block;
    margin-top: 4px;
}

.pin {
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 12px;
    padding: 12px 0;
}

.pin b {
    min-width: 96px;
}

.pin span {
    color: #475569;
}

.component-symbol-panel { align-items: center; display: grid; gap: 28px; grid-template-columns: minmax(240px,.72fr) minmax(420px,1.28fr); }
.component-symbol-panel > div > p { color: #50635e; line-height: 1.65; }
.component-symbol-frame { background: #f8fbfa; border: 1px solid #d8e4e1; border-radius: 14px; overflow: hidden; padding: 8px; }
.component-export-actions { display: flex; flex-wrap: wrap; gap: 9px; grid-column: 1 / -1; }
.component-symbol { display: block; height: auto; width: 100%; }
.component-symbol-sheet { fill: #fff; stroke: #b7cbc6; stroke-width: 2; }
.component-symbol-grid { fill: none; opacity: .28; stroke: #dce8e5; stroke-width: 1; }
.component-symbol-drawing { fill: none; stroke: #173c3a; stroke-linecap: round; stroke-linejoin: round; stroke-width: 5; }
.component-symbol .symbol-wire { fill: none; stroke: #173c3a; stroke-width: 5; }
.component-symbol .symbol-part { fill: #fff; stroke: #173c3a; stroke-width: 5; }
.component-symbol .symbol-fill { fill: #eaf6f3; }
.component-symbol .symbol-secondary { fill: none; stroke: #6b817c; stroke-width: 3; }
.component-symbol .symbol-accent { fill: none; stroke: #d97706; stroke-width: 4; }
.component-symbol .symbol-terminal-dot { fill: #fff; stroke: #173c3a; stroke-width: 5; }
.component-symbol text { fill: #173c3a; font-family: Inter,ui-sans-serif,system-ui,sans-serif; stroke: none; }
.component-symbol .symbol-terminal { font-size: 16px; font-weight: 750; }
.component-symbol .symbol-value { font-size: 24px; font-weight: 900; letter-spacing: .04em; }
.component-symbol .symbol-value-large { font-size: 62px; }
.component-symbol .component-symbol-caption { fill: #315d59; font-size: 17px; font-weight: 850; }

@media (max-width: 820px) {
    .component-symbol-panel { grid-template-columns: 1fr; }
}

.block {
    border-left: 4px solid var(--accent);
    margin: 16px 0;
    padding-left: 14px;
}

pre {
    background: #17212b;
    border-radius: 8px;
    color: #d7ebe7;
    overflow: auto;
    padding: 14px;
}

.adminform {
    display: grid;
    gap: 10px;
}

.adminform textarea {
    min-height: 150px;
}

.adminform .code-editor {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    min-height: 360px;
    tab-size: 2;
}

.adminform label {
    color: #334155;
    font-weight: 700;
    margin-top: 8px;
}

.form-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-hero {
    align-items: end;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .55fr);
    margin-bottom: 18px;
    padding: 22px;
}

.admin-hero h1 {
    margin: 0 0 8px;
}

.admin-hero p {
    color: var(--muted);
    margin: 0;
}

.admin-hero .eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.admin-nav a {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    padding: 9px 11px;
}

.admin-stats {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    margin-bottom: 22px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 6px;
    padding: 15px;
}

.stat-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.stat-card strong {
    color: var(--ink);
    font-size: 28px;
    line-height: 1;
}

.admin-layout {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 330px;
    margin-bottom: 22px;
}

.admin-body {
    background: #f1f5f9;
}

.admin-body h1,
.admin-body h2,
.admin-body h3 { font-family: Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.02em; }

.admin-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    background: #17232d;
    color: #dce7e5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 20px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.admin-brand {
    align-items: center;
    color: #fff;
    display: flex;
    font-size: 18px;
    gap: 11px;
    padding: 4px 10px 22px;
    text-decoration: none;
}

.admin-brand span {
    align-items: center;
    background: var(--accent);
    border-radius: 8px;
    display: flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.admin-sidebar nav { display: grid; gap: 4px; }
.admin-sidebar nav a {
    align-items: center;
    border-radius: 7px;
    color: #c7d4d2;
    display: grid;
    font-weight: 700;
    gap: 10px;
    grid-template-columns: 24px 1fr auto;
    padding: 11px 12px;
    text-decoration: none;
}
.admin-sidebar nav a:hover,
.admin-sidebar nav a.active { background: #263943; color: #fff; }
.admin-sidebar nav a.active { box-shadow: inset 3px 0 var(--accent); }
.admin-sidebar nav a b { background: #dc2626; border-radius: 99px; color: #fff; font-size: 11px; padding: 2px 7px; }
.admin-sidebar-footer { border-top: 1px solid #31434b; display: grid; gap: 8px; margin-top: auto; padding: 16px 10px 0; }
.admin-sidebar-footer a { color: #a9bfbc; font-size: 14px; }
.admin-content { margin: 0 auto; max-width: 1540px; min-width: 0; padding: 32px clamp(22px, 3vw, 48px); width: 100%; }
.admin-content > .ok,
.admin-content > .warn { margin-top: 0; }
.admin-home-projects { margin-top: 20px; }
.admin-quick-actions { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-quick-actions a { background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); display: grid; grid-template-columns: 34px 1fr; padding: 15px; text-decoration: none; }
.admin-quick-actions a:hover { border-color: var(--accent); box-shadow: 0 8px 20px rgba(16,43,51,.08); }
.admin-quick-actions span { align-items: center; background: var(--soft); border-radius: 7px; color: var(--accent); display: flex; font-size: 20px; grid-row: 1 / 3; height: 34px; justify-content: center; margin-right: 10px; }
.admin-quick-actions strong { font-size: 14px; }
.admin-quick-actions small { color: var(--muted); }
.section-heading-row { align-items: center; display: flex; justify-content: space-between; }
.section-heading-row h2 { margin: 3px 0 16px; }
.admin-home-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.admin-home-grid article { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 15px; }
.admin-home-grid h3 { margin: 10px 0; }
.tutorial-editor { min-height: 420px; }
.section-action { margin: 24px 0 8px; text-align: center; }
.admin-hero > .button-link { justify-self: end; min-width: 210px; text-align: center; }
.admin-section-heading { align-items: center; display: flex; gap: 20px; grid-column: 1 / -1; justify-content: space-between; margin: 0 0 4px; }
.admin-section-heading h1 { font-size: 32px; line-height: 1.1; margin: 3px 0; }
.admin-section-heading p { color: var(--muted); margin: 0; }
.admin-section-heading .eyebrow { color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.admin-section-heading .button-link.secondary { border: 1px solid var(--line); white-space: nowrap; }
.admin-header-actions { align-items: center; display: flex; gap: 16px; }
.admin-content-index { grid-column: 1 / -1; padding: 0; overflow: hidden; }
.admin-index-toolbar { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 20px; justify-content: space-between; padding: 18px 20px; }
.admin-index-toolbar strong { font-size: 18px; }
.admin-index-toolbar input { border: 1px solid var(--line); border-radius: 8px; font: inherit; max-width: 380px; padding: 10px 12px; width: 100%; }
.admin-index-table { min-width: 850px; }
.admin-index-table td:first-child strong,
.admin-index-table td:first-child span { display: block; }
.admin-index-table td:first-child span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.admin-row-actions { white-space: nowrap; }
.admin-row-actions a { margin-right: 12px; }
.admin-layout > aside.panel { align-self: start; position: sticky; top: 24px; }
.admin-form-group { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; margin-top: 4px; padding: 0 14px; }
.admin-form-group[open] { padding-bottom: 14px; }
.admin-form-group summary { cursor: pointer; font-weight: 850; padding: 14px 2px; }
.admin-form-group textarea { min-height: 100px; }
.adminform .admin-textarea-medium { min-height: 125px; }
.admin-empty-state { background: #f8fafc; border: 1px dashed #b8c7c2; border-radius: 8px; color: var(--muted); padding: 34px; text-align: center; }
.admin-empty-state strong { color: var(--ink); display: block; font-size: 20px; }
.tutorial-page { max-width: 980px; }
.tutorial-article h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; margin: 18px 0 12px; }
.tutorial-objective { background: var(--soft); border-left: 4px solid var(--accent); margin: 24px 0; padding: 15px 18px; }
.tutorial-objective p { margin: 4px 0 0; }
.tutorial-tool { border-top: 5px solid var(--accent-2); margin-top: 22px; }
.tutorial-tool .eyebrow { color: var(--accent-2); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.tool-fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 18px 0; }
.tool-fields label { color: var(--muted); display: grid; font-size: 13px; font-weight: 800; gap: 6px; }
.tool-fields input,
.tool-fields select { background: #fff; border: 1px solid var(--line); border-radius: 7px; font: inherit; padding: 11px; width: 100%; }
.tutorial-tool output { background: #eef6ff; border: 1px solid #bfdbfe; border-radius: 7px; display: block; font-size: 18px; font-weight: 800; margin-top: 16px; min-height: 54px; padding: 13px 15px; }
.tutorial-category { background: rgba(255,255,255,.56); border: 1px solid var(--line); border-radius: 10px; margin: 20px 0; padding: 20px; }
.tutorial-category-title { align-items: center; display: flex; gap: 16px; margin-bottom: 18px; }
.tutorial-category-title h2,
.tutorial-category-title p { margin: 2px 0; }
.category-icon { align-items: center; background: var(--deep); border-radius: 10px; color: #5eead4; display: flex; font-size: 28px; height: 58px; justify-content: center; width: 58px; }
.module.active { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.component-visual { background: linear-gradient(135deg,#f8fafc,#e8f2f0); border: 1px solid var(--line); border-radius: 10px; margin: 18px 0; overflow: hidden; padding: 8px; }
.component-visual svg { display: block; height: auto; max-height: 250px; width: 100%; }
.component-visual text { fill: #334155; font-family: Inter,system-ui,sans-serif; font-size: 14px; font-weight: 700; }
.component-visual [data-svg-value] { fill: var(--accent); font-size: 17px; }
.svg-wire { fill: none; stroke: #475569; stroke-linecap: round; stroke-width: 6; }
.svg-component { fill: #fff; stroke: #334155; stroke-linecap: round; stroke-linejoin: round; stroke-width: 6; }
.svg-resistor { fill: #e8c98d; stroke: #8b6b3f; stroke-width: 4; }
.svg-accent { fill: none; stroke: var(--accent-2); stroke-linecap: round; stroke-linejoin: round; stroke-width: 5; }
.svg-board { fill: #0f766e; stroke: #115e59; stroke-width: 5; }
.svg-board + .svg-pin { fill: #facc15; }
.svg-board ~ text { fill: #fff; }

.admin-list {
    display: grid;
    gap: 8px;
    max-height: 520px;
    overflow: auto;
}

.admin-list div {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 6px;
    grid-template-columns: 1fr auto auto;
    padding: 8px 0;
}

.admin-list span {
    color: var(--muted);
    font-size: 13px;
}

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    border-collapse: collapse;
    min-width: 760px;
    width: 100%;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--line);
    padding: 11px 10px;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.admin-table td span {
    color: var(--muted);
    display: block;
    font-size: 13px;
    margin-top: 3px;
}

.status-pill {
    border-radius: 999px;
    display: inline-block;
    font-size: 12px;
    font-weight: 900;
    padding: 5px 8px;
}

.ok-pill {
    background: #dcfce7;
    color: #166534;
}

.pending-pill {
    background: #fff7ed;
    color: #9a3412;
}

.settings-form .form-grid label {
    display: grid;
    gap: 6px;
    margin-top: 0;
}

.check-row {
    align-items: center;
    display: flex;
    gap: 8px;
}

.check-row input {
    width: auto;
}

.upload-form {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 18px;
}

.warn {
    background: var(--warn);
    border-color: var(--warn-line);
}

.ok {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 12px;
}

.inline {
    display: flex;
    gap: 8px;
}

.inline button {
    padding: 8px 10px;
}

button.danger {
    background: #b91c1c;
}

.auth-providers,
.dashboard-list,
.submission-list {
    display: grid;
    gap: 12px;
}

.auth-providers {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin: 14px 0;
}

.auth-local h2,.auth-oauth h2{font-size:1.05rem;margin:18px 0 12px}.auth-separator{align-items:center;color:var(--muted);display:flex;gap:12px;margin:24px 0 8px}.auth-separator::before,.auth-separator::after{background:var(--line);content:"";flex:1;height:1px}.auth-separator span{font-size:.82rem;font-weight:700;white-space:nowrap}.auth-provider-button{align-items:center;background:#fff;border:1px solid var(--line);border-radius:9px;color:var(--text);display:flex;font-weight:750;gap:10px;justify-content:center;min-height:46px;padding:10px 14px;text-decoration:none}.auth-provider-button:hover{border-color:#7aa7b4;box-shadow:0 5px 16px rgba(15,23,42,.09);transform:translateY(-1px)}.auth-provider-button .auth-provider-icon{align-items:center;display:flex;flex:0 0 22px;height:22px;justify-content:center;overflow:hidden;width:22px}.auth-provider-button .auth-provider-icon svg{display:block;height:22px!important;max-height:22px!important;max-width:22px!important;width:22px!important}.auth-provider-github{background:#24292f;color:#fff}.unified-account-actions{align-items:center;display:flex;gap:10px}.unified-account-actions form,.unified-mobile-menu form{margin:0}.unified-logout,.unified-mobile-menu form button{background:transparent;border:0;color:inherit;cursor:pointer;font:inherit;padding:0;white-space:nowrap}

.inline-form {
    display: inline;
}

.submission-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .38fr);
    padding: 16px;
}

.submission-item h2 {
    margin: 8px 0 4px;
}

details {
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}

summary {
    cursor: pointer;
    font-weight: 700;
}

.lesson h2 {
    margin-bottom: 6px;
}

.lesson-content {
    border-top: 1px solid var(--line);
    margin-top: 14px;
    padding-top: 12px;
}

.resource {
    border-top: 1px solid var(--line);
    padding: 14px 0;
}

.resource:first-of-type {
    border-top: 0;
}

.resource h3 {
    font-size: 17px;
    margin: 0 0 10px;
}

.resource img {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: block;
    height: auto;
    max-width: min(100%, 720px);
}

.simulator-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
}

.board-panel,
.project-detail-panel,
.example-panel {
    grid-column: 1 / -1;
}

.simulator-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

#arduino-code {
    background: #101827;
    border: 1px solid #273449;
    border-radius: 8px;
    color: #dbeafe;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 14px;
    min-height: 360px;
    padding: 16px;
    resize: vertical;
    width: 100%;
}

.sim-output,
.serial-monitor {
    background: #17212b;
    border-radius: 8px;
    color: #d7ebe7;
    min-height: 120px;
    white-space: pre-wrap;
}

.serial-monitor {
    min-height: 512px;
}

.simulator-editor {
    display: grid;
    gap: 12px;
}

.board-panel h2 {
    margin-top: 0;
}

.board-heading {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.view-toggle {
    background: #edf4f1;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: inline-flex;
    gap: 4px;
    padding: 4px;
}

.view-toggle button {
    background: transparent;
    color: var(--muted);
    padding: 8px 12px;
}

.view-toggle button.active {
    background: var(--accent);
    color: #ffffff;
}

.visual-workbench {
    background: #edf4f1;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 18px;
    padding: 14px;
}

.wokwi-stage {
    background:
        linear-gradient(90deg, rgba(15, 118, 110, .12) 1px, transparent 1px),
        linear-gradient(0deg, rgba(15, 118, 110, .12) 1px, transparent 1px),
        #f8fbf9;
    background-size: 24px 24px;
    border: 1px solid #cddbd7;
    border-radius: 8px;
    min-height: 1120px;
    overflow: hidden;
    position: relative;
}

.schematic-layer {
    left: 0;
    position: absolute;
    top: 650px;
    width: 100%;
    height: 460px;
    z-index: 9;
}

.wokwi-stage.schematic-only-mode .visual-board-mount,
.wokwi-stage.schematic-only-mode .breadboard-visual,
.wokwi-stage.schematic-only-mode .wire-layer {
    display: none;
}

.wokwi-stage.schematic-only-mode {
    min-height: 600px;
}

.wokwi-stage.schematic-only-mode .schematic-layer {
    top: 0;
}

.sch-board,
.sch-part {
    fill: #ffffff;
    stroke: #94a3b8;
    stroke-width: 3;
}

.sch-page {
    fill: #fbfdfc;
    stroke: #cbd5e1;
    stroke-width: 2.5;
}

.sch-title {
    fill: #102027;
    font-size: 28px;
    font-weight: 900;
}

.sch-title-small {
    font-size: 21px;
}

.sch-note {
    fill: #475569;
    font-size: 20px;
}

.sch-note-small {
    font-size: 14px;
    font-weight: 700;
}

.sch-pin,
.sch-label {
    fill: #334155;
    font-size: 18px;
    font-weight: 800;
}

.sch-small-label {
    font-size: 12px;
}

.sch-wire-name {
    font-size: 14px;
}

.sch-terminal {
    fill: #ffffff;
    stroke: #0f766e;
    stroke-width: 4;
}

.sch-wire {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4.5;
}

.sch-rail {
    stroke-width: 4;
}

.sch-rail-label {
    font-size: 13px;
}

.sch-red { stroke: #dc2626; }
.sch-yellow { stroke: #eab308; }
.sch-green { stroke: #16a34a; }
.sch-blue { stroke: #2563eb; }
.sch-ground { stroke: #111827; }
.sch-signal { stroke: #0f766e; }

.sch-led-body {
    stroke-width: 4;
}

.sch-led-body.sch-red { fill: rgba(220, 38, 38, .18); stroke: #dc2626; }
.sch-led-body.sch-yellow { fill: rgba(234, 179, 8, .18); stroke: #eab308; }
.sch-led-body.sch-green { fill: rgba(22, 163, 74, .18); stroke: #16a34a; }

.sch-led-bar,
.sch-led-arrow {
    fill: none;
    stroke: #334155;
    stroke-linecap: round;
    stroke-width: 4;
}

.sch-symbol .sch-part {
    fill: #ffffff;
}

.sch-text-tag rect {
    fill: rgba(255,255,255,.94);
    stroke: #e2e8f0;
    stroke-width: 1;
}

.sch-junction {
    stroke: #ffffff;
    stroke-width: 1.5;
}

.sch-junction.sch-red {
    fill: #dc2626;
}

.sch-junction.sch-ground {
    fill: #111827;
}

.sch-supply-wire {
    stroke-width: 3.5;
}

.sch-vcc-flag {
    fill: #fee2e2;
    stroke: #dc2626;
    stroke-linejoin: round;
    stroke-width: 2;
}

.sch-buzzer,
.sch-motor {
    fill: #ffffff;
    stroke: #334155;
    stroke-linejoin: round;
    stroke-width: 4;
}

.sch-buzzer-wave {
    fill: none;
    stroke: #334155;
    stroke-linecap: round;
    stroke-width: 3;
}

.visual-board-mount {
    display: flex;
    justify-content: center;
    left: 50%;
    position: absolute;
    top: 18px;
    transform: translateX(-50%);
    transform-origin: top center;
    width: max-content;
    z-index: 8;
}
.visual-board-mount #visual-board { display: block; transform: scale(1.05); transform-origin: top center; }
.visual-board-mount[data-board="nano"] { top: 34px; }
.visual-board-mount[data-board="nano"] #visual-board { transform: scale(2.35); }
.visual-board-mount[data-board="mega"] #visual-board { transform: scale(1.15); }
.visual-board-mount[data-board="esp32"] { top: 22px; }
.visual-board-mount[data-board="esp32"] #visual-board { transform: scale(1.65); }

.breadboard-visual {
    background:
        radial-gradient(circle, #aebdb8 0 2px, transparent 2.4px),
        linear-gradient(90deg, transparent 0 17px, rgba(239, 68, 68, .38) 17px 20px, transparent 20px 31px, rgba(37, 99, 235, .36) 31px 34px, transparent 34px),
        #f8faf9;
    background-position: 0 0, 0 0;
    background-size: 18px 18px, 100% 100%;
    border: 1px solid #c9d8d3;
    border-radius: 8px;
    bottom: auto;
    box-shadow: inset 0 0 0 8px rgba(255,255,255,.52);
    height: 270px;
    left: 50%;
    position: absolute;
    right: auto;
    top: 350px;
    transform: translateX(-50%);
    width: min(94%, 860px);
    z-index: 3;
}

.rail {
    align-items: center;
    border-radius: 999px;
    color: #ffffff;
    display: flex;
    font-size: 13px;
    font-weight: 900;
    height: 22px;
    justify-content: center;
    left: 12px;
    position: absolute;
    width: 22px;
    z-index: 4;
}

.rail-plus {
    background: #ef4444;
    top: 9px;
}

.rail-minus {
    background: #2563eb;
    bottom: 9px;
}

.breadboard-visual::before,
.breadboard-visual::after {
    border-radius: 999px;
    content: "";
    left: 16px;
    position: absolute;
    right: 16px;
}

.breadboard-visual::before {
    border-top: 3px solid rgba(239, 68, 68, .65);
    top: 18px;
}

.breadboard-visual::after {
    border-top: 3px solid rgba(37, 99, 235, .65);
    bottom: 18px;
}

.breadboard-components {
    inset: 0;
    position: absolute;
}

.breadboard-visual.traffic-board,
.breadboard-visual.single-led-board,
.breadboard-visual.rgb-board {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.breadboard-visual.traffic-board::before,
.breadboard-visual.traffic-board::after,
.breadboard-visual.single-led-board::before,
.breadboard-visual.single-led-board::after,
.breadboard-visual.rgb-board::before,
.breadboard-visual.rgb-board::after {
    display: none;
}

.breadboard-visual .rail {
    display: none;
}

.bb-renderer {
    display: block;
    height: 100%;
    width: 100%;
}

.bb-board-shell {
    fill: #fbfdfc;
    stroke: #c9d8d3;
    stroke-width: 2;
}

.bb-center-gap {
    fill: rgba(203, 213, 225, .32);
}

.bb-hole {
    fill: #9fb2ad;
    opacity: .82;
}

.bb-hole.rail {
    fill: #8ca29c;
}

.bb-hole.gap-edge {
    fill: #b9c9c4;
}

.bb-rail-line {
    fill: none;
    stroke-linecap: round;
    stroke-width: 4;
}

.bb-plus-line {
    stroke: rgba(239, 68, 68, .72);
}

.bb-minus-line {
    stroke: rgba(37, 99, 235, .78);
}

.bb-rail-mark {
    dominant-baseline: middle;
    fill: #ffffff;
    font-size: 15px;
    font-weight: 900;
    text-anchor: middle;
}

.bb-plus-mark {
    paint-order: stroke;
    stroke: #ef4444;
    stroke-linejoin: round;
    stroke-width: 10;
}

.bb-minus-mark {
    paint-order: stroke;
    stroke: #2563eb;
    stroke-linejoin: round;
    stroke-width: 10;
}

.bb-wire-svg {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 5.5;
    filter: drop-shadow(0 1px 0 rgba(255,255,255,.8));
}

.bb-wire-manual {
    stroke-width: 4.5;
    filter: drop-shadow(0 1px 0 rgba(255,255,255,.9)) drop-shadow(0 2px 3px rgba(15, 23, 42, .16));
    cursor: pointer;
    pointer-events: stroke;
}
.bb-wire-hit,
.manual-wire-hit {
    cursor: pointer;
    fill: none;
    pointer-events: stroke;
    stroke: transparent;
    stroke-width: 18;
}
.bb-wire-manual.is-selected,
.manual-arduino-wire.is-selected {
    filter: drop-shadow(0 0 5px rgba(249,115,22,.9));
    stroke: #f97316 !important;
    stroke-width: 7;
}
.bb-manual-part { cursor: grab; touch-action: none; }
.bb-manual-part.is-dragging { cursor: grabbing; opacity: .88; }
.bb-free-terminal { cursor: crosshair; }
.bb-terminal-label {
    fill: #17212b;
    font-size: 9px;
    font-weight: 900;
    pointer-events: none;
    text-anchor: middle;
}
.bb-button-plunger {
    fill: none;
    stroke: #17212b;
    stroke-linecap: round;
    stroke-width: 4;
    transition: transform .08s ease;
}

.bb-interactive-control {
    cursor: pointer;
    outline: none;
    touch-action: none;
}

.bb-interactive-control:focus-visible .bb-module-body {
    filter: drop-shadow(0 0 7px rgba(8, 125, 115, .8));
    stroke: #087d73;
    stroke-width: 4;
}

.bb-interactive-control.active .bb-module-button {
    fill: #fef3c7;
    stroke: #d97706;
}

.bb-interactive-control.active .bb-button-plunger {
    transform: translateY(5px);
}

.bb-module-potentiometer { fill: #eff6ff; stroke: #2563eb; }
.bb-pot-knob { fill: #334155; stroke: #0f172a; stroke-width: 2; }
.bb-pot-indicator {
    stroke: #f8fafc;
    stroke-linecap: round;
    stroke-width: 4;
    transform: rotate(var(--pot-angle, 0deg));
    transform-box: fill-box;
    transform-origin: center bottom;
}

.bb-component-lead {
    fill: none;
    stroke: #64748b;
    stroke-linecap: round;
    stroke-width: 4;
}

.bb-resistor-body {
    fill: #f8d98b;
    stroke: rgba(124, 45, 18, .38);
    stroke-width: 1.4;
}

.bb-band {
    stroke-linecap: round;
    stroke-width: 3;
}

.bb-band-1 { stroke: #7c2d12; }
.bb-band-2 { stroke: #111827; }
.bb-band-3 { stroke: #dc2626; }

.bb-component-label,
.bb-led-label,
.bb-polarity {
    fill: #17212b;
    font-weight: 900;
}

.bb-component-label {
    font-size: 11px;
}

.bb-led-label {
    font-size: 12px;
    text-anchor: middle;
}

.bb-polarity {
    font-size: 10px;
}

.bb-led-body-svg {
    opacity: .93;
    stroke: rgba(15, 23, 42, .32);
    stroke-width: 1.6;
    filter: drop-shadow(0 4px 5px rgba(15, 23, 42, .2));
}

.bb-led-shine {
    fill: none;
    opacity: .58;
    stroke: rgba(255,255,255,.72);
    stroke-linecap: round;
    stroke-width: 3;
}

.bb-led-flat {
    stroke: rgba(15, 23, 42, .48);
    stroke-linecap: round;
    stroke-width: 2;
}

.bb-module-body {
    fill: #ffffff;
    stroke: #94a3b8;
    stroke-width: 2;
    filter: drop-shadow(0 4px 5px rgba(15, 23, 42, .12));
}

.bb-module-sensor { fill: #ecfeff; stroke: #0891b2; }
.bb-module-motor { fill: #fff7ed; stroke: #ea580c; }
.bb-module-servo { fill: #eff6ff; stroke: #2563eb; }
.bb-module-led { fill: #fef2f2; stroke: #dc2626; }
.bb-module-buzzer { fill: #fdf4ff; stroke: #a21caf; }
.bb-module-ultrasonic { fill: #e0f2fe; stroke: #0369a1; }
.bb-module-pir { fill: #ecfdf5; stroke: #047857; }
.bb-module-ldr,.bb-module-thermistor,.bb-module-temperature { fill: #fefce8; stroke: #a16207; }
.bb-module-joystick { fill: #eef2ff; stroke: #4338ca; }
.bb-module-relay { fill: #f0fdfa; stroke: #0f766e; }
.bb-module-transistor,.bb-module-diode { fill: #f8fafc; stroke: #475569; }
.bb-sensor-eye { fill: #dbeafe; stroke: #334155; stroke-width: 3; }
.bb-sensor-dome { fill: #f8fafc; stroke: #64748b; stroke-width: 2; }
.bb-sensor-symbol { fill: none; stroke: #334155; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }
.bb-display-screen { fill: #ccfbf1; stroke: #0f766e; stroke-width: 2; }
.bb-module-chip { fill: #334155; stroke: #0f172a; stroke-width: 2; }

.bb-output.active .bb-led-body-svg,
.bb-output.active .bb-module-body {
    filter: drop-shadow(0 0 12px rgba(250, 204, 21, .95)) drop-shadow(0 0 22px rgba(34, 197, 94, .35));
    opacity: 1;
}

.bb-output.active .bb-module-led,
.bb-output.active .bb-led-body-svg {
    stroke: #facc15;
    stroke-width: 3;
}

.bb-output.active .bb-module-buzzer {
    animation: buzzerPulse .18s linear infinite alternate;
}

.bb-rgb-segment {
    opacity: .22;
    transition: filter .08s linear, opacity .08s linear;
}

.bb-rgb-led.red-active .bb-rgb-red {
    filter: drop-shadow(0 0 9px #dc2626);
    opacity: .95;
}

.bb-rgb-led.green-active .bb-rgb-green {
    filter: drop-shadow(0 0 9px #16a34a);
    opacity: .95;
}

.bb-rgb-led.blue-active .bb-rgb-blue {
    filter: drop-shadow(0 0 9px #2563eb);
    opacity: .95;
}

@keyframes buzzerPulse {
    from { transform: scale(1); transform-origin: center; }
    to { transform: scale(1.035); transform-origin: center; }
}

.bb-module-title {
    fill: #17212b;
    font-size: 12px;
    font-weight: 900;
    text-anchor: middle;
}

.bb-module-pins {
    fill: #64748b;
    font-size: 9px;
    font-weight: 800;
    text-anchor: middle;
}

.bb-pin-label {
    fill: #334155;
    font-size: 10px;
    font-weight: 900;
}

.bb-connection-note {
    fill: #334155;
    font-size: 11px;
    font-weight: 800;
}

.bb-anchor-dot,
.bb-socket {
    fill: #ffffff;
    stroke-width: 3;
}

.bb-free-terminal {
    cursor: crosshair;
    pointer-events: all;
}

.bb-free-terminal:hover {
    fill: #fef3c7;
    stroke-width: 4;
}

.bb-ground-dot,
.bb-ground-net .bb-socket {
    stroke: #111827;
}

.bb-junction-dot {
    stroke: none;
}

.bb-part {
    align-items: center;
    background: #ffffff;
    border: 1px solid #bac9c4;
    border-radius: 6px;
    color: #17212b;
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    height: 28px;
    justify-content: center;
    max-width: 94px;
    overflow: hidden;
    padding: 0 8px;
    position: absolute;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bb-1 { left: 10%; top: 78px; }
.bb-2 { left: 30%; top: 78px; }
.bb-3 { left: 50%; top: 78px; }
.bb-4 { left: 20%; top: 148px; }
.bb-5 { left: 40%; top: 148px; }

.bb-led {
    border-radius: 50% 50% 44% 44%;
    box-shadow: inset -5px -8px 11px rgba(0,0,0,.22), inset 5px 5px 8px rgba(255,255,255,.42), 0 6px 12px rgba(15, 23, 42, .18);
    height: 30px;
    position: absolute;
    top: 62px;
    width: 24px;
    z-index: 10;
}

.bb-led::marker {
    content: "";
}

.bb-led b {
    color: #17212b;
    font-size: 11px;
    left: 50%;
    position: absolute;
    text-align: center;
    top: -22px;
    transform: translateX(-50%);
    white-space: nowrap;
}

.bb-led .leg {
    background: #6b7280;
    bottom: -46px;
    height: 42px;
    position: absolute;
    width: 3px;
}

.bb-led .anode {
    height: 50px;
    left: 7px;
}

.bb-led .cathode {
    right: 7px;
}

.bb-led .socket {
    background: #ffffff;
    border: 2px solid #64748b;
    border-radius: 50%;
    bottom: -53px;
    height: 9px;
    position: absolute;
    width: 9px;
}

.bb-led .socket-anode { left: 4px; }
.bb-led .socket-cathode { right: 4px; }
.bb-red { background: #ef4444; left: 28%; }
.bb-yellow { background: #facc15; left: 48%; }
.bb-green { background: #22c55e; left: 68%; }

.bb-resistor {
    height: 30px;
    position: absolute;
    width: 76px;
    z-index: 10;
}

.bb-resistor.r1 { left: calc(28% - 26px); top: 168px; }
.bb-resistor.r2 { left: calc(48% - 26px); top: 168px; }
.bb-resistor.r3 { left: calc(68% - 26px); top: 168px; }
.single-led-board .single-led { left: 48%; }
.single-led-board .single-resistor { left: calc(48% - 26px); top: 168px; }

.traffic-board .bb-resistor,
.single-led-board .single-resistor {
    height: 78px;
    width: 30px;
}

.traffic-board .bb-resistor.r1 { left: calc(28% + 5px); top: 146px; }
.traffic-board .bb-resistor.r2 { left: calc(48% + 5px); top: 146px; }
.traffic-board .bb-resistor.r3 { left: calc(68% + 5px); top: 146px; }
.single-led-board .single-resistor { left: calc(48% + 5px); top: 146px; }

.traffic-board .bb-resistor .lead,
.single-led-board .single-resistor .lead {
    height: 18px;
    left: 14px;
    width: 3px;
}

.traffic-board .bb-resistor .lead-left,
.single-led-board .single-resistor .lead-left {
    top: 0;
}

.traffic-board .bb-resistor .lead-right,
.single-led-board .single-resistor .lead-right {
    bottom: 0;
    right: auto;
}

.traffic-board .bb-resistor .res-body,
.single-led-board .single-resistor .res-body {
    background: linear-gradient(180deg, #f8d98b 0 18%, #7c2d12 18% 26%, #111827 26% 34%, #dc2626 34% 42%, #f8d98b 42% 100%);
    height: 44px;
    left: 8px;
    top: 17px;
    width: 14px;
}

.traffic-board .bb-resistor .socket,
.single-led-board .single-resistor .socket {
    left: 10px;
    top: auto;
}

.traffic-board .bb-resistor .socket-left,
.single-led-board .single-resistor .socket-left {
    top: -4px;
}

.traffic-board .bb-resistor .socket-right,
.single-led-board .single-resistor .socket-right {
    bottom: -4px;
    right: auto;
}

.traffic-board .bb-resistor b,
.single-led-board .single-resistor b {
    left: 34px;
    top: 30px;
    transform: none;
}

.bb-resistor .lead {
    background: #94a3b8;
    height: 3px;
    position: absolute;
    top: 13px;
    width: 18px;
}

.bb-resistor .lead-left {
    left: 0;
}

.bb-resistor .lead-right {
    right: 0;
}

.bb-resistor .res-body {
    background: linear-gradient(90deg, #f8d98b 0 18%, #7c2d12 18% 26%, #111827 26% 34%, #dc2626 34% 42%, #f8d98b 42% 100%);
    border: 1px solid rgba(124, 45, 18, .36);
    border-radius: 999px;
    box-shadow: inset -4px -3px 6px rgba(0,0,0,.14), inset 3px 3px 5px rgba(255,255,255,.35);
    height: 14px;
    left: 16px;
    position: absolute;
    top: 7px;
    width: 44px;
}

.bb-resistor b {
    color: #17212b;
    font-size: 10px;
    left: 50%;
    position: absolute;
    top: 24px;
    transform: translateX(-50%);
    white-space: nowrap;
}

.bb-resistor .socket {
    background: #ffffff;
    border: 2px solid #64748b;
    border-radius: 50%;
    height: 9px;
    position: absolute;
    top: 9px;
    width: 9px;
}

.bb-resistor .socket-left { left: -3px; }
.bb-resistor .socket-right { right: -3px; }

.bb-jumper {
    border-radius: 999px;
    position: absolute;
    z-index: 9;
}

.bb-jumper.red { background: #dc2626; }
.bb-jumper.yellow { background: #eab308; }
.bb-jumper.green { background: #16a34a; }
.bb-jumper.black { background: #111827; }
.bb-jumper.blue { background: #2563eb; }

.bb-jumper.vertical {
    height: 72px;
    width: 5px;
}

.bb-jumper.horizontal {
    height: 5px;
}

.bb-link {
    border-radius: 999px;
    height: 3px;
    opacity: .72;
    position: absolute;
    z-index: 5;
}

.bb-link.red { background: #dc2626; }
.bb-link.yellow { background: #eab308; }
.bb-link.green { background: #16a34a; }
.bb-link.black { background: #111827; }

.link-red-a,
.link-yellow-a,
.link-green-a,
.link-single-a {
    display: none;
}

.link-red-k { left: calc(28% + 19px); top: 140px; width: 10px; transform: rotate(90deg); transform-origin: left center; }
.link-yellow-k { left: calc(48% + 19px); top: 140px; width: 10px; transform: rotate(90deg); transform-origin: left center; }
.link-green-k { left: calc(68% + 19px); top: 140px; width: 10px; transform: rotate(90deg); transform-origin: left center; }
.link-single-k { left: calc(48% + 19px); top: 140px; width: 10px; transform: rotate(90deg); transform-origin: left center; }

.jr1 { left: calc(28% + 9px); top: 22px; }
.jy1 { left: calc(48% + 9px); top: 22px; }
.jg1 { left: calc(68% + 9px); top: 22px; }
.jgnd1 { left: calc(28% + 2px); top: 96px; }
.jgnd2 { left: calc(48% + 2px); top: 96px; }
.jgnd3 { left: calc(68% + 2px); top: 96px; }
.jrail1 { left: 11%; top: 226px; width: 78%; }
.jrail2 { left: 10%; top: 226px; width: 18%; }
.jsingle-signal { left: calc(48% + 9px); top: 22px; }
.jsingle-gnd { left: calc(48% + 2px); top: 96px; }
.jsingle-rail { left: 18%; top: 226px; width: 64%; }
.jsingle-gnd-rail { left: 18%; top: 226px; width: 30%; }

.wire-layer {
    inset: 0;
    pointer-events: none;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 6;
}

.wire-layer.manual-wire-mode {
    z-index: 10;
}

.manual-arduino-wire {
    cursor: pointer;
    pointer-events: stroke;
}

.free-arduino-pin-target {
    cursor: crosshair;
    pointer-events: all;
}

.free-arduino-pin-target {
    fill: transparent;
    stroke: transparent;
    stroke-width: 3;
}

.free-arduino-pin-target:hover,
.free-arduino-pin-target:focus {
    fill: #fef3c7;
    outline: none;
    stroke: #f97316;
    stroke-width: 5;
}

.free-arduino-pin-target.is-connected {
    fill: rgba(220,252,231,.28);
    stroke: #16a34a;
}

.wire {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4.5;
}

.wire-socket {
    fill: #ffffff;
    stroke-width: 3;
}

.wire-socket.red { stroke: #dc2626; }
.wire-socket.yellow { stroke: #eab308; }
.wire-socket.green { stroke: #16a34a; }
.wire-socket.blue { stroke: #2563eb; }
.wire-socket.ground { stroke: #111827; }

.stage-wire-red { stroke: #dc2626; }
.stage-wire-yellow { stroke: #eab308; }
.stage-wire-green { stroke: #16a34a; }
.stage-wire-blue { stroke: #2563eb; }
.stage-wire-ground { stroke: #111827; }

.pin-row {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(12, 1fr);
    margin-top: 12px;
}

.pin-row i {
    background: #dbeafe;
    border-radius: 4px;
    color: #17212b;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    padding: 7px 0;
    text-align: center;
}

.pin-row i.on {
    background: #facc15;
    box-shadow: 0 0 14px #facc15;
}

.visual-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.visual-summary strong {
    color: var(--ink);
}

.visual-summary span {
    color: var(--muted);
}

.visual-summary .electrical-status {
    background: #e7f7f1;
    border: 1px solid #9dd8c5;
    border-radius: 999px;
    color: #075f4d;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 9px;
}

.visual-summary .electrical-status-error {
    background: #fff1f2;
    border-color: #fda4af;
    color: #9f1239;
}

.electrical-model-error {
    align-content: center;
    background: #fff7ed;
    border: 2px dashed #fb923c;
    border-radius: 12px;
    color: #9a3412;
    display: grid;
    gap: 8px;
    min-height: 210px;
    padding: 24px;
    text-align: center;
}

.serial-panel {
    display: grid;
    gap: 12px;
    grid-template-rows: auto 1fr;
}

.analog-controls {
    display: grid;
    gap: 10px;
}

.digital-controls {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.digital-input-button {
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--ink);
    display: grid;
    gap: 3px;
    justify-items: start;
    text-align: left;
}

.digital-input-button span {
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
}

.digital-input-button strong {
    font-size: 14px;
}

.digital-input-button small {
    font-size: 11px;
}

.digital-input-button.active {
    background: #fef3c7;
    border-color: #d97706;
    box-shadow: 0 0 0 2px rgba(217, 119, 6, .18);
}

.free-circuit-toolbar,
.free-component-list {
    display: grid;
    gap: 10px;
}

.free-circuit-toolbar {
    grid-template-columns: minmax(120px, 1fr) minmax(90px, .65fr) auto auto;
}

.free-circuit-toolbar select {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
}

.free-component-row {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 10px;
}

.free-component-row strong {
    color: var(--ink);
}

.free-component-heading,
.free-component-field {
    display: grid;
    gap: 3px;
}

.free-component-heading,
.free-component-field,
.free-component-warning,
.free-component-row > button {
    grid-column: 1 / -1;
}

.free-component-heading a {
    font-size: 12px;
    width: fit-content;
}

.free-component-heading small,
.free-component-field span,
.free-component-warning {
    color: var(--muted);
    font-size: 12px;
}

.free-component-field select,
.free-component-field input {
    min-width: 0;
    width: 100%;
}

.free-component-value {
    grid-template-columns: 1fr auto;
}

.free-component-value span {
    grid-column: 1 / -1;
}

.free-component-value small {
    align-self: center;
    font-weight: 900;
}

.free-component-warning {
    color: #9a3412;
    font-weight: 800;
}

.free-component-row span {
    color: var(--accent);
    font-weight: 900;
}

.free-wire-helper {
    align-items: center;
    background: #f8fbf9;
    border: 1px dashed #9fb2ad;
    border-radius: 8px;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 12px;
}

.free-wire-helper strong {
    color: var(--ink);
}

.bb-empty-title {
    fill: #17212b;
    font-size: 28px;
    font-weight: 900;
    text-anchor: middle;
}

.bb-empty-note {
    fill: #64748b;
    font-size: 16px;
    font-weight: 700;
    text-anchor: middle;
}

.analog-controls label {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 32px 1fr 48px;
}

@media (max-width: 980px) {
    body.admin-body { overflow-x: hidden; }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { height: auto; max-width: 100vw; min-height: auto; min-width: 0; overflow: hidden; padding: 14px; position: static; }
    .admin-brand { padding-bottom: 12px; }
    .admin-sidebar nav { display: flex; margin: 0 -14px; max-width: calc(100vw + 14px); min-width: 0; overflow-x: auto; padding: 0 14px 8px; scrollbar-width: thin; width: calc(100% + 28px); }
    .admin-sidebar nav a { flex: 0 0 auto; grid-template-columns: 22px auto auto; min-width: 142px; }
    .admin-sidebar-footer { display: flex; margin-top: 8px; padding-top: 10px; }
    .admin-content { padding: 22px 18px; }
    .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
    .admin-header-actions { flex-wrap: wrap; }
    .admin-index-toolbar { align-items: stretch; flex-direction: column; }
    .admin-layout > aside.panel { position: static; }
    .hero {
        grid-template-columns: 1fr;
    }

    .hero nav {
        justify-content: flex-start;
        order: -1;
    }

    .searchbox {
        margin-top: 0;
    }

    .searchbox form,
    .cols,
    .admin-hero,
    .admin-layout,
    .submission-item,
    .project-detail-grid,
    .free-circuit-toolbar,
    .free-component-row,
    .simulator-grid {
        grid-template-columns: 1fr;
    }

    .ad-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .admin-quick-actions { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .hero {
        padding: 18px 18px 28px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero-board {
        display: none;
    }

    .hero-actions {
        gap: 10px;
    }

    .button-link,
    button {
        padding: 11px 15px;
    }

    .section-title {
        display: block;
    }

    .inline {
        display: block;
    }

    .inline button {
        margin-top: 6px;
        width: 100%;
    }

    .wokwi-stage {
        min-height: 980px;
    }

    .schematic-layer {
        height: 360px;
        top: 610px;
    }

    .visual-board-mount {
        left: 50%;
        top: 18px;
        transform: translateX(-50%) scale(.78);
    }

    .breadboard-visual {
        height: 210px;
        top: 330px;
        width: 94%;
    }

    .bb-led b,
    .bb-resistor b {
        display: none;
    }

    .wokwi-stage .wire-layer {
        display: none;
    }

    .pin-row {
        grid-template-columns: repeat(6, 1fr);
    }
}

.local-ai-chat { bottom: 18px; position: fixed; right: 18px; z-index: 2500; }
.local-ai-launcher { align-items: center; background: #0f766e; border: 0; border-radius: 999px; box-shadow: 0 10px 28px rgba(15,23,42,.25); color: #fff; display: flex; gap: 8px; font-weight: 850; }
.local-ai-launcher > span:first-child { color: #f9d55c; font-size: 18px; }
.local-ai-window { background: #fff; border: 1px solid #cadbd7; border-radius: 13px; bottom: 58px; box-shadow: 0 20px 55px rgba(15,23,42,.3); max-height: min(660px,calc(100vh - 90px)); overflow: hidden; position: absolute; right: 0; width: min(390px,calc(100vw - 24px)); }
.local-ai-window header { align-items: center; background: #103b3d; color: #fff; display: flex; justify-content: space-between; padding: 14px 16px; }
.local-ai-window header div { display: grid; gap: 2px; }
.local-ai-window header small { color: #bfe4de; }
.local-ai-window header button { background: transparent; border: 0; color: #fff; font-size: 25px; padding: 2px 7px; }
.local-ai-messages { background: #f4f8f7; display: flex; flex-direction: column; gap: 9px; height: 330px; overflow-y: auto; padding: 14px; }
.local-ai-message { align-self: flex-start; background: #fff; border: 1px solid #d6e4e1; border-radius: 10px 10px 10px 2px; color: #253c37; line-height: 1.48; margin: 0; max-width: 92%; padding: 10px 12px; white-space: pre-wrap; }
.local-ai-message.user { align-self: flex-end; background: #0f766e; border-color: #0f766e; border-radius: 10px 10px 2px 10px; color: #fff; }
.local-ai-message.pending { color: #64748b; font-style: italic; }
.local-ai-message.error { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.local-ai-window form { padding: 12px 14px 14px; }
.local-ai-window form > label { color: #354c46; display: block; font-size: 11px; font-weight: 850; margin-bottom: 5px; }
.local-ai-window form > div { align-items: stretch; display: flex; gap: 7px; }
.local-ai-window textarea { border: 1px solid #b8cdc8; border-radius: 7px; flex: 1; font: inherit; max-height: 110px; min-height: 48px; padding: 9px; resize: vertical; }
.local-ai-window form button { background: #0f766e; color: #fff; }
.local-ai-window form small { color: #6a7d78; display: block; font-size: 10px; line-height: 1.35; margin-top: 6px; }
@media(max-width:520px){.local-ai-chat{bottom:10px;right:10px}.local-ai-window{bottom:55px}.local-ai-launcher>span:last-child{display:none}}
.form-honeypot { height: 1px !important; left: -10000px !important; overflow: hidden !important; position: absolute !important; width: 1px !important; }
.sr-only { height: 1px !important; margin: -1px !important; overflow: hidden !important; padding: 0 !important; position: absolute !important; width: 1px !important; clip: rect(0,0,0,0) !important; }
.unified-site-header { align-items: center; background: #071229; border-bottom: 1px solid rgba(78,216,255,.2); color: #e9f7ff; display: flex; gap: 18px; min-height: 68px; padding: 10px clamp(16px,3vw,42px); position: relative; z-index: 3000; }
.unified-brand { align-items: center; color: #fff; display: flex; flex: 0 0 auto; gap: 8px; text-decoration: none; }
.unified-brand > span { color: #32d4ef; display: block; width: 43px; }
.unified-brand svg { display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; width: 100%; }
.unified-brand strong { font-size: 17px; letter-spacing: -.02em; white-space: nowrap; }
.unified-nav { align-items: center; display: flex; gap: 2px; margin-left: auto; }
.unified-nav a,.unified-account { border-radius: 6px; color: #bad0e5; font-size: 12px; font-weight: 750; padding: 8px 7px; text-decoration: none; white-space: nowrap; }
.unified-nav a:hover,.unified-nav a[aria-current="page"],.unified-account:hover { background: rgba(50,212,239,.11); color: #63e6f5; }
.unified-search { align-items: stretch; display: flex; margin: 0; }
.unified-search input { background: rgba(255,255,255,.07); border: 1px solid rgba(151,190,220,.28); border-radius: 7px 0 0 7px; color: #fff; min-height: 36px; padding: 7px 10px; width: clamp(110px,12vw,190px); }
.unified-search input::placeholder { color: #91a9bc; }
.unified-search button { background: #0ea5b7; border-radius: 0 7px 7px 0; color: #03151d; min-height: 36px; padding: 6px 10px; }
.language-picker{margin:0}.language-picker select{background:#102d3b;border:1px solid rgba(255,255,255,.28);border-radius:7px;color:#fff;cursor:pointer;font-size:.75rem;font-weight:850;min-height:34px;padding:5px 7px}.unified-logout{align-items:center!important;background:rgba(255,255,255,.08)!important;border:1px solid rgba(255,255,255,.25)!important;border-radius:7px!important;display:inline-flex!important;font-size:.78rem!important;font-weight:750!important;gap:5px;min-height:34px;padding:6px 10px!important}.unified-logout:hover{background:rgba(255,255,255,.16)!important;border-color:rgba(255,255,255,.45)!important}
.arduino-family-guide .lead{font-size:1.08rem}.board-learning-list{display:grid;gap:10px;grid-template-columns:repeat(2,minmax(0,1fr));list-style:none;padding:0}.board-learning-list li{background:rgba(14,165,183,.08);border-left:3px solid #0e8797;border-radius:6px;padding:12px}.component-safety-note{background:#fff7ed;border-left:4px solid #f97316;border-radius:6px;padding:13px}.arduino-history p{max-width:900px}.board-comparison{display:grid;gap:14px;grid-template-columns:repeat(3,minmax(0,1fr))}.board-comparison article{background:var(--panel-soft,#f5f8f7);border:1px solid var(--line);border-radius:9px;padding:16px}.board-comparison h3{margin-top:0}@media(max-width:720px){.board-learning-list,.board-comparison{grid-template-columns:1fr}}
.unified-mobile-menu { display: none; margin-left: auto; position: relative; }
.unified-mobile-menu summary { background: rgba(50,212,239,.12); border: 1px solid rgba(50,212,239,.3); border-radius: 7px; cursor: pointer; font-weight: 800; list-style: none; padding: 9px 12px; }
.unified-mobile-menu nav { background: #0b1b35; border: 1px solid #264564; border-radius: 9px; box-shadow: 0 16px 40px rgba(0,0,0,.35); display: grid; min-width: 210px; padding: 8px; position: absolute; right: 0; top: 46px; }
.unified-mobile-menu nav a { border-radius: 5px; color: #d9e9f5; padding: 9px; text-decoration: none; }
body > .top:not(.unified-site-header),body > .simulator-topbar,body > .landing-header,.hero > nav { display: none !important; }
@media(max-width:1180px){.unified-nav a{padding-inline:5px}.unified-account{display:none}.unified-search input{width:120px}}
@media(max-width:940px){.unified-nav,.unified-search,.unified-account{display:none}.unified-mobile-menu{display:block}}
@media(max-width:480px){.unified-site-header{gap:8px;padding-left:12px;padding-right:12px}.unified-brand{gap:6px;min-width:0}.unified-brand>span{width:35px}.unified-brand strong{font-size:14px;overflow:hidden;text-overflow:ellipsis}.unified-mobile-menu summary{padding:8px 9px}.language-picker select{padding-left:5px;padding-right:5px}}
.search-page{min-height:65vh}.site-search-page-form{display:flex;gap:0;margin-bottom:24px}.site-search-page-form input{border-radius:8px 0 0 8px;flex:1;font-size:16px;padding:14px}.site-search-page-form button{border-radius:0 8px 8px 0}.search-count{color:var(--muted,#526070)}.search-results{display:grid;gap:16px;grid-template-columns:repeat(3,minmax(0,1fr))}.search-results>.panel{margin:0;padding:22px}.search-results h2{font-size:20px;margin:10px 0}.search-empty{padding:28px}.search-suggestions{display:grid;gap:8px;margin-top:20px;max-width:680px}.search-suggestions>a{background:rgba(14,165,183,.08);border:1px solid rgba(14,165,183,.25);border-radius:7px;display:flex;font-weight:800;justify-content:space-between;padding:11px 13px;text-decoration:none}.search-suggestions small{color:var(--muted,#526070)}@media(max-width:800px){.search-results{grid-template-columns:1fr}}
.password-help { color: var(--muted, #526070); font-size: .9rem; margin: -.25rem 0 .2rem; }
.registration-captcha { border: 1px solid rgba(82,96,112,.35); border-radius: 8px; display: grid; gap: .55rem; margin: .25rem 0; padding: .8rem 1rem 1rem; }
.registration-captcha legend { font-weight: 750; padding: 0 .35rem; }
.registration-captcha label { font-weight: 650; }
.registration-captcha input[type="text"] { max-width: 9rem; }
.ad-placement { align-items: center; background: rgba(127,127,127,.05); border: 1px dashed rgba(127,127,127,.25); display: grid; margin: 14px auto; max-width: 1180px; min-height: 96px; overflow: hidden; position: relative; width: calc(100% - 32px); }
.ad-placement iframe { border: 0; display: block; height: 100%; min-height: 90px; width: 100%; }
.ad-placement.ad-size-compact,.ad-placement.ad-size-compact iframe{min-height:90px}.ad-placement.ad-size-standard,.ad-placement.ad-size-standard iframe{min-height:250px}.ad-placement.ad-size-large,.ad-placement.ad-size-large iframe{min-height:600px}
.ad-disclosure { background: rgba(10,20,30,.7); border-radius: 0 0 4px 0; color: #d8e2df; font-size: 9px; left: 0; letter-spacing: .08em; padding: 3px 6px; position: absolute; text-transform: uppercase; top: 0; z-index: 2; }
.floating-ad[hidden] { display: none; }
.floating-ad { background: rgba(3,10,20,.94); border: 1px solid rgba(90,190,255,.35); border-radius: 14px; bottom: 18px; box-shadow: 0 20px 55px rgba(0,0,0,.45); max-width: min(420px,calc(100vw - 24px)); padding: 8px; position: fixed; right: 18px; width: 100%; z-index: 1000; }
.floating-ad > button { align-items: center; background: #17233a; border: 1px solid #53627a; border-radius: 50%; color: #fff; display: flex; font-size: 18px; height: 32px; justify-content: center; position: absolute; right: -8px; top: -12px; width: 32px; z-index: 4; }
.floating-ad .ad-placement { border: 0; margin: 0; min-height: 220px; width: 100%; }
.floating-ad .ad-placement iframe { min-height: 220px; }
.floating-ad-left{left:18px;right:auto}.floating-ad-right{left:auto;right:18px}.floating-ad .ad-size-compact,.floating-ad .ad-size-compact iframe{min-height:160px}.floating-ad .ad-size-standard,.floating-ad .ad-size-standard iframe{min-height:250px}.floating-ad .ad-size-large,.floating-ad .ad-size-large iframe{min-height:500px}
@media(max-width:600px){.ad-hide-mobile{display:none!important}}
@media(max-width:600px){.floating-ad{bottom:8px;left:8px;right:8px;width:auto}.ad-placement-banner{min-height:72px}.ad-placement-banner iframe{min-height:68px}}
/* Structured educational resources */
.local-component-bank td small{display:block;margin-top:.35rem;color:var(--muted,#526070)}
.project-cad-resources .card{display:flex;flex-direction:column;gap:.55rem}
.project-cad-resources .hero-actions{margin-top:auto}
.media-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:1rem;margin:1rem 0}.media-item{margin:0;min-width:0;border:1px solid var(--line,#d8e2e8);border-radius:14px;overflow:hidden;background:var(--surface,#fff)}.media-item img,.media-item video{display:block;width:100%;max-height:520px;object-fit:contain;background:#07131c}.media-item audio{display:block;width:calc(100% - 2rem);margin:1rem}.media-item figcaption{padding:.7rem 1rem;font-size:.9rem}.media-ratio{position:relative;aspect-ratio:16/9;background:#07131c}.media-ratio iframe{position:absolute;inset:0;width:100%;height:100%;border:0}.media-download{display:flex;justify-content:space-between;gap:1rem;padding:1rem;text-decoration:none}.media-download small{white-space:nowrap}.pdf-viewer{min-height:460px;display:flex;flex-direction:column}.pdf-toolbar{display:flex;justify-content:space-between;gap:1rem;padding:.7rem 1rem;background:#173f53;color:#fff}.pdf-toolbar a{color:#fff}.pdf-viewer object{width:100%;min-height:420px;flex:1;border:0}.site-media-strip{padding-top:1rem;padding-bottom:.2rem}.site-media-strip>.media-gallery{padding:1rem;border-radius:18px;background:color-mix(in srgb,var(--surface,#fff) 92%,transparent)}
.site-footer{background:#071a24;border-top:1px solid rgba(102,209,210,.25);color:#b7c9ce;margin-top:clamp(42px,7vw,90px)}.site-footer-inner{align-items:center;display:grid;gap:24px;grid-template-columns:minmax(150px,.7fr) minmax(280px,2fr) auto;margin:auto;max-width:1180px;padding:30px 20px}.site-footer strong,.site-footer small{display:block}.site-footer strong{color:#fff;font-size:18px}.site-footer small{font-size:11px;margin-top:3px}.site-footer p{font-size:12px;line-height:1.65;margin:0}.site-footer a{color:#72eadb}.site-footer nav{display:flex;flex-wrap:wrap;font-size:12px;gap:12px;justify-content:flex-end}.site-footer nav a{font-weight:800}@media(max-width:760px){.site-footer-inner{grid-template-columns:1fr}.site-footer nav{justify-content:flex-start}}
