/* Teacher workbench: the five teaching tools. Builds on the clay tokens and
   primitives in home.css, which loads first; everything here is scoped to
   #view-teaching. */

#view-teaching .tw-page { gap: 20px; }

.tw-segs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--tw-surface-2);
    border: 1px solid var(--tw-rim);
    border-radius: 16px;
    box-shadow: var(--twb-shadow-sm);
    padding: 8px;
}

.tw-seg {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 800;
    color: var(--tw-ink-2);
    background: transparent;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
}

.tw-seg:hover { background: var(--tw-surface); }
.tw-seg:focus-visible { outline: 3px solid var(--tw-accent); outline-offset: 2px; }

.tw-seg[aria-selected="true"] {
    color: #1F5A3D;
    background: #D6F1E2;
    border-color: rgba(82, 162, 119, 0.35);
    box-shadow: 0 2px 8px rgba(82, 162, 119, 0.16);
}

.tw-teach-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 18px;
    align-items: start;
}

@media (max-width: 1000px) {
    .tw-teach-grid { grid-template-columns: 1fr; }
}

.tw-form { display: flex; flex-direction: column; gap: 14px; }
.tw-form.hidden { display: none; }
.tw-form h2 { font-size: 24px; margin-bottom: 2px; }

.tw-form .tw-field > span { color: var(--tw-ink-2); }

.tw-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.tw-teach-aside {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tw-preview {
    min-height: 300px;
    font-family: "JetBrains Mono", "Fira Code", Consolas, "PingFang SC", monospace;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    background: var(--tw-surface-2);
    color: var(--tw-ink-2);
    resize: vertical;
}

/* Placeholder styling is left to the browser, but the clay inputs get a
   readable one in both themes. */
.tw-input::placeholder,
.tw-textarea::placeholder { color: var(--tw-ink-3); opacity: 0.75; }
