:root {
    --bg: #f7f8fa;
    --panel: #ffffff;
    --line: #dfe1e6;
    --muted: #5e6c84;
    --text: #172b4d;
    --blue: #0052cc;
    --blue-soft: #deebff;
    --green: #36b37e;
    --yellow: #ffab00;
    --purple: #6554c0;
    --cyan: #00b8d9;
    --red: #de350b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

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

button,
.button {
    min-height: 38px;
    border: 0;
    border-radius: 6px;
    background: var(--blue);
    color: #fff;
    padding: 0 14px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

button.secondary,
.button.secondary {
    background: #ebecf0;
    color: var(--text);
}

button.danger {
    background: var(--red);
    color: #fff;
}

button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

input,
select {
    height: 38px;
    padding: 0 10px;
}

textarea {
    min-height: 170px;
    resize: vertical;
    padding: 14px;
    line-height: 1.5;
}

.app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
}

.sidebar {
    border-right: 1px solid var(--line);
    background: #fafbfc;
    padding: 26px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
}

.project-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.sidebar #newSessionBtn,
.sidebar #sessionManagementBtn {
    width: 100%;
}

.sidebar #newSessionBtn {
    margin-bottom: 14px;
}

.sidebar #sessionManagementBtn {
    margin-top: 4px;
    margin-bottom: 0;
    justify-content: flex-start;
    border: 1px solid var(--line);
    background: #ebecf0;
    color: var(--text);
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #fff;
    font-weight: 800;
}

.project-lockup span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-top: 3px;
}

.session-list h2 {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 10px;
}

.session-item {
    width: 100%;
    min-height: 46px;
    justify-content: flex-start;
    text-align: left;
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 10px;
}

.session-item.active {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 2px var(--blue-soft);
}

.main {
    min-width: 0;
    padding: 32px 48px 80px;
}

.topbar {
    min-height: 88px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.breadcrumb {
    color: var(--muted);
    font-size: 14px;
}

h1 {
    font-size: 30px;
    margin: 8px 0 0;
}

h2 {
    margin: 0;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.credit-pill {
    height: 38px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 0 14px;
    white-space: nowrap;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    border-radius: 6px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--line);
    font-size: 15px;
}

.menu {
    position: relative;
}

.menu summary {
    list-style: none;
}

.menu-panel {
    position: absolute;
    right: 0;
    top: 46px;
    min-width: 220px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(9, 30, 66, .16);
    z-index: 10;
    display: grid;
    gap: 8px;
}

.menu-panel a {
    background: transparent;
    color: var(--text);
    justify-content: flex-start;
    font-size: 15px;
    font-weight: 600;
    padding: 8px 10px;
}

.progress-row {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(6, minmax(110px, 1fr));
    gap: 10px;
    background: rgba(247, 248, 250, .94);
    backdrop-filter: blur(8px);
    padding: 12px 0 18px;
}

.step {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--text);
    justify-content: flex-start;
    min-height: 50px;
}

.step span {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #ebecf0;
}

.step.active {
    border-color: var(--blue);
    color: var(--blue);
}

.step.active span,
.step.complete span {
    background: var(--blue);
    color: #fff;
}

.step.locked {
    opacity: .55;
    cursor: not-allowed;
}

.step.processing span::after {
    content: '\f110';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    animation: fa-spin 1s linear infinite;
}

.step.stale {
    border-color: #d97000;
    color: #9b5100;
}

.step.stale span {
    background: #fff4e5;
    color: #9b5100;
}

.workspace-section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-top: 22px;
    padding: 24px;
}

.workspace-section.compact {
    max-width: 760px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-heading span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 4px;
}

.section-heading select {
    max-width: 220px;
}

.llm-controls {
    display: grid;
    grid-template-columns: minmax(150px, 180px) minmax(190px, 260px);
    gap: 10px;
}

.llm-controls select {
    max-width: none;
}

#hfProviderNotice {
    margin: -6px 0 16px;
}

