:root{--ink:#18212f;--muted:#627084;--line:#dfe5ec;--surface:#fff;--bg:#f5f7fa;--blue:#1769aa;--blue-dark:#0d4d80;--green:#157347;--red:#b42318;--amber:#b54708}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif;font-size:15px;line-height:1.55}.topbar{min-height:58px;height:auto;flex-wrap:wrap;gap:10px;background:#102a43;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:12px max(20px,calc((100vw - 1180px)/2));box-shadow:0 1px 3px #0002}.brand{color:#fff;text-decoration:none;font-weight:700;font-size:17px;white-space:nowrap}.brand span{font-size:11px;color:#b9d9f4;border:1px solid #4e718f;border-radius:4px;padding:1px 4px;margin-left:4px}.topbar nav{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;min-width:0}.topbar nav a,.link-button{white-space:nowrap;font:inherit;color:#d9e7f2;text-decoration:none;border:0;background:none;padding:4px;cursor:pointer}.topbar nav a:hover,.link-button:hover{color:white}.user-name{font-size:13px;border-left:1px solid #42627e;padding-left:14px}.container{max-width:1180px;margin:0 auto;padding:32px 20px 56px}.container.narrow{max-width:480px;padding-top:70px}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin:0 0 22px}.page-heading h1,.exam-header h1,.result-hero h1{font-size:28px;letter-spacing:-.5px;margin:0 0 4px}.page-heading p{margin:0}.eyebrow{font-size:12px;letter-spacing:.08em;font-weight:700;text-transform:uppercase;color:var(--blue);margin:0 0 4px}.muted,.hint{color:var(--muted)}.hint{font-size:13px;margin:.35rem 0 0}.card,.login-card{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:24px;margin:0 0 18px;box-shadow:0 1px 2px #1d2a3910}.card.compact{padding:14px 18px}.card h2{font-size:18px;margin:0 0 10px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.section-heading h2,.section-heading p{margin:0}.button-row,.action-cell{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.button{display:inline-flex;justify-content:center;align-items:center;min-height:38px;border:1px solid transparent;border-radius:7px;padding:7px 13px;text-decoration:none;cursor:pointer;font:600 14px inherit;white-space:nowrap}.button.primary{background:var(--blue);color:#fff}.button.primary:hover{background:var(--blue-dark)}.button.secondary{background:#fff;color:#274c6b;border-color:#b8c7d5}.button.small{min-height:30px;padding:4px 9px;font-size:12px}.inline{display:inline}.form-stack{display:grid;gap:16px}.form-grid{display:grid;gap:15px}.form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.form-actions{display:flex;gap:10px;margin-top:3px}label{display:grid;gap:5px;font-weight:600;font-size:14px}input,select,textarea{width:100%;border:1px solid #bfcbd8;border-radius:6px;background:#fff;color:var(--ink);font:inherit;padding:8px 9px;line-height:1.35}textarea{resize:vertical}input:focus,select:focus,textarea:focus{outline:3px solid #bde0fa;border-color:var(--blue)}fieldset{border:1px solid var(--line);border-radius:8px;margin:0;padding:16px}legend{font-weight:700;padding:0 5px}.check-row{display:flex;gap:20px;flex-wrap:wrap}.check-row label{display:block;font-weight:500}.check-row input{width:auto}.filter-row{display:flex;gap:10px}.filter-row select{width:140px}.filter-row input{max-width:380px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}.stats div{background:#eaf3fa;border:1px solid #c8e0f0;border-radius:10px;padding:17px}.stats strong{display:block;font-size:28px;color:#104a77}.stats span{color:#48657e;font-size:13px}.steps{margin:0;padding-left:22px}.steps li{padding:5px 0}.steps a{color:var(--blue)}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;min-width:650px}th{text-align:left;color:#fff;background:#244a66;font-size:13px;font-weight:600;padding:9px 11px}th:first-child{border-radius:5px 0 0 5px}th:last-child{border-radius:0 5px 5px 0}td{border-bottom:1px solid var(--line);padding:11px;vertical-align:middle}td small{display:block;color:var(--muted);margin-top:2px}.badge{display:inline-block;border-radius:999px;padding:2px 8px;font-size:12px;font-weight:700;white-space:nowrap}.badge.draft{background:#edf0f4;color:#465568}.badge.published{background:#d9f4e6;color:#12623c}.badge.closed{background:#fce8e6;color:#9a2d23}.badge.neutral{background:#e8f1f8;color:#235c85}.flash{padding:11px 13px;border-radius:8px;margin-bottom:16px;border:1px solid}.flash.success{color:#155b36;background:#e9f8ef;border-color:#b9e3c9}.flash.error{color:#8c241d;background:#feeeee;border-color:#f2c5c0}.flash.info{color:#195679;background:#e7f3fa;border-color:#c1e1f1}.empty{color:var(--muted);padding:20px 0;text-align:center}.question-list{display:grid;gap:0}.question-row{border-bottom:1px solid var(--line);padding:15px 0}.question-row:first-child{padding-top:0}.question-row:last-child{border-bottom:0;padding-bottom:0}.question-row h3{font-size:16px;margin:6px 0}.question-row p{font-size:13px;margin:5px 0}.question-meta{display:flex;gap:8px;color:var(--muted);font-size:13px;align-items:center}.link-danger{font:inherit;font-size:13px;padding:0;border:0;color:var(--red);background:none;cursor:pointer}.import-guide{background:#f4f8fb;border-left:3px solid #5ea2d6;padding:12px 15px}.import-guide h2{font-size:15px}.import-guide ul{margin:6px 0 0;padding-left:20px}.rule-grid{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:10px;align-items:center;max-width:650px}.rule-head{font-weight:700;color:#506174;font-size:13px}.exam-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.exam-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:22px;display:flex;flex-direction:column;justify-content:space-between;min-height:200px}.exam-card h2{font-size:20px;margin:10px 0 4px}.exam-card p{margin:4px 0 14px}.login-card h1{font-size:26px;margin:0 0 4px}.login-card .muted{margin-top:0}.login-card .hint{margin-top:8px}.exam-page{max-width:900px}.exam-header{display:flex;justify-content:space-between;align-items:flex-start;background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px;margin-bottom:12px}.exam-header h1{font-size:24px}.timer{background:#eef6fb;border-radius:8px;padding:8px 14px;text-align:right;min-width:130px}.timer span{display:block;font-size:12px;color:#60758a}.timer strong{font-size:24px;font-variant-numeric:tabular-nums;color:#164e78}.submit-top{float:right;margin:0 0 10px}.question-nav{clear:both;display:flex;gap:7px;flex-wrap:wrap;padding:12px 0}.question-nav a{height:29px;width:29px;border:1px solid #b9c9d6;border-radius:5px;text-align:center;line-height:28px;color:#3c566e;text-decoration:none;background:#fff}.question-nav a.answered{background:#d9f4e6;border-color:#87cfaa;color:#145f38}.paper-questions{display:grid;gap:14px}.paper-question{background:#fff;border:1px solid var(--line);border-radius:10px;padding:20px;display:grid;grid-template-columns:36px 1fr;gap:13px;scroll-margin-top:12px}.question-number span{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#e1f0fb;color:#13537d;font-weight:700}.question-number small{display:block;white-space:nowrap;color:var(--muted);font-size:11px;margin-top:5px}.question-content h2{font-size:17px;margin:0 0 12px;font-weight:600}.question-type{display:none}.options{display:grid;gap:9px}.option{display:flex;grid-template-columns:auto 22px 1fr;align-items:center;gap:9px;border:1px solid #d6e0e8;border-radius:7px;padding:10px;font-weight:400;cursor:pointer}.option:has(input:checked){border-color:#57a0d5;background:#f0f8fd}.option input{width:auto}.option b{color:#1e6091}.sticky-submit{position:sticky;bottom:12px;display:flex;justify-content:flex-end;margin-top:14px}.sticky-submit .button{box-shadow:0 3px 13px #164e7850}.result-hero{text-align:center;background:#fff;border:1px solid var(--line);border-radius:12px;padding:32px 20px;margin-bottom:18px}.score strong{font-size:55px;letter-spacing:-2px;color:#105682}.score span{font-size:18px;color:var(--muted)}.answer-review{border-top:1px solid var(--line);padding:18px 0}.answer-review:first-of-type{border-top:0}.answer-review h3{font-size:16px;margin:8px 0}.answer-review p{margin:7px 0}.answer-pill{display:inline-block;background:#f0f3f5;border-radius:5px;padding:2px 6px;margin:2px 4px 2px 0;font-size:13px}.answer-pill.correct{background:#d9f4e6;color:#145f38}.answer-review.wrong{border-left:3px solid #e79088;padding-left:12px}.answer-review.correct{border-left:3px solid #74c697;padding-left:12px}@media(max-width:700px){.topbar{padding:0 13px}.topbar nav{gap:8px}.topbar nav a{display:inline-flex}.user-name{border-left:0;padding-left:0;max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.container{padding:22px 13px 48px}.page-heading{align-items:flex-start;flex-direction:column;gap:12px}.stats{grid-template-columns:repeat(2,1fr)}.form-grid.two,.form-grid.three{grid-template-columns:1fr}.filter-row{flex-wrap:wrap}.filter-row input{max-width:none}.exam-cards{grid-template-columns:1fr}.exam-header{padding:15px}.timer{min-width:112px;padding:7px 9px}.exam-header h1{font-size:20px}.paper-question{padding:15px;grid-template-columns:28px 1fr;gap:8px}.question-number span{width:25px;height:25px}.rule-grid{grid-template-columns:1fr 1fr 1fr;font-size:13px}.card{padding:17px}.submit-top{float:none;margin-bottom:12px}.button-row{width:100%}.button-row .button{flex:1}.login-card{padding:22px}}
@media(max-width:700px){.topbar nav a.nav-import{display:inline-flex;font-weight:700;color:#fff;padding:4px 6px;border:1px solid #4e718f;border-radius:5px}}
@media(max-width:1200px){.topbar nav{width:100%;gap:8px 12px}.topbar nav a,.link-button{font-size:14px}}
.button.danger{background:var(--red);color:#fff}.button.danger:hover{background:#8c241d}.danger-card{border-color:#f0b6b0;background:#fff9f8}.danger-note{color:#8c241d}.check-label{display:flex;align-items:center;gap:8px;font-weight:500}.check-label input{width:auto}
.site-footer{max-width:1120px;margin:0 auto;padding:0 20px 28px;color:var(--muted);font-size:13px;text-align:center}.site-footer span{color:#4b657b}

/* Keep account actions visible in narrow windows without crowding the brand. */
@media(max-width:700px){
  .topbar{height:auto;min-height:58px;flex-wrap:wrap;gap:8px;padding:10px 13px}
  .topbar nav{width:100%;flex-wrap:wrap;gap:8px}
  .topbar nav a.nav-account{display:inline-flex;white-space:nowrap}
}

[hidden] { display: none !important; }
.result-filters { display:flex; flex-wrap:wrap; gap: .5rem; margin: 1rem 0; }
.result-filters [aria-pressed="true"] { background:#163c36; color:white; }

@media(max-width:700px){.topbar nav a.nav-ai{display:inline-flex;white-space:nowrap}}

/* Keep dashboard actions readable in the in-app side panel. */
@media(min-width:701px) and (max-width:1000px){.page-heading{align-items:flex-start;flex-direction:column;gap:12px}}

/* Give each learner card one consistent, touch-friendly action row. */
.exam-card-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:stretch;margin-top:4px}
.exam-card-start{display:grid;min-width:0;margin:0}
.exam-card-actions .button{width:100%;min-width:0;min-height:44px;font-family:inherit;font-size:14px;font-weight:600;line-height:1.4}
.exam-card-actions>:only-child,.exam-card-notice,.exam-card-notice+.button{grid-column:1/-1}
.exam-card-actions .exam-card-notice{margin:0;color:var(--muted)}

/* Original day/night fishing photographs, with a quiet reading surface. */
:root{--ink:#203b35;--muted:#42594f;--line:#dce5df;--bg:#edf3ef;--blue:#246d60;--blue-dark:#185346}
body{min-height:100vh;isolation:isolate}
.fishing-background{position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none;background:#e8efea}
.fishing-background img{position:absolute;top:0;width:54%;height:100%;object-fit:cover}
.fishing-day{left:0;object-position:50% 28%;mask-image:linear-gradient(90deg,#000 72%,transparent)}
.fishing-night{right:0;object-position:50% 12%;mask-image:linear-gradient(90deg,transparent,#000 28%)}
.fishing-background::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(239,246,241,.48),rgba(245,248,244,.9) 34%,rgba(245,248,244,.9) 66%,rgba(239,246,241,.48)),linear-gradient(180deg,transparent 30%,rgba(236,243,237,.64))}
.welcome-page .fishing-background::after{background:linear-gradient(90deg,rgba(234,243,238,.12),rgba(242,247,241,.62) 40%,rgba(242,247,241,.62) 60%,rgba(17,39,37,.18)),linear-gradient(180deg,transparent 55%,rgba(234,242,236,.65))}
.topbar{background-color:#214f42;background-image:linear-gradient(110deg,rgba(18,55,47,.9),rgba(31,83,68,.84) 58%,rgba(18,39,39,.9)),url('/static/images/fishing-day.jpg'),url('/static/images/fishing-night.jpg');background-size:cover,50% auto,50% auto;background-position:center,left 48%,right 33%;background-repeat:no-repeat;border-bottom:1px solid rgba(197,177,119,.65);box-shadow:0 3px 16px #183c3024}
.brand span{color:#d8e8d8;border-color:#789785;background:#ffffff0a}
.topbar nav a,.link-button{color:#edf4ed}
.topbar nav a:hover,.link-button:hover{color:#fff;background:#ffffff12;border-radius:5px}
.user-name{border-color:#809e8a}
.topbar nav a.nav-import{border-color:#7d9e88}
.container.narrow{padding-top:70px}
.workspace-page .container{background:rgba(249,251,247,.7);border-radius:0 0 18px 18px}
.card,.login-card,.exam-card,.exam-header,.paper-question,.result-hero{background:rgba(255,255,252,.97);box-shadow:0 6px 24px #234b3710}
.login-card{border-color:#ffffffb3;box-shadow:0 18px 60px #0d342c26}
.login-card .button{min-height:44px;font-family:inherit;font-size:14px;font-weight:600;line-height:1.4}
input:focus,select:focus,textarea:focus{outline-color:#c6dfcf;border-color:var(--blue)}
.button.secondary{color:#2e5d4d;border-color:#b7cbbb}
.stats div{background:rgba(235,244,236,.97);border-color:#cddfcf}
.stats strong{color:#285f4c}
.stats span{color:#526f5c}
th{background:#315e4e}
.badge.neutral{background:#e7f0e8;color:#38644f}
.score strong{color:#246d60}
.site-footer{width:fit-content;max-width:calc(100% - 26px);padding:8px 16px;margin:0 auto 24px;border:1px solid #d9e5d9;border-radius:999px;background:rgba(250,252,247,.9);color:#536c5d}
.site-footer span{color:#3b6351}
@media(max-width:700px){
  .fishing-background img{left:0;right:auto;width:100%;height:60%}
  .fishing-day{top:0;object-position:50% 32%;mask-image:linear-gradient(180deg,#000 75%,transparent)}
  .fishing-background .fishing-night{top:45%;height:55%;object-position:50% 15%;mask-image:linear-gradient(180deg,transparent,#000 30%)}
  .fishing-background::after{background:linear-gradient(180deg,rgba(241,247,241,.74),rgba(244,248,242,.92) 38%,rgba(241,247,241,.86) 60%,rgba(238,245,238,.93))}
  .workspace-page .fishing-background::after{background:linear-gradient(180deg,rgba(239,246,240,.46),rgba(239,246,240,.62) 60%,rgba(239,246,240,.78))}
  .welcome-page .fishing-background::after{background:linear-gradient(180deg,rgba(230,242,235,.3),rgba(242,247,239,.65) 43%,rgba(235,244,235,.72) 65%,rgba(235,244,235,.92))}
  .container.narrow{padding-top:36px}
  .site-footer{border-radius:14px}
}
@media(prefers-reduced-transparency:reduce){
  .fishing-background::after,.welcome-page .fishing-background::after,.workspace-page .fishing-background::after{background:rgba(241,247,241,.95)}
  .topbar{background:#214f42}
  .workspace-page .container,.card,.login-card,.exam-card,.exam-header,.paper-question,.result-hero,.site-footer{background:#fffffc}
}
