/* Stories Download — visual identity: "highlights home" (v3-B).
 * Warm paper canvas, stone ink, clay / sand / slate highlight rings.
 * Not Instagram's brand colours, glyph, or gradient.
 * The v1 wordmark (green rounded square) keeps its own official fills.
 */
@font-face {
  font-family: "Albert Sans";
  src: url("/assets/AlbertSans.e95c387bfe.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F5F2EC;
  --card: #FFFFFF;
  --ink: #1C1917;
  --muted: #57534E;
  --hint: #6B6560;
  --line: #E4DFD6;
  --clay: #8A5A3C;
  --sand: #C4B49A;
  --slate: #4A5560;
  --danger: #8A2B2B;
  --danger-bg: #F8EEEE;
  --ok: #3F5D46;
  --font: "Albert Sans", ui-sans-serif, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  font-weight: 430;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; }
a { color: var(--clay); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
button, textarea, input { font: inherit; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--clay);
  color: #fff;
  border-radius: 6px;
}
.skip:focus { top: 8px; }

.wrap,
.footer-row,
.not-affiliated {
  width: min(100% - 40px, 760px);
  margin-left: auto;
  margin-right: auto;
}

/* Header — same centered column as the page */
.site-header {
  padding: 0;
  border-bottom: 1px solid var(--line);
}
.header-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 48px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  min-height: 44px;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: block;
}
.nav {
  display: none;
  margin-left: auto;
  gap: 12px;
  flex-wrap: nowrap;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--clay); }
.header-bar .dsk-account {
  margin-left: auto;
}
.menu-btn {
  margin-left: 0;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.menu-panel {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 8px 0 14px;
}
.menu-panel[hidden] { display: none; }

/* Author display rules (e.g. .btn { display: inline-flex }) must not override hidden. */
[hidden] { display: none !important; }
.menu-panel a {
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.menu-panel a[aria-current="page"] { color: var(--clay); }

/* Homepage / shared page intro — tight column, starts near the top */
main { flex: 1; padding: 20px 0 0; }
.profile { padding: 0; }
h1 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 5.2vw, 2.35rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.lede {
  margin: 0 0 14px;
  max-width: 60ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}
.profile-home .lede {
  font-size: 0.9375rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Highlights row — homepage tool entries */
.highlights { padding: 0 0 14px; }
.row-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hint);
}
.ring-row {
  display: flex;
  gap: 14px;
}
.hl {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
  min-width: 64px;
  min-height: 44px;
}
.cover {
  position: relative;
  width: 48px;
  height: 48px;
  color: var(--ink);
}
.cover svg { display: block; width: 48px; height: 48px; }
.cover i {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.cover-story i { background: #E8D5C4; color: #5C3A28; }
.cover-high i { background: #E6DCC8; color: #5C4E38; }
.cover-reels i { background: #D7DCE0; color: #2E363C; }
.hl-name { font-size: 11px; font-weight: 650; color: var(--muted); }
.hl.is-active .hl-name { color: var(--ink); }
.hl:not(.is-active) .cover { opacity: 0.78; }
.hl:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 8px; }


/* Type bar — compact tool chooser above the paste form (site-specific, not kit) */
.type-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scroll-padding-inline: 8px;
  margin: 0 0 12px;
  padding: 0 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FBFAF7;
  -webkit-overflow-scrolling: touch;
}
.type-bar-item {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 40px;
  min-height: 40px;
  padding: 6px 8px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 650;
}
.type-bar-item + .type-bar-item {
  box-shadow: inset 1px 0 0 var(--line);
}
.type-bar-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: none;
}
.type-bar-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.type-bar-item:hover { color: var(--ink); }
.type-bar-item[aria-current="page"],
.type-bar-item.is-current { color: var(--clay); }
.type-bar-item[aria-current="page"]::after,
.type-bar-item.is-current::after {
  content: "";
  position: absolute;
  inset-inline: 8px;
  bottom: 0;
  border-block-end: 2px solid var(--clay);
}
.type-bar-item:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: -2px;
  z-index: 1;
}

@media (min-width: 720px) {
  .type-bar { padding: 0 4px; margin-bottom: 14px; }
  .type-bar-item {
    flex-direction: row;
    gap: 6px;
    min-width: 0;
    min-height: 42px;
    padding: 6px 11px;
  }
  .type-bar-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    clip: auto;
    overflow: visible;
    white-space: nowrap;
    font-size: 13px;
    letter-spacing: -0.01em;
  }
}

