@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&family=Ubuntu:wght@400;500;700&display=swap');

:root {
    color-scheme: light;
    --paper: #FFFDF4;
    --white: #fff;
    --ink: #11140f;
    --muted: #747970;
    --line: #dfe2dc;
    --lime: #d9df67;
    --lime-dark: #A1A500;
    --navy: #003684;
    --font-display: 'Ubuntu', 'Trebuchet MS', sans-serif;
    --font-body: 'Raleway', 'Avenir Next', sans-serif;
    --page-gutter: clamp(22px, 5.5vw, 88px);
    --content-width: 1500px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--lime); color: var(--ink); }

.topbar { height: 78px; padding: 0 var(--page-gutter); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e4e6e1; background: rgba(250, 251, 248, .88); }
.brand { display: inline-flex; align-items: center; gap: 7px; font: 700 25px/1 var(--font-display); letter-spacing: 0; }
.brand-dark { color: var(--ink); }
.brand-mark { width: 17px; height: 17px; display: inline-block; background: var(--lime-dark); clip-path: polygon(0 25%, 100% 0, 74% 100%, 52% 57%); transform: rotate(-8deg); }
.brand-period { color: #A1A500; }
.topbar-label, .eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.topbar-label { display: flex; align-items: center; gap: 9px; color: #596052; }
.status-dot { width: 7px; height: 7px; background: #91c934; border-radius: 50%; box-shadow: 0 0 0 3px #91c93422; }
.admin-link { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); font-size: 12px; font-weight: 700; transition: background .2s, border .2s; }
.admin-link:hover { background: var(--lime); border-color: var(--lime); }
.admin-icon { font-size: 15px; }
.archive-main { width: min(100%, var(--content-width)); margin: 0 auto; padding: 60px var(--page-gutter) 110px; }
.archive-heading { min-height: 144px; display: flex; align-items: end; justify-content: space-between; gap: 35px; margin-bottom: 48px; }
.eyebrow { margin: 0 0 12px; color: #656b60; }
.eyebrow span { color: #a0a59c; padding: 0 5px; }
.archive-heading h1 { margin: 0; font: 600 54px/.98 var(--font-display); letter-spacing: 0; }
.archive-heading h1 span { color: #A1A500; }
.archive-summary { display: flex; align-items: center; gap: 22px; padding-bottom: 5px; }
.archive-summary > div { display: grid; gap: 2px; }
.archive-summary strong { font: 600 25px/1 var(--font-display); }
.archive-summary span { color: var(--muted); font-size: 11px; }
.archive-summary i { width: 1px; height: 37px; background: #d4d7d1; }
.library-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 30px; }
.category-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.category-filters::-webkit-scrollbar { display: none; }
.filter-chip { flex: none; display: inline-flex; align-items: center; gap: 10px; padding: 9px 13px; border: 1px solid #dfe2dc; border-radius: 3px; background: transparent; color: #596052; cursor: pointer; font-size: 11px; font-weight: 600; transition: color .2s, background .2s, border-color .2s; }
.filter-chip span { color: #90958c; font-size: 10px; }
.filter-chip:hover, .filter-chip.is-active { background: var(--ink); border-color: var(--ink); color: white; }
.filter-chip.is-active span { color: var(--lime); }
.search-box { flex: 0 0 210px; height: 39px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border-bottom: 1px solid #cdd1c9; color: #62675f; }
.search-box > span { font: 28px/1 var(--font-body); transform: rotate(-20deg); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search-box input::placeholder { color: #858a82; }
.category-section { margin: 0 0 66px; animation: section-arrive .55s both; }
.category-banner { position: relative; isolation: isolate; height: clamp(170px, 19vw, 250px); overflow: hidden; display: flex; align-items: end; justify-content: space-between; padding: 27px 32px; border-radius: 7px; background: var(--navy); color: white; }
.category-banner > img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 48%; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.category-section:hover .category-banner > img { transform: scale(1.025); }
.banner-shade { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(11, 19, 27, .78), rgba(11, 19, 27, .2) 70%), linear-gradient(0deg, rgba(11, 19, 27, .35), transparent 70%); }
.banner-copy { position: relative; }
.banner-copy .eyebrow { color: #d9e0d2; margin-bottom: 8px; }
.banner-copy h2 { margin: 0; font: 600 48px/1 var(--font-display); letter-spacing: 0; }
.banner-count { padding: 8px 11px; border: 1px solid #ffffff70; border-radius: 2px; background: #0d17254a; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; padding: 32px 10px 0; }
.project-card { min-width: 0; animation: card-arrive .6s both; }
.laptop-stage { position: relative; isolation: isolate; padding: 8px 0 18px; perspective: 1000px; transform-style: preserve-3d; outline: none; transition: transform .45s cubic-bezier(.2,.75,.2,1); }
.project-card:hover .laptop-stage, .laptop-stage:focus-visible { transform: translateY(-5px) rotateX(1.6deg) rotateY(-1.6deg); }
.laptop-lid { position: relative; z-index: 2; width: 89%; margin: 0 auto; padding: 8px 8px 9px; border: 1px solid #abb2b2; border-bottom-color: #8a9293; border-radius: 11px 11px 4px 4px; background: linear-gradient(145deg, #f9fbfa 0%, #cdd2d1 39%, #f2f3ef 75%, #aeb5b4 100%); box-shadow: 0 7px 12px #1c25231a, inset 0 1px 0 #fff; }
.laptop-bezel { position: relative; padding: 4px 4px 3px; border-radius: 6px 6px 2px 2px; background: linear-gradient(120deg, #141817, #050706 65%, #222624); box-shadow: inset 0 0 0 1px #ffffff17; }
.camera-dot { position: absolute; z-index: 2; top: 1px; left: 50%; width: 3px; height: 3px; border-radius: 50%; background: #38413e; }
.screen-viewport { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 2px; background: #e8eae6; }
.page-capture { display: block; width: 100%; height: auto; max-width: none; transform: translateY(0); transition-property: transform; transition-duration: var(--scroll-duration, 4s); transition-timing-function: cubic-bezier(.36,.01,.26,1); will-change: transform; }
.project-card:hover .page-capture, .laptop-stage:focus-visible .page-capture, .laptop-stage.is-scrolling .page-capture { transform: translateY(calc(-1 * var(--scroll-distance, 0px))); }
.laptop-base { position: relative; z-index: 3; width: 100%; height: 13px; margin-top: -1px; border: 1px solid #a4acab; border-top-color: #dfe2df; border-radius: 2px 2px 12px 12px; background: linear-gradient(180deg, #dce0de 0%, #aeb5b3 65%, #e0e3df 100%); box-shadow: 0 4px 4px #202b2720; }
.base-notch { position: absolute; top: -1px; left: 50%; width: 18%; height: 3px; transform: translateX(-50%); border-radius: 0 0 6px 6px; background: #989f9d; }
.laptop-shadow { position: absolute; z-index: -1; right: 7%; bottom: 7px; left: 7%; height: 17px; border-radius: 50%; background: #131b1833; filter: blur(8px); transition: transform .45s, opacity .45s; }
.project-card:hover .laptop-shadow { transform: scaleX(.92); opacity: .7; }
.project-caption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 3px 0; }
.project-caption h3 { margin: 0; overflow: hidden; color: var(--ink); font: 600 16px/1.25 var(--font-display); text-overflow: ellipsis; white-space: nowrap; }
.project-caption p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.visit-link { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #d6d9d3; border-radius: 50%; background: #fff; font-size: 17px; transition: background .2s, transform .2s; }
.visit-link:hover { transform: translate(2px, -2px); border-color: var(--lime); background: var(--lime); }
.no-results { margin: 50px 0; padding: 35px; text-align: center; color: var(--muted); }
.first-run-state { position: relative; overflow: hidden; min-height: 385px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 52px clamp(28px, 8vw, 116px); border-radius: 7px; background: var(--navy); color: white; }
.first-run-state::after { content: ''; position: absolute; right: 11%; top: 50%; width: 240px; height: 240px; border: 1px solid #ffffff21; border-radius: 50%; transform: translateY(-50%); box-shadow: 0 0 0 28px #ffffff08, 0 0 0 60px #ffffff05; }
.first-run-state .eyebrow { color: var(--lime); }
.first-run-state h2 { max-width: 620px; margin: 0 0 11px; font: 600 48px/1.05 var(--font-display); }
.first-run-state > p:not(.eyebrow) { max-width: 470px; margin: 0 0 25px; color: #d1d8db; font-size: 14px; }
.empty-mark { position: absolute; top: 45px; right: 15%; width: 100px; height: 74px; transform: rotate(-13deg); }
.empty-mark span { position: absolute; display: block; width: 55px; height: 35px; border: 1px solid #d9df6777; transform: skew(-25deg); }
.empty-mark span:nth-child(2) { top: 19px; left: 22px; background: #d9df6720; }
.empty-mark span:nth-child(3) { top: 38px; left: 44px; background: #d9df6745; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 17px; padding: 0 16px; border: 1px solid transparent; border-radius: 3px; cursor: pointer; font-size: 12px; font-weight: 700; transition: background .2s, border-color .2s, transform .2s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--lime); color: var(--ink); }
.button-primary:hover { background: #e6ea8f; }
.button-secondary { border-color: var(--line); background: white; }
.button-light { background: white; color: var(--ink); }
.button-light:hover { background: var(--lime); }
.archive-footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px var(--page-gutter); border-top: 1px solid #dfe2dc; color: #767c72; font-size: 9px; font-weight: 700; letter-spacing: .1em; }

/* Shared authentication surfaces */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 35px 20px; background: var(--navy); }
.auth-shell { width: min(100%, 430px); }
.auth-shell > .brand { margin: 0 0 28px 3px; color: white; }
.auth-panel { padding: 36px; border-radius: 5px; background: #fbfcf9; box-shadow: 0 20px 70px #080d1433; }
.auth-panel h1 { margin: 0 0 9px; font: 600 34px/1.1 var(--font-display); }
.auth-panel > p:not(.eyebrow) { margin: 0 0 25px; color: #687068; font-size: 13px; }
.auth-panel code { color: var(--ink); font-size: 12px; }
.stack-form { display: grid; gap: 17px; }
.stack-form label, .management-form > label, .inline-category-fields > label { display: grid; gap: 7px; color: #434940; font-size: 11px; font-weight: 700; }
.stack-form input, .management-form input:not([type=file]), .management-form select, .inline-create-form > input, .category-edit-form > input:not([type=hidden]) { width: 100%; min-height: 43px; padding: 0 11px; border: 1px solid #d9ddd5; border-radius: 3px; outline: none; background: white; color: var(--ink); font-size: 13px; }
.stack-form input:focus, .management-form input:focus, .management-form select:focus, .inline-create-form > input:focus, .category-edit-form > input:focus { border-color: #83b82b; box-shadow: 0 0 0 3px #d9df6733; }
.stack-form small, .management-form small { display: block; color: #848a80; font-size: 10px; font-weight: 400; }
.stack-form .button { width: 100%; margin-top: 3px; }
.quiet-link { color: #5d655b; font-size: 11px; font-weight: 600; }
.auth-shell > .quiet-link { display: inline-block; margin: 18px 0 0 4px; color: #e0e5e1; }
.notice { margin: 0 0 17px; padding: 11px 13px; border-left: 3px solid #8cbd31; background: #f0f5e6; color: #3d4a2c; font-size: 12px; }
.notice-error { border-left-color: #d65b4a; background: #fcf0ee; color: #883a30; }

/* Admin workspace */
.admin-page { min-height: 100vh; background: #f3f4f0; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 27px 18px 22px; border-right: 1px solid #e0e3dd; background: #fbfcf9; }
.admin-sidebar > .brand { padding: 0 10px; }
.sidebar-label { margin: 48px 11px 11px; color: #969c92; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.admin-nav { display: grid; gap: 4px; }
.admin-nav a { min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 11px; border-radius: 3px; color: #5c635a; font-size: 12px; font-weight: 600; transition: color .2s, background .2s; }
.admin-nav a:hover, .admin-nav a.is-current { background: #eef4e4; color: #2d4014; }
.admin-nav a.is-current { box-shadow: inset 3px 0 #9dce39; }
.nav-symbol { width: 17px; color: #70786d; font-size: 16px; text-align: center; }
.nav-count { min-width: 22px; margin-left: auto; padding: 2px 5px; border-radius: 10px; background: #e9ece6; color: #62695f; font-size: 9px; text-align: center; }
.sidebar-label-bottom { margin-top: 34px; }
.sidebar-bottom { display: grid; gap: 17px; margin-top: auto; padding: 16px 8px 0; border-top: 1px solid #e4e6e1; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: var(--lime); font: 600 14px var(--font-display); }
.user-chip strong, .user-chip small { display: block; }
.user-chip strong { font-size: 11px; }
.user-chip small { margin-top: 2px; color: #8a9087; font-size: 10px; }
.logout-form { margin: 0; }
.text-button { padding: 0; border: 0; background: transparent; color: #73796f; cursor: pointer; font-size: 11px; font-weight: 600; }
.text-button:hover { color: #ad483b; }
.admin-content { width: min(100%, 1450px); margin: 0 auto; padding: 36px clamp(25px, 5vw, 74px) 90px; }
.admin-topbar { min-height: 69px; display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 30px; }
.admin-topbar .eyebrow { margin-bottom: 5px; }
.admin-topbar h1 { margin: 0; font: 600 30px/1.1 var(--font-display); }
.admin-topbar > .button { flex: none; }
.admin-notice { margin-bottom: 22px; }
.welcome-strip { min-height: 178px; display: flex; justify-content: space-between; align-items: center; gap: 25px; padding: 28px 33px; border-radius: 5px; background: var(--navy); color: white; }
.welcome-strip .eyebrow { color: var(--lime); }
.welcome-strip h2 { max-width: 470px; margin: 0; font: 600 26px/1.16 var(--font-display); }
.welcome-strip .button { flex: none; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0 39px; }
.metric-panel { position: relative; min-height: 145px; display: grid; align-content: center; justify-items: start; padding: 20px 24px; border: 1px solid #e0e3dd; border-radius: 4px; background: white; }
.metric-panel-lime { background: #eaf5d8; border-color: #d9e9bc; }
.metric-panel > strong { font: 600 33px/1.1 var(--font-display); }
.metric-panel > span:not(.metric-icon) { margin-top: 4px; font-weight: 700; font-size: 12px; }
.metric-panel > small { margin-top: 4px; color: #81877d; font-size: 10px; }
.metric-icon { position: absolute; top: 19px; right: 20px; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 3px; background: #f1f2ef; color: #71786d; font-size: 17px; }
.metric-panel-lime .metric-icon { background: #dceebd; color: #4d6921; }
.admin-section, .form-section { margin: 0 0 32px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 0 0 17px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading h2 { margin: 0; font: 600 21px/1.2 var(--font-display); }
.project-table-wrap { overflow-x: auto; border: 1px solid #e0e3dd; border-radius: 4px; background: white; }
.project-table { width: 100%; border-collapse: collapse; text-align: left; }
.project-table th { height: 39px; padding: 0 17px; border-bottom: 1px solid #e5e7e2; color: #92988e; font-size: 9px; letter-spacing: .08em; white-space: nowrap; }
.project-table td { height: 63px; padding: 8px 17px; border-bottom: 1px solid #eff0ed; color: #62695f; font-size: 11px; white-space: nowrap; }
.project-table tbody tr:last-child td { border-bottom: 0; }
.table-project { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.table-project img { width: 56px; height: 38px; border: 1px solid #dfe2dc; border-radius: 2px; object-fit: cover; object-position: top; background: #eef0eb; }
.table-project strong { max-width: 210px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; }
.table-link { color: #596f31; font-weight: 700; }
.table-link:hover { text-decoration: underline; }
.muted { color: #a5aaa2; }
.icon-action { width: 31px; height: 31px; display: inline-grid; place-items: center; border: 1px solid #e0e3dd; border-radius: 3px; background: white; color: #4b5547; cursor: pointer; font-size: 16px; transition: background .2s, border-color .2s; }
.icon-action:hover { border-color: var(--lime-dark); background: #eff8df; }
.icon-danger:hover { border-color: #e1a69e; background: #fff0ee; color: #a3473b; }
.table-actions { display: flex; align-items: center; gap: 6px; }
.table-actions form { margin: 0; }
.admin-empty { min-height: 125px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 24px; border: 1px dashed #cfd4cb; border-radius: 4px; background: #fafbf8; color: #73796f; font-size: 12px; }
.admin-empty p { margin: 0; }
.admin-empty a { color: #4c6625; font-weight: 700; }
.form-section { padding: 25px; border: 1px solid #e0e3dd; border-radius: 4px; background: white; }
.management-form { max-width: 670px; display: grid; gap: 18px; }
.management-form select { appearance: auto; }
.management-form input[type=file], .inline-category-fields input[type=file] { width: 100%; min-height: 42px; padding: 10px; border: 1px dashed #ccd1c8; border-radius: 3px; background: #fafbf8; color: #596052; font-size: 11px; }
.management-form label > small { margin-top: -2px; }
.optional { margin-left: 5px; color: #969c92; font-size: 8px; letter-spacing: .08em; }
.inline-category-fields { display: grid; grid-template-columns: 1fr 1.25fr; gap: 13px; padding: 15px; border: 1px solid #e4e7e0; border-radius: 3px; background: #f8faf4; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.current-image { display: flex; align-items: center; gap: 10px; color: #7d837a; font-size: 10px; }
.current-image img { width: 150px; height: 78px; border: 1px solid #dfe2dc; border-radius: 3px; object-fit: cover; object-position: top; }
.category-create-section { padding-bottom: 22px; }
.inline-create-form { display: grid; grid-template-columns: minmax(160px, 1fr) auto auto; align-items: center; gap: 10px; }
.upload-control { position: relative; min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 11px; border: 1px solid #dfe2dc; border-radius: 3px; background: white; color: #646b61; cursor: pointer; font-size: 10px; font-weight: 600; white-space: nowrap; }
.upload-control:hover { border-color: #a9d45c; background: #f5faeb; }
.upload-control input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.category-admin-list { display: grid; border-top: 1px solid #e1e4dd; }
.category-admin-row { min-height: 77px; display: grid; grid-template-columns: 82px minmax(0, 1fr) 36px; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid #e1e4dd; }
.category-thumb { width: 76px; height: 52px; border-radius: 3px; object-fit: cover; background: #d9ded8; }
.category-edit-form { display: grid; grid-template-columns: minmax(110px, 1fr) auto 36px; align-items: center; gap: 9px; }
.category-edit-form > input:not([type=hidden]) { max-width: 330px; }
.category-edit-form > .upload-control { min-width: 114px; }
.category-admin-row > form:last-child { margin: 0; }
.category-admin-row > form:last-child button { width: 32px; }
.settings-panel { max-width: 760px; }
.admin-auth-shell .auth-panel { box-shadow: none; }
.admin-login-page { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 32px 20px; }
.admin-login-page .admin-auth-shell { min-width: 0; }
.admin-login-page .admin-auth-shell > .brand { margin: 0 0 24px; }
.admin-login-page .auth-panel { border: 1px solid var(--line); box-shadow: 0 16px 48px #11140f0a; }
.admin-login-page .stack-form label, .admin-login-page .stack-form input { min-width: 0; }
.admin-login-page .admin-auth-shell > .quiet-link { color: #5d655b; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

@keyframes section-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes card-arrive { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1050px) {
    .archive-heading h1 { font-size: 50px; }
    .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 22px; }
    .category-filters { max-width: calc(100% - 205px); }
    .admin-shell { grid-template-columns: 205px minmax(0, 1fr); }
    .admin-content { padding-right: 30px; padding-left: 30px; }
}
@media (max-width: 700px) {
    :root { --page-gutter: 20px; }
    .topbar { height: 66px; }
    .brand { font-size: 22px; }
    .topbar-label { display: none; }
    .archive-main { padding-top: 38px; padding-bottom: 70px; }
    .archive-heading { min-height: 0; align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 27px; }
    .archive-heading h1 { font-size: 42px; }
    .archive-summary { gap: 12px; }
    .archive-summary strong { font-size: 19px; }
    .archive-summary span { font-size: 9px; }
    .library-toolbar { align-items: stretch; flex-direction: column-reverse; gap: 13px; margin-bottom: 22px; }
    .category-filters { max-width: 100%; padding-bottom: 3px; }
    .search-box { flex-basis: auto; width: 100%; }
    .category-section { margin-bottom: 47px; }
    .category-banner { height: 168px; padding: 19px; }
    .banner-copy h2 { font-size: 34px; }
    .banner-count { font-size: 8px; }
    .project-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 22px 2px 0; }
    .laptop-stage { max-width: 510px; margin: auto; }
    .project-caption { max-width: 510px; margin: 0 auto; }
    .first-run-state { min-height: 355px; padding: 37px 25px; }
    .first-run-state::after { right: -74px; width: 220px; height: 220px; }
    .empty-mark { top: 24px; right: 18px; transform: scale(.72) rotate(-13deg); transform-origin: top right; }
    .first-run-state h2 { max-width: 330px; font-size: 36px; }
    .first-run-state > p:not(.eyebrow) { max-width: 340px; font-size: 12px; }
    .archive-footer { flex-direction: column; gap: 6px; font-size: 8px; }
    .auth-panel { padding: 28px 23px; }
    .admin-shell { display: block; }
    .admin-sidebar { position: relative; z-index: 5; width: 100%; height: auto; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding: 14px 18px 10px; border-right: 0; border-bottom: 1px solid #e0e3dd; }
    .admin-sidebar > .brand { grid-row: 1; padding: 0; }
    .admin-sidebar > .sidebar-label, .sidebar-label-bottom, .sidebar-bottom { display: none; }
    .admin-nav { grid-row: 1; grid-column: 2; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
    .admin-nav a { min-height: 38px; justify-content: center; gap: 5px; padding: 0 4px; font-size: 10px; }
    .admin-nav a.is-current { box-shadow: inset 0 -2px #9dce39; }
    .nav-symbol { display: none; }
    .nav-count { min-width: 17px; margin: 0; padding: 1px 4px; font-size: 8px; }
    .admin-content { padding: 25px 18px 60px; }
    .admin-topbar { min-height: 55px; margin-bottom: 21px; }
    .admin-topbar h1 { font-size: 25px; }
    .admin-topbar .button { min-height: 38px; gap: 6px; padding: 0 10px; font-size: 10px; }
    .welcome-strip { min-height: 160px; align-items: flex-start; flex-direction: column; padding: 23px; }
    .welcome-strip h2 { font-size: 23px; }
    .welcome-strip .button { min-height: 38px; }
    .metric-grid { gap: 9px; margin: 12px 0 30px; }
    .metric-panel { min-height: 126px; padding: 16px; }
    .metric-panel > strong { font-size: 28px; }
    .metric-panel > small { max-width: 135px; font-size: 9px; }
    .metric-icon { top: 13px; right: 12px; width: 25px; height: 25px; }
    .section-heading h2 { font-size: 19px; }
    .project-table th, .project-table td { padding-right: 10px; padding-left: 10px; }
    .project-table th { font-size: 8px; }
    .project-table td { font-size: 10px; }
    .table-project { gap: 7px; }
    .table-project img { width: 43px; height: 31px; }
    .table-project strong { max-width: 125px; }
    .project-table th:nth-child(3), .project-table td:nth-child(3) { display: none; }
    .form-section { padding: 19px 15px; }
    .inline-category-fields { grid-template-columns: 1fr; }
    .inline-create-form { grid-template-columns: minmax(0, 1fr) auto; }
    .inline-create-form > input { grid-column: 1 / -1; }
    .inline-create-form > .button { grid-column: 1 / -1; }
    .category-admin-row { grid-template-columns: 55px minmax(0, 1fr) 32px; gap: 8px; }
    .category-thumb { width: 52px; height: 43px; }
    .category-edit-form { grid-template-columns: minmax(80px, 1fr) 32px; gap: 5px; }
    .category-edit-form > .upload-control { grid-column: 1; grid-row: 2; justify-self: start; min-height: 29px; }
    .category-edit-form > .icon-action { grid-column: 2; grid-row: 1 / span 2; }
    .category-admin-row > form:last-child button { width: 28px; }
}
@media (max-width: 390px) {
    .archive-heading { align-items: flex-start; flex-direction: column; gap: 15px; }
    .archive-heading h1 { font-size: 38px; }
    .banner-count { padding: 6px 7px; font-size: 7px; }
    .admin-nav a { font-size: 9px; }
    .table-project strong { max-width: 94px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Device interaction, including tap and keyboard previews. */
.project-card:hover .laptop-stage, .laptop-stage:focus-visible {
    transform: translateY(-5px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}
.laptop-stage { cursor: pointer; }
.laptop-stage:focus-visible { outline: 2px solid var(--lime-dark); outline-offset: 6px; border-radius: 12px; }
.camera-dot { top: 0; width: 14px; height: 5px; border-radius: 0 0 3px 3px; transform: translateX(-50%); background: #070908; }
.camera-dot::after { content: ''; display: block; width: 2px; height: 2px; margin: 1px auto; border-radius: 50%; background: #394850; }
.category-banner { border-radius: 16px; }
.filter-chip, .admin-link, .button { border-radius: 8px; }
@media (hover: none) {
    .project-card:hover .page-capture { transform: translateY(0); }
    .laptop-stage.is-scrolling .page-capture { transform: translateY(calc(-1 * var(--scroll-distance, 0px))); }
}
@media (prefers-reduced-motion: reduce) {
    .project-card:hover .laptop-stage, .laptop-stage:focus-visible { transform: none; }
    .page-capture { transition: none; }
    .project-card:hover .page-capture, .laptop-stage:focus-visible .page-capture { transform: none; }
    .laptop-stage.is-scrolling .page-capture { transform: translateY(calc(-1 * var(--scroll-distance, 0px))); }
}

/* Official Kefi identity, paired with the product name. */
.brand { gap: 14px; }
.brand-logo { display: block; width: 73px; height: 48px; object-fit: contain; }
.folio-wordmark { padding-left: 14px; border-left: 1px solid #00368430; font: 500 25px/1 'Ubuntu', sans-serif; color: #003684; }
.auth-shell > .brand { padding: 8px 16px; border-radius: 10px; background: var(--paper); }
@media (max-width: 560px) {
    .brand { gap: 9px; }
    .brand-logo { width: 58px; height: 38px; }
    .folio-wordmark { padding-left: 9px; font-size: 22px; }
}
.gallery-intro { max-width: 540px; margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.admin-topbar-actions { display: flex; align-items: center; gap: 8px; }
@media (max-width: 560px) {
    .admin-topbar { flex-wrap: wrap; }
    .admin-topbar-actions { flex-wrap: wrap; }
    .admin-topbar-actions .button { min-height: 38px; padding: 0 10px; font-size: 10px; gap: 7px; }
    .gallery-intro { font-size: 12px; }
}
.laptop-stage, .filter-chip, .visit-link { -webkit-tap-highlight-color: transparent; }

/* Modern M4-inspired device: thin dark display edge, notch and flat metal chassis. */
.project-card { perspective: 1200px; padding: 18px 12px 15px; border: 1px solid #0036840b; border-radius: 18px; background: linear-gradient(145deg, #ffffffa8, #f3f2e850); transition: box-shadow .35s, border-color .35s; }
.project-card:hover { border-color: #00368422; box-shadow: 0 18px 36px -24px #00368455; }
.laptop-stage { display: block; transform-style: preserve-3d; padding: 8px 0 20px; }
.laptop-lid { width: 93%; padding: 1.5px; border: 1px solid #40434a; border-radius: 11px 11px 3px 3px; background: linear-gradient(135deg, #81838a, #292c32 45%, #94969c); box-shadow: 0 8px 20px #18203224, inset 0 1px #ffffff80; }
.laptop-bezel { padding: 4px 4px 5px; border-radius: 9px 9px 2px 2px; background: #08090b; }
.screen-viewport { border-radius: 6px 6px 1px 1px; aspect-ratio: 1.55; }
.camera-dot { z-index: 4; top: 3px; width: 12%; max-width: 42px; height: 9px; border-radius: 0 0 4px 4px; background: #08090b; }
.camera-dot::after { width: 2px; height: 2px; margin: 2px auto; background: #293847; }
.laptop-base { width: 100%; height: 7px; margin-top: 0; border: 1px solid #63666c; border-top-color: #aeb1b6; border-radius: 1px 1px 5px 5px; background: linear-gradient(#aeb0b5, #74777f 45%, #494c52); box-shadow: 0 2px 1px #1c22202a; }
.base-notch { width: 15%; height: 2px; background: #555960; border-radius: 0 0 3px 3px; }
.laptop-shadow { bottom: 10px; height: 12px; opacity: .7; filter: blur(10px); }
.project-card:hover .laptop-stage, .laptop-stage:focus-visible { transform: translateY(-7px) rotateX(var(--tilt-x, 2deg)) rotateY(var(--tilt-y, -2deg)); }
.project-caption { padding: 2px 3px 0; }
.project-caption h3 { font-size: 14px; }
.category-banner { height: clamp(170px, 19vw, 250px); }
.category-banner > img { object-position: center; }
.banner-shade { background: linear-gradient(90deg, #051c39b0, #051c3920 65%, #051c3910), linear-gradient(0deg, #051c3950, transparent 65%); }
@media (max-width: 700px) {
    .gallery-page { --page-gutter: 10px; }
    .category-banner { height: 168px; border-radius: 12px; padding: 18px 16px; }
    .project-grid { padding: 20px 2px 0; }
    .project-card { padding: 16px 10px; }
    .banner-copy h2 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
    .project-card:hover .laptop-stage, .laptop-stage:focus-visible { transform: none; }
}
.project-caption > div { min-width: 0; flex: 1; }
@media (max-width: 390px) {
    .banner-copy h2 { font-size: 28px; }
    .category-banner { gap: 8px; }
    .banner-count { flex-shrink: 0; }
}
.category-banner > img { object-position: center 32%; }
/* Optical alignment follows the KEFI lettering beneath its paper airplane. */
.topbar .folio-wordmark { transform: translateY(5px); }
.category-admin-row { grid-template-columns: 70px 82px minmax(0,1fr) 36px; }
.category-order-controls { display: flex; align-items: center; gap: 3px; margin: 0; }
.category-order-controls > span { width: 16px; color: var(--muted); font-size: 11px; }
.category-order-controls .icon-action { width: 24px; height: 30px; font-size: 14px; }
.icon-action:disabled { cursor: default; opacity: .3; }
.category-help { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.banner-copy { min-width: 0; }
@media (max-width:700px) {
    .category-admin-row { grid-template-columns: 64px 55px minmax(0,1fr) 32px; }
    .category-edit-form .upload-control { white-space: normal; text-align: center; }
    .banner-copy h2 { font-size: clamp(23px,6.5vw,32px); line-height: 1.08; }
}
@media (max-width:560px) {
    .category-admin-row { grid-template-columns: 64px minmax(0,1fr) 30px; gap: 6px; }
    .category-admin-row > .category-thumb { display: none; }
    .category-edit-form > input:not([type=hidden]) { min-width: 0; }
}
.category-banner:has(> img[src*="kefi-projects"]) > img { object-position: center 15%; }
