/* Shared guide theme — AI 共创·湾区科创行 */

:root {
    --accent: #F3A21C;
    --accent-soft: #fff6e8;
    --accent-dark: #c77a00;
    --text: #2f2f2f;
    --muted: #5c5c5c;
    --line: #e8e8e8;
    --card: #fff;
    --warn: #fff3cd;
    --warn-border: #f0c040;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: #f5f5f5;
    color: var(--text);
}

/* Back link */
.page-back,
.back-button {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 100;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: color 0.2s, border-color 0.2s;
}

.page-back:hover,
.back-button:hover {
    color: var(--accent-dark);
    border-color: var(--accent);
    background: var(--card);
}

/* Page shell */
.guide-layout,
.tutorial-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 72px 20px 48px;
}

.guide-layout--wide {
    max-width: 900px;
}

.guide-layout--form {
    max-width: 960px;
}

/* Hero */
.guide-hero,
.tutorial-header,
.header {
    text-align: center;
    margin-bottom: 32px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.guide-hero .eyebrow {
    color: var(--accent-dark);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0 0 8px;
}

.guide-hero h1,
.tutorial-header h1,
.header h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    line-height: 1.25;
    margin: 0 0 12px;
    color: var(--text);
}

.guide-hero .lead,
.tutorial-header p,
.header p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.65;
    max-width: 36em;
    margin: 0 auto;
}

/* Flow nav (ai-assistant) */
.flow-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.flow-overview a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    transition: border-color 0.2s, background 0.2s;
}

.flow-overview a:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.flow-overview .num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Prereq banner */
.prereq {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    margin-bottom: 36px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.55;
}

.prereq-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
}

.prereq a {
    color: var(--accent-dark);
    font-weight: 600;
}

/* Step stack */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Step cards */
.guide-step,
.step {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 28px 28px 32px;
    margin-bottom: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border-left: 1px solid var(--line);
}

.step-head,
.step-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.step-badge,
.step-number {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
}

.step-head-text h2,
.step-title {
    font-size: 1.35rem;
    margin: 0 0 6px;
    color: var(--text);
    font-weight: 600;
}

.step-goal {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.5;
}

.step-content {
    color: var(--text);
    line-height: 1.7;
    font-size: 0.98rem;
}

.step-content p {
    margin: 0 0 12px;
}

.step-content ul,
.step-content ol {
    margin: 12px 0;
    padding-left: 1.35rem;
}

.step-content li {
    margin-bottom: 8px;
}

/* Subsections */
.guide-block {
    margin-top: 24px;
}

.guide-block h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guide-block h3::before {
    content: "";
    width: 4px;
    height: 1em;
    background: var(--accent);
    border-radius: 2px;
}

.guide-block p {
    margin: 0 0 12px;
    color: var(--text);
    line-height: 1.7;
    font-size: 0.98rem;
}

/* Prompt / example cards */
.prompt-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0 18px;
}

.prompt-card,
.prompt-example {
    padding: 12px 14px;
    background: #f8f8f8;
    border-radius: 8px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text);
    white-space: pre-wrap;
}

.prompt-card kbd,
.prompt-title {
    display: inline-block;
    margin-right: 6px;
    margin-bottom: 8px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-family: inherit;
    background: var(--accent-soft);
    color: var(--accent-dark);
    border-radius: 4px;
    font-weight: 700;
}

/* Figures & media */
.figure,
.gif-container,
.video-reference {
    margin: 16px 0 0;
    padding: 12px;
    background: #fafafa;
    border: 1px solid var(--line);
    border-radius: 10px;
    text-align: center;
}

.figure img,
.gif-container img,
.video-reference img,
.step-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 6px;
}

.figure img {
    cursor: zoom-in;
    max-height: 420px;
}

.figure figcaption,
.gif-container em,
.gif-container p {
    margin-top: 10px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
    font-style: normal;
}

.video-reference {
    text-align: left;
}

.video-reference h3 {
    color: var(--text);
    margin: 0 0 12px;
    font-size: 1rem;
}

/* Callouts */
.callout,
.info-box {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 0.92rem;
    line-height: 1.6;
}

.callout-tip,
.info-box {
    background: var(--accent-soft);
    border: 1px solid #f5d9a8;
    border-left: 4px solid var(--accent);
}

.callout-tip strong,
.info-box strong {
    color: var(--accent-dark);
}

.callout-warn,
.password-info {
    background: var(--warn);
    border: 1px solid var(--warn-border);
    border-left: 4px solid var(--warn-border);
}

.callout-warn strong {
    color: #8a6d00;
}

/* Must-do highlight */
.must-do {
    margin-top: 20px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #fff9ed 0%, #fff3dc 100%);
    border: 2px solid var(--accent);
    border-radius: 12px;
}

.must-do-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-dark);
    margin: 0 0 8px;
}

