/* ProjectHub — RKALC application skin. Component rules, then responsive and print layouts. */

:root {
    --ink: #172033;
    --muted: #64748b;
    --line: #dce1e6;
    --action: #00843d;
    --amber: #aa6c2e;
    --sidebar-width: 240px;
    --sidebar-rail-width: 42px;
}

* {
    box-sizing: border-box;
}

a {
    color: inherit;
    text-decoration: none;
    outline-offset: 4px;
}

button {
    font: inherit;
    outline-offset: 4px;
    cursor: pointer;
}

    button:disabled {
        cursor: default;
    }

p {
    margin-top: 0;
    line-height: 1.7;
    color: #64748b;
}

small {
    font-size: 11px;
    color: var(--muted);
}

.muted {
    color: var(--muted);
}

.avatar {
    width: 33px;
    height: 33px;
    border-radius: 50%;
    background: #e6f0fa;
    color: #145da0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.lilac {
    background: #eeebf4;
    color: #84729e;
}

.back {
    font-size: 11px;
    color: var(--muted);
    display: block;
    margin-bottom: 28px;
}

.sidebar p {
    font-size: 11px;
}

.tree details {
    margin: 10px 0 10px 12px;
}

.tree summary {
    cursor: pointer;
}

.tree details.calc-group {
    margin: 3px 0;
}

    .tree details.calc-group > summary {
        cursor: pointer;
        list-style-position: outside;
    }

    .tree details.calc-group > a {
        display: block;
        padding-left: 18px;
        font-size: 12px;
    }

.tree a {
    display: block;
    padding: 9px 0 2px 13px;
}

.team b {
    font-size: 10px;
}

.team small {
    display: block;
    font-size: 9px;
    margin-top: 4px;
}

.avatars {
    display: flex;
}

.page-heading p {
    font-size: 12px;
    max-width: 750px;
    margin: 0;
}

.hero-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 15px;
    margin-bottom: 25px;
}

    .stats sup {
        font-size: 16px;
    }

.meter i {
    display: block;
    background: #00843d;
    height: 100%;
    border-radius: 5px;
}

.columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 23px;
    margin-bottom: 22px;
    align-items: start;
}

.wide-left {
    grid-template-columns: minmax(0,1.85fr) minmax(260px,1fr);
}

.columns > .panel {
    margin-bottom: 0;
}

.attention {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    border-bottom: 1px solid #e8edf4;
    padding: 18px 0;
}

    .attention:first-of-type {
        padding-top: 5px;
    }

    .attention:last-child {
        border: 0;
        padding-bottom: 0;
    }

    .attention > div {
        flex: 1;
    }

    .attention b {
        font-size: 12px;
    }

    .attention p {
        font-size: 11px;
        margin: 6px 0;
    }

    .attention > span:last-child {
        color: #9ba7a4;
    }

.item-icon {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.milestones {
    list-style: none;
    margin: 0;
    padding: 0 0 0 10px;
}

    .milestones li {
        border-left: 1px solid #e3e9e5;
        position: relative;
        padding: 2px 0 26px 22px;
    }

        .milestones li:last-child {
            border: 0;
            padding-bottom: 5px;
        }

        .milestones li:before {
            content: '';
            width: 8px;
            height: 8px;
            background: white;
            border: 2px solid #d8e1dd;
            border-radius: 50%;
            position: absolute;
            left: -6px;
            top: 4px;
        }

    .milestones b {
        font-size: 11px;
    }

    .milestones small {
        display: block;
        margin-top: 6px;
        font-size: 10px;
    }

.activity {
    display: flex;
    gap: 12px;
    padding: 10px 0;
}

.person {
    display: flex;
    gap: 12px;
    padding: 10px 0;
}

.activity b {
    font-size: 11px;
}

.person b {
    font-size: 11px;
}

.activity p {
    font-size: 11px;
    margin: 5px 0;
}

.person small {
    display: block;
    margin-top: 5px;
}

label {
    font-size: 12px;
    display: block;
    margin: 12px 0 8px;
}

input[type=text] {
    border: 1px solid #dbe4ef;
    background: #fbfcfe;
    border-radius: 5px;
    color: var(--ink);
    width: 100%;
    padding: 12px;
}

input:not([type]) {
    border: 1px solid #dbe4ef;
    background: #fbfcfe;
    border-radius: 5px;
    color: var(--ink);
    width: 100%;
    padding: 12px;
}

input[type=search] {
    border: 1px solid #dbe4ef;
    background: #fbfcfe;
    border-radius: 5px;
    color: var(--ink);
    width: 100%;
    padding: 12px;
}

input[type=checkbox] {
    accent-color: var(--action);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.editor-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    gap: 15px;
}

    .editor-bottom span {
        font-size: 10px;
        color: var(--muted);
    }

.date-divider {
    font-size: 10px;
    letter-spacing: 1.4px;
    color: #86978d;
    margin: 28px 0 16px;
}

.byline {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 10px;
    color: #87938d;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

blockquote {
    border-left: 3px solid #12a8c9;
    background: #f5f8fb;
    font-size: 12px;
    line-height: 1.7;
    color: #475569;
    margin: 15px 0;
    padding: 15px;
}

.link-chips {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin: 20px 0;
}

    .link-chips a {
        font-size: 10px;
        border: 1px solid var(--line);
        border-radius: 4px;
        padding: 6px 9px;
    }

.check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    line-height: 1.6;
}

    .check:has(input:checked) {
        color: #8e9c93;
        text-decoration: line-through;
    }

.tabs {
    display: flex;
    gap: 27px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
}

    .tabs button {
        background: none;
        border: 0;
        color: #87938d;
        font-size: 12px;
        padding: 13px 0;
    }

.element-status {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 10px;
    color: var(--muted);
}

.facts {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 15px;
}

    .facts small {
        display: block;
        font-size: 8px;
        letter-spacing: .6px;
        margin-bottom: 9px;
    }

.decision-grid small {
    display: block;
    font-size: 8px;
    letter-spacing: .6px;
    margin-bottom: 9px;
}

.facts b {
    font-size: 11px;
}

.facts a {
    font-size: 11px;
}

.decision-grid b {
    font-size: 11px;
}

.decision-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: 1fr 1fr;
    background: #f5f8fb;
    margin: 22px 0;
    padding: 20px;
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 11px;
}

td {
    border-bottom: 1px solid #e8edf4;
    line-height: 1.6;
    padding: 16px 12px;
}

    td small {
        display: block;
        font-size: 10px;
        margin-top: 3px;
    }

.drawing-layout {
    display: grid;
    grid-template-columns: 260px minmax(0,1fr);
    gap: 22px;
}

.drawing-row {
    background: white;
    border: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    display: block;
    width: 100%;
    color: #8b9a93;
    font-size: 10px;
    padding: 18px 12px;
}

.drawing-layout input {
    font-size: 11px;
}

.plan {
    background: #fafbf8;
    border: 1px solid #e5eae3;
    margin-top: 20px;
}

    .plan svg {
        width: 100%;
        max-height: 510px;
    }

.drawing-caption {
    text-align: center;
    font-size: 9px;
    color: #9aA69e;
    margin: 12px;
}

.drawing-comment {
    display: flex;
    gap: 15px;
    border-top: 1px solid var(--line);
    padding-top: 20px;
    font-size: 12px;
}

    .drawing-comment p {
        margin: 5px 0;
    }

.filterbar {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
}

    .filterbar select {
        width: auto;
        min-width: 200px;
        font-size: 11px;
    }

    .filterbar input {
        width: auto;
        min-width: 200px;
        font-size: 11px;
    }

    .filterbar #project-search {
        flex: 0 1 430px;
        width: 430px;
        max-width: 100%;
        min-width: 0;
    }

    .filterbar label {
        font-size: 11px;
        margin: 0;
    }

    .filterbar .muted {
        font-size: 10px;
        margin-left: auto;
    }

