:root { font-family: system-ui, sans-serif; color: #18303a; background: #f3f6f6; }
* { box-sizing: border-box; }
body { margin: 0; }
header { background: linear-gradient(135deg,#103d47,#176c64); color: white; padding: 36px max(24px, calc((100vw - 1000px)/2)); }
header h1 { max-width: 780px; margin: 14px 0 8px; font-size: clamp(1.7rem,4vw,2.5rem); }
header p { max-width: 750px; color: #d8eeeb; line-height: 1.55; }
.brand { font-weight: 800; letter-spacing: .15em; font-size: 1.3rem; }
.brand span { font-weight: 600; font-size: .7rem; background: #c9ede0; color: #103d47; padding: 5px 8px; border-radius: 8px; vertical-align: middle; letter-spacing: .05em; }
main { max-width: 1048px; padding: 20px 24px 60px; margin: auto; }
.panel { background: #fff; border: 1px solid #d8e2e1; border-radius: 14px; padding: 22px; margin: 14px 0; box-shadow: 0 2px 10px #1d4b4410; }
h2 { margin: 0 0 18px; font-size: 1.2rem; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
label { display: block; font-weight: 600; margin-bottom: 14px; }
input,textarea,select { display: block; width: 100%; padding: 11px; border: 1px solid #acc1bd; border-radius: 8px; margin-top: 6px; font: inherit; color: inherit; background: white; }
button { background: #12695e; color: white; border: 0; border-radius: 8px; padding: 11px 16px; margin: 5px 8px 5px 0; font: inherit; font-weight: 700; cursor: pointer; }
button.secondary { background: #56666a; }
button:disabled { opacity: .42; cursor: not-allowed; }
.hint { color: #5c7074; line-height: 1.5; }
.error-text { color: #a32332; font-weight: 700; }
.flow { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; }
.flow div { padding: 13px 8px; border: 1px solid #b8cac8; border-radius: 8px; text-align: center; color: #6b7b7d; font-size: .85rem; }
.flow .active { background: #dff4ed; border-color: #3b9f85; color: #145d4b; font-weight: 700; }
.cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 16px 0; }
.card { border: 1px solid #d6e3df; border-radius: 10px; padding: 14px; background: #fbfdfc; }
.card h3 { margin: 0 0 10px; font-size: 1.05rem; }
.card p { line-height: 1.45; }
.badge { color: #88600e; background: #fff0cd; display: inline-block; padding: 4px 8px; border-radius: 6px; font-size: .75rem; font-weight: 700; }
.badge.warning { color: #a32332; background: #fde3e6; }
.badge.harvested { color: #35506b; background: #e6eef6; font-weight: 600; } /* Step 11: lesson harvested by the worker */
.actions { display: flex; flex-wrap: wrap; align-items: end; gap: 4px; }
.actions label { width: 150px; margin: 0 8px 0 0; }
#events { padding-left: 24px; }
#events li { margin: 7px 0; }
#notice { position: sticky; bottom: 10px; padding: 10px 14px; color: white; background: #1e5d56; border-radius: 8px; display: none; }
#notice.error { background: #a32332; }
#notice .notice-close { float: right; margin: -2px -6px 0 12px; padding: 0 8px; background: transparent; color: inherit; border: 0; font-size: 20px; line-height: 1.2; cursor: pointer; }
@media (max-width: 700px) { .grid.two,.cards { grid-template-columns: 1fr; } .flow { grid-template-columns: 1fr 1fr; } }
h3 { font-size: 1.05rem; margin: 18px 0 8px; }
h4 { font-size: .95rem; margin: 14px 0 6px; }
.table-wrap { overflow-x: auto; margin: 10px 0 14px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; vertical-align: top; padding: 8px 6px; border-bottom: 1px solid #e1eae8; }
th { color: #4b6266; font-weight: 700; }
td button { padding: 6px 10px; font-size: .85rem; }
details { margin: 12px 0; border: 1px solid #e1eae8; border-radius: 10px; padding: 10px 14px; }
summary { cursor: pointer; font-weight: 700; }
.card.editing { grid-column: 1 / -1; border-color: #3b9f85; }
pre { white-space: pre-wrap; }
a.button { display: inline-block; background: #12695e; color: white; border-radius: 8px; padding: 11px 16px; margin: 5px 8px 5px 0; font-weight: 700; text-decoration: none; }