.must-do p {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.65;
}

/* Lists */
.action-list {
    margin: 12px 0 0;
    padding-left: 1.25rem;
    font-size: 0.98rem;
    line-height: 1.75;
}

.loop-note {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed var(--line);
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.6;
}

.loop-note strong {
    color: var(--text);
}

/* Buttons & links */
.link-button {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 12px 22px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 10px 0;
    transition: background 0.2s;
}

.link-button:hover {
    background: var(--accent-dark);
    color: #fff;
}

.copy-button,
.generate-button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}

.generate-button {
    padding: 14px 28px;
    font-size: 1rem;
}

.copy-button:hover,
.generate-button:hover:not(:disabled) {
    background: var(--accent-dark);
}

.copy-button.copied,
.generate-button:disabled {
    background: #b0b0b0;
    cursor: not-allowed;
}

/* Account list (login guide) */
.account-list {
    background: #fafafa;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    margin: 18px 0;
}

.account-list h3 {
    color: var(--text);
    margin: 0 0 14px;
    font-size: 1rem;
}

.account-groups-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-groups-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.account-group-tab {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-dark);
    cursor: pointer;
    text-align: center;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.account-group-tab::before {
    content: "▶";
    display: inline-block;
    margin-right: 8px;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.account-group-tab.is-active::before {
    transform: rotate(90deg);
}

.account-group-tab:hover {
    background: var(--accent-soft);
}

.account-group-tab.is-active {
    background: var(--accent-soft);
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(243, 162, 28, 0.25);
}

.account-group-panel {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card);
}

.account-group-panel-title {
    margin: 0 0 12px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--muted);
}

.account-grid--panel {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.account-grid--panel .account-info {
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    word-break: break-all;
}

.account-grid--panel .copy-button {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 0.85rem;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    background: var(--card);
    border-radius: 8px;
    border: 1px solid var(--line);
    transition: border-color 0.2s;
}

.account-item:hover {
    border-color: var(--accent);
}

.account-info {
    flex: 1;
    font-family: "Courier New", monospace;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Login: teacher account first, trial accounts collapsed */
.login-primary {
    margin-top: 16px;
}

.login-fallback-lead {
    margin: 20px 0 12px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--muted);
}

.trial-accounts-disclosure {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fafafa;
    overflow: hidden;
}

.trial-accounts-summary {
    padding: 14px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-dark);
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 0.2s;
}

.trial-accounts-summary::-webkit-details-marker {
    display: none;
}

.trial-accounts-summary::before {
    content: "▶";
    display: inline-block;
    margin-right: 8px;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.trial-accounts-disclosure[open] .trial-accounts-summary::before {
    transform: rotate(90deg);
}

.trial-accounts-summary:hover {
    background: var(--accent-soft);
}

.trial-accounts-body {
    padding: 0 18px 18px;
    border-top: 1px solid var(--line);
    background: var(--card);
}

.trial-accounts-body .account-list {
    margin-top: 16px;
}

.password-value {
    font-family: "Courier New", monospace;
    font-weight: 700;
    color: var(--accent-dark);
    margin-right: 10px;
}

.trial-accounts-note {
    margin-top: 16px;
    margin-bottom: 0;
}

.trial-accounts-hint {
    margin: 14px 0 0;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--muted);
}

.trial-accounts-hint code {
    font-family: "Courier New", monospace;
    font-size: 0.85em;
    padding: 1px 6px;
    background: #f0f0f0;
    border-radius: 4px;
    color: var(--text);
}

.step-content code,
.description code,
.intro code {
    font-family: "Courier New", monospace;
    font-size: 0.85em;
    padding: 1px 6px;
    background: #f0f0f0;
    border-radius: 4px;
    color: var(--text);
}

/* Content panels (versioning, tips) */
.content {
    padding: 0;
}