.kanban {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 20px;
}

.task-card h3 {
    font-size: 14px;
    margin: 13px 0 8px;
}

.task-card p {
    font-size: 11px;
}

.task-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0 15px;
}

.task-card .check {
    border-top: 1px solid var(--line);
    padding-top: 12px;
    font-size: 10px;
}

.report-item {
    display: flex;
    gap: 15px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: 17px 0;
}

    .report-item > div {
        flex: 1;
    }

    .report-item b {
        font-size: 12px;
    }

    .report-item small {
        display: block;
        margin-top: 6px;
        font-size: 10px;
    }

.project-cards {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 22px;
}

.project-card h2 {
    font-size: 19px;
}

.project-card p {
    font-size: 11px;
}

.card-bottom {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    font-size: 10px;
}

.project-card .text-button {
    margin-top: 15px;
    text-decoration: underline;
}

footer span {
    flex: 1;
}

#toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 7px;
    background: #111827;
    color: white;
    font-size: 12px;
    box-shadow: 0 8px 35px #203e3920;
    display: none;
    z-index: 99;
    padding: 13px 22px;
}

.skip {
    position: absolute;
    left: -9999px;
}

.sr-only {
    position: absolute;
    left: -9999px;
}

.skip:focus {
    left: 10px;
    top: 10px;
    z-index: 100;
    background: white;
    padding: 10px;
}

[hidden] {
    display: none !important;
}

#print-book {
    display: none;
}

.entry-body {
    white-space: pre-wrap;
}

#new-project-form {
    max-width: 550px;
}

    #new-project-form button {
        margin-top: 20px;
    }

.topmiddle .muted {
    color: #64748b;
}

.project-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #145da0;
}

.project-stage {
    font-size: 11px;
    margin-bottom: 28px;
    color: #00843d;
}

.nav-label {
    font-weight: 700;
    letter-spacing: 1.5px;
    font-size: 9px;
    color: #64748b;
    margin: 22px 10px 12px;
}

.section-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    color: inherit;
}

    .section-toggle:hover {
        color: #fff;
        background: rgba(255,255,255,.06);
    }

.section-chevron {
    display: block;
}

.sidebar-section-body {
    overflow: hidden;
    max-height: 1200px;
    opacity: 1;
    transition: max-height .35s ease, opacity .22s ease, margin .35s ease;
}

    .sidebar-section-body.section-collapsed {
        max-height: 0;
        opacity: 0;
        margin: 0;
    }

.sidebar .tree details.calc-group > summary {
    padding: 7px 10px;
    margin: 0;
    line-height: 1.35;
    list-style: none !important;
    padding-left: 10px;
}

    .sidebar .tree details.calc-group > summary::marker {
        content: '';
        display: none;
    }

.sidebar .tree summary::marker {
    content: '';
    display: none;
}

.sidebar .tree details.calc-group > summary::-webkit-details-marker {
    display: none;
}

.sidebar .tree details.calc-group > summary::before {
    content: '•';
    display: inline-block;
    width: 16px;
    color: #91a8bd;
}

.sidebar .tree details.calc-group > a {
    padding: 10px 16px;
    margin: 0;
    line-height: 1.35;
}

.sidebar .tree .calc-unavailable {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    color: rgba(247, 244, 216, .58);
    cursor: not-allowed;
}

.sidebar .tree .calc-unavailable small {
    font-size: 10px;
    white-space: nowrap;
    opacity: .8;
}

.link-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: #145da0;
    cursor: pointer;
    text-decoration: underline;
}

.link-button.danger {
    display: inline-block;
    margin-left: 10px;
    padding: 5px 9px;
    border: 1px solid #e3b4b4;
    border-radius: 5px;
    background: #fff7f7;
    color: #a52d2d;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.link-button.danger:hover,
.link-button.danger:focus {
    border-color: #b52f2f;
    background: #b52f2f;
    color: #fff;
    text-decoration: none;
}

.link-button.danger:focus-visible {
    outline: 3px solid rgba(181, 47, 47, .25);
    outline-offset: 2px;
}

.pdf-viewer {
    position: fixed;
    z-index: 2000;
    top: 12vh;
    left: 20vw;
    width: 60vw;
    min-width: 320px;
    height: 72vh;
    min-height: 280px;
    resize: both;
    overflow: hidden;
    background: #fff;
    border: 1px solid #607086;
    border-radius: 8px;
    box-shadow: 0 18px 55px rgba(15, 23, 42, .35);
}

.pdf-viewer-bar {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    color: #fff;
    background: #101827;
    cursor: move;
    user-select: none;
}

.pdf-viewer-bar a,
.pdf-viewer-bar button {
    margin-left: 14px;
    color: #fff;
}

.pdf-viewer-bar button {
    border: 0;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
}

.pdf-viewer iframe {
    width: 100%;
    height: calc(100% - 42px);
    border: 0;
}

    .sidebar .tree details.calc-group > summary:hover,
    .sidebar .tree details.calc-group > a:hover {
        background: rgba(255,255,255,.10);
        color: #fff;
        border-radius: 5px;
    }

.sidebar .tree details.calc-group details.calc-group > summary {
    padding-left: 28px;
}

.sidebar .tree details.calc-group details.calc-group > a {
    padding-left: 42px;
}

.sidebar .tree details.calc-group > details.calc-group {
    margin-left: 24px;
}

    .sidebar .tree details.calc-group > details.calc-group > summary {
        padding-left: 10px;
    }

    .sidebar .tree details.calc-group > details.calc-group > a {
        padding-left: 26px;
    }

.sidebar .tree details.calc-group details.calc-group > summary::before {
    content: '◦';
}

.hero p {
    font-size: 12px;
    color: #475569;
}

.meter {
    height: 4px;
    border-radius: 5px;
    margin-top: 15px;
    background: #e9eff5;
}

.stat-note {
    font-size: 10px;
    color: #00843d;
}

.amber-text {
    color: #946000;
}

.mini-label {
    font-weight: 700;
    letter-spacing: 1.5px;
    font-size: 9px;
    color: #64748b;
    margin: 24px 0 10px;
}

.badge.blue {
    background: #e8f2fb;
    color: #145da0;
}

.green {
    background: #e7f4eb;
    color: #00843d;
}

.blue {
    background: #e8f2fb;
    color: #145da0;
}

.milestones .done:before {
    background: #00843d;
    border-color: #00843d;
}

.milestones .current:before {
    background: #ffcd00;
    border-color: #b88e00;
}

.tree {
    font-size: 13px;
    color: #64748b;
}

.tree-element {
    color: #145da0;
}

.avatars span {
    font-size: 8px;
    border: 2px solid white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    margin-left: -6px;
    background: #e4edf8;
}

.team {
    margin-top: 30px;
    border-top: 1px solid var(--line);
    padding-top: 19px;
    display: flex;
    gap: 10px;
    align-items: center;
    border-color: #dbe4ef;
}

.report-number {
    font-size: 18px;
    color: #7a9cbc;
}

.drawing-row b {
    display: block;
    font-size: 13px;
    color: #334b68;
    margin: 7px 0;
}

footer {
    font-size: 10px;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 16px;
    margin-top: 30px;
    color: #64748b;
    padding: 24px 0;
}

.text-button {
    background: none;
    border: 0;
    font-size: 10px;
    color: #526984;
    padding: 0;
}

.integration-note {
    background: #f5f8fb;
    font-size: 10px !important;
    color: #64748b !important;
    margin: 16px 0 0;
    padding: 12px;
}

body {
    font: 14px Arial, sans-serif;
    background: #fff;
    color: #172033;
    margin: 0;
}

h2 {
    margin-top: 0;
    font-size: 16px;
    margin-bottom: 12px;
    color: #0b1220;
    font-family: Arial, sans-serif;
}

h3 {
    margin-top: 0;
    font-size: 16px;
    line-height: 1.5;
    color: #0b1220;
    font-family: Arial, sans-serif;
}

h1 {
    color: #0b1220;
    font-family: Arial, sans-serif;
    font-size: 28px;
    letter-spacing: -0.4px;
    margin: 9px 0 10px;
}

.rkalc-home:hover {
    color: #00843d;
}

.sidebar-toggle:hover {
    background: #374151;
    color: #ffcd00;
}

.sidebar-toggle:focus-visible {
    background: #374151;
    color: #ffcd00;
}

.topmiddle {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    font-size: 12px;
    color: #FFCD00;
}

.org-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00843d;
    box-shadow: none;
}

