:root {
  color: #17221d; background: #f4f6f1; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none; --green: #176b4d; --green-dark: #10523b; --ink-soft: #607068; --line: #dbe2dc;
  --blue: #2d6cdf; --orange: #e86f32;
}
* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 10% 0%, #fff 0, transparent 32%), #f4f6f1; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
.shell { width: min(1480px, 100%); height: 100dvh; margin: 0 auto; padding: 18px clamp(36px, 8vw, 128px) 20px; display: flex; flex-direction: column; }
.page-header { display: flex; flex: none; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 15px; }
.eyebrow { color: var(--green); text-transform: uppercase; font-size: 12px; letter-spacing: .14em; font-weight: 800; margin: 0 0 7px; }
h1 { font-family: Georgia, serif; font-size: clamp(24px, 3.4vw, 38px); line-height: 1; letter-spacing: -.025em; margin: 0; font-weight: 500; }
.subtitle { color: var(--ink-soft); margin: 10px 0 0; font-size: 15px; }
.status { flex: none; display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.75); padding: 8px 12px; border-radius: 999px; }
.status span { width: 8px; height: 8px; border-radius: 50%; background: #d69b25; box-shadow: 0 0 0 4px #f8ebca; }
.status.ready span { background: #2c9b68; box-shadow: 0 0 0 4px #d9f0e5; }.status.error span { background: #c74848; box-shadow: 0 0 0 4px #f5dddd; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 22px; align-items: stretch; flex: 1; min-height: 0; }
.plot-card, .control-card { background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 35px rgba(38,57,47,.07); }
.plot-card { padding: 16px; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.plot-toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 13px; }
h2 { margin: 0; font-size: 15px; letter-spacing: -.01em; }.plot-toolbar p { margin: 5px 0 0; font-size: 12px; color: var(--ink-soft); }
.legend { display: flex; gap: 14px; font-size: 11px; color: var(--ink-soft); white-space: nowrap; padding-top: 2px; }.legend span { display: flex; gap: 6px; align-items: center; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }.dot-a { background: var(--blue); }.dot-b { background: var(--orange); }
.batch-ring { display: inline-block; width: 12px; height: 12px; border: 2px solid #d29400; border-radius: 50%; background: rgba(255,202,58,.28); }
.canvas-wrap { position: relative; min-height: 0; flex: 1; border: 1px solid #d7dfd9; border-radius: 9px; overflow: hidden; background: #fbfcfa; }
#plot { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.empty-hint { pointer-events: none; position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%); color: #77847d; background: rgba(255,255,255,.88); border: 1px solid var(--line); padding: 9px 13px; border-radius: 7px; font-size: 12px; white-space: nowrap; }
.plot-footer { display: flex; gap: 18px; color: var(--ink-soft); font-size: 11px; padding: 12px 2px 0; }.plot-footer span + span { border-left: 1px solid var(--line); padding-left: 18px; }
.control-card { overflow: hidden; align-self: stretch; min-height: 0; }.control-section { padding: 16px 20px 18px; border-bottom: 1px solid var(--line); }.control-section:last-child { border-bottom: 0; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 7px; border-bottom: 1px solid var(--line); background: #f7f9f6; }.tab { border: 0; color: var(--ink-soft); background: transparent; padding-inline: 5px; }.tab.active { color: var(--green); background: white; box-shadow: 0 1px 4px rgba(20,50,35,.12); }.tab-panel { display: none; }.tab-panel.active { display: block; height: calc(100% - 51px); overflow-y: auto; }
.usage-section h2 { margin: 4px 0 10px; }.usage-section h2:not(:first-child) { margin-top: 24px; }.usage-section ol, .usage-section ul { margin: 0; padding-left: 20px; color: #526159; font-size: 11px; line-height: 1.55; }.usage-section li { margin-bottom: 10px; }.usage-section strong { color: #2d3b33; }
.examples-section > h2 { margin: 4px 0 5px; }.examples-intro { color: var(--ink-soft); font-size: 10px; line-height: 1.45; margin: 0 0 14px; }.example-card { border: 1px solid var(--line); border-radius: 9px; padding: 11px; background: white; margin-bottom: 10px; }.example-button { width: 100%; color: var(--green); background: #edf5f0; border-color: #b9d1c4; text-align: left; }.example-button:hover { background: #e1efe7; }.example-card p { margin: 8px 2px 1px; color: #59685f; font-size: 10px; line-height: 1.5; }
.train-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }.train-heading span { color: var(--ink-soft); font-size: 10px; }
.metrics-panel { margin-bottom: 15px; border: 1px solid var(--line); border-radius: 9px; padding: 10px; background: white; }.metrics-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }.metrics-heading > div { color: var(--ink-soft); font-size: 9px; display: flex; align-items: center; gap: 5px; }.metric-key { width: 13px; height: 3px; display: inline-block; border-radius: 2px; margin-left: 6px; }.loss-key { background: #8b5cf6; }.accuracy-key { background: #159267; }#metrics-chart { display: block; width: 100%; height: 135px; }
.parameter-panel { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #f8faf7; }
.parameter-block { padding: 12px; }.parameter-block + .parameter-block { border-top: 1px solid var(--line); }.parameter-block > span { display: block; color: #435149; font-size: 11px; font-weight: 800; }.parameter-block small { display: block; color: var(--ink-soft); font-size: 9px; margin: 3px 0 9px; }
.parameter-block code { display: block; color: #35433b; font: 10px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }.parameter-block.update-values { background: rgba(255,202,58,.08); }.update-values code { color: #775b12; }
.history-buttons { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 7px; margin-top: 12px; }.history-buttons .primary { padding: 9px; }
.animation-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 7px; }.animation-buttons #animate { color: var(--green); border-color: #a9c7b8; }.animation-buttons #pause:not(:disabled) { color: #9a5e18; border-color: #d7bc94; }
.section-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }.section-heading > span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e4eee8; color: var(--green); font-size: 11px; font-weight: 800; }
.additional-options-section .section-heading { margin-bottom: 10px; }.additional-options-section .field-grid label { margin-top: 0; }
label { display: block; color: #53635b; font-size: 11px; font-weight: 700; margin: 12px 0 6px; }
.inline-field { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 10px; }.inline-field label { margin: 0; }.inline-field select { min-width: 0; }
select, input { width: 100%; border: 1px solid #ccd6cf; border-radius: 7px; background: #fff; color: #26332d; padding: 9px 10px; outline: none; font-size: 12px; }
select:focus, input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,107,77,.1); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.segment { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #ccd6cf; border-radius: 8px; padding: 3px; gap: 3px; }
.label-button { display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: transparent; color: #53635b; padding: 8px; border-radius: 5px; font-size: 12px; }.label-button.active { background: #edf2ee; color: #1f2d26; box-shadow: 0 1px 3px rgba(0,0,0,.09); font-weight: 700; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }button { border-radius: 7px; padding: 9px 12px; border: 1px solid transparent; font-size: 12px; font-weight: 700; transition: .15s ease; }
.button-row.data-buttons { grid-template-columns: repeat(3, 1fr); }
button:disabled { opacity: .48; cursor: not-allowed; }.secondary { background: #fff; border-color: #ccd6cf; color: #44534b; }.secondary:hover:not(:disabled) { background: #f1f4f1; }.danger { color: #a84942; }.full { width: 100%; margin-top: 8px; }
.primary { width: 100%; background: var(--green); color: white; display: flex; justify-content: center; align-items: center; position: relative; padding: 11px; }.primary:hover:not(:disabled) { background: var(--green-dark); transform: translateY(-1px); }.shortcut { position: absolute; right: 10px; padding: 2px 5px; background: rgba(255,255,255,.15); border-radius: 4px; font-size: 9px; font-weight: 500; }
.help, .message { color: var(--ink-soft); font-size: 10px; line-height: 1.45; margin: 8px 0 0; }.message.error { color: #ad3f3f; }.message.success { color: var(--green); }.train-section { background: #fbfcfa; }
@media (max-width: 900px) { html, body { height: auto; overflow: auto; }.shell { height: auto; min-height: 100dvh; }.workspace { grid-template-columns: 1fr; }.canvas-wrap { min-height: 470px; }.control-card { min-height: 480px; }.page-header { align-items: start; }.status { margin-top: 5px; } }
@media (max-width: 560px) { .shell { padding: 22px 24px 32px; }.page-header { display: block; }.status { margin-top: 16px; width: max-content; }.plot-toolbar { display: block; }.legend { margin-top: 12px; }.canvas-wrap { min-height: 390px; }.plot-footer { gap: 8px; flex-wrap: wrap; }.plot-footer span + span { padding-left: 8px; }.shortcut { display: none; } }
