:root {
    --green: #135f4b;
    --green-light: #e9f3ee;
    --ink: #21312f;
    --muted: #73807e;
    --line: #dfe5e3;
    --bg: #f4f6f7;
    --white: #fff;
    --amber: #9b691e;
    --amber-bg: #fcf3df;
    --red: #ae3e3e;
    --shadow: 0 3px 18px #1f3d3110;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    font-size: 14px;
    font-synthesis: none
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg)
}

button,
input,
textarea,
select {
    font: inherit
}

button,
a,
input,
textarea,
select {
    -webkit-tap-highlight-color: transparent
}

button,
.button {
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    background: white;
    color: var(--ink);
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.35
}

button:hover,
.button:hover {
    border-color: #9aafa6;
    background: #f8faf9
}

button:disabled {
    opacity: .5;
    cursor: not-allowed
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid #8bb8a7;
    outline-offset: 3px
}

.primary {
    background: var(--green);
    color: white;
    border-color: var(--green)
}

.primary:hover {
    background: #0b4939;
    color: white
}

.danger {
    color: var(--red);
    border-color: #e8caca
}

.quiet {
    border-color: transparent;
    background: transparent
}

.wide {
    width: 100%;
    justify-content: space-between
}

.small {
    min-height: 36px;
    font-size: 12px;
    padding: 7px 11px
}

.icon {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round
}

a {
    color: var(--green)
}

h1,
h2,
h3,
p {
    margin-top: 0
}

h1 {
    font-size: 30px;
    letter-spacing: -.8px;
    margin-bottom: 9px;
    line-height: 1.2
}

h2 {
    font-size: 19px;
    letter-spacing: -.3px
}

h3 {
    font-size: 15px;
    margin-bottom: 7px
}

p {
    line-height: 1.65
}

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

.eyebrow {
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 1.7px;
    color: var(--muted);
    margin-bottom: 12px
}

.wordmark {
    font-size: 40px;
    letter-spacing: -3px;
    font-weight: 850;
    line-height: 1
}

.brand-dot {
    color: #61ab86
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    background: white;
    border-right: 1px solid var(--line);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    z-index: 30
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 0 10px 30px
}

.brand small {
    font-size: 9px;
    line-height: 1.65;
    letter-spacing: 1.5px;
    font-weight: 700
}

.side-label {
    font-size: 10px;
    letter-spacing: 1.3px;
    color: #929b98;
    padding: 16px 14px 8px
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 5px
}

.nav button {
    border: 0;
    justify-content: flex-start;
    color: #6b7975;
    min-height: 47px;
    padding-left: 14px;
    font-weight: 550
}

.nav button.active {
    color: var(--green);
    background: var(--green-light);
    font-weight: 700
}

.side-bottom {
    margin-top: auto;
    padding: 20px 8px 0
}

.pilot-badge {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--green);
    border: 1px solid #cfe1d8;
    padding: 5px 8px;
    border-radius: 4px
}

.pilot-badge:before,
.dot:before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #4c9875;
    border-radius: 50%;
    margin-right: 2px
}

.user-info {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line)
}

.avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e7eeeb;
    color: #34604e;
    font-size: 12px;
    font-weight: 700
}

.user-name {
    font-size: 12px;
    font-weight: 650
}

.role-name {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px
}

.workspace {
    margin-left: 240px
}

.topbar {
    min-height: 74px;
    padding: 16px 38px;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: #ffffffc9
}

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

.breadcrumb strong {
    color: var(--ink);
    font-weight: 550
}

.connection {
    font-size: 11px;
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 7px
}

.connection.offline {
    color: var(--amber)
}

main.content {
    max-width: 1250px;
    margin: auto;
    padding: 35px 38px 70px
}

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

.page-heading p {
    font-size: 13px;
    margin-bottom: 0;
    color: var(--muted)
}

.day-tag {
    font-size: 11px;
    color: var(--muted)
}

[hidden] {
    display: none !important;
}

.toolbar {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 23px
}

.toolbar label {
    margin: 0
}

.project-select {
    min-width: 300px
}

.date-select {
    width: 175px
}

.context-strip {
    display: flex;
    gap: 28px;
    background: #eaf0ed;
    border: 1px solid #dce6e0;
    border-radius: 9px;
    padding: 14px 20px;
    margin-bottom: 24px
}

.context-strip span {
    font-size: 10px;
    color: var(--muted);
    display: block;
    margin-bottom: 5px
}

.context-strip strong {
    font-size: 12px;
    font-weight: 650
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start
}

.card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 11px;
    box-shadow: 0 2px 5px #17352b02;
    margin-bottom: 20px;
    overflow: hidden
}