.sidebar .muted {
    color: #cbd5e1;
}

.sidebar .project-label {
    color: #ffcd00;
}

.project-stage i {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
    background: #00843d;
}

.sidebar .tree {
    font-size: 12px;
    color: #f7f4d8;
}

    .sidebar .tree a:hover {
        color: #ffcd00;
    }

.sidebar .tree-element {
    color: #ffcd00 !important;
}

.sidebar .team b {
    color: #f7f4d8;
}

.sidebar .team small {
    color: #cbd5e1;
}

.sidebar .avatars span {
    border-color: #1f2937;
    background: #374151;
    color: #ffcd00;
}

.sidebar .back:hover {
    color: #ffcd00;
}

.breadcrumbs {
    font-size: 10px;
    display: flex;
    gap: 12px;
    color: #64748b;
    margin-bottom: 23px;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.hero svg {
    width: 260px;
    opacity: .65;
    color: #526478;
    margin: -15px 10px;
}

.hero-tags span {
    font-size: 9px;
    border: 1px solid #dce6df;
    border-radius: 4px;
    background: #fff;
    border-color: #dce1e6;
    color: #526071;
    padding: 6px 9px;
}

.hero h2 {
    letter-spacing: -1px;
    color: #0b1220;
    font-size: 26px;
    margin: 13px 0 7px;
}

.secondary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    background: white;
    border: 1px solid var(--line);
    color: #00843d;
    border-color: #00843d;
    padding: 12px 17px;
}

.stats > a {
    background: white;
    border: 1px solid var(--line);
    border-radius: 4px;
    border-color: #dce1e6;
    box-shadow: none;
    padding: 22px;
}

.stats > div {
    background: white;
    border: 1px solid var(--line);
    border-radius: 4px;
    border-color: #dce1e6;
    box-shadow: none;
    padding: 22px;
}

.panel {
    background: white;
    border: 1px solid var(--line);
    margin-bottom: 22px;
    min-width: 0;
    border-radius: 4px;
    border-color: #dce1e6;
    box-shadow: none;
    padding: 23px;
}

.project-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 4px;
    border-color: #dce1e6;
    box-shadow: none;
    padding: 25px;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    border-bottom: 1px solid #e4e7eb;
    padding-bottom: 12px;
}

    .panel-title h2 {
        color: #172033;
        font-size: 15px;
        margin: 0;
    }

.panel p {
    font-size: 13px;
}

.inline-link {
    font-size: 11px;
    display: inline-block;
    margin-top: 12px;
    color: #00843d;
}

.list-link {
    font-size: 11px;
    display: block;
    border-bottom: 1px solid #e8edf4;
    color: #00843d;
    padding: 13px 0;
}

.stats strong {
    display: block;
    color: #0b1220;
    font-family: Arial, sans-serif;
    font-size: 28px;
    margin: 12px 0;
}

.stats small {
    letter-spacing: 1px;
    color: #64748b;
    font-size: 10px;
}

.stats em {
    font: 10px 'Roboto',Arial;
    color: #8a9595;
    margin-left: 7px;
    font-family: Arial, sans-serif;
}

.badge {
    display: inline-block;
    font-size: 9px;
    white-space: nowrap;
    background: #edf2f7;
    color: #536579;
    border-radius: 3px;
    padding: 5px 8px;
}

    .badge.amber {
        background: #f7f4d8;
        color: #776000;
    }

    .badge.green {
        background: #e9f5ed;
        color: #00843d;
    }

.tabs button.active {
    border-bottom: 2px solid var(--action);
    color: #00843d;
    border-color: #00843d;
}

.drawing-row.active {
    border-left: 3px solid var(--action);
    border-left-color: #145da0;
    background: #f7f4d8;
    border-color: #00843d;
}

.notice {
    border: 1px solid #dbe4ef;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.7;
    background: #f7f4d8;
    border-color: #e4dfb3;
    border-left: 3px solid #ffcd00;
    color: #625e43;
    margin: 22px 0;
    padding: 15px;
}

.kanban > .panel {
    background: #f2f4f6;
    padding: 16px;
}

.task-card {
    border: 1px solid #e1e8df;
    background: white;
    margin-top: 15px;
    border-color: #dbe4ef;
    border-radius: 4px;
    padding: 19px;
}

    .task-card .mini-label {
        font-size: 8px;
        color: #00843d;
    }

.project-art {
    height: 135px;
    display: grid;
    place-items: center;
    font-size: 70px;
    border-radius: 4px;
    background: #f2f5f4;
    color: #00843d;
    margin: 20px -5px;
}

.orange {
    color: #946000;
    background: #f7f4d8;
}

.beam-sketch {
    border: 1px solid #e8edf4;
    border-radius: 6px;
    border-color: #e3ebf5;
    background: #fafbfc;
    margin: 25px 0;
    padding: 20px;
}

.breadcrumbs b {
    font-weight: 500;
    color: #00843d;
}

th {
    font-weight: 500;
    background: #1f2937;
    color: #f7f4d8;
    font-size: 11px;
    padding: 12px;
}

input {
    font: inherit;
    outline-offset: 4px;
    border-radius: 3px !important;
}

textarea {
    font: inherit;
    outline-offset: 4px;
    border: 1px solid #dbe4ef;
    background: #fbfcfe;
    color: var(--ink);
    width: 100%;
    resize: vertical;
    line-height: 1.7;
    border-radius: 3px !important;
    padding: 12px;
}

select {
    font: inherit;
    outline-offset: 4px;
    border: 1px solid #dbe4ef;
    background: #fbfcfe;
    color: var(--ink);
    width: 100%;
    border-radius: 3px !important;
    padding: 12px;
}

.attention:hover b {
    color: #00843d;
}

body.sidebar-collapsed .sidebar {
    width: 42px;
    overflow: hidden;
    padding: 0;
}

    body.sidebar-collapsed .sidebar > * {
        visibility: hidden;
        pointer-events: none;
    }

body.sidebar-collapsed #main {
    margin-left: 42px;
}

.topbar {
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    color: #f1f5f9;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #ffffff1a;
    box-shadow: none;
    height: 50px;
    gap: 18px;
    background: #111827;
    padding: 0 8px 0 3px;
}

.rkalc-home {
    color: #ffcd00;
    white-space: nowrap;
    font-size: 18px;
}

.hub-title {
    color: #ffcd00;
    border-left: 1px solid #ffffff30;
    padding-left: 18px;
    font-size: 15px;
}

.topbar .avatar {
    border: 1px solid #3b526d;
    color: #ffcd00;
    background: #1f2937;
    border-color: #ffffff25;
    display: none;
}

.demo {
    letter-spacing: 1px;
    border-radius: 4px;
    background: none;
    border: 0;
    color: #ffcd00;
    font-size: 9px;
    margin-left: auto;
    font-weight: 700;
    padding: 8px 10px;
}

.sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    overflow: auto;
    border: 0;
    color: #f7f4d8;
    transition: width 0.22s, padding 0.22s;
    scrollbar-color: #526071 #1f2937;
    top: 42px;
    width: var(--sidebar-width);
    height: calc(100vh - 42px);
    background: #1f2937;
    padding: 18px 15px;
}

    .sidebar nav a {
        display: flex;
        align-items: center;
        gap: 8px;
        border-radius: 0;
        color: #f7f4d8;
        font-size: 14px;
        line-height: 1.4;
        margin: 2px 0;
        padding: 10px 1px;
    }

    .sidebar .section-toggle,
    .sidebar .section-toggle1 {
        min-height: 42px;
        padding: 12px 10px !important;
        border-radius: 6px;
        margin-bottom: 0 !important;
        margin-top: 0 !important;
    }

        .sidebar .section-toggle:hover,
        .sidebar .section-toggle1:hover {
            background: rgba(255,255,255,.16);
            color: #fff;
        }

    .sidebar nav a span {
        width: 17px;
        font-size: 17px;
        display: none;
    }

    .sidebar nav a.active {
        font-weight: 700;
        background: #374151;
        color: #ffcd00;
        box-shadow: none;
        padding-left: 9px;
        border-left: 3px solid #ffcd00;
    }

    .sidebar nav a:hover {
        background: #f7f4d8;
        color: #00843d;
        box-shadow: none;
        padding-left: 9px;
    }

    .sidebar nav a:focus-visible {
        box-shadow: none;
        background: #f7f4d8;
        color: #00843d;
        padding-left: 9px;
    }

    .sidebar .back {
        color: #cbd5e1;
        margin-bottom: 21px;
    }

    .sidebar .nav-label {
        color: #ffcd00;
        margin-left: 0;
    }

    .sidebar .project-stage {
        color: #f7f4d8;
        margin-bottom: 20px;
    }

    .sidebar h2 {
        font-size: 20px;
        color: #f7f4d8;
        margin: 8px 0;
    }

#main {
    max-width: none;
    transition: margin-left 0.22s;
    margin-left: var(--sidebar-width);
    padding: 66px 36px 0;
}

.sidebar .tree details {
    margin-left: 15px;
}

.sidebar .tree a {
    color: #f7f4d8;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.4;
    margin: 2px 10px;
    padding: 10px 1px;
}

/* Keep calculation navigator items visually identical to project navigation. */
.sidebar .tree a.active,
.sidebar .tree details.calc-group > summary.active {
    font-weight: 700;
    background: #374151;
    color: #ffcd00;
    box-shadow: none;
    padding-left: 9px;
    border-left: 3px solid #ffcd00;
}

.sidebar .tree a:hover,
.sidebar .tree a:focus-visible,
.sidebar .tree details.calc-group > summary:hover,
.sidebar .tree details.calc-group > summary:focus-visible {
    background: #f7f4d8;
    color: #00843d;
    box-shadow: none;
    padding-left: 9px;
    border-radius: 0;
}

.sidebar .team {
    border-color: #ffffff26;
    margin-top: 25px;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 23px;
    overflow: hidden;
    border: 1px solid #dce1e6;
    border-left: 4px solid #00843d;
    border-radius: 5px;
    box-shadow: none;
    min-height: 185px;
    background: linear-gradient(115deg, #f8fbff, #edf3f9);
    border-left-color: #145da0;
    padding: 25px 28px;
}

.eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #145da0;
}

.hero .eyebrow {
    color: #145da0;
}

.primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    color: white;
    border: 0;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 4px;
    box-shadow: none;
    font-size: 12px;
    background: linear-gradient(135deg, #145da0, #0f766e);
    padding: 12px 17px;
}

.stm-apps {
    margin-top: 20px;
}

.stm-app {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    justify-content: space-between;
}

