:root { --eco-green: #8bc94b; --ink: #1d1d1b; --muted: #6b6b6b; --line: #dcdcdc; --bg: #f6f7f5;
        --red: #c62828; --red-bg: #fdecea; --yellow-bg: #fff4cc; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--bg); }
.top { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px;
       background: #fff; border-bottom: 3px solid var(--eco-green); }
.top { flex-wrap: wrap; gap: 8px; }
.top .logo { height: 36px; }
.top nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.top nav form { margin: 0; }
.top nav a, .top nav button { font: inherit; color: var(--ink); background: none; border: 1px solid var(--line);
       border-radius: 6px; padding: 5px 10px; cursor: pointer; text-decoration: none; }
.top nav button.active { background: var(--eco-green); border-color: var(--eco-green); color: #fff; }
main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; }
.pdf-only { background: #fff; border-left: 4px solid var(--eco-green); padding: 10px 14px; font-weight: 600; }
.drops { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; }
@media (max-width: 700px) { .drops { grid-template-columns: 1fr; } }
.drop { display: block; background: #fff; border: 2px dashed var(--line); border-radius: 10px; padding: 18px;
        cursor: pointer; }
.drop.has-file { border-color: var(--eco-green); border-style: solid; }
.drop .title { font-weight: 700; display: block; margin-bottom: 8px; }
.drop .fname { display: block; margin-top: 8px; color: var(--muted); overflow-wrap: anywhere; }
textarea, input[type=text], input[type=password] { width: 100%; font: inherit; padding: 10px;
        border: 1px solid var(--line); border-radius: 8px; background: #fff; }
button.primary { font: inherit; font-weight: 700; background: var(--eco-green); color: #fff; border: 0;
        border-radius: 8px; padding: 10px 22px; cursor: pointer; margin-top: 10px; }
button.primary:disabled { opacity: .5; cursor: wait; }
#chat { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.bubble { background: #fff; border-radius: 10px; padding: 12px 14px; border: 1px solid var(--line); max-width: 100%; }
.bubble.user { align-self: flex-end; background: #eef7e3; border-color: #d7ebc0; max-width: 80%; }
.bubble.error { background: var(--red-bg); border-color: #f5c2c0; color: var(--red); }
.bubble.progress { color: var(--muted); font-style: italic; }
.bubble iframe { width: 100%; border: 0; min-height: 400px; }
.lesson-hint { margin-top: 10px; font-size: 0.9em; }
.lesson-box { border: 1px solid var(--line); border-radius: 6px; padding: 8px; margin-top: 6px; font-size: 0.9em; }
.lesson-box button { margin-top: 6px; }
.lesson-error { color: var(--red); margin-top: 4px; }
.usage { color: var(--red); font-size: 0.85em; margin-top: 8px; }
.clock { font-style: normal; font-variant-numeric: tabular-nums; color: var(--ink); }
.actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.actions a, .actions button { font: inherit; }
#chat-form { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
#chat-form input { flex: 1; min-width: 200px; }
.memory-entry { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
        margin: 8px 0; display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.memory-entry small { color: var(--muted); display: block; }
.login-box { max-width: 360px; margin: 80px auto; background: #fff; padding: 24px; border-radius: 12px;
        border-top: 4px solid var(--eco-green); }
.login-box img { height: 36px; margin-bottom: 14px; }
.hidden { display: none !important; }
.memory-hint { color: var(--muted); font-size: 0.9em; margin: 0 0 10px; }