.card-head {
    padding: 20px 24px;
    border-bottom: 1px solid #edf0ee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px
}

.card-head h2 {
    margin: 0;
    font-size: 16px
}

.card-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px
}

.card-body {
    padding: 24px
}

.section-num {
    background: #eff4f1;
    color: var(--green);
    border-radius: 6px;
    font-size: 11px;
    padding: 6px 8px;
    margin-right: 9px;
    vertical-align: 2px
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 650;
    border-radius: 5px;
    padding: 5px 8px;
    white-space: nowrap;
    background: #eef1f3;
    color: #6c7882
}

.badge.submitted,
.badge.released {
    background: #e8f4ed;
    color: #237253
}

.badge.returned {
    background: var(--amber-bg);
    color: var(--amber)
}

.badge.pending,
.badge.draft {
    background: #f0f2f3;
    color: #77827e
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px
}

.form-grid.three {
    grid-template-columns: 1fr 1fr 1fr
}

.full {
    grid-column: 1/-1
}

label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #44534d;
    margin-bottom: 18px;
    line-height: 1.5
}

label>small {
    font-weight: 400;
    color: var(--muted);
    display: block;
    margin: 5px 0
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 13px;
    background: #fff;
    border: 1px solid #dce2de;
    border-radius: 7px;
    color: var(--ink);
    margin-top: 7px;
    outline: none;
    min-height: 46px;
    font-size: 14px;
    font-weight: 400
}

textarea {
    min-height: 112px;
    line-height: 1.65;
    resize: vertical
}

input:focus,
select:focus,
textarea:focus {
    border-color: #5a9b7d;
    box-shadow: 0 0 0 3px #eaf3ee
}

input[type=checkbox] {
    width: 18px;
    min-height: 18px;
    margin: 0;
    accent-color: var(--green)
}

.check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    cursor: pointer
}

.check-label input {
    margin-top: 2px;
    flex-shrink: 0
}

.mode-toggle {
    display: flex;
    background: #f4f6f5;
    border: 1px solid #e5e9e7;
    padding: 4px;
    border-radius: 8px;
    gap: 3px;
    margin-bottom: 22px
}

.mode-toggle button {
    flex: 1;
    border: 0;
    background: transparent;
    font-size: 12px;
    min-height: 40px;
    color: var(--muted)
}

.mode-toggle button.active {
    background: white;
    box-shadow: 0 1px 4px #19332612;
    color: var(--green)
}

.optional {
    display: flex;
    gap: 6px;
    color: var(--muted);
    font-weight: 400;
    font-size: 10px;
    margin-left: auto
}

.entry-separator {
    height: 1px;
    background: var(--line);
    margin: 10px 0 25px
}

.photo-actions {
    display: flex;
    gap: 12px
}

.photo-actions .photo-picker {
    flex: 1;
    border: 1px dashed #bacdc2;
    background: #f9fbfa;
    min-height: 76px;
    font-size: 12px
}

.photo-picker {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 14px;
    border-radius: 8px;
    color: var(--green);
    cursor: pointer;
    overflow: hidden;
}
.photo-actions .photo-picker { font-size: 16px; min-height: 60px; }
.photo-picker:focus-within { outline: 3px solid var(--green); outline-offset: 3px; }
.photo-picker .photo-native {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}

.photo-actions .icon {
    width: 23px;
    height: 23px
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin: 20px 0
}

.photo-tile {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden
}

.photo-tile img {
    width: 100%;
    height: 145px;
    object-fit: cover;
    background: #f0f2f0
}

.photo-tile .photo-meta {
    padding: 10px
}

.photo-meta label {
    font-size: 10px;
    margin-bottom: 8px
}

.photo-meta input {
    font-size: 12px
}

.photo-meta textarea {
    min-height: 65px;
    font-size: 12px
}

.photo-meta .photo-time {
    font-size: 10px;
    color: var(--muted)
}

.add-block {
    width: 100%;
    border-style: dashed;
    min-height: 52px;
    background: transparent;
    color: var(--green);
    margin-bottom: 20px
}

.aside-card {
    border: 1px solid var(--line);
    background: white;
    border-radius: 10px;
    padding: 21px;
    margin-bottom: 18px
}

.aside-card h3 {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px
}

.aside-card p {
    font-size: 12px;
    color: var(--muted)
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin: 13px 0
}

.summary-line strong {
    font-weight: 600
}

.divider {
    height: 1px;
    background: var(--line);
    margin: 19px 0
}

.save-state {
    font-size: 11px;
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 7px;
    line-height: 1.6
}

.save-state.error {
    color: var(--red)
}

