:root {
  --rose: #b58678;
  --dust: #d6a392;
  --sage: #747e5f;
  --brown: #6d4a30;
  --choc: #4f2f26;
  --copper: #99643f;
  --sand: #e2dcc5;
  --off: #fbf8f6;
  --paper: #f9f7fa;
  --ink: #312c29;
  --line: #e6ddd7;
}

* { box-sizing: border-box; }
html { background: var(--off); }
body { margin: 0; background: var(--off); color: var(--ink); font: 15px "Montserrat", "Avenir Next", "Helvetica Neue", Arial, sans-serif; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--dust); color: var(--choc); }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.topbar { align-items: center; background: var(--choc); color: var(--off); display: flex; height: 76px; justify-content: space-between; padding: 0 clamp(22px, 4vw, 68px); }
.brand-mark { align-items: center; display: flex; flex: 0 0 auto; gap: 10px; height: 54px; width: max-content; }
.brand-mark__icon, .brand-mark__wordmark { background-position: center; background-repeat: no-repeat; background-size: contain; display: block; flex: 0 0 auto; }
.brand-mark__icon { background-image: url("https://hefuco.com/favicon-hefuco.svg?v=4"); height: 34px; width: 34px; }
.brand-mark__wordmark { background-image: url("https://hefuco.com/images/hefuco-logo-text.png?v=4"); background-position: -156px -105.3px; background-size: 349.4px 232.9px; height: 22px; width: 121px; }
.top-actions { align-items: center; display: flex; gap: 15px; }
.top-actions > span { color: #fbf8f6a3; font-size: 9px; font-weight: 700; letter-spacing: .08em; max-width: 280px; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.all-boards { color: #fbf8f6c7; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.quiet { background: transparent; border: 1px solid #fbf8f65c; cursor: pointer; display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 10px 14px; text-transform: uppercase; }
.quiet:hover { background: var(--off); color: var(--choc); }
.quiet.dark { border-color: #7d6a5e6b; color: var(--choc); }
.quiet.dark:hover { background: var(--choc); color: var(--off); }

.eyebrow { color: var(--brown) !important; font-size: 10px !important; font-weight: 800; letter-spacing: .18em; margin: 0 0 17px !important; text-transform: uppercase; }
.primary, .delete { border: 0; cursor: pointer; display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .1em; padding: 13px 18px; text-transform: uppercase; }
.primary { background: var(--choc); color: var(--off); margin-top: 18px; }
.primary:hover { background: var(--brown); }
.primary:disabled { cursor: wait; opacity: .55; }
.delete { background: transparent; color: #9a3b32; }
.button-link { width: max-content; }
.error { background: #f7dfdc; border: 1px solid #e4bbb5; color: #81352d; margin: 20px clamp(22px, 4vw, 64px); padding: 13px 16px; }

.page-loader { align-items: center; display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - 76px); }
.page-loader span { animation: spin .8s linear infinite; border: 2px solid var(--line); border-top-color: var(--rose); border-radius: 50%; height: 34px; width: 34px; }
.page-loader p { color: #8a817c; font-size: 10px; font-weight: 700; letter-spacing: .1em; margin-top: 18px; text-transform: uppercase; }
@keyframes spin { to { transform: rotate(360deg); } }

.dashboard-hero { align-items: end; display: flex; justify-content: space-between; margin: auto; max-width: 1520px; padding: 72px clamp(22px, 6vw, 96px) 48px; }
.dashboard-hero h1, .intro h1 { font: 400 clamp(44px, 5.2vw, 82px)/.94 Georgia, serif; letter-spacing: -.05em; margin: 0; }
.dashboard-hero h1 { font-size: clamp(58px, 8vw, 118px); }
.dashboard-hero > div > p:last-child, .intro > div:first-child > p:last-child { color: #716964; font-size: 16px; line-height: 1.65; margin: 20px 0 0; max-width: 720px; }
.new-board { margin: 0 !important; }
.board-catalog { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: auto; max-width: 1520px; padding: 0 clamp(22px, 6vw, 96px) 86px; }
.board-tile { background: var(--sand); display: flex; flex-direction: column; min-height: 430px; padding: 26px; transition: transform .18s, box-shadow .18s; }
.board-tile:nth-child(3n+2) { background: var(--dust); }
.board-tile:nth-child(3n+3) { background: #dfe7da; }
.board-tile:hover { box-shadow: 0 18px 45px #4f2f2617; transform: translateY(-4px); }
.tile-top { align-items: center; display: flex; justify-content: space-between; }
.tile-top > span { font: italic 38px Georgia, serif; opacity: .5; }
.tile-top i { border: 1px solid #4f2f2638; font-size: 8px; font-style: normal; font-weight: 800; letter-spacing: .1em; padding: 6px 8px; text-transform: uppercase; }
.board-tile > p:not(.tile-copy) { color: var(--brown); font-size: 9px; font-weight: 800; letter-spacing: .14em; margin: 46px 0 10px; text-transform: uppercase; }
.board-tile h2 { font: 400 clamp(30px, 3vw, 48px)/1 Georgia, serif; letter-spacing: -.04em; margin: 0; }
.tile-copy { color: #625b56; font-size: 12px; line-height: 1.65; margin: 18px 0; }
.tile-stats { border-top: 1px solid #4f2f2624; display: flex; flex-wrap: wrap; gap: 22px; margin-top: auto; padding-top: 16px; }
.tile-stats span { color: #6f665f; font-size: 9px; text-transform: uppercase; }
.tile-stats strong { color: var(--choc); font: 400 18px Georgia, serif; margin-right: 4px; }
.tile-stats .warn strong { color: #a54237; }
.tile-link { align-items: center; border-top: 1px solid #4f2f2624; display: flex; font-size: 9px; justify-content: space-between; letter-spacing: .1em; margin-top: 18px; padding-top: 18px; text-transform: uppercase; }

.intro { align-items: end; display: grid; gap: 48px; grid-template-columns: 1fr minmax(300px, 460px); margin: auto; max-width: 1680px; padding: 58px clamp(22px, 4vw, 64px) 38px; }
.momentum { border-left: 1px solid var(--rose); padding: 4px 0 4px 28px; }
.momentum > div { align-items: baseline; display: grid; gap: 7px 10px; grid-template-columns: auto 1fr 1px auto 1fr; }
.momentum strong { color: var(--choc); font: 400 36px Georgia, serif; }
.momentum span { color: #726a65; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.momentum i { align-self: stretch; background: var(--line); display: block; margin-inline: 8px; }
.momentum > p:last-child { color: #908680; font-size: 10px; margin: 14px 0 0; }
.summary { border-block: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); margin: 0 clamp(22px, 4vw, 64px) 28px; }
.summary > div { align-items: baseline; display: flex; gap: 13px; padding: 15px 20px 15px 0; }
.summary > div + div { border-left: 1px solid var(--line); padding-left: 20px; }
.summary span { color: #8a817c; font-size: 9px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.summary strong { font: 400 22px Georgia, serif; }
.summary .alert strong { color: #a54237; }
.summary .delivered strong { color: var(--sage); }

.board { margin: auto; max-width: 1800px; padding: 0 clamp(16px, 3vw, 48px) 54px; }
.board-toolbar { align-items: center; display: flex; justify-content: space-between; padding: 4px 0 14px; }
.board-toolbar span { color: var(--brown); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.board-toolbar p { color: #918781; font-size: 11px; margin: 4px 0 0; }
.board-scroll { overflow-x: auto; padding-bottom: 16px; scrollbar-color: var(--rose) #ede6e1; }
.board-grid { display: grid; grid-template-columns: 225px repeat(4, minmax(245px, 1fr)); min-width: 1225px; }
.board-head { border-bottom: 1px solid var(--line); }
.board-head > div { color: #948a84; font-size: 10px; font-weight: 800; letter-spacing: .12em; padding: 14px 18px 14px 10px; text-transform: uppercase; }
.board-head .col-head { border-left: 1px solid var(--line); display: flex; justify-content: space-between; padding-left: 18px; }
.col-head small { color: #a29994; font-size: 9px; letter-spacing: .05em; text-transform: none; }
.swimlane { border-bottom: 1px solid var(--line); min-height: 270px; }
.lane-title { padding: 20px 20px 18px 10px; }
.lane-heading { align-items: start; display: flex; justify-content: space-between; }
.lane-code { align-items: center; background: var(--dust); color: var(--choc); display: inline-flex; font: 13px Georgia, serif; height: 38px; justify-content: center; margin-bottom: 22px; min-width: 38px; padding: 0 7px; }
.lane-code.tone-1 { background: #dfe7da; color: #45503c; }
.lane-code.tone-2 { background: var(--sand); color: var(--brown); }
.lane-code.tone-3 { background: #ead8d0; color: var(--copper); }
.lane-edit { background: transparent; border: 0; color: #a99e97; cursor: pointer; letter-spacing: 1px; padding: 4px; }
.lane-title h2 { font: 400 20px/1.08 Georgia, serif; margin: 0; overflow-wrap: anywhere; }
.lane-title > p { color: #8d837d; font-size: 11px; line-height: 1.45; margin: 7px 0 0; }
.lane-progress { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 12px; }
.lane-progress > div:first-child { align-items: baseline; display: flex; justify-content: space-between; }
.lane-progress span { color: var(--brown); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lane-progress strong { font: 400 15px Georgia, serif; }
.lane-progress progress { appearance: none; background: #e6ddd7; border: 0; display: block; height: 6px; margin-top: 7px; width: 100%; }
.lane-progress progress::-webkit-progress-bar { background: #e6ddd7; }
.lane-progress progress::-webkit-progress-value { background: var(--sage); }
.lane-progress progress::-moz-progress-bar { background: var(--sage); }
.lane-progress > p { color: #9a908a; font-size: 9px; margin: 6px 0 0; }
.cell { border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; min-height: 270px; padding: 12px; transition: background .15s; }
.cell.drop { background: #efe8e3; }
.card { background: #fff; border: 1px solid #e9e1dc; border-left: 3px solid var(--rose); box-shadow: 0 3px 12px #4f2f260d; cursor: pointer; display: flex; flex-direction: column; gap: 9px; padding: 14px; text-align: left; transition: .16s; width: 100%; }
.card:hover { box-shadow: 0 7px 22px #4f2f2617; transform: translateY(-1px); }
.card[draggable=true] { cursor: grab; }
.card.blocked { border-left-color: #b64a3e; }
.card-top { align-items: center; display: flex; justify-content: space-between; width: 100%; }
.card-top em { color: #8b817b; font-size: 9px; font-style: normal; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.card-top b { color: #b5aaa3; letter-spacing: -2px; }
.card > strong { font-size: 13px; line-height: 1.35; }
.description { color: #746c67; display: -webkit-box; font-size: 11px; line-height: 1.5; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tags i { background: #efeae6; color: #675e59; font-size: 8px; font-style: normal; font-weight: 800; letter-spacing: .08em; padding: 5px 7px; text-transform: uppercase; }
.tags .blocked-tag { background: #f5d7d3; color: #8b3028; }
.reason { align-items: center; background: #fbefed; color: #873a31; display: flex; font-size: 10px; gap: 7px; margin: 1px -4px -4px; padding: 8px; width: calc(100% + 8px); }
.reason b { align-items: center; border: 1px solid; border-radius: 50%; display: flex; flex: 0 0 16px; font-size: 9px; height: 16px; justify-content: center; }
.add { background: transparent; border: 1px dashed #d8ccc4; color: #817671; cursor: pointer; font-size: 10px; font-weight: 700; margin-top: auto; padding: 10px; text-align: left; }
.add:hover { background: #f0e9e4; border-color: var(--rose); }
.empty-lanes { border: 1px dashed var(--line); margin: 20px 0; padding: 50px; text-align: center; }
.empty-lanes h2 { font: 400 28px Georgia, serif; }

footer { border-top: 1px solid var(--line); color: #8b817b; display: flex; font-size: 9px; font-weight: 700; justify-content: space-between; letter-spacing: .12em; margin: 0 clamp(22px, 4vw, 64px); padding: 22px 0 30px; text-transform: uppercase; }
.empty-state { border: 1px dashed var(--line); grid-column: 1/-1; padding: 70px; text-align: center; }
.empty-state h2, .empty-state h1 { font: 400 36px Georgia, serif; }
.empty-state.standalone { margin: 10vh auto; max-width: 660px; }
.empty-state .primary { display: inline-block; }

.backdrop { align-items: center; background: #312c298a; display: flex; inset: 0; justify-content: center; padding: 20px; position: fixed; z-index: 100; }
.modal { background: var(--off); box-shadow: 0 24px 80px #312c2947; max-height: calc(100vh - 40px); max-width: 680px; overflow-y: auto; padding: clamp(28px, 4vw, 48px); position: relative; width: 100%; }
.modal.small { max-width: 480px; }
.access-modal { max-width: 760px; }
.close { background: transparent; border: 0; color: #8d837d; cursor: pointer; font-size: 28px; position: absolute; right: 18px; top: 14px; }
.modal h2 { font: 400 34px Georgia, serif; letter-spacing: -.03em; margin: 0 36px 12px 0; }
.modal-copy { color: #766d68; line-height: 1.65; }
.modal label, .auth-form label { color: #625a56; display: flex; flex-direction: column; font-size: 9px; font-weight: 800; gap: 7px; letter-spacing: .08em; margin-top: 18px; text-transform: uppercase; }
.modal input, .modal textarea, .modal select, .auth-form input { background: #fff; border: 1px solid #ddd2cb; color: var(--ink); font-size: 13px; font-weight: 400; letter-spacing: 0; padding: 12px; text-transform: none; width: 100%; }
.task-form { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }
.task-form .wide { grid-column: 1/-1; }
.task-form .check { align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 10px; }
.check input { accent-color: var(--rose); width: auto; }
.stack-form { display: flex; flex-direction: column; }
.actions { align-items: center; display: flex; justify-content: space-between; margin-top: 18px; }
.field-error, .form-error { color: #9a3b32 !important; font-size: 11px; line-height: 1.5; }
.readonly > p { color: #6f6661; line-height: 1.7; }
.readonly dl { border-top: 1px solid var(--line); margin-top: 28px; }
.readonly dl div { border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 130px 1fr; padding: 13px 0; }
.readonly dt { color: #918781; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.readonly dd { margin: 0; }
.member-form { align-items: end; display: grid; gap: 12px; grid-template-columns: 1.4fr 1fr auto; }
.member-form .primary { margin: 18px 0 0; }
.member-list { border-top: 1px solid var(--line); margin-top: 28px; }
.member-list > div { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 12px; grid-template-columns: 1fr 190px auto; padding: 13px 0; }
.member-list strong { font-size: 12px; }
.member-list span { color: #7d746f; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.member-list button { background: transparent; border: 0; color: #a54237; cursor: pointer; font-size: 9px; text-transform: uppercase; }
.access-note { background: #eee8e4; color: #766d68; font-size: 10px !important; line-height: 1.55; margin-top: 22px; padding: 12px; }
.invite-box:not(:empty) { background: #dfe7da; border-left: 3px solid var(--sage); margin-top: 20px; padding: 16px; }
.invite-box strong { font: 400 20px Georgia, serif; }
.invite-box p { color: #5d6554; font-size: 11px; line-height: 1.55; }

.auth-page { min-height: 100vh; }
.auth-shell { display: grid; grid-template-columns: minmax(360px, 1.05fr) minmax(420px, .95fr); min-height: 100vh; }
.auth-brand { background: var(--choc); color: var(--off); display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 42px clamp(32px, 6vw, 96px); }
.auth-brand .eyebrow { color: var(--dust) !important; }
.auth-brand h1 { font: 400 clamp(60px, 8vw, 122px)/.86 Georgia, serif; letter-spacing: -.06em; margin: 0; }
.auth-brand div > p:last-child { color: #f8eee9b8; font-size: 16px; line-height: 1.7; margin-top: 30px; max-width: 520px; }
.auth-brand small { color: #f8eee96e; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.auth-panel { align-items: center; display: flex; justify-content: center; padding: 48px clamp(30px, 6vw, 92px); }
.auth-form { max-width: 460px; width: 100%; }
.auth-form h2 { font: 400 clamp(38px, 5vw, 62px)/.95 Georgia, serif; letter-spacing: -.04em; margin: 0; }
.auth-form > p:not(.eyebrow):not(.form-error) { color: #766d68; line-height: 1.65; margin: 20px 0; }
.auth-form label small { color: #988e88; font-size: 9px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.auth-form .primary { margin-top: 28px; width: 100%; }

@media (max-width: 1000px) {
  .board-catalog { grid-template-columns: repeat(2, 1fr); }
  .intro { align-items: start; grid-template-columns: 1fr; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .summary > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .summary > div:nth-child(4) { border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .topbar { height: 68px; }
  .brand-mark { height: 46px; gap: 8px; }
  .brand-mark__icon { height: 30px; width: 30px; }
  .brand-mark__wordmark { background-position: -134.1px -90.5px; background-size: 300.3px 200.2px; height: 19px; width: 104px; }
  .top-actions > span, .all-boards { display: none; }
  .dashboard-hero { align-items: flex-start; flex-direction: column; gap: 28px; padding-top: 48px; }
  .board-catalog { grid-template-columns: 1fr; }
  .board-tile { min-height: 380px; }
  .board { padding-inline: 10px; }
  .task-form { grid-template-columns: 1fr; }
  .task-form .wide { grid-column: auto; }
  .member-form { grid-template-columns: 1fr; }
  .member-list > div { grid-template-columns: 1fr auto; }
  .member-list span { grid-column: 1; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { min-height: 42vh; padding: 28px; }
  .auth-brand h1 { font-size: 56px; }
  .auth-brand div > p:last-child, .auth-brand small { display: none; }
  .auth-panel { min-height: 58vh; }
}

@media (max-width: 520px) {
  .summary { margin-inline: 22px; }
  .summary > div { align-items: flex-start; flex-direction: column; gap: 5px; }
  .dashboard-hero, .intro { padding-inline: 22px; }
  footer { align-items: flex-start; flex-direction: column; gap: 8px; }
  .modal { padding: 28px 22px; }
  .momentum { padding-left: 18px; }
  .momentum strong { font-size: 30px; }
  .auth-panel { padding: 36px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

