.model-panel { margin-top: 1.5rem; border-block: 1px solid var(--line, #e0e7e2); }
.model-panel > summary { display: flex; align-items: center; gap: .75rem; padding: 1rem 0; cursor: pointer; color: var(--ink, #243a32); font-size: .875rem; font-weight: 600; list-style: none; }
.model-panel > summary::-webkit-details-marker { display: none; }
.model-panel__icon { display: grid; place-items: center; flex: 0 0 2rem; height: 2rem; background: var(--surface, #f3f8f4); color: var(--accent, #286448); border-radius: .5rem; font-size: 1.25rem; }
.model-panel__heading small { display: block; margin-top: .25rem; color: var(--muted, #62716a); font-size: .75rem; font-weight: 400; }
.model-panel__chevron { margin-left: auto; color: var(--muted, #62716a); }
.model-panel[open] > summary .model-panel__chevron { transform: rotate(180deg); }
.model-panel > summary:focus-visible { outline: 2px solid var(--accent, #365b68); outline-offset: 4px; border-radius: 3px; }
.model-panel__body { padding: 0 0 1.25rem 2.75rem; color: var(--ink, #243a32); }
.model-panel .model-panel__label { margin: 0 0 .375rem; color: var(--muted, #62716a); font-size: .625rem; text-transform: uppercase; letter-spacing: .08em; }
.model-panel .model-panel__question { margin: 0 0 1rem; font-size: .9375rem; line-height: 1.6; font-weight: 550; }
.model-panel .model-panel__note { color: var(--muted, #62716a); font-size: .6875rem; line-height: 1.6; margin: 1rem 0 0; }
.model-panel__feedback { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.model-panel__preferences { flex-shrink: 0; padding: .5rem .75rem; border: 1px solid var(--line, #e0e7e2); border-radius: .4375rem; color: var(--accent, #286448); font-size: .75rem; text-decoration: none; }
.model-panel__preferences:hover { border-color: currentColor; }
.model-panel__preferences:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.model-panel__row { display: grid; grid-template-columns: minmax(7rem, 1fr) 3fr; gap: .75rem; padding: .75rem 0; border-top: 1px solid var(--line, #e2e8f0); font-size: .875rem; line-height: 1.5; }
.model-panel__row strong { font-size: .8rem; overflow-wrap: anywhere; }
.model-panel__row p { margin: 0; }
.model-panel__row--unavailable { color: var(--muted, #596773); }
.model-panel__row--loading { color: var(--muted, #596773); }
.model-panel__loading { display: inline-flex; align-items: center; gap: .45rem; }
.model-panel__spinner { width: .75rem; height: .75rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: model-panel-spin .7s linear infinite; }
@keyframes model-panel-spin { to { transform: rotate(360deg); } }
.model-panel .model-panel__status { margin: 0; padding-left: .875rem; border-left: 2px solid var(--line, #e0e7e2); color: var(--muted, #62716a); font-size: .75rem; line-height: 1.65; }
.model-panel__status:empty { display: none; }
@media (max-width: 620px) { .model-panel__body { padding-left: 0; } .model-panel__feedback { flex-direction: column; align-items: flex-start; } }
@media (max-width: 480px) { .model-panel__row { grid-template-columns: 1fr; gap: .25rem; } }

.model-panel__modes { display: inline-flex; gap: .25rem; padding: .25rem; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: .625rem; }
.model-panel__modes button { padding: .45rem .9rem; border: 0; border-radius: .375rem; background: transparent; color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; }
.model-panel__modes button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px #00000012; }
.model-panel__modes button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.model-panel__modes button:disabled { cursor: wait; opacity: .65; }
.model-panel--extended .model-panel__row { grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: .75rem; }
.model-panel--extended .model-panel__row > strong { color: var(--accent); font-size: .875rem; }
.model-panel__answer { min-width: 0; overflow-wrap: anywhere; }
.model-panel .model-panel__answer p + p { margin-top: .75rem; }
.model-panel__answer pre { white-space: pre-wrap; }
@media (prefers-reduced-motion: reduce) { .model-panel__spinner { animation: none; } }

.model-panel__run { display: block; margin-bottom: 1rem; padding: .5rem 1rem; border: 1px solid var(--accent); border-radius: .5rem; background: var(--accent); color: var(--paper, #fff); font: inherit; font-size: .8rem; cursor: pointer; }
.model-panel__run[hidden] { display: none; }
.model-panel__run:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