/* Tool card — compact, no side preview, so the form stays on the first screen */
.viewer {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 14px 16px;
  box-shadow: 0 1px 0 rgba(28, 25, 23, 0.04);
}
.viewer-cover { display: none; }
.tool { min-width: 0; }
.tool label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 6px;
  color: var(--hint);
}
.tool-field input[type="text"],
.tool textarea {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  box-sizing: border-box;
  min-height: 44px;
  height: 44px;
  max-height: 44px;
  resize: none;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 0;
  padding: 0 12px;
  line-height: 44px;
  outline: none;
  margin: 0;
  field-sizing: fixed;
}
.tool-field input[type="text"]:focus,
.tool textarea:focus { border-color: transparent; }
.tool-field input[type="text"]::placeholder,
.tool textarea::placeholder {
  color: #6B6560;
  line-height: 44px;
  vertical-align: middle;
  white-space: nowrap;
}
.tool-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
}
.tool-field {
  --dsk-field-bg: #FBFAF7;
  --dsk-field-focus: var(--clay);
  --dsk-paste-bg: #EFECE6;
  --dsk-paste-bg-hover: #E4E0D8;
}
.tool-field:focus-within {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}
.tool-row .btn-primary {
  flex: 0 0 auto;
}
.tool-row .btn-ghost {
  min-width: 0;
}