.stm-app-default {
    border-color: var(--rk-accent, #1c7c77);
    box-shadow: 0 0 0 1px var(--rk-accent, #1c7c77);
}

.stm-app .mini-label {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--rk-accent, #1c7c77);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

    .primary:hover {
        background: #145da0;
    }

.topbar .sidebar-toggle {
    width: 46px;
    border: 1px solid #ffffff2e;
    border-radius: 5px;
    background: #111827;
    color: #ffcd00;
    font-size: 23px;
    text-align: center;
    flex-shrink: 0;
    height: 30px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    overflow: hidden;
    padding: 2px 4px;
}

.sidebar-toggle img {
    display: block;
    width: 23px;
    height: 23px;
    object-fit: contain;
}

.sidebar-toggle-arrow {
    display: block;
    font-size: 23px;
    line-height: 24px;
    color: #ffcd00;
}

/* Responsive layout. The navigation remains a dark rail when collapsed. */
@media (min-width: 1600px) {
    #main {
        padding-left: 50px;
        padding-right: 50px;
    }
}

@media (max-width: 1150px) {
    .topmiddle {
        display: none;
    }

    .hub-title {
        flex: 1;
    }

    #main {
        padding-right: 24px;
        padding-left: 24px;
    }

    .stats, .project-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .wide-left {
        grid-template-columns: 1fr;
    }

    .hero svg {
        width: 190px;
    }

    .kanban {
        gap: 10px;
    }

        .kanban > .panel {
            padding: 10px;
        }

    .drawing-layout {
        grid-template-columns: 210px minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .topbar {
        gap: 10px;
    }

    .rkalc-home {
        font-size: 15px;
    }

    .hub-title {
        font-size: 14px;
        padding-left: 12px;
    }

    .demo {
        display: none;
    }

    #main {
        padding: 63px 16px 0;
        min-width: 280px;
    }

    .breadcrumbs {
        margin-bottom: 22px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

        .page-heading .primary {
            white-space: normal;
        }

    .hero {
        padding: 20px;
    }

        .hero svg {
            display: none;
        }

    .stats {
        gap: 10px;
    }

        .stats > a, .stats > div {
            padding: 16px;
        }

        .stats em {
            display: block;
            margin: 5px 0;
        }

    .columns, .drawing-layout, .kanban, .project-cards {
        grid-template-columns: 1fr;
    }

    .facts {
        grid-template-columns: repeat(2, 1fr);
    }

    .filterbar {
        flex-wrap: wrap;
    }

        .filterbar .muted {
            margin-left: 0;
        }

    .report-item {
        gap: 8px;
    }

        .report-item .badge {
            display: none;
        }

    .panel {
        padding: 19px;
    }

    .tabs {
        gap: 18px;
    }

        .tabs button {
            font-size: 10px;
        }

    .element-status {
        flex-wrap: wrap;
    }
}

.setup-form {
    max-width: 760px;
    display: grid;
    gap: 10px
}

    .setup-form label {
        margin-top: 10px
    }

    .setup-form input, .setup-form textarea {
        width: 100%;
        box-sizing: border-box
    }

.setup-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 20px
}

    .setup-actions input {
        width: auto
    }

.setup-form textarea {
    resize: vertical
}

.team-invite-panel {
    width: 456px;
    max-width: 100%;
}

.team-members-panel,
.team-pending-panel {
    width: 60%;
}

.team-role-editor {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

    .team-role-editor select {
        flex: 0 1 220px;
        width: 220px;
        min-width: 120px;
    }

    .team-role-editor .primary {
        flex: 0 0 auto;
    }

@media (max-width: 1150px) {
    .team-members-panel,
    .team-pending-panel {
        width: 100%;
    }
}

/* Live project context */
.project-context {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 13px 17px;
    margin-bottom: 20px;
    background: #f7f4d8;
    border-left: 3px solid #ffcd00;
    color: #1f2937
}

    .project-context .eyebrow {
        font-size: 9px
    }

    .project-context b {
        font-size: 12px
    }

    .project-context > span:not(.eyebrow):not(.badge) {
        font-size: 11px;
        color: #526071
    }

    .project-context a {
        margin-left: auto;
        color: #00843d;
        font-size: 11px
    }

.live-summary {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid #dbe4ef;
    background: #f5f8fb;
    color: #526071;
    font-size: 11px
}

    .live-summary b {
        color: #145da0;
        font-size: 15px;
        margin-right: 4px
    }

.project-activity-panel {
    display: flex;
    flex-direction: column;
    max-height: 560px
}

.project-activity-scroll {
    max-height: 400px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 12px;
    margin-right: -4px;
    scrollbar-gutter: stable
}

    .project-activity-scroll:focus-visible {
        outline: 2px solid #145da0;
        outline-offset: 4px
    }

    .project-activity-panel > .inline-link {
        margin-top: 16px;
        align-self: flex-start
    }

.task-form-grid {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr auto;
    gap: 10px
}

.new-task-form {
    padding: 18px
}

    .new-task-form h2 {
        margin-bottom: 12px
    }

.live-task-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 18px;
    margin-bottom: 22px
}

.live-task-card {
    margin: 0
}

.preview-activity {
    display: none
}

/* Engineering register element workspaces */
.engineering-workspaces {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.engineering-workspace-card {
    position: relative;
    display: flex;
    min-height: 230px;
    box-sizing: border-box;
    flex-direction: column;
    padding: 24px;
    border: 1px solid #d9e2ec;
    border-radius: 18px;
    background: #fff;
    color: #172033;
    box-shadow: 0 10px 28px rgba(32, 52, 71, .06);
}

a.engineering-workspace-card {
    text-decoration: none;
}

.engineering-workspace-card.is-available {
    border-top: 4px solid #087f72;
    background: linear-gradient(145deg, #fff 55%, #e8f7f5 100%);
}

.engineering-workspace-card.is-available:hover,
.engineering-workspace-card.is-available:focus-visible {
    border-color: #087f72;
    box-shadow: 0 16px 34px rgba(20, 93, 160, .14);
    transform: translateY(-2px);
}

.engineering-workspace-card.is-planned {
    background: #f8fafc;
    color: #526071;
    box-shadow: none;
}

.engineering-workspace-card h2 {
    margin: 14px 0 8px;
    font-size: 22px;
    color: #111827;
}

.engineering-workspace-card p {
    margin: 0 0 20px;
    line-height: 1.55;
}

.workspace-status {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #edf2f7;
    color: #526071;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.is-available .workspace-status {
    background: #dff5ee;
    color: #08734f;
}

.workspace-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: #eaf1f8;
    color: #145da0;
    font-size: 23px;
}

.workspace-metrics {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding-top: 15px;
    margin-top: auto;
    border-top: 1px solid #dce7ec;
    color: #526071;
    font-size: 11px;
}

.workspace-metrics b {
    display: block;
    color: #145da0;
    font-size: 18px;
}

.workspace-open,
.workspace-planned {
    margin-top: 18px;
    font-size: 12px;
    font-weight: 700;
}

.workspace-open {
    color: #087f72;
}

.workspace-planned {
    margin-top: auto;
    color: #788697;
}

.engineering-register-note {
    max-width: none;
}

.review-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #edf2f7;
    color: #526071;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.review-status.is-needed {
    background: #fff4cc;
    color: #785b00;
}

.review-status.is-requested {
    background: #e8f1fb;
    color: #145da0;
}

.review-status.is-approved {
    background: #dff5e8;
    color: #08734f;
}

.review-status.is-changes {
    background: #fde8e7;
    color: #a33a32;
}

.review-assignee {
    display: block;
    margin-top: 5px;
    color: #697789;
}

.table-action {
    text-align: right;
    white-space: nowrap;
}

.button.compact {
    min-height: 0;
    padding: 7px 11px;
    font-size: 11px;
}

.column-register-scroll {
    max-height: 520px;
    overflow: auto;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    scrollbar-gutter: stable;
}

.column-register-table {
    margin: 0;
    min-width: 1120px;
}

.column-register-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #111827;
}

.column-register-row {
    height: 49px;
    cursor: pointer;
}

.column-register-row:hover td {
    background: #f1f7fb;
}

.person-cell {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.engineering-progress {
    position: fixed;
    z-index: 1400;
    top: 41px;
    left: 0;
    right: 0;
    height: 4px;
    overflow: visible;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}

.engineering-progress span {
    display: block;
    width: 38%;
    height: 100%;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(90deg, #145da0, #00a887, #ffcd00);
    box-shadow: 0 0 12px rgba(20, 93, 160, .4);
    animation: engineering-progress 1.05s ease-in-out infinite;
}

.engineering-progress b {
    position: absolute;
    top: 10px;
    left: 50%;
    padding: 7px 12px;
    transform: translateX(-50%);
    border: 1px solid #cbd7e2;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    box-shadow: 0 8px 22px rgba(20, 35, 52, .15);
    font-size: 11px;
    white-space: nowrap;
}

.engineering-progress.is-visible {
    opacity: 1;
}

@media print {
    .engineering-progress {
        display: none !important;
    }
}

@keyframes engineering-progress {
    from { transform: translateX(-100%); }
    to { transform: translateX(365%); }
}

.engineering-dialog {
    position: fixed;
    z-index: 1000;
    inset: 0;
    pointer-events: none;
}

.engineering-dialog-window {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: max(20px, 6.5vh);
    left: max(20px, calc(50vw - 350px));
    width: min(700px, calc(100vw - 40px));
    max-width: 700px;
    height: 87vh;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    pointer-events: auto;
    border: 1px solid #dbe4ed;
    border-radius: 18px;
    box-shadow: 0 22px 55px rgba(7, 20, 36, .25);
    background: #f7f9fc;
}

.engineering-dialog-header {
    flex: 0 0 auto;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0;
    padding: 18px 24px;
    border-bottom: 1px solid #252525;
    background: #111111;
    color: #ffffff;
    cursor: move;
    touch-action: none;
    user-select: none;
}

.engineering-dialog-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    line-height: 1.35;
}

.engineering-dialog-close {
    flex: 0 0 auto;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid #dbe4ed;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    font-size: 25px;
    line-height: 1;
    text-decoration: none;
}

.engineering-dialog-close:hover,
.engineering-dialog-close:focus-visible {
    background: #e8eef4;
}

.engineering-dialog-body {
    flex: 1 1 auto;
    min-height: 0;
    margin: 8px;
    padding: 16px 16px 20px;
    overflow-y: auto;
    border-radius: 12px;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #eef2f6;
}

.engineering-dialog-body > p:first-of-type {
    margin: 0 0 14px;
}

.dialog-section {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 20px;
    border: 1px solid #dbe4ed;
    border-radius: 12px;
    background: #fff;
}

.dialog-section h3 {
    margin: 0 0 3px;
    color: #172033;
}

.dialog-section label {
    margin-top: 2px;
    color: #334155;
    font-weight: 600;
}

.dialog-section input[type="submit"] {
    margin-top: 4px;
    width: auto;
    justify-self: start;
}

.review-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
    padding: 16px;
    border: 1px solid #dbe4ed;
    border-left: 4px solid #d19b00;
    border-radius: 12px;
    background: #fff;
}

.review-summary.is-approved {
    border-left-color: #16825d;
}

.review-summary.is-requested {
    border-left-color: #145da0;
}

.review-summary.is-changes {
    border-left-color: #b4433b;
}

.review-summary h3,
.review-summary p {
    margin: 0 0 7px;
}

.review-summary small,
.review-owner {
    color: #64748b;
}

.review-response {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #f0f7f4;
}