.save-state.local {
    color: var(--amber)
}

.helper-step {
    display: flex;
    gap: 11px;
    margin-bottom: 15px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6
}

.helper-step .step-dot {
    font-size: 10px;
    color: var(--green);
    background: var(--green-light);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: grid;
    place-items: center
}

.aside-note {
    font-size: 11px;
    line-height: 1.7;
    color: #8b9690;
    padding: 0 5px
}

.sticky-aside {
    position: sticky;
    top: 24px
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap
}

.actions.right {
    justify-content: flex-end
}

.submission-bar {
    border-top: 1px solid var(--line);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px
}

.submission-bar p {
    font-size: 11px;
    color: var(--muted);
    margin: 0;
    max-width: 260px
}

.alert {
    padding: 14px 17px;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.65;
    margin-bottom: 20px;
    background: #eaf2ed;
    color: #275e48;
    border: 1px solid #d4e4da
}

.alert.warning {
    background: #fff7e6;
    border-color: #efe0bd;
    color: #805d20
}

.alert.error {
    background: #fdf0ee;
    border-color: #edcfca;
    color: #a4423a
}

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

.stat {
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 20px
}

.stat .stat-value {
    font-size: 29px;
    font-weight: 650;
    letter-spacing: -1px;
    margin: 13px 0 5px
}

.stat .stat-label {
    font-size: 11px;
    color: var(--muted)
}

.stat .stat-icon {
    float: right;
    color: var(--muted)
}

.company-row {
    padding: 18px 22px;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 15px
}

.company-row:first-child {
    border-top: 0
}

.company-row h3 {
    font-size: 13px;
    margin: 0 0 5px
}

.company-row p {
    font-size: 11px;
    color: var(--muted);
    margin: 0
}

.company-avatar {
    width: 32px;
    height: 34px;
    display: grid;
    place-items: center;
    background: #f0f3f1;
    color: #627a6d;
    border-radius: 6px
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px
}

.report-table th {
    font-size: 10px;
    letter-spacing: .6px;
    color: var(--muted);
    text-align: left;
    background: #f8faf9;
    font-weight: 650
}

.report-table td,
.report-table th {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line)
}

.report-table td:last-child {
    white-space: nowrap
}

.report-table tr:last-child td {
    border: 0
}

.overflow-x {
    overflow-x: auto
}

.empty {
    text-align: center;
    padding: 45px 25px;
    color: var(--muted);
    line-height: 1.7
}

.empty .icon {
    width: 35px;
    height: 35px;
    margin-bottom: 12px
}

.empty h3 {
    color: var(--ink)
}

details {
    margin: 15px 0
}

summary {
    cursor: pointer;
    font-size: 12px;
    color: var(--muted);
    padding: 8px 0
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: #152c2575;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100;
    backdrop-filter: blur(3px)
}

.modal {
    background: white;
    border-radius: 13px;
    max-width: 760px;
    width: 100%;
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 90px #0003
}

.modal-header {
    padding: 19px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px
}

.modal-header h2 {
    margin: 0;
    font-size: 18px
}

.modal-body {
    padding: 24px;
    overflow: auto
}

.modal-footer {
    padding: 15px 24px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: flex-end;
    gap: 10px
}

.preview-entry {
    border-top: 1px solid var(--line);
    padding: 18px 0
}

.preview-entry p {
    font-size: 13px;
    white-space: pre-wrap;
    overflow-wrap: anywhere
}

.preview-entry .details {
    font-size: 11px;
    color: var(--muted)
}

.selection-row {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 7px;
    margin-bottom: 9px
}

.selection-row .badge {
    float: right
}

.journal-layout {
    max-width: 840px;
    margin: 0 auto;
}
.journal-layout #journal-notes { min-height: 180px; }
.journal-layout .card-head h2 { font-size: 18px; }
.journal-layout .photo-actions .photo-picker { min-height: 52px; font-size: 16px; }
.journal-layout .photo-actions .photo-picker { flex: 1; }
.journal-preview { white-space: pre-wrap; overflow-wrap: anywhere; }
.journal-photos { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.journal-photos .photo-tile img { height: 220px; }
.journal-photos .photo-meta { padding: 16px; }

#toast {
    position: fixed;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90vw;
    padding: 13px 22px;
    background: #203f33;
    color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 300;
    display: none;
    font-size: 13px
}

.loading {
    min-height: 80vh;
    display: grid;
    place-content: center;
    text-align: center;
    font-size: 25px;
    font-weight: 700;
    line-height: 2
}

.loading span {
    font-size: 13px;
    font-weight: 400;
    color: var(--muted)
}

