:root {
    --bg: #080a0c;
    --bg-elevated: #0c0f12;
    --bg-soft: #101418;
    --line: rgba(210, 225, 230, 0.14);
    --line-strong: rgba(210, 225, 230, 0.28);
    --text: #e6ecef;
    --muted: #8a969f;
    --accent: #2ec4b6;
    --accent-dim: rgba(46, 196, 182, 0.55);
    --danger: #e86a76;
    --success: #5ddea0;
    --radius: 2px;
    --font-display: "Syne", sans-serif;
    --font-body: "Instrument Sans", sans-serif;
    --grid-size: 48px;
    --grid-color: rgba(210, 225, 230, 0.045);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--text);
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: var(--grid-size) var(--grid-size);
    background-attachment: fixed;
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem clamp(1.2rem, 4vw, 3rem);
    border-bottom: 1px solid transparent;
}

.brand {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.brand img {
    width: auto;
    height: 2.15rem;
}

.brand-sidebar {
    display: inline-flex;
    width: 100%;
}

.brand-sidebar img {
    height: 2.25rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 0.7rem 1.15rem;
    font: inherit;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s linear, border-color 0.15s linear, color 0.15s linear;
}

.btn-primary {
    background: var(--accent);
    color: #041210;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent);
}

.btn-ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-danger {
    background: transparent;
    border-color: rgba(232, 106, 118, 0.45);
    color: var(--danger);
}

.btn-danger:hover {
    border-color: var(--danger);
}

.btn-small {
    padding: 0.4rem 0.75rem;
    font-size: 0.88rem;
}

.site-header .btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.92rem;
}

/* —— Hero / blueprint —— */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    align-items: end;
    padding: clamp(5rem, 12vh, 8rem) clamp(1.2rem, 4vw, 3rem) clamp(2.5rem, 6vh, 4rem);
    position: relative;
}

.hero-frame {
    position: absolute;
    inset: clamp(4.5rem, 8vh, 5.5rem) clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem);
    pointer-events: none;
    border: 1px solid var(--line);
    animation: fade-in 0.7s linear both;
}

.hero-ticks {
    position: absolute;
    inset: 0;
}

.hero-frame::before,
.hero-frame::after,
.hero-ticks span {
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: var(--accent-dim);
    border-style: solid;
}

.hero-frame::before {
    content: "";
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.hero-frame::after {
    content: "";
    top: -1px;
    right: -1px;
    border-width: 2px 2px 0 0;
}

.hero-ticks span:nth-child(1) {
    bottom: -1px;
    left: -1px;
    border-width: 0 0 2px 2px;
}

.hero-ticks span:nth-child(2) {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.hero-content {
    position: relative;
    max-width: 720px;
    animation: fade-in 0.55s linear 0.12s both;
}

.hero-brand {
    display: block;
    width: min(100%, 18rem);
    height: auto;
    margin: 0 0 1.1rem;
    transform: translate(var(--grid-size), calc(var(--grid-size) * -0.5));
}

.hero h1 {
    font-family: var(--font-body);
    font-size: clamp(1.35rem, 2.8vw, 1.95rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.45;
    margin: 0 0 0.75rem;
    max-width: 22ch;
}

.hero-content > p {
    margin: 0 0 1.75rem;
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 40ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.section {
    padding: clamp(3.5rem, 8vh, 5.5rem) clamp(1.2rem, 4vw, 3rem);
    border-top: 1px solid var(--line);
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 0.85rem;
    font-weight: 600;
}

.section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 2.8vw, 2.15rem);
    letter-spacing: -0.03em;
    margin: 0 0 0.55rem;
    font-weight: 700;
}

.section > .section-inner > p,
.lede {
    color: var(--muted);
    margin: 0 0 2rem;
    max-width: 48ch;
}

.module-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--line);
}

.module-grid li {
    padding: 1.35rem 1.2rem;
    border-right: 1px solid var(--line);
    animation: fade-in 0.45s linear both;
}

.module-grid li:last-child {
    border-right: none;
}

.module-grid li:nth-child(2) { animation-delay: 0.08s; }
.module-grid li:nth-child(3) { animation-delay: 0.16s; }

.module-index {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--accent-dim);
    margin-bottom: 0.65rem;
    font-family: var(--font-body);
}

.module-grid strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.module-grid span {
    color: var(--muted);
    font-size: 0.95rem;
}