.review-response p {
    margin-top: 5px;
    white-space: pre-wrap;
}

.engineering-activity-scroll {
    max-height: 360px;
    overflow-y: auto;
    padding-right: 12px;
    scrollbar-gutter: stable;
}

@media (max-width: 680px) {
    .engineering-dialog-window {
        top: 10px;
        left: 10px;
        width: calc(100vw - 20px);
        height: 93vh;
        max-height: calc(100vh - 20px);
        padding: 0;
    }

    .engineering-dialog-header {
        padding-left: 18px;
        padding-right: 18px;
    }

    .engineering-dialog-body {
        padding-left: 10px;
        padding-right: 10px;
    }

    .engineering-activity-scroll {
        max-height: 300px;
    }
}

@media (max-width: 1100px) {
    .engineering-workspaces {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .engineering-workspaces {
        grid-template-columns: 1fr;
    }
}

/* Only the assembled project book is printed. */
@media print {
    body {
        background: white;
    }

    .topbar, .sidebar, .breadcrumbs, .page-heading, .columns, footer, .panel {
        display: none !important;
    }

    #main, body.sidebar-collapsed #main {
        margin: 0;
        padding: 0;
    }

    #print-book {
        display: block !important;
        color: #142b2b;
    }

        #print-book h1 {
            font-size: 30px;
        }

        #print-book section {
            break-inside: avoid;
            margin: 30px 0;
        }

        #print-book .print-label {
            letter-spacing: 2px;
            color: #a2672e;
        }

    .print-header {
        padding-bottom: 30px;
        border-bottom: 2px solid #145da0;
    }
}

/* ========================================================================== 
   RKALC THEME ALIGNMENT
   Matches the visual language used by the RKALC main site while preserving
   the existing ProjectHub layout and class names.
   ========================================================================== */

:root {
    --rk-navy: #0b1220;
    --rk-navy-2: #111827;
    --rk-blue: #145da0;
    --rk-cyan: #12a8c9;
    --rk-green: #00843d;
    --rk-amber: #ffcd00;
    --rk-ink: #172033;
    --rk-muted: #64748b;
    --rk-line: #dbe4ef;
    --rk-bg: #f5f8fb;
    --rk-card: #ffffff;
    /* Match Site.Master application chrome */
    --sidebar-width: 250px;
    --sidebar-rail-width: 42px;
    /* Existing ProjectHub tokens mapped to RKALC */
    --ink: var(--rk-ink);
    --muted: var(--rk-muted);
    --line: var(--rk-line);
    --action: var(--rk-blue);
    --amber: var(--rk-amber);
}

html,
body,
button,
input,
textarea,
select {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--rk-ink);
    background: var(--rk-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

#main {
    min-height: 100vh;
    background: radial-gradient(circle at 88% 3%, rgba(20, 93, 160, .11), transparent 27%), linear-gradient(180deg, #f8fbff 0%, #eef4f9 46%, #ffffff 100%);
}

a {
    transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

p {
    color: var(--rk-muted);
    font-size: 14px;
    line-height: 1.65;
}

small,
.muted {
    color: var(--rk-muted);
}

small {
    font-size: 12px;
}

h1,
h2,
h3 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--rk-navy);
}

h1 {
    margin: 8px 0 10px;
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

h2 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: -.02em;
}

h3 {
    margin-top: 0;
    font-size: 16px;
    line-height: 1.4;
}

/* Top application chrome — aligned directly with Site.Master */
.topbar {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    gap: 18px;
    padding: 0 15px;
    color: #F7F4D8;
    background-color: #111827;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.rkalc-home {
    color: #FFCD00;
    white-space: nowrap;
    font-size: 20px;
    font-weight: 400;
    line-height: 20px;
}

    .rkalc-home:hover,
    .rkalc-home:focus-visible {
        color: #00843D;
        text-decoration: none;
    }

.hub-title {
    color: #ffcd00;
    font-weight: 700;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    padding-left: 18px;
    font-size: 14px;
    font-weight: 400;
}

.topmiddle {
    color: #F7F4D8;
    font-size: 14px;
}

    .topmiddle .muted {
        color: #F7F4D8;
        opacity: .78;
    }

.demo {
    margin-left: auto;
    padding: 15px;
    border: 0;
    border-radius: 0;
    background: none;
    color: #FFCD00;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
}

    .demo:hover,
    .demo:focus-visible {
        background-color: #F7F4D8;
        color: #00843D;
        text-decoration: none;
    }

.topbar .avatar {
    display: none;
}

/* Site.Master navigation toggle */
.topbar .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: auto;
    height: 38px;
    padding: 0 5px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 5px;
    background: #111827;
    color: #FFCD00;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.sidebar-toggle img {
    display: block;
    width: auto;
    height: 24px;
    object-fit: contain;
}

.sidebar-toggle-arrow {
    display: inline-block;
    color: #FFCD00;
    font-size: 22px;
    line-height: 1;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus,
.sidebar-toggle:focus-visible {
    background: #374151;
    color: #FFCD00;
    border-color: rgba(255, 255, 255, 0.18);
    outline: none;
}

/* Sidebar — aligned directly with Site.Master */
.sidebar {
    width: var(--sidebar-width);
    box-sizing: border-box;
    position: fixed;
    top: 50px;
    bottom: auto;
    left: 0;
    z-index: 950;
    height: calc(100vh - 50px);
    padding: 15px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 0;
    color: #F7F4D8;
    background-color: #1F2937;
    background-image: none;
    scrollbar-color: #526071 #1F2937;
    transition: width 0.22s ease, padding 0.22s ease, box-shadow 0.22s ease;
}

    .sidebar .back {
        color: #F7F4D8;
        font-size: 14px;
        margin-bottom: 20px;
    }

        .sidebar .back:hover,
        .sidebar .back:focus-visible {
            color: #00843D;
            background-color: #F7F4D8;
            text-decoration: none;
        }

    .sidebar .project-label {
        color: #FFCD00;
    }

    .sidebar .nav-label {
        margin: 10px 0 10px;
        color: #FFCD00;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 1.2px;
    }

    .sidebar h2 {
        margin: 8px 0;
        color: #F7F4D8;
        font-size: 20px;
        line-height: 1.2;
    }

    .sidebar p,
    .sidebar .project-stage,
    .sidebar .tree,
    .sidebar .tree a {
        font-size: 12px;
    }

    .sidebar .project-stage,
    .sidebar .tree {
        color: #F7F4D8;
    }

        .sidebar .tree a {
            color: #F7F4D8;
            border-radius: 0;
        }

            .sidebar .tree a:hover,
            .sidebar .tree a:focus-visible,
            .sidebar .tree-element {
                color: #00843D !important;
                background-color: #F7F4D8;
                text-decoration: none;
            }

    /* ProjectHub navigation items use the same treatment as Site.Master .nav-link */
    .sidebar nav a {
        display: block;
        width: 100%;
        margin: 0;
        padding: 9px 10px;
        border: 0;
        border-radius: 0;
        color: #F7F4D8;
        background: transparent;
        font-size: 13px;
        font-weight: 400;
        line-height: 1.4;
        transition: color 0.3s, background-color 0.3s;
    }

    .sidebar nav a {
        padding-top: 9px;
        padding-bottom: 9px;
        line-height: 1.4;
    }

    .sidebar .section-toggle {
        margin-top: 30px;
        margin-bottom: 18px;
        padding-top: 0;
        padding-bottom: 0;
    }

    .sidebar nav a span {
        width: auto;
        font-size: inherit;
    }

    .sidebar nav a:hover,
    .sidebar nav a:focus,
    .sidebar nav a:focus-visible,
    .sidebar nav a.active {
        padding-left: 8px;
        border-left: 0;
        box-shadow: none;
        background-color: #F7F4D8;
        color: #00843D;
        text-decoration: none;
        outline: none;
    }

    .sidebar nav a.active {
        font-weight: 600;
    }

    .sidebar .team {
        border-color: rgba(255, 255, 255, 0.18);
    }

        .sidebar .team b {
            color: #F7F4D8;
            font-size: 13px;
        }

        .sidebar .team small {
            color: #F7F4D8;
            opacity: .76;
            font-size: 10px;
        }

    .sidebar .avatars span {
        border-color: #1F2937;
        background: #374151;
        color: #FFCD00;
    }

body:not(.sidebar-collapsed) .sidebar {
    box-shadow: 8px 0 18px rgba(0, 0, 0, 0.22);
}

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-rail-width);
    padding: 0;
    box-shadow: none;
}