.form-row,
.action-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.form-row {
    flex-wrap: wrap;
}

.section-helper {
    color: var(--muted);
    line-height: 1.45;
    margin: -6px 0 18px;
}

.stl-workspace {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stl-main-grid {
    display: grid;
    grid-template-columns: minmax(0, calc((100% - 36px) / 3)) minmax(420px, 1fr);
    gap: 22px;
    align-items: start;
}

.openscad-workspace {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.openscad-main-grid {
    display: grid;
    grid-template-columns: minmax(0, calc((100% - 36px) / 3)) minmax(420px, 1fr);
    gap: 22px;
    align-items: start;
}

.stl-image-panel.empty-state {
    min-height: 320px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #fafbfc;
    text-align: center;
}

.openscad-image-panel.empty-state {
    min-height: 320px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #fafbfc;
    text-align: center;
}

.openscad-image-panel .concept-card {
    width: 100%;
}

.stl-image-panel .concept-card {
    width: 100%;
}

.stl-image-stack {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f4f5f7;
}

.stl-image-stack img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.stl-image-stack.cropped-image-stack img {
    object-fit: contain;
}

.stl-control-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: #fafbfc;
    display: grid;
    gap: 14px;
}

.openscad-control-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: #fafbfc;
    display: grid;
    gap: 14px;
}

.openscad-control-panel label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.openscad-control-panel textarea {
    min-height: 100px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 400;
}

.openscad-field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.openscad-field-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.unit-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.unit-input input {
    min-width: 0;
}

.unit-input span {
    color: var(--muted);
    font-weight: 700;
}

.field-error {
    color: var(--red);
    font-size: 13px;
    font-weight: 700;
}

.openscad-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.openscad-helper {
    color: var(--muted);
    line-height: 1.45;
    font-size: 14px;
    margin: 0;
}

.openscad-output {
    border-top: 1px solid var(--line);
    padding-top: 16px;
    display: grid;
    gap: 12px;
}

.openscad-output h3 {
    margin: 0;
}

.openscad-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.openscad-meta-grid div {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    padding: 12px;
    min-width: 0;
}

.openscad-meta-grid ul {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

#openScadCodeOutput {
    min-height: 360px;
    overflow: auto;
    white-space: pre;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.45;
    resize: vertical;
}

.stl-control-panel p {
    margin: 0;
}

.stl-helper {
    color: var(--muted);
    line-height: 1.45;
    font-size: 14px;
}

.stl-size-row,
.stl-actions,
.stl-crop-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.stl-size-row label {
    font-weight: 700;
}

.stl-size-input {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.stl-size-input input {
    width: 120px;
    text-align: right;
}

.stl-status-area {
    min-height: 28px;
    border: 1px solid #ffe380;
    border-radius: 6px;
    background: #fffae6;
    color: #4f3a00;
    padding: 8px 12px;
    display: grid;
    gap: 4px;
    line-height: 1.25;
    font-size: 14px;
    font-weight: 700;
}

.stl-status-area.finished {
    border-color: #abf5d1;
    background: #e3fcef;
    color: #064;
}

.stl-status-area.failed {
    border-color: #ffbdad;
    background: #ffebe6;
    color: #5f1f12;
}

.stl-input-mode-indicator {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    padding: 9px 12px;
    color: var(--text);
    font-weight: 700;
}

.stl-input-thumbnail-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
    gap: 20px;
    width: 100%;
}

.stl-input-thumbnail {
    display: grid;
    gap: 8px;
}

.stl-input-thumbnail-label {
    padding: 0 10px 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-align: left;
}

.crop-selection-title,
.crop-selection-instructions {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    color: #fff;
    font-weight: 700;
}

.crop-selection-title {
    border-right: 1px solid rgba(255, 255, 255, .35);
    padding-right: 12px;
}

.stl-error {
    color: var(--red);
    font-size: 14px;
    font-weight: 700;
}