.btn {
  appearance: none;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-align: center;
  text-decoration: none;
  letter-spacing: -0.01em;
  color: inherit;
}
.btn:disabled { opacity: 0.65; cursor: default; }
.btn-ghost {
  flex: 0 0 auto;
  min-width: 88px;
  background: #fff;
  color: var(--ink);
  border-color: #D6D0C7;
}
.btn-ghost:hover { background: #F5F2EC; color: var(--ink); }
.btn-primary { flex: 1; background: var(--clay); color: #fff; border-color: var(--clay); }
.btn-primary:hover { background: #6F4730; color: #fff; border-color: #6F4730; }
.btn-link {
  background: none;
  border: 0;
  color: var(--clay);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  min-height: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  border-radius: 0;
}
.btn-link:hover { color: var(--ink); }

.btn:focus-visible,
.nav a:focus-visible,
.menu-btn:focus-visible,
.brand:focus-visible,
.skip:focus-visible,
.status:focus-visible,
.menu-panel a:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

.tool-hint,
.noscript-note,
.download-all-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--hint);
}
.status {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.status[data-state="parsing"] { color: var(--ink); }
.status[data-state="error"] {
  color: var(--danger);
  background: var(--danger-bg);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
}
.status[data-state="ready"] { color: var(--ok); }
.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.65rem;
}
.status-actions .btn { flex: none; min-height: 44px; }
.status[hidden],
.results[hidden] { display: none; }

.spinner {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  border: 2px solid color-mix(in srgb, var(--clay) 22%, transparent);
  border-top-color: var(--clay);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -0.1em;
  margin-right: 0.35em;
}
@keyframes spin { to { transform: rotate(360deg); } }

.results { margin-top: 12px; display: grid; gap: 8px; }
.result-block { display: grid; gap: 8px; }
.result-meta { font-size: 13px; color: var(--muted); }
.result-meta strong { color: var(--ink); font-weight: 700; }
.media-card {
  display: grid;
  grid-template-columns: 4.4rem 1fr auto;
  gap: 0.7rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem;
  background: #FBFAF7;
}
.media-card img {
  width: 4.4rem;
  height: 4.4rem;
  object-fit: cover;
  border-radius: 8px;
  background: var(--line);
}
.media-card .ph {
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 8px;
  background: #E8D5C4;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #5C3A28;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.media-info { min-width: 0; }
.media-info .kind {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clay);
}
.media-info .name {
  display: block;
  font-size: 0.86rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-card .btn { min-height: 44px; padding: 0.4rem 0.75rem; flex: none; }
.download-all { margin-top: 0.15rem; }

/* How / FAQ / disclaimer */
.below { padding: 28px 0 48px; }
.block { margin-bottom: 32px; }
.block:first-child { margin-top: 0; }
h2 {
  margin: 0 0 16px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 14px;
}
.steps li {
  counter-increment: step;
  padding-left: 36px;
  position: relative;
  color: var(--muted);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.steps strong { display: block; color: var(--ink); font-weight: 700; margin-bottom: 2px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 0 0 16px; color: var(--muted); }
.faq a { color: var(--clay); }
.disclaimer, .note {
  color: var(--hint);
  font-size: 13px;
  line-height: 1.5;
}
.disclaimer { margin: 0; }
.note { margin: 0 0 24px; }

/* Blog / legal / 404 */
.prose { padding: 0 0 48px; }
.prose h1 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 5.2vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-weight: 700;
}
.prose h2 {
  margin: 1.8rem 0 0.6rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.prose p, .prose li { color: var(--ink); }
.prose .lede, .prose .meta { color: var(--muted); }
.prose .meta { font-size: 0.88rem; margin: 0 0 1.2rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose .disclaimer { color: var(--hint); margin-top: 2rem; }
.legal h1 { font-size: clamp(1.7rem, 5.2vw, 2.35rem); }

.blog-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.blog-list a {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}
.blog-list a:hover { border-color: var(--clay); color: inherit; }
.blog-list h2 { margin: 0 0 0.3rem; font-size: 1.05rem; letter-spacing: -0.02em; color: var(--ink); }
.blog-list p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.cta-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.15rem;
  display: grid;
  gap: 0.7rem;
  margin: 1.2rem 0 0;
}
.cta-panel p { margin: 0; color: var(--muted); }
.cta-panel .btn { justify-self: start; flex: 0 0 auto; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 32px;
  color: var(--hint);
  font-size: 13px;
}
.footer-row,
.footer-cols,
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.footer-row { justify-content: space-between; align-items: flex-start; }
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
}
.footer-links a:hover { color: var(--ink); }
.not-affiliated { margin-top: 8px; }

@media (min-width: 880px) {
  .menu-btn { display: none; }
  .nav { display: flex; }
  .header-bar .dsk-account { margin-left: 8px; }
}

@media (min-width: 720px) {
  .header-bar { min-height: 52px; }
  main { padding: 28px 0 0; }
  .profile-home .lede {
    -webkit-line-clamp: unset;
    overflow: visible;
    display: block;
  }
  .cover { width: 56px; height: 56px; }
  .cover svg { width: 56px; height: 56px; }
  .cover i { inset: 6px; font-size: 15px; }
  .hl-name { font-size: 12px; }
  .viewer { padding: 16px 18px 18px; }
  .tool-row .btn-primary { flex: 0 0 auto; min-width: 0; }
}

/* Short screens: keep the paste box and Download button on the first screen */
@media (max-height: 700px) {
  main { padding-top: 14px; }
  .lede { margin-bottom: 8px; font-size: 0.9375rem; }
  .highlights { padding-bottom: 10px; }
  .type-bar { margin-bottom: 8px; }
  .viewer { padding: 10px 12px 12px; }
  .profile-home .lede,
  .profile .lede {
    font-size: 0.875rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* Narrow phones: keep H1 + type bar + paste + primary button on the first screen */
@media (max-width: 430px) {
  main { padding-top: 14px; }
  .lede { margin-bottom: 10px; font-size: 0.9375rem; line-height: 1.4; }
  .type-bar { margin-bottom: 8px; }
  .viewer { padding: 10px 10px 12px; }
}

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


/* download-site-kit success row + footer tip, in site colours */
.btn.coffee-btn {
  flex: none;
  background: var(--clay);
  color: #fff;
  border-color: var(--clay);
  text-decoration: none;
}
.btn.coffee-btn:hover { background: #6F4730; color: #fff; }
.btn.download-another {
  flex: none;
  background: var(--clay);
  color: #fff;
  border-color: var(--clay);
  text-decoration: none;
}
.btn.download-another:hover { background: #6F4730; color: #fff; }
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}
.footer-coffee { color: var(--muted); }
.footer-coffee:hover { color: var(--ink); }
.paste-hint[data-state="error"] {
  color: var(--danger);
  background: var(--danger-bg);
}

.sample-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 10px 0 0;
}
.sample-btn {
  min-width: 0;
  font-weight: 600;
}
.sample-icon { flex: none; }
.sample-credit {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}
.sample-credit a {
  color: inherit;
  text-underline-offset: 2px;
}
.sample-credit a:hover { color: var(--ink); }

.file-progress { display: grid; gap: 8px; margin: 0 0 4px; }
.file-progress[hidden] { display: none; }
.file-progress-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.file-progress-row .bar { flex: 1 1 12rem; min-width: 0; }
.file-progress .btn { flex: none; min-height: 36px; }
.file-fallback { margin: 0; font-size: 0.8125rem; color: var(--muted); }
.file-fallback a { color: inherit; text-underline-offset: 2px; }
.media-card.is-saving { opacity: 0.9; }

.sample-credit-note { color: var(--muted); }

/* download-site-kit primitives. Brand typography and colours stay on the site.
 * Tokens: --dsk-* with fallbacks to common site variables.
 */
.btn.is-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.btn-spinner {
  display: block;
  flex: none;
  width: 16px;
  height: 16px;
  animation: dsk-btn-spin .8s linear infinite;
}
@keyframes dsk-btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation: none; }
}

.tool-samples { display: grid; gap: 8px; margin: 12px 0 0; }
.tool-sample {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin: 0;
}
.sample-credit { font-size: 0.78125rem; line-height: 1.5; color: var(--dsk-ink-2, var(--ink-2, var(--muted, #57534E))); }
.tool.is-downloading .sample-link:disabled,
.tool.is-downloading .paste-link:disabled,
.tool.is-downloading [data-paste]:disabled { cursor: not-allowed; opacity: .65; }

.paste-hint { margin: 10px 0 0; }
.paste-hint[hidden] { display: none; }

.tool-out { scroll-margin-top: 16px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tool-out .download-another,
[data-results] .download-another,
.results .download-another { justify-self: start; margin-top: 4px; }

.page-share { margin: 2px 0 2px; }
.page-share[hidden] { display: none; }
.page-share-heading {
  margin: 0 0 4px;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--dsk-ok, var(--ok, #3F5D46));
}
.page-share-invite {
  margin: 0 0 10px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--dsk-ink-2, var(--ink-2, var(--muted, #57534E)));
}
.page-share-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.page-share-action {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--dsk-line, var(--rule, var(--line, #E4DFD6)));
  border-radius: 10px;
  background: var(--dsk-paper, var(--paper, var(--card, #fff)));
  color: var(--dsk-ink, var(--ink, #1C1917));
  text-decoration: none;
  cursor: pointer;
  flex: none;
  -webkit-tap-highlight-color: transparent;
}
.page-share-action svg { width: 24px; height: 24px; display: block; pointer-events: none; }
.page-share-action:hover {
  background: var(--dsk-paper-2, var(--paper-2, var(--bg, #F5F2EC)));
  border-color: var(--dsk-ink, var(--ink, #1C1917));
}
.page-share-action:focus { outline: none; }
.page-share-action:focus-visible {
  outline: 3px solid var(--dsk-accent, var(--accent, var(--clay, #8A5A3C)));
  outline-offset: 2px;
}
.page-share-action.is-copied {
  color: var(--dsk-ok, var(--ok, #3F5D46));
  border-color: var(--dsk-ok, var(--ok, #3F5D46));
}
.page-share-note {
  margin: 8px 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
}
.page-share-note[hidden] { display: none; }

.form-lock-note { color: var(--dsk-ink, var(--ink, #1C1917)); }
.form-lock-note[hidden] { display: none; }
.tool.is-downloading input:disabled,
.tool.is-downloading textarea:disabled { cursor: not-allowed; opacity: .65; }
.tool.is-downloading button[type=submit]:disabled { cursor: not-allowed; }

.page-coffee { display: grid; gap: 8px; justify-items: start; margin: 16px 0 0; }
.page-coffee-row {
  display: flex;
  flex-wrap: wrap;
  align-items: safe center;
  gap: 8px 14px;
  max-width: 100%;
}
.page-coffee-hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--dsk-ink-2, var(--ink-2, var(--muted, #57534E)));
  flex: 1 1 16rem;
  min-inline-size: 0;
}
.coffee-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  flex: none;
  text-decoration: none;
}
.coffee-btn .coffee-icon,
.footer-coffee .coffee-icon { display: block; flex: none; }
a.footer-coffee {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
a.footer-coffee .coffee-icon { width: 14px; height: 14px; }

@media (max-width: 640px) {
  .tool { padding: 14px 12px 16px; }
}

.bar {
  position: relative;
  min-height: 30px;
  border: 1px solid var(--dsk-line, var(--line, #E4DFD6));
  background: var(--dsk-paper, var(--paper, #fff));
  overflow: hidden;
  border-radius: 8px;
}
.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--dsk-accent, var(--accent, var(--clay, #8A5A3C)));
  opacity: 0.3;
  transition: width 0.2s;
}
.bar.is-indeterminate .bar-fill {
  width: 35%;
  animation: dsk-bar-indeterminate 1.2s ease-in-out infinite;
}
.bar-text {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 6px 10px;
  font-size: 0.8125rem;
  line-height: 1.35;
}
.bar-label { min-width: 0; }
.bar-eta {
  flex: none;
  color: var(--dsk-ink-2, var(--ink-2, var(--muted, #57534E)));
}
@keyframes dsk-bar-indeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(350%); }
}
@media (prefers-reduced-motion: reduce) {
  .bar-fill { transition: none; }
  .bar.is-indeterminate .bar-fill { animation: none; width: 100%; opacity: 0.2; }
}

/* In-field paste: the button sits inside the input border, at the right. */
.tool-field {
  display: flex;
  align-items: stretch;
  min-width: 0;
  flex: 1 1 12rem;
  border: var(--dsk-field-border, 1px solid var(--dsk-line, var(--line, #D6D0C7)));
  border-radius: var(--dsk-field-radius, 10px);
  background: var(--dsk-field-bg, var(--dsk-paper, var(--paper, #fff)));
  overflow: hidden;
}
.tool-field:focus-within {
  border-color: var(--dsk-field-focus, var(--dsk-accent, var(--accent, var(--clay, #8A5A3C))));
  outline: var(--dsk-field-focus-outline, none);
  outline-offset: var(--dsk-field-focus-offset, 0);
}
.tool-field input,
.tool-field textarea {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  border: 0;
  border-radius: 0;
  outline: none;
  box-shadow: none;
  background: transparent;
}
.tool-field [data-paste],
.tool-field .paste-link {
  flex: none;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  border: 0;
  border-left: var(--dsk-field-split, 1px solid var(--dsk-line, var(--line, #D6D0C7)));
  border-radius: 0;
  background: var(--dsk-paste-bg, #EFECE6);
  box-shadow: none;
  min-height: 0;
  white-space: nowrap;
}
.tool-field [data-paste]:hover,
.tool-field .paste-link:hover {
  background: var(--dsk-paste-bg-hover, #E4E0D8);
}
.paste-icon {
  display: block;
  flex: none;
  width: 16px;
  height: 16px;
}

/* Auth, quota, and paywall chrome. Brand colours stay on the site via tokens. */
.dsk-account {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-left: 8px;
  min-width: 0;
}
.dsk-account-status,
.dsk-account-plan {
  font-size: 0.8125rem;
  line-height: 1.3;
  color: var(--dsk-ink-2, var(--ink-2, var(--muted, #57534E)));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 10rem;
}
.dsk-account-btn {
  margin: 0;
  padding: 0 10px;
  min-height: 36px;
  border: 1px solid var(--dsk-line, var(--line, #E4DFD6));
  border-radius: 8px;
  background: var(--dsk-paper, var(--paper, #fff));
  color: var(--dsk-ink, var(--ink, #1C1917));
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}
.dsk-account-btn:hover {
  border-color: var(--dsk-ink, var(--ink, #1C1917));
}
.dsk-account-btn:focus { outline: none; }
.dsk-account-btn:focus-visible {
  outline: 3px solid var(--dsk-accent, var(--accent, var(--clay, #8A5A3C)));
  outline-offset: 2px;
}

.dsk-quota-note {
  margin: 10px 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--dsk-ink-2, var(--ink-2, var(--muted, #57534E)));
}
.dsk-paywall {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 14px 14px 16px;
  border: 1px solid var(--dsk-line, var(--line, #E4DFD6));
  border-radius: 12px;
  background: var(--dsk-paper, var(--paper, #fff));
  justify-items: start;
}
.dsk-paywall-title {
  margin: 0;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--dsk-ink, var(--ink, #1C1917));
}
.dsk-paywall-copy,
.dsk-paywall-note {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--dsk-ink-2, var(--ink-2, var(--muted, #57534E)));
}
.dsk-paywall-note[hidden] { display: none; }
.dsk-auth-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}
.dsk-auth-form input[type="email"] {
  flex: 1 1 12rem;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--dsk-line, var(--line, #D6D0C7));
  border-radius: 10px;
  background: var(--dsk-field-bg, var(--dsk-paper, var(--paper, #fff)));
  color: var(--dsk-ink, var(--ink, #1C1917));
  font: inherit;
}
.dsk-auth-form input[type="email"]:focus {
  outline: none;
  border-color: var(--dsk-accent, var(--accent, var(--clay, #8A5A3C)));
}