body.sidebar-collapsed #main {
    margin-left: var(--sidebar-rail-width);
}

/* Main content */
#main {
    padding-top: 66px;
}

.breadcrumbs {
    margin-bottom: 20px;
    color: var(--rk-muted);
    font-size: 11px;
}

    .breadcrumbs b {
        color: var(--rk-blue);
        font-weight: 700;
    }

.page-heading {
    margin-bottom: 24px;
}

    .page-heading p {
        max-width: 780px;
        color: #475569;
        font-size: 14px;
        line-height: 1.65;
    }

/* Hero */
.hero {
    min-height: 190px;
    margin-bottom: 26px;
    padding: 28px 30px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .24);
    border-left: 4px solid var(--rk-blue);
    border-radius: 20px;
    background: radial-gradient(circle at 90% 15%, rgba(18, 168, 201, .14), transparent 28%), linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(238, 244, 249, .96));
    box-shadow: 0 18px 46px rgba(15, 23, 42, .06);
}

    .hero .eyebrow,
    .eyebrow {
        color: var(--rk-blue);
        font-size: 11px;
    }

    .hero h2 {
        margin: 12px 0 8px;
        color: var(--rk-navy);
        font-size: clamp(25px, 2.5vw, 32px);
        line-height: 1.08;
        letter-spacing: -.035em;
    }

    .hero p {
        max-width: 760px;
        color: #475569;
        font-size: 14px;
        line-height: 1.65;
    }

    .hero svg {
        color: var(--rk-blue);
        opacity: .58;
    }

.hero-tags {
    gap: 9px;
}

    .hero-tags span,
    .link-chips a {
        border: 1px solid rgba(148, 163, 184, .30);
        border-radius: 999px;
        background: rgba(255, 255, 255, .88);
        color: #334155;
        font-size: 11px;
        font-weight: 700;
        box-shadow: 0 5px 16px rgba(15, 23, 42, .03);
    }

/* Buttons */
.primary,
.secondary {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--rk-blue), #0f766e);
    box-shadow: 0 12px 26px rgba(20, 93, 160, .20);
}

    .primary:hover,
    .primary:focus-visible {
        transform: translateY(-1px);
        background: linear-gradient(135deg, #174f88, #0d6b64);
        box-shadow: 0 15px 30px rgba(20, 93, 160, .25);
    }

.secondary {
    color: var(--rk-blue);
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(20, 93, 160, .26);
}

    .secondary:hover,
    .secondary:focus-visible {
        transform: translateY(-1px);
        background: #ffffff;
        border-color: rgba(20, 93, 160, .48);
        box-shadow: 0 9px 22px rgba(15, 23, 42, .06);
    }

/* Shared action buttons */
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--rk-blue), #0f766e);
    box-shadow: 0 12px 26px rgba(20, 93, 160, .20);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
    color: #ffffff;
    background: linear-gradient(135deg, #174f88, #0d6b64);
    box-shadow: 0 15px 30px rgba(20, 93, 160, .25);
    text-decoration: none;
}

.button:disabled,
.button[aria-disabled="true"] {
    opacity: .55;
    transform: none;
    box-shadow: none;
}

.button.compact {
    min-height: 0;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 11px;
}

.text-button,
.inline-link,
.list-link,
.project-context a {
    color: var(--rk-blue);
}

.text-button {
    font-size: 12px;
    font-weight: 700;
}

.inline-link,
.list-link {
    font-size: 12px;
    font-weight: 700;
}

    .attention:hover b,
    .inline-link:hover,
    .list-link:hover,
    .text-button:hover,
    .project-context a:hover {
        color: #0f766e;
    }

/* Cards and panels */
.panel,
.project-card,
.stats > a,
.stats > div,
.task-card {
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(148, 163, 184, .24);
    box-shadow: 0 14px 38px rgba(15, 23, 42, .055);
}

.panel {
    padding: 24px;
    border-radius: 18px;
}

.project-card {
    padding: 25px;
    border-radius: 18px;
}

.stats > a,
.stats > div {
    padding: 22px;
    border-radius: 16px;
}

    .stats > a:hover {
        transform: translateY(-2px);
        border-color: rgba(20, 93, 160, .32);
        box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
    }

.panel-title {
    margin-bottom: 18px;
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(148, 163, 184, .22);
}

    .panel-title h2 {
        color: var(--rk-navy);
        font-size: 17px;
        font-weight: 800;
        letter-spacing: -.015em;
    }

.panel p,
.project-card p {
    font-size: 13px;
    line-height: 1.65;
}

.project-card h2 {
    color: var(--rk-navy);
    font-size: 19px;
}