.file-button {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.file-button input {
    display: none;
}

.process-status {
    min-height: 38px;
    max-width: min(420px, 100%);
    border: 1px solid #ffe380;
    border-radius: 6px;
    background: #fffae6;
    color: #4f3a00;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    line-height: 1.25;
    font-size: 14px;
    font-weight: 700;
}

.process-status.finished {
    border-color: #abf5d1;
    background: #e3fcef;
    color: #064;
}

.concept-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.concept-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: grid;
    grid-template-rows: auto 1fr;
}

.concept-card.selected {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px var(--blue-soft);
}

.refinement-image-card {
    grid-template-rows: auto;
}

.concept-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
    object-fit: cover;
    background: #f4f5f7;
}

.concept-image-button {
    width: 100%;
    border: 0;
    padding: 0;
    display: block;
    background: transparent;
    cursor: zoom-in;
}

.concept-image-stack {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f4f5f7;
}

.concept-image-stack img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
}

.concept-image-base {
    z-index: 0;
}

.concept-image-stack .concept-image-overlay {
    z-index: 1;
    pointer-events: none;
    background: transparent;
}

.concept-image-button:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: -3px;
}

.image-pending {
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    gap: 8px;
    color: var(--muted);
    background: #f4f5f7;
}

.concept-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.concept-body h3 {
    margin: 0 0 8px;
}

.concept-body p {
    color: var(--muted);
    line-height: 1.45;
}

.concept-body button[data-select] {
    margin-top: auto;
    align-self: flex-start;
}

.refinement-workspace {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.refinement-main-grid {
    display: grid;
    grid-template-columns: minmax(0, calc((100% - 36px) / 3)) minmax(420px, 1fr);
    gap: 22px;
    align-items: start;
}

.selected-concept-panel.empty-state {
    min-height: 320px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #fafbfc;
}

.refinement-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: #fafbfc;
    display: grid;
    gap: 14px;
}

.refinement-panel label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.refinement-panel textarea {
    min-height: 150px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

.refinement-actions {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.refinement-thumbnail-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    width: 100%;
}

.refinement-thumbnail {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
}

.refinement-thumbnail.active {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px var(--blue-soft);
}

.refinement-thumbnail:hover {
    border-color: var(--blue);
}

.refinement-thumbnail:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

.refinement-thumbnail .concept-image-stack,
.refinement-thumbnail .image-pending {
    width: 100%;
    border-radius: 7px;
    overflow: hidden;
}

.refinement-thumbnail .concept-image-stack img {
    object-fit: cover;
}

.artifact-sidebar-rail {
    display: grid;
    gap: 10px;
    margin: 0 0 24px;
}

.artifact-sidebar-section {
    display: grid;
    gap: 10px;
}

.artifact-sidebar-section h2 {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0;
}

.artifact-sidebar-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 0;
}

.sidebar-artifact-thumbnail {
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fafbfc;
    display: block;
    overflow: hidden;
}

.sidebar-artifact-thumbnail:hover {
    border-color: #b3bac5;
}

.sidebar-artifact-thumbnail.active {
    border-color: #8c9bab;
    box-shadow: 0 0 0 2px #ebecf0;
}

.sidebar-artifact-thumbnail:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

.sidebar-artifact-thumbnail .concept-image-stack {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 7px;
    overflow: hidden;
}

.sidebar-artifact-thumbnail .concept-image-stack img {
    object-fit: cover;
}

.sidebar-artifact-thumbnail .concept-image-stack.cropped-image-stack img {
    object-fit: contain;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
}

.tag-list span {
    border-radius: 999px;
    background: #ebecf0;
    padding: 4px 8px;
    font-size: 12px;
}

.empty-state {
    color: var(--muted);
    display: block;
}

.notice {
    border-radius: 6px;
    padding: 12px 14px;
}

.notice.error {
    color: #5f1f12;
    background: #ffebe6;
}

.notice.warning {
    color: #4f3a00;
    background: #fffae6;
    border: 1px solid #ffe380;
}

.notice.success {
    color: #064;
    background: #e3fcef;
}

