/* Dexterity Share client page. Design language "Line of flow" (brand/dx.css): a dark title-block
   panel that says what this is and where it comes from, beside a light work column with the files.
   (c) Dexterity Design Services Private Limited. */
:root { --pad-x: clamp(28px, 4.6vw, 72px); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.ico { width: 18px; height: 18px; flex: none; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--amber); color: #132b2e; font-weight: 600; padding: 8px 14px; border-radius: 4px; }
.skip:focus { top: 10px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.nav :focus-visible, .side :focus-visible, .skip:focus-visible { outline-color: var(--amber); }
h1[tabindex="-1"]:focus { outline: none; }

/* ---- page frame: the panel runs the full height on the left ---------------------------------- */
.page { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: auto 1fr auto; }
.page::before {
  content: ''; grid-column: 1; grid-row: 1 / -1; background-color: var(--panel);
  /* an isometric drafting grid, barely there, fading out towards the top */
  background-image:
    linear-gradient(to bottom, var(--panel) 0%, transparent 42%),
    radial-gradient(120% 70% at 0% 100%, rgba(42, 140, 152, .28), transparent 60%),
    repeating-linear-gradient(30deg, rgba(185, 207, 209, .055) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(150deg, rgba(185, 207, 209, .055) 0 1px, transparent 1px 34px);
}
.nav { grid-column: 1; grid-row: 1; padding: 30px var(--pad-x) 0; color: var(--on-panel); position: relative; z-index: 1; }
.tools { grid-column: 2; grid-row: 1; justify-self: end; padding: 22px 26px 0; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; transition: color .2s, border-color .2s, transform .3s var(--ease); }
.icon-btn:hover { color: var(--ink); border-color: var(--ink-2); transform: rotate(-18deg); }
#main { grid-column: 1 / -1; grid-row: 2; display: grid; min-width: 0; }
.card { display: grid; min-width: 0; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-width: 0; }
.side { position: relative; display: flex; flex-direction: column; gap: 22px; padding: clamp(44px, 9vh, 104px) var(--pad-x) 48px; color: var(--on-panel); min-width: 0; }
.main { display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: calc(620px + 2 * var(--pad-x)); padding: clamp(44px, 9vh, 104px) var(--pad-x) 32px; min-width: 0; }
footer { grid-column: 2; grid-row: 3; width: 100%; max-width: calc(620px + 2 * var(--pad-x)); padding: 10px var(--pad-x) 30px; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }
footer p { margin: 0 0 3px; }
footer .legal { margin-top: 8px; font: 500 10.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; opacity: .8; }

/* ---- the panel ------------------------------------------------------------------------------ */
.kicker { margin: 0; color: var(--amber); display: flex; align-items: center; gap: 12px; }
.kicker::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.side h1 { margin: 0; font: 300 clamp(36px, 4.5vw, 68px)/1.02 var(--display); letter-spacing: -.035em; text-wrap: balance; overflow-wrap: anywhere; color: var(--on-panel); }
.side h1.title { font-weight: 280; }
.side p { margin: 0; color: var(--on-panel-2); }
.from { display: flex; align-items: center; gap: 12px; color: var(--on-panel-2); font-size: 15px; line-height: 1.4; }
.from b { color: var(--on-panel); font-weight: 600; overflow-wrap: anywhere; }
.from > span { min-width: 0; overflow-wrap: anywhere; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--amber); color: #132b2e; font: 500 12.5px var(--mono); letter-spacing: .04em; }
.message { margin: 0; max-width: 34ch; color: var(--on-panel); font: italic 400 clamp(21px, 1.9vw, 26px)/1.32 var(--serif); white-space: pre-wrap; overflow-wrap: anywhere; position: relative; padding-left: 26px; }
.message::before { content: '\201C'; position: absolute; left: -2px; top: -10px; font: italic 500 54px/1 var(--serif); color: var(--amber); }

/* the title block: label over value, hairlines between, like the corner of a drawing */
.pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-top: auto; border-top: 1px solid var(--panel-line); border-bottom: 1px solid var(--panel-line); }
.pill { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px 14px 0; font-variant-numeric: tabular-nums; color: var(--on-panel-2); font-size: 13px; line-height: 1.35; min-width: 0; }
.pill + .pill { padding-left: 18px; border-left: 1px solid var(--panel-line); }
.pill .k { color: var(--on-panel-3); font-size: 10px; }
.pill .v { color: var(--on-panel); font: 400 19px/1.25 var(--display); letter-spacing: -.01em; }
.pill .v b { font-weight: 500; }
.pill .d { color: var(--on-panel-3); font-size: 12.5px; }
.pill.soon .v, .pill.soon .k { color: var(--amber); }

/* direct from our office: the line of flow with one quiet sentence */
.direct { margin-top: 6px; color: var(--on-panel-2); }
.direct .route { color: var(--on-panel-2); }
.direct-words { margin: 14px 0 0 !important; max-width: 46ch; font-size: 13.5px; line-height: 1.55; color: var(--on-panel-3) !important; }
.direct-words b { color: var(--on-panel); font: 500 13.5px var(--font); }
.state .direct { margin-top: auto; padding-top: 20px; }

/* ---- the work column ------------------------------------------------------------------------- */
.label, .files-title { margin: 0; color: var(--ink-2); display: flex; align-items: center; gap: 12px; }
.files-title::after, .label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.main p { margin: 0; max-width: 54ch; }
.state .main > p:first-of-type { font: 400 clamp(19px, 1.6vw, 22px)/1.45 var(--display); letter-spacing: -.01em; color: var(--ink); }
.main .small, .main .sub { color: var(--ink-2); font-size: 13.5px; }
.main .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.countdown { font: 500 1em var(--mono); color: var(--accent); }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* On the files view the main action comes first for keyboard and screen readers (one Tab from the
   heading) and sits under the list on screen. */
.ready .main > .files-title { order: 1; }
.ready .main > .files { order: 2; }
.ready .main > .cta { order: 3; }
.ready .main > .status { order: 4; }
.ready .main > .assure { order: 5; }
.ready .main > .note { order: 6; }
.ready .main > .fine { order: 7; }
.status:empty { display: none; }

/* ---- buttons ---------------------------------------------------------------------------------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 20px; border-radius: 999px; font: 600 15px var(--font); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .2s, border-color .2s, color .2s, transform .15s var(--ease); }
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--cta); color: var(--on-cta); border-color: transparent; }
.btn.primary:hover { background: var(--cta-hover); }
.btn.lg { width: 100%; min-height: 62px; padding: 0 26px; font-size: 16.5px; overflow: hidden; }
.btn.lg .lbl { flex: 1; text-align: left; }
.btn.lg .size { font: 500 14px var(--mono); letter-spacing: .02em; }
.btn.lg .ico { width: 20px; height: 20px; }
.btn.lg:hover .ico { animation: nudge .9s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateY(3px); } }
/* a light sweep across the main button when it first appears */
.btn.lg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%); transform: translateX(-100%); animation: sweep 1.3s var(--ease) 1.1s; pointer-events: none; }
@keyframes sweep { to { transform: translateX(100%); } }
.btn.sm { min-height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent); padding: 0 12px; }
.btn.ghost:hover { background: var(--row-2); }
.btn.round { width: 40px; height: 40px; min-height: 0; padding: 0; border-color: var(--line-2); background: var(--surface); flex: none; }
.btn.round:hover { color: var(--accent); border-color: var(--accent); }
.btn[disabled] { opacity: .6; cursor: default; }
.cta { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }

/* ---- file rows -------------------------------------------------------------------------------- */
.files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 16px; padding: 16px 4px; border-bottom: 1px solid var(--line); background: var(--surface); animation: dx-rise .5s var(--ease) both; }
.file:nth-child(2) { animation-delay: .05s; } .file:nth-child(3) { animation-delay: .1s; } .file:nth-child(4) { animation-delay: .15s; } .file:nth-child(n+5) { animation-delay: .2s; }
.badge { grid-row: span 2; width: 46px; height: 54px; position: relative; display: grid; place-items: end center; padding-bottom: 8px; border: 1px solid var(--line-2); border-radius: 3px; color: var(--accent); background: var(--row); font: 500 10.5px var(--mono); letter-spacing: .06em; }
.badge::after { content: ''; position: absolute; top: -1px; right: -1px; width: 12px; height: 12px; background: linear-gradient(225deg, var(--bg) 50%, var(--line-2) 50%, var(--row-2) calc(50% + 1px)); }
.badge.pdf { color: #b3261e; } .badge.cad { color: var(--accent); } .badge.sheet { color: #17734a; }
:root[data-theme="dark"] .badge.pdf { color: #ff9b93; } :root[data-theme="dark"] .badge.sheet { color: #6fd3a0; }
.file .name { font: 500 16px/1.35 var(--font); overflow-wrap: anywhere; }
.file .meta { grid-column: 2; color: var(--ink-2); font: 400 12.5px var(--mono); letter-spacing: .02em; }
.file .act { grid-row: 1 / span 2; grid-column: 3; display: flex; align-items: center; gap: 6px; }
.file .more { grid-column: 1 / -1; }
.hash { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 4px; background: var(--row); font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; animation: dx-rise .3s var(--ease) both; }
.hash b { color: var(--ink-2); }
.hash code { display: block; width: 100%; font: 12px/1.55 var(--mono); color: var(--ink); overflow-wrap: anywhere; user-select: all; }
.hash .how { margin: 0; color: var(--ink-2); }
@media (max-width: 519px) {
  .file .act { grid-row: 3; grid-column: 1 / -1; justify-content: space-between; margin-top: 8px; }
  .file .act .btn.ghost { margin-left: -12px; }
}

/* ---- progress (download through the page) ---------------------------------------------------- */
.prog { margin-top: 12px; animation: dx-rise .3s var(--ease) both; }
.prog .line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; margin-top: 8px; font: 400 12.5px var(--mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.prog .ok { color: var(--ok); font: 600 13.5px var(--font); }
.prog .err { color: var(--bad); font: 600 13.5px var(--font); }

/* ---- notes ------------------------------------------------------------------------------------ */
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 4px; background: var(--row); color: var(--ink); font-size: 14px; border-left: 2px solid var(--line-2); animation: dx-rise .35s var(--ease) both; }
.note .ico { margin-top: 2px; color: var(--ink-2); }
.note.good { background: var(--ok-tint); border-left-color: var(--ok); }
.note.good .ico { color: var(--ok); }
.note.warn { background: var(--warn-tint); border-left-color: var(--warn); }
.note.warn .ico { color: var(--warn); }
.note.bad { background: var(--bad-tint); border-left-color: var(--bad); }
.note.bad .ico { color: var(--bad); }
.prog .note { margin-top: 8px; background: var(--surface); }
.assure { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 0 !important; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.assure .ico { color: var(--accent); margin-top: 2px; }
.assure b { color: var(--ink); font-weight: 600; }
.fine { margin: 0; color: var(--ink-2); font-size: 13px; }

/* ---- password ---------------------------------------------------------------------------------- */
.main .lock-glyph { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--accent); animation: dx-pop .5s var(--ease) .2s both; }
.main .lock-glyph svg { width: 22px; height: 22px; }
.main h2.ask { margin: 0; font: 300 clamp(26px, 2.6vw, 34px)/1.15 var(--display); letter-spacing: -.025em; }
.lock { max-width: 460px; margin-top: 6px; }
.lock label { display: block; margin-bottom: 8px; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.field { display: flex; gap: 8px; }
.field input { flex: 1; min-width: 0; height: 50px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 16px; transition: border-color .2s; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field input[aria-invalid="true"] { border-color: var(--bad); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.field .btn { min-height: 50px; }
.lock .err { margin: 10px 0 0; color: var(--bad); font-size: 14px; font-weight: 600; min-height: 1.5em; }
.lock .show { margin-top: 8px; display: inline-flex; align-items: center; gap: 8px; font: 400 14px var(--font); letter-spacing: 0; text-transform: none; color: var(--ink-2); cursor: pointer; }
.lock .show input { width: 16px; height: 16px; accent-color: var(--teal); }
@media (max-width: 419px) { .field { flex-direction: column; } .field .btn { width: 100%; } }

/* ---- loading ------------------------------------------------------------------------------------ */
.sk { border-radius: 3px; background: linear-gradient(90deg, var(--row) 25%, var(--row-2) 50%, var(--row) 75%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
.side .sk { background-image: linear-gradient(90deg, rgba(185, 207, 209, .07) 25%, rgba(185, 207, 209, .15) 50%, rgba(185, 207, 209, .07) 75%); }
.sk-hero { width: min(440px, 92%); height: clamp(36px, 4.5vw, 64px); }
.sk-hero.short { width: min(280px, 64%); margin-top: -10px; }
.sk-label { width: 120px; height: 12px; }
.sk-row { height: 86px; }
.sk-btn { height: 62px; border-radius: 999px; }
.loading .direct { margin-top: auto; }
.loading-note { margin: 0; color: var(--ink-2); font-size: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.btn.primary .spin { color: var(--on-cta); }

/* ---- view entrance: the panel settles line by line, the title is drawn up from its baseline ---- */
.card > .view > .side > * { animation: dx-rise .55s var(--ease) both; }
.card > .view > .side > :nth-child(2) { animation-delay: .06s; }
.card > .view > .side > :nth-child(3) { animation-delay: .14s; }
.card > .view > .side > :nth-child(4) { animation-delay: .2s; }
.card > .view > .side > :nth-child(5) { animation-delay: .26s; }
.card > .view > .side > :nth-child(n+6) { animation-delay: .32s; }
.card > .view > .side > h1 { animation: dx-wipe .8s var(--ease) .05s both; }
.card > .view > .main { animation: dx-rise .55s var(--ease) .12s both; }

@media (scripting: none) {
  .card > .loading { display: none; }
  .card > noscript { display: grid; }
  .tools { display: none; }
}

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 24px); padding: 11px 20px; border-radius: 999px; background: var(--panel); color: var(--on-panel); font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .25s, transform .35s var(--ease); z-index: 40; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(19, 43, 46, .25); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---- phones and narrow windows: one column, the panel first ------------------------------------ */
@media (max-width: 759px) {
  :root { --pad-x: 20px; }
  .page { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; }
  .page::before { display: none; }
  .nav { grid-column: 1; grid-row: 1; background: var(--panel); padding: 20px 72px 0 var(--pad-x); align-self: stretch; }
  .tools { grid-column: 1; grid-row: 1; padding: 12px 14px 0; }
  .tools .icon-btn { background: transparent; border-color: var(--panel-line); color: var(--on-panel); }
  .tools .icon-btn:focus-visible { outline-color: var(--amber); }
  #main { grid-column: 1; grid-row: 2; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .side { background: radial-gradient(120% 80% at 0% 100%, rgba(42, 140, 152, .3), transparent 65%) var(--panel); padding: 30px var(--pad-x) 30px; gap: 18px; overflow: hidden; }
  .main { max-width: none; padding: 28px var(--pad-x) 24px; }
  footer { grid-column: 1; grid-row: 4; max-width: none; padding: 4px var(--pad-x) 28px; }
  .side h1 { font-size: clamp(32px, 9.6vw, 46px); }
  .message { font-size: 20px; }
  .pills { margin-top: 4px; }
}
@media (max-width: 359px) { :root { --pad-x: 16px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001s !important; }
}
@media print {
  .tools, .toast, .skip, .direct { display: none; }
  .page::before { display: none; }
  .nav, .side { color: #000; background: none; }
  .side p, .side h1, .from, .from b, .message, .pill, .pill .v { color: #000; }
}