.project-art {
    border-radius: 14px;
    background: linear-gradient(135deg, #f8fbff, #eef4f9);
    color: var(--rk-blue);
}

.project-art-model {
    overflow: hidden;
}

.project-art-model img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.project-art-model img[hidden] {
    display: none;
}

/* Statistics */
.stats {
    gap: 18px;
    margin-bottom: 26px;
}

    .stats strong {
        margin: 10px 0 8px;
        color: var(--rk-navy);
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        font-size: 30px;
        line-height: 1;
    }

    .stats small {
        color: var(--rk-muted);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .stats em,
    .stat-note {
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        font-size: 11px;
    }

.stat-note {
    color: var(--rk-green);
    font-weight: 700;
}

.meter {
    height: 6px;
    border-radius: 999px;
    background: #e7edf4;
}

    .meter i {
        border-radius: 999px;
        background: linear-gradient(90deg, var(--rk-blue), var(--rk-cyan));
    }

/* Badges and status colours */
.badge {
    padding: 5px 9px;
    border-radius: 999px;
    background: #edf2f7;
    color: #475569;
    font-size: 10px;
    font-weight: 800;
}

    .badge.blue,
    .blue {
        background: rgba(20, 93, 160, .10);
        color: var(--rk-blue);
    }

    .badge.green,
    .green {
        background: rgba(0, 132, 61, .10);
        color: var(--rk-green);
    }

    .badge.amber,
    .orange {
        background: rgba(255, 205, 0, .15);
        color: #806600;
    }

.amber-text {
    color: #806600;
}

.avatar {
    width: 36px;
    height: 36px;
    background: rgba(20, 93, 160, .10);
    color: var(--rk-blue);
    font-size: 11px;
    font-weight: 800;
}

.lilac {
    background: #f1edfa;
    color: #715f92;
}

/* Lists, milestones and activity */
.attention {
    padding: 17px 0;
    border-bottom-color: #e8eef5;
}

    .attention b,
    .report-item b {
        color: var(--rk-navy);
        font-size: 13px;
    }

    .attention p,
    .activity p {
        font-size: 12px;
    }

.item-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
}

.activity b,
.person b,
.milestones b {
    font-size: 12px;
}

.activity,
.person {
    gap: 13px;
    padding: 11px 0;
}

.milestones li {
    border-left-color: #dbe4ef;
    padding-bottom: 24px;
}

    .milestones li::before {
        border-color: #cbd5e1;
    }

.milestones .done::before {
    background: var(--rk-green);
    border-color: var(--rk-green);
}

.milestones .current::before {
    background: var(--rk-amber);
    border-color: #d2a900;
    box-shadow: 0 0 0 4px rgba(255, 205, 0, .14);
}

.milestones small {
    font-size: 11px;
}

/* Forms */
label {
    margin: 13px 0 7px;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

input[type=text],
input:not([type]),
input[type=search],
input[type=email],
input[type=password],
input[type=tel],
input[type=url],
input[type=number],
input[type=date],
input[type=datetime-local],
input[type=time],
input[type=month],
input[type=week],
textarea,
select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--rk-line);
    border-radius: 10px !important;
    background: #ffffff;
    color: var(--rk-ink);
    font-family: inherit;
    font-size: 13px;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

    input[type=text]:focus,
    input:not([type]):focus,
    input[type=search]:focus,
    input[type=email]:focus,
    input[type=password]:focus,
    input[type=tel]:focus,
    input[type=url]:focus,
    input[type=number]:focus,
    input[type=date]:focus,
    input[type=datetime-local]:focus,
    input[type=time]:focus,
    input[type=month]:focus,
    input[type=week]:focus,
    textarea:focus,
    select:focus {
        outline: none;
        border-color: rgba(20, 93, 160, .55);
        box-shadow: 0 0 0 3px rgba(20, 93, 160, .10);
        background: #ffffff;
    }

input[type=checkbox] {
    width: 16px;
    height: 16px;
    accent-color: var(--rk-green);
}

.editor-bottom span,
.date-divider,
.byline,
.element-status,
.filterbar .muted {
    font-size: 11px;
}

/* Tabs */
.tabs {
    gap: 28px;
    border-bottom-color: var(--rk-line);
}

    .tabs button {
        color: var(--rk-muted);
        font-size: 13px;
        font-weight: 700;
    }

        .tabs button.active {
            color: var(--rk-blue);
            border-bottom-color: var(--rk-blue);
        }

/* Tables */
table {
    font-size: 12px;
}

th {
    padding: 12px 13px;
    background: var(--rk-navy-2);
    color: #e5edf7;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
}

td {
    padding: 14px 13px;
    border-bottom-color: #e8eef5;
}

    td small {
        font-size: 11px;
    }

/* Notices and contextual information */
.notice,
.project-context {
    border-radius: 12px;
    background: rgba(255, 205, 0, .10);
    border: 1px solid rgba(255, 205, 0, .26);
    border-left: 4px solid var(--rk-amber);
    color: #5f5634;
}

.notice {
    padding: 15px 17px;
    font-size: 12px;
}

.project-context {
    padding: 13px 16px;
}

.live-summary,
.integration-note,
.decision-grid {
    background: #f8fafc;
    border-color: var(--rk-line);
}

.live-summary {
    border-radius: 12px;
    font-size: 12px;
}

    .live-summary b {
        color: var(--rk-blue);
    }

.integration-note {
    border-radius: 10px;
    font-size: 11px !important;
}

blockquote {
    border-left-color: var(--rk-cyan);
    border-radius: 0 10px 10px 0;
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
}

/* Drawing workspace */
.drawing-row {
    padding: 16px 13px;
    background: #ffffff;
    border-bottom-color: var(--rk-line);
    color: var(--rk-muted);
    font-size: 11px;
}

    .drawing-row b {
        color: #334155;
        font-size: 12px;
    }

    .drawing-row.active {
        border-left: 3px solid var(--rk-blue);
        background: rgba(20, 93, 160, .06);
    }

.plan,
.beam-sketch {
    border-color: var(--rk-line);
    border-radius: 14px;
    background: #fbfdff;
}

.drawing-caption {
    color: var(--rk-muted);
    font-size: 10px;
}

/* Kanban */
.kanban > .panel {
    background: rgba(241, 245, 249, .72);
    border-radius: 18px;
}

.task-card {
    margin-top: 14px;
    padding: 18px;
    border-radius: 14px;
}

    .task-card h3 {
        color: var(--rk-navy);
        font-size: 15px;
    }

    .task-card p {
        font-size: 12px;
    }

    .task-card .mini-label {
        color: var(--rk-blue);
        font-size: 10px;
    }

.check {
    font-size: 12px;
}

/* Footer */
footer {
    padding: 24px 0;
    color: var(--rk-muted);
    border-top-color: var(--rk-line);
    font-size: 11px;
}

#toast {
    padding: 13px 20px;
    border-radius: 12px;
    background: var(--rk-navy-2);
    color: #ffffff;
    font-size: 12px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .22);
}

/* Responsive refinements for the RKALC skin */
@media (max-width: 760px) {
    .topbar {
        height: 54px;
    }

    #main {
        padding-top: 70px;
    }

    .hero {
        border-radius: 16px;
        padding: 22px;
    }

    .panel,
    .project-card {
        border-radius: 15px;
    }

    .stats > a,
    .stats > div {
        border-radius: 14px;
    }
}

/* Print remains deliberately plain and engineering-document friendly. */
@media print {
    body,
    #main {
        background: #ffffff !important;
    }

    #print-book {
        color: var(--rk-ink);
        font-family: Arial, Helvetica, sans-serif;
    }

    .print-header {
        border-bottom-color: var(--rk-blue);
    }

    #print-book .print-label {
        color: var(--rk-blue);
    }
}

/* PROJECTHUB EDIT ZONE: header and sidebar refinements */
.topbar .account-nav .hub-title {
    color: #ffcd00 !important;
    font-weight: 700 !important;
}

.topbar .topmiddle {
    color: #ffcd00 !important;
    font-weight: 700 !important;
}

.sidebar .section-toggle,
.sidebar .section-toggle1 {
    min-height: 42px;
    margin-bottom: 0 !important;
    padding: 12px 10px !important;
}

.sidebar .section-toggle:hover,
.sidebar .section-toggle1:hover {
    background: rgba(255, 255, 255, .16) !important;
    color: #fff !important;
}

/* The responsive master is shared by desktop and mobile. */
@media (max-width: 760px) {
    .topbar {
        display: grid;
        grid-template-columns: auto auto minmax(0, 1fr) auto;
        gap: 8px;
        height: 54px;
        padding: 0 10px !important;
    }

    .topbar .rkalc-home {
        display: none;
    }

    .topbar .sidebar-toggle {
        grid-column: 1;
    }

    .topbar .hub-title {
        min-width: 0;
        margin-left: 0 !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar > .hub-title {
        grid-column: 2;
    }

    .topbar .topmiddle {
        display: none;
    }

    .topbar .account-nav {
        grid-column: 4;
        gap: 8px;
        min-width: 0;
    }

    .topbar .account-nav .hub-title {
        font-size: 12px;
    }

    .topbar .account-nav .hub-title:first-child,
    .topbar .account-separator {
        display: none;
    }

    .sidebar,
    body:not(.sidebar-collapsed) .sidebar {
        width: min(86vw, 300px);
        box-shadow: 12px 0 30px rgba(15, 23, 42, .24);
    }

    body.sidebar-collapsed .sidebar {
        width: 0;
        padding-left: 0;
        padding-right: 0;
        border: 0;
        overflow: hidden;
    }

    #main,
    body.sidebar-collapsed #main {
        width: 100%;
        margin-left: 0;
        padding: 70px 14px 28px;
    }

    .breadcrumbs {
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .hero,
    .panel,
    .project-card {
        padding-left: 16px;
        padding-right: 16px;
    }

    .columns,
    .stats,
    .project-grid,
    .kanban {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    input,
    select,
    textarea,
    button {
        max-width: 100%;
    }

    table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
