:root {
    --ink: #18212f;
    --muted: #65758b;
    --line: #d7dee8;
    --panel: #ffffff;
    --wash: #f4f7fb;
    --brand: #0f6cbf;
    --brand-2: #0a8f77;
    --danger: #b42318;
    --warn: #a15c07;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--wash);
    color: var(--ink);
    line-height: 1.5;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 18px;
    justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); }
.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
}
.topbar-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nav a, .button, .topbar-right > a {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}
.nav a.primary, .button.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.profile-chip {
    display: grid;
    grid-template-columns: 34px minmax(92px, auto);
    grid-template-rows: auto auto;
    column-gap: 8px;
    align-items: center;
    min-height: 38px;
    padding: 4px 10px 4px 5px !important;
    max-width: 210px;
    text-decoration: none;
}
.profile-chip img, .profile-chip span, .profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    grid-row: 1 / span 2;
    object-fit: cover;
    display: grid;
    place-items: center;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
    overflow: hidden;
}
.profile-chip .avatar-img {
    width: 34px !important;
    height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    border-radius: 50%;
    object-fit: cover;
}
.profile-avatar.large .avatar-img {
    width: 82px !important;
    height: 82px !important;
    max-width: 82px !important;
    max-height: 82px !important;
}
.profile-chip strong {
    font-size: 13px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-chip small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
}
.profile-card { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.profile-avatar.large { width: 82px; height: 82px; font-size: 26px; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.button.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.button.good { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 18px 48px; }
.hero {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 0 16px;
    text-align: center;
}
.hero.with-profile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: center;
    text-align: left;
}
.hero.with-profile .actions { justify-content: flex-start; }
.hero h1 { margin: 0 0 12px; font-size: 40px; line-height: 1.1; letter-spacing: 0; }
.hero p { color: var(--muted); font-size: 17px; margin: 0 auto 18px; max-width: 980px; }
.hero.with-profile p { margin-left: 0; }
.hero .subtitle { color: var(--muted); font-size: 18px; font-weight: 400; margin-bottom: 18px; }
.hero-panel, .panel, .card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.hero-panel { padding: 22px; }
.hero-profile-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 16px;
    align-items: center;
}
.profile-photo {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
    font-size: 24px;
    overflow: hidden;
    text-decoration: none;
}
.profile-photo img {
    width: 86px !important;
    height: 86px !important;
    object-fit: cover;
    border-radius: 50%;
}
.profile-summary h2 { margin: 8px 0 0; font-size: 20px; line-height: 1.2; }
.profile-summary dl { margin: 0 0 14px; display: grid; gap: 8px; }
.profile-summary dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.profile-summary dd { margin: 0; font-size: 14px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel { padding: 18px; margin-bottom: 16px; }
.card { padding: 16px; }
.card h3, .panel h2, .panel h3 { margin-top: 0; }
.muted { color: var(--muted); }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 12px;
    background: #fff;
    color: var(--muted);
}
.badge.approved, .badge.published { color: #05603a; border-color: #a6f4c5; background: #ecfdf3; }
.badge.submitted { color: #1849a9; border-color: #b2ccff; background: #eff4ff; }
.badge.rejected { color: var(--danger); border-color: #fecdca; background: #fff1f3; }
.progress-bar {
    width: 150px;
    height: 8px;
    border-radius: 999px;
    background: #e5eaf2;
    overflow: hidden;
    margin: 6px 0;
}
.progress-bar span {
    display: block;
    height: 100%;
    background: var(--brand-2);
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 13px; color: var(--muted); background: #f8fafc; }
tr:last-child td { border-bottom: 0; }
label { display: block; font-weight: 700; margin: 10px 0 5px; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 11px;
    font: inherit;
    background: #fff;
}
textarea { min-height: 120px; resize: vertical; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero .actions { justify-content: center; }
.notice { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid var(--line); background: #fff; }
.notice.good { border-color: #a6f4c5; background: #ecfdf3; }
.notice.bad { border-color: #fecdca; background: #fff1f3; color: var(--danger); }
.help-box {
    border: 1px solid #b2ccff;
    background: #eff4ff;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 12px 0;
    color: #243b6b;
}
.help-box h3 { margin: 0 0 8px; font-size: 16px; }
.help-box code {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 2px 5px;
}
.help-box .examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.question {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    margin: 14px 0;
    background: #fff;
}
.option-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; }
.option-row input { width: auto; margin-top: 5px; }
.footer-bar {
    background: #fff;
    border-top: 1px solid var(--line);
    margin-top: 28px;
}
.footer-bar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 14px;
}
.footer-bar p { margin: 0; }
.footer-links { display: flex; gap: 14px; align-items: center; }
.footer-links a { color: var(--ink); font-weight: 700; }
@media (max-width: 820px) {
    .hero, .hero.with-profile, .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 30px; }
    .hero.with-profile { text-align: center; }
    .hero.with-profile .actions { justify-content: center; }
    .hero.with-profile p { margin-left: auto; }
    .hero-profile-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .topbar-inner { align-items: flex-start; flex-direction: column; }
    .topbar-right { justify-content: flex-start; }
    .footer-bar-inner { flex-direction: column; align-items: flex-start; }
}