.hidden {
    display: none !important;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(9, 30, 66, .42);
}

.modal-panel {
    width: min(440px, 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 22px;
    box-shadow: 0 18px 48px rgba(9, 30, 66, .24);
}

.modal-panel h2 {
    margin-bottom: 15px;
}

.modal-panel p {
    color: var(--muted);
    margin: 0 0 20px;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.image-viewer-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 18px;
    padding: 24px 16px 28px;
    background: rgba(9, 30, 66, .84);
}

.image-viewer-stage {
    min-height: 0;
    display: grid;
    place-items: center;
}

.image-viewer-canvas-wrap {
    position: relative;
    max-width: 96vw;
    max-height: calc(100vh - 170px);
    display: grid;
    place-items: center;
}

.image-viewer-canvas-wrap img {
    max-width: 96vw;
    max-height: calc(100vh - 170px);
    display: block;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 56px rgba(0, 0, 0, .35);
}

.image-viewer-canvas-wrap canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    touch-action: none;
}

.image-viewer-canvas-wrap.annotation-disabled canvas {
    pointer-events: none;
}

.image-annotation-toolbar {
    justify-self: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: min(760px, 96vw);
}

.image-annotation-toolbar button {
    min-width: 0;
}

.image-annotation-toolbar button.active {
    background: var(--red);
    color: #fff;
}

#imageViewerCloseBtn {
    justify-self: center;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px;
}

.login-card {
    width: min(440px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 30px;
}

.login-card form,
.admin-form {
    display: grid;
    gap: 14px;
}

.login-card button {
    justify-content: center;
}

.login-card label,
.admin-form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.login-card input {
    font-weight: 400;
}

.admin-page {
    background: #fff;
}

.admin-shell {
    width: min(1180px, calc(100% - 48px));
    margin: 32px auto;
}

.admin-shell section:not(:first-child) {
    margin-top: 32px;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.section-actions {
    margin-top: 18px;
    margin-bottom: 16px;
}

.section-actions .button {
    display: inline-flex;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 10px;
    text-align: left;
}

.process-tracker-table td {
    vertical-align: top;
}

.process-tracker-table th:nth-child(5),
.process-tracker-table th:nth-child(6),
.process-tracker-table td:nth-child(5),
.process-tracker-table td:nth-child(6) {
    width: 15%;
}

.tracker-preview,
.tracker-preview-static {
    min-height: auto;
    max-width: 180px;
    padding: 0;
    display: inline-grid;
    gap: 3px;
    line-height: 1.25;
    text-align: left;
}

.tracker-preview {
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--blue);
    font-size: 13px;
    cursor: pointer;
}

.tracker-preview:hover {
    text-decoration: underline;
}

.tracker-preview-static {
    color: var(--text);
    font-size: 13px;
}

.tracker-preview-label {
    color: var(--muted);
    font-family: Consolas, "Courier New", monospace;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.tracker-preview-text {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.tracker-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(9, 30, 66, .42);
}

.tracker-detail-panel {
    width: min(780px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 22px;
    box-shadow: 0 18px 48px rgba(9, 30, 66, .24);
    display: grid;
    gap: 16px;
}

.tracker-detail-panel h2 {
    margin: 0;
}

.tracker-detail-body {
    max-height: min(560px, calc(100vh - 190px));
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fafbfc;
    color: var(--text);
    padding: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.tracker-detail-panel button {
    justify-self: end;
}

.inline-form {
    display: flex;
    gap: 8px;
}

.inline-form input {
    max-width: 120px;
}

@media (max-width: 1100px) {
    .app {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .main {
        padding: 26px;
    }

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

    .refinement-main-grid,
    .stl-main-grid,
    .openscad-main-grid {
        grid-template-columns: 1fr;
    }

    .openscad-field-grid,
    .openscad-field-grid.two,
    .openscad-meta-grid {
        grid-template-columns: 1fr;
    }

    .llm-controls {
        grid-template-columns: 1fr;
        width: 100%;
    }
}