.mobile-brand {
    display: none
}

.auth-page {
    background: #f4f6f3
}

.auth-shell {
    max-width: 1120px;
    margin: auto;
    padding: 40px
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 15px
}

.auth-brand>span:last-child {
    font-size: 10px;
    letter-spacing: 2px;
    color: #526b5e
}

.auth-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 100px;
    align-items: center;
    margin: 65px 0
}

.auth-intro h1 {
    font-size: 44px;
    letter-spacing: -1.7px;
    line-height: 1.15;
    margin: 22px 0
}

.auth-intro p {
    color: #718077;
    font-size: 15px
}

.auth-intro small {
    color: #8b978f;
    font-size: 10px
}

.auth-card {
    background: white;
    padding: 35px;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 9px 40px #284b3410
}

.auth-card h2 {
    font-size: 26px;
    margin-bottom: 12px
}

.auth-card>.muted {
    font-size: 13px;
    margin-bottom: 25px
}

.auth-card .primary {
    margin: 10px 0 20px
}

.auth-note {
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
    border-top: 1px solid var(--line);
    padding-top: 23px;
    margin-top: 25px
}

.subtle-link {
    font-size: 12px;
    text-decoration: none
}

.auth-shell footer {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #8a978f;
    border-top: 1px solid #dce3dd;
    padding-top: 22px
}

.building-art {
    height: 175px;
    position: relative;
    margin-top: 35px;
    margin-bottom: 20px
}

.building {
    position: absolute;
    border: 1px solid #8eaf9d;
    background: repeating-linear-gradient(90deg, transparent 0, transparent 26px, #a7c0b0 27px, transparent 28px), repeating-linear-gradient(0deg, #e8efe9 0, #e8efe9 29px, #aec5b7 30px, #e8efe9 31px);
    transform: skewY(-6deg)
}

.b1 {
    width: 165px;
    height: 123px;
    left: 7px;
    bottom: 30px
}

.b2 {
    width: 160px;
    height: 91px;
    left: 173px;
    bottom: 28px;
    transform: skewY(9deg)
}

.ground-line {
    position: absolute;
    bottom: 17px;
    height: 1px;
    background: #a5c0ad;
    width: 360px
}

.building-art>span {
    position: absolute;
    bottom: 0;
    font-size: 7px;
    letter-spacing: 2px;
    color: #7e9d88
}

.errorlist {
    font-size: 12px;
    color: var(--red);
    padding-left: 15px
}

.auth-card .helptext {
    font-size: 11px;
    color: var(--muted)
}

.auth-card ul {
    font-size: 11px;
    color: var(--muted)
}

.inline-status {
    font-size: 11px;
    color: var(--muted)
}

.version-note {
    font-size: 11px;
    color: var(--muted);
    margin: 8px 0
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0)
}

.layout>div,
.layout>aside,
.card {
    min-width: 0
}

@media(min-width:1500px) {
    main.content {
        padding-top: 45px
    }

    .layout {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 28px
    }
}

@media(max-width:1150px) {
    .sidebar {
        width: 205px;
        padding: 25px 13px
    }

    .workspace {
        margin-left: 205px
    }

    .topbar {
        padding: 16px 25px
    }

    main.content {
        padding: 28px 25px 70px
    }

    .layout {
        grid-template-columns: minmax(0, 1fr) 230px;
        gap: 18px
    }

    .card-body {
        padding: 20px
    }

    .context-strip {
        gap: 20px
    }

    .project-select {
        min-width: 250px
    }

    .auth-grid {
        gap: 50px
    }
}

@media(max-width:900px) {
    .layout {
        grid-template-columns: 1fr
    }

    .sticky-aside {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px
    }

    .aside-note {
        grid-column: 1/-1
    }

    .stats {
        gap: 10px
    }

    .stat {
        padding: 15px
    }

    .auth-grid {
        gap: 30px
    }

    .auth-intro h1 {
        font-size: 34px
    }

    .company-row {
        gap: 10px;
        padding: 16px
    }

    .context-strip {
        flex-wrap: wrap
    }
}