.container {
    max-width: 820px;
    margin: 0 auto;
    padding: 72px 20px 48px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.intro,
.guide-panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px 26px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.intro h2,
.guide-panel h2 {
    color: var(--text);
    font-size: 1.2rem;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.intro h2::before,
.guide-panel h2::before {
    content: "";
    width: 4px;
    height: 1em;
    background: var(--accent);
    border-radius: 2px;
}

.intro p,
.guide-panel p {
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.7;
    margin: 0 0 10px;
}

.section {
    margin-bottom: 28px;
}

.section > h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.tip-card,
.command-card,
.input-section,
.practice {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px 26px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.tip-card::before,
.command-card::before,
.input-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
}

.tip-card:hover,
.command-card:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.tip-title,
.command-title,
.input-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tip-title .icon,
.command-title .icon {
    font-size: 1.2rem;
}

.tip-description,
.description {
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.7;
}

.example-section {
    margin-top: 16px;
}

.example-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.example-item {
    background: #f8f8f8;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
    margin: 10px 0;
    position: relative;
}

.example-item.wrong {
    border-left: 3px solid #e74c3c;
}

.example-item.correct {
    border-left: 3px solid #27ae60;
}

.example-text {
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.55;
    margin-right: 28px;
}

.command-example {
    background: #f8f8f8;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    margin: 12px 0;
    font-family: "Courier New", monospace;
    font-size: 0.9rem;
}

.tips {
    background: var(--accent-soft);
    border: 1px solid #f5d9a8;
    border-radius: 14px;
    padding: 22px 24px;
    margin-top: 8px;
}

.tips h4 {
    font-size: 1.05rem;
    margin: 0 0 14px;
    color: var(--accent-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tips h4::before {
    content: "💡";
}

.tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips li {
    margin-bottom: 10px;
    padding-left: 22px;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
}

.tips li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-dark);
    font-weight: bold;
}

.practice {
    border-left: 1px solid var(--line);
}

.practice h4 {
    color: var(--text);
    font-size: 1.1rem;
    margin: 0 0 16px;
    text-align: center;
    font-weight: 700;
}

.practice-item {
    background: #f8f8f8;
    padding: 16px 18px;
    border-radius: 10px;
    margin-bottom: 12px;
    border-left: 3px solid var(--accent);
    font-size: 0.95rem;
    line-height: 1.6;
    transition: background 0.2s;
}

.practice-item strong {
    color: var(--accent-dark);
}

.practice-item:hover {
    background: var(--accent-soft);
}

.intro ul {
    margin: 12px 0 0;
    padding-left: 1.25rem;
}

.intro li {
    margin-bottom: 8px;
    font-size: 0.98rem;
    line-height: 1.6;
}

.description ol,
.description ul {
    margin: 12px 0 0;
    padding-left: 1.35rem;
    color: var(--text);
}

.description li {
    margin-bottom: 8px;
}

.warning {
    background: var(--warn);
    border: 1px solid var(--warn-border);
    border-left: 4px solid var(--warn-border);
    padding: 18px 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.warning strong,
.warning p {
    color: #8a6d00;
}

.warning p {
    margin: 6px 0 0;
}

.highlight-box {
    background: var(--accent-soft);
    border: 1px solid #f5d9a8;
    border-left: 4px solid var(--accent);
    padding: 18px 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.highlight-box strong {
    color: var(--accent-dark);
}

@media (max-width: 768px) {
    .account-groups-nav {
        grid-template-columns: 1fr;
    }

    .account-grid--panel {
        grid-template-columns: 1fr;
    }

    .account-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .flow-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .guide-step,
    .step {
        padding: 20px 18px 24px;
    }

    .step-head,
    .step-header {
        flex-direction: column;
        gap: 12px;
    }

    .account-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .guide-layout,
    .tutorial-container,
    .container {
        padding: 64px 16px 40px;
    }
}

/* sz2608: 赛道 × Group 选择 + 账号面板 */
.track-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.track-section {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card);
}

.track-section--buffer {
    border-style: dashed;
    opacity: 0.92;
}

.track-name {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-dark);
}

.group-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.group-grid--track {
    grid-template-columns: repeat(2, 1fr);
}

.group-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 8px;
    min-height: 68px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card);
    cursor: pointer;
    user-select: none;
    text-align: center;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.group-card:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.group-card.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(243, 162, 28, 0.25);
}

.group-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--accent-dark);
}

.group-range {
    font-family: "Courier New", monospace;
    font-size: 0.72rem;
    color: var(--muted);
}

.account-panel {
    display: none;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card);
}

.account-panel.visible {
    display: block;
}

.account-panel-title {
    margin: 0 0 12px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--muted);
}

.account-grid--5x2 {
    grid-template-columns: repeat(5, 1fr);
}

.account-item--tap {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 8px;
    cursor: pointer;
    text-align: center;
}

.account-item--tap .account-info {
    flex: none;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    font-size: 0.9rem;
    font-weight: 600;
}

.account-copy-hint {
    font-size: 0.72rem;
    color: var(--muted);
}

.account-copy-hint.copied {
    color: #27ae60;
    font-weight: 600;
}

.next-step-box {
    margin-top: 8px;
    padding: 22px 24px;
    background: linear-gradient(135deg, #fff9ed 0%, #fff3dc 100%);
    border: 2px solid var(--accent);
    border-radius: 12px;
}

.next-step-box h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-dark);
}

.next-step-box p {
    margin: 0 0 12px;
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--text);
}

@media (max-width: 768px) {
    .group-grid,
    .account-grid--5x2 {
        grid-template-columns: repeat(3, 1fr);
    }

    .group-grid--track {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .group-grid,
    .account-grid--5x2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .group-grid--track {
        grid-template-columns: 1fr;
    }
}