.site-footer {
    padding: 1.5rem clamp(1.2rem, 4vw, 3rem) 2.5rem;
    color: var(--muted);
    font-size: 0.88rem;
    border-top: 1px solid var(--line);
    letter-spacing: 0.02em;
}

/* —— Auth —— */
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: min(400px, 100%);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
    position: relative;
    animation: fade-in 0.4s linear both;
}

.auth-card::before,
.auth-card::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border-color: var(--accent-dim);
    border-style: solid;
}

.auth-card::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.auth-card::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.auth-card .brand {
    display: inline-flex;
    margin-bottom: 0.35rem;
}

.auth-card .brand img {
    height: 2.1rem;
}

.auth-card h1 {
    font-family: var(--font-display);
    margin: 1rem 0 0.3rem;
    font-size: 1.55rem;
    letter-spacing: -0.03em;
    font-weight: 700;
}

.auth-card .muted {
    color: var(--muted);
    margin: 0 0 1.35rem;
    font-size: 0.95rem;
}

.auth-links {
    margin: 1.1rem 0 0;
    text-align: center;
    font-size: 0.92rem;
}

.auth-links a {
    color: var(--muted);
}

.auth-links a:hover {
    color: var(--accent);
}

.form-stack {
    display: grid;
    gap: 1rem;
}

label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.88rem;
    color: var(--muted);
    letter-spacing: 0.02em;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    padding: 0.7rem 0.8rem;
    font: inherit;
    outline: none;
    transition: border-color 0.15s linear;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
}

.alert {
    border-radius: var(--radius);
    padding: 0.7rem 0.85rem;
    margin-bottom: 1rem;
    font-size: 0.92rem;
    border: 1px solid var(--line);
}

.alert-error {
    border-color: rgba(232, 106, 118, 0.45);
    color: #ffb3bb;
    background: transparent;
}

.alert-success {
    border-color: rgba(93, 222, 160, 0.4);
    color: #b8f0d2;
    background: transparent;
}

/* —— App shell —— */
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    align-content: start;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

.sidebar {
    background: var(--bg-elevated);
    border-right: 1px solid var(--line);
    padding: 1.35rem 1rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 30;
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--line);
}

.sidebar-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s linear, color 0.15s linear;
}

.nav-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 1rem;
    height: 2px;
    background: currentColor;
}

.nav-toggle-bars {
    position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
    transition: transform 0.15s linear, top 0.15s linear;
}

.nav-toggle-bars::before {
    top: -5px;
}

.nav-toggle-bars::after {
    top: 5px;
}

.sidebar.is-open .nav-toggle-bars {
    background: transparent;
}

.sidebar.is-open .nav-toggle-bars::before {
    top: 0;
    transform: rotate(45deg);
}

.sidebar.is-open .nav-toggle-bars::after {
    top: 0;
    transform: rotate(-45deg);
}

.nav-backdrop {
    display: none;
}

.nav-label {
    margin: 0.85rem 0 0.2rem;
    padding: 0 0.7rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-label:first-child {
    margin-top: 0;
}

.side-nav {
    display: grid;
    gap: 0.15rem;
    flex: 1;
    align-content: start;
}

.side-nav a {
    padding: 0.6rem 0.7rem;
    border-radius: var(--radius);
    color: var(--muted);
    border-left: 2px solid transparent;
    transition: color 0.15s linear, border-color 0.15s linear, background 0.15s linear;
}

.side-nav a:hover {
    color: var(--text);
    background: transparent;
}

.side-nav a.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: transparent;
}

.sidebar-foot {
    display: grid;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.user-chip {
    display: grid;
    gap: 0.1rem;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-role {
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.app-main {
    min-width: 0;
    max-width: 100%;
    padding: clamp(1.35rem, 2.5vw, 2.25rem);
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.page-header h1 {
    font-family: var(--font-display);
    margin: 0;
    font-size: clamp(1.55rem, 2.8vw, 2rem);
    letter-spacing: -0.03em;
    font-weight: 700;
}

.page-header p {
    margin: 0.3rem 0 0;
    color: var(--muted);
}

.panel {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.15rem;
}

.panel-title {
    font-family: var(--font-display);
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
}

.checkbox-row input {
    width: auto;
}

.inline-form {
    display: inline;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
    gap: 0;
    border: 1px solid var(--line);
    max-width: 100%;
}

.app-item {
    background: var(--bg-elevated);
    border: none;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 1.25rem;
    display: grid;
    gap: 0.7rem;
    transition: background 0.15s linear;
    animation: fade-in 0.4s linear both;
}

.app-item:hover {
    background: var(--bg-soft);
}

.app-item h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin: 0;
    letter-spacing: -0.02em;
    font-weight: 700;
}

.app-item p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.store-card {
    align-content: start;
}

.store-card-link {
    display: grid;
    gap: 0.65rem;
    min-width: 0;
}

.store-card-link:hover h2 {
    color: var(--accent);
}

.store-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    flex-shrink: 0;
}

.app-icon-lg {
    width: 96px;
    height: 96px;
    border-radius: 22px;
}

.app-icon-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--accent);
    font-size: 1.15rem;
}