@media(max-width:700px) {
    .sidebar {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 74px;
        padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
        border: 0;
        border-top: 1px solid var(--line);
        display: block
    }

    .sidebar .brand,
    .side-label,
    .side-bottom {
        display: none
    }

    .nav {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        gap: 0;
        height: 62px
    }

    .nav button {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 5px;
        font-size: 9px;
        padding: 8px 3px;
        min-height: 56px;
        border-radius: 7px;
        text-align: center;
        max-width: 100px
    }

    .nav .icon {
        width: 20px;
        height: 20px
    }

    .workspace {
        margin-left: 0
    }

    .topbar {
        padding: 13px 18px;
        min-height: 65px
    }

    .mobile-brand {
        display: block;
        font-size: 28px;
        font-weight: 800;
        letter-spacing: -1.5px
    }

    .breadcrumb {
        display: none
    }

    .topbar .connection {
        font-size: 10px
    }

    main.content {
        padding: 25px 17px 105px
    }

    .page-heading {
        margin-bottom: 22px;
        align-items: flex-start
    }

    .page-heading h1 {
        font-size: 26px
    }

    .page-heading p {
        font-size: 12px
    }

    .page-heading>.actions {
        display: none
    }

    .toolbar {
        gap: 12px;
        margin-bottom: 17px;
        align-items: stretch
    }

    .toolbar .project-select {
        min-width: 0;
        flex: 1 1 100%
    }

    .date-select {
        width: 100%;
        flex: 1
    }

    .toolbar .button {
        align-self: end
    }

    .context-strip {
        padding: 13px 15px;
        gap: 15px 25px;
        margin-bottom: 20px
    }

    .context-strip strong {
        font-size: 11px
    }

    .context-strip span {
        font-size: 9px
    }

    .card-head {
        padding: 17px
    }

    .card-head h2 {
        font-size: 14px
    }

    .card-body {
        padding: 18px 16px
    }

    .form-grid {
        gap: 12px
    }

    .form-grid.three {
        gap: 10px
    }

    .form-grid.three label {
        font-size: 10px
    }

    input,
    textarea,
    select {
        font-size: 16px;
        padding: 11px 10px
    }

    .mode-toggle button {
        font-size: 11px;
        padding: 8px
    }

    .card-head .badge {
        font-size: 9px
    }

    .photo-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px
    }

    .photo-actions .photo-picker {
        flex-direction: row;
        gap: 10px;
        font-size: 16px;
        min-height: 56px;
        padding: 14px 8px
    }

    .journal-photo-actions { display: grid; grid-template-columns: 1fr; }
    .journal-photo-actions .photo-picker { flex-direction: row; font-size: 16px; min-height: 56px; }
    .journal-photos { grid-template-columns: 1fr; }
    .journal-layout .primary.wide { min-height: 56px; font-size: 16px; }
    .journal-layout .card-head h2 { font-size: 17px; }
    .journal-layout #journal-notes { min-height: 120px; }
    .journal-layout .photo-tile img { height: 220px; }

    .photo-grid {
        gap: 10px
    }

    .photo-tile img {
        height: 125px
    }

    .photo-meta input,
    .photo-meta textarea {
        font-size: 16px
    }

    .sticky-aside {
        display: block
    }

    .submission-bar {
        flex-direction: column;
        align-items: stretch
    }

    .submission-bar p {
        max-width: none
    }

    .submission-bar button {
        min-height: 52px
    }

    .aside-card {
        padding: 19px
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 11px
    }

    .stat .stat-value {
        font-size: 26px;
        margin-top: 10px
    }

    .company-row {
        grid-template-columns: 26px 1fr auto;
        gap: 10px;
        padding: 17px 14px
    }

    .company-row .badge {
        grid-column: 2;
        grid-row: 2;
        justify-self: start
    }

    .company-row>button {
        grid-column: 3;
        grid-row: 1/3;
        font-size: 11px
    }

    .company-avatar {
        width: 26px;
        height: 30px
    }

    .company-row h3 {
        font-size: 12px
    }

    .company-row p {
        font-size: 10px
    }

    .report-table td,
    .report-table th {
        padding: 14px 13px
    }

    .modal-backdrop {
        padding: 0;
        align-items: flex-end
    }

    .modal {
        max-height: 95dvh;
        border-radius: 14px 14px 0 0
    }

    .modal-body {
        padding: 20px 17px
    }

    .modal-header {
        padding: 17px
    }

    .modal-footer {
        padding: 14px 17px calc(14px + env(safe-area-inset-bottom));
        flex-wrap: wrap
    }

    .auth-shell {
        padding: 25px 20px
    }

    .auth-grid {
        display: block;
        margin: 35px 0
    }

    .auth-intro {
        display: none
    }

    .auth-card {
        padding: 27px 23px
    }

    .auth-shell footer {
        gap: 20px;
        line-height: 1.6
    }

    .auth-brand .wordmark {
        font-size: 35px
    }

    #toast {
        bottom: 90px;
        font-size: 12px;
        width: max-content;
        max-width: calc(100vw - 30px)
    }

    .actions {
        gap: 8px
    }

    .photo-grid:empty {
        display: none
    }
}