.app-icon-lg.app-icon-fallback {
    font-size: 1.6rem;
}

.store-badge {
    flex-shrink: 0;
}

.app-detail {
    display: grid;
    gap: 1.25rem;
}

.app-detail-hero {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.25rem;
    align-items: center;
    padding: 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
}

.app-detail-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    margin: 0;
    letter-spacing: -0.03em;
    font-weight: 700;
}

.app-detail-pitch {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

.app-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.85rem;
}

.app-detail-cta {
    justify-self: end;
}

.app-detail-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.app-install-hint {
    margin: 0.65rem 0 0;
    max-width: 20rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.app-install-hint code {
    font-size: 0.8em;
}

.app-detail-section p {
    margin: 0;
    color: var(--text);
}

.app-detail-version {
    margin-bottom: 0.65rem !important;
}

.app-detail-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1.25rem;
    margin-top: 0.85rem;
}

.app-detail-score,
.app-detail-rate-form {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.5rem;
    margin: 0;
}

.app-detail-rating-label {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.app-detail-score-value {
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

.app-rating-pips {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
}

.app-rating-score-btn {
    appearance: none;
    width: 1.7rem;
    height: 1.7rem;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--bg-soft);
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.app-rating-score-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.app-rating-score-btn:hover {
    border-color: var(--accent-dim);
    color: var(--text);
    transform: scale(1.05);
}

.app-rating-score-btn.is-selected {
    border-color: var(--accent);
    background: var(--accent);
    color: #061012;
}

.app-rating-clear {
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.8rem;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    cursor: pointer;
}

.app-rating-clear:hover {
    color: var(--text);
}

.store-card-rating {
    margin: 0.55rem 0 0;
    font-size: 0.85rem;
}

.btn-disabled {
    opacity: 0.55;
    pointer-events: none;
    cursor: default;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.table-wrap {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

table.data {
    width: 100%;
    border-collapse: collapse;
}

table.data th,
table.data td {
    text-align: left;
    padding: 0.8rem 0.65rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

table.data th {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius);
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid var(--line);
    color: var(--muted);
}

.badge-admin {
    color: var(--accent);
    border-color: var(--accent-dim);
}

.badge-inactive {
    color: var(--danger);
    border-color: rgba(232, 106, 118, 0.45);
}

.badge-published {
    color: var(--success);
    border-color: rgba(93, 222, 160, 0.45);
}

.badge-beta {
    color: var(--accent);
    border-color: var(--accent-dim);
}

.badge-soon {
    color: var(--muted);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.form-grid {
    display: grid;
    gap: 1rem;
    max-width: 640px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid > .btn {
    justify-self: start;
}

.form-span-2 {
    grid-column: 1 / -1;
}

.form-grid textarea {
    min-height: 6rem;
    resize: vertical;
}

.split-forms {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    border: 1px solid var(--line);
}

.split-forms .panel {
    border: none;
    border-radius: 0;
    border-right: 1px solid var(--line);
}

.split-forms .panel:last-child {
    border-right: none;
}

.muted {
    color: var(--muted);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.filter-row .btn.active {
    border-color: var(--accent);
    color: var(--text);
}

.message-thread {
    display: grid;
    gap: 0.85rem;
}

.message-bubble {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    background: transparent;
}

.message-bubble header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
    font-size: 0.88rem;
}

.message-bubble time {
    color: var(--muted);
    white-space: nowrap;
}

.message-body {
    line-height: 1.55;
    white-space: normal;
}

.message-staff {
    border-color: rgba(120, 180, 140, 0.35);
}

.message-member {
    border-color: var(--line);
}

.back-link {
    color: var(--muted);
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--accent);
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 860px) {
    .site-header .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.88rem;
    }

    body.page-home {
        min-height: 100svh;
        display: flex;
        flex-direction: column;
    }

    body.page-home .hero {
        flex: 1 1 auto;
        min-height: 0;
        padding: 4.75rem 2rem 2rem;
    }

    body.page-home .site-footer {
        flex-shrink: 0;
        padding: 0.85rem 1.2rem 1.1rem;
    }

    .hero-frame {
        inset: 4.25rem 0.85rem 0.85rem;
    }

    .hero-brand {
        width: min(100%, 14rem);
        margin-bottom: 0.9rem;
    }

    .hero h1 {
        font-size: 1.25rem;
        margin-bottom: 0.55rem;
    }

    .hero-content > p {
        margin-bottom: 1.15rem;
        font-size: 0.98rem;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: sticky;
        top: 0;
        height: auto;
        max-height: none;
        padding: 0;
        border-right: none;
        border-bottom: 1px solid var(--line);
        align-self: start;
        width: 100%;
    }

    .sidebar-top {
        margin-bottom: 0;
        padding: 0.35rem 0.65rem;
        border-bottom: none;
        background: var(--bg-elevated);
        min-height: 0;
    }

    .brand-sidebar {
        width: auto;
        min-width: 0;
        line-height: 0;
    }

    .brand-sidebar img {
        height: 1.45rem;
    }

    .nav-toggle {
        display: inline-flex;
        position: relative;
        padding: 0.35rem;
        gap: 0;
        min-width: 2rem;
        min-height: 2rem;
        justify-content: center;
    }

    .nav-toggle-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .sidebar-panel {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        flex: none;
        height: auto;
        max-height: none;
        overflow: visible;
        padding: 0.35rem 0.5rem 0.65rem;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4);
        justify-content: flex-start;
    }

    .sidebar.is-open .sidebar-panel {
        display: flex;
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 25;
        width: 0;
        height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        background: rgba(4, 6, 8, 0.55);
        cursor: pointer;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        overflow: hidden;
        transition: opacity 0.18s linear, visibility 0.18s linear;
    }

    .sidebar.is-open ~ .nav-backdrop {
        inset: 0;
        width: auto;
        height: auto;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        overflow: visible;
    }

    .side-nav {
        flex: none;
        margin-bottom: 0.45rem;
        gap: 0.05rem;
    }

    .side-nav a {
        padding: 0.45rem 0.55rem;
    }

    .nav-label {
        margin: 0.45rem 0 0.05rem;
        padding: 0 0.55rem;
    }

    .sidebar-foot {
        gap: 0.45rem;
        padding-top: 0.55rem;
    }

    body.nav-open {
        overflow: hidden;
    }

    .module-grid {
        grid-template-columns: 1fr;
    }

    .module-grid li {
        border-right: none;
        border-bottom: 1px solid var(--line);
    }

    .module-grid li:last-child {
        border-bottom: none;
    }

    .app-main {
        padding: 1rem 0.85rem 1.35rem;
    }

    .app-grid {
        grid-template-columns: 1fr;
    }

    .app-item {
        border-right: none;
    }

    .page-header {
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 1.1rem;
    }

    .page-header .btn {
        width: 100%;
    }

    .table-wrap {
        overflow: visible;
    }

    .panel.table-wrap {
        padding: 0.65rem 0.85rem;
    }

    table.data thead {
        display: none;
    }

    table.data tbody,
    table.data tr,
    table.data td {
        display: block;
        width: 100%;
    }

    table.data tr {
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--line);
    }

    table.data tr:last-child {
        border-bottom: none;
        padding-bottom: 0.25rem;
    }

    table.data tr:first-child {
        padding-top: 0.25rem;
    }

    table.data td {
        display: grid;
        grid-template-columns: 6.25rem minmax(0, 1fr);
        gap: 0.55rem;
        padding: 0.28rem 0;
        border: none;
        text-align: left;
        align-items: start;
        word-break: break-word;
    }

    table.data td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 500;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        padding-top: 0.2rem;
    }

    table.data td:not([data-label]),
    table.data td[data-label=""] {
        grid-template-columns: 1fr;
    }

    table.data td:not([data-label])::before,
    table.data td[data-label=""]::before {
        display: none;
    }

    table.data .actions {
        width: 100%;
    }

    table.data .actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .app-detail-hero {
        grid-template-columns: auto 1fr;
    }

    .app-detail-cta {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .split-forms .panel {
        border-right: none;
        border-bottom: 1px solid var(--line);
    }

    .split-forms .panel:last-child {
        border-bottom: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
