.dd-section { padding-top: 76px; padding-bottom: 76px; scroll-margin-top: 24px; }
.dd-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.dd-section-heading h2 { margin: 14px 0 12px; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.04em; line-height: 1.5; }
.dd-section-heading > div > p:last-child { margin: 0; font-size: 16px; color: var(--muted); }
.dd-mobile-break { display: none; }
.dd-expand, .dd-secondary { display: inline-flex; justify-content: center; align-items: center; gap: 12px; border: 1px solid #d6deea; border-radius: 9px; background: #fff; color: #34445c; padding: 12px 17px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.dd-expand:hover, .dd-secondary:hover:not(:disabled) { background: #f3f7fe; border-color: #a9c8f5; }
.dd-expand:focus-visible, .dd-shell button:focus-visible, .dd-dialog button:focus-visible, .dd-slide-launch:focus-visible { outline: 3px solid #1a73e8; outline-offset: 4px; }
.dd-shell { border: 1px solid #dce3ed; border-radius: 22px; padding: 24px; background: #fff; box-shadow: 0 12px 40px #22365308; }
.dd-shell *, .dd-dialog-header * { box-sizing: border-box; }
.dd-shell [hidden] { display: none !important; }
.dd-simulation-label { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.dd-simulation-label > span { flex-shrink: 0; padding: 4px 9px; border-radius: 5px; color: #1a73e8; background: #e8f0fe; font-size: 12px; font-weight: 700; }
.dd-simulation-label p { margin: 0; color: #6a7688; font-size: 12px; line-height: 1.6; }
.dd-shell .service, .dd-dialog-header .service { display: inline-flex; gap: 0; margin: 0; vertical-align: middle; }
.dd-shell .service img, .dd-dialog-header .service img { width: 28px; height: 28px; object-fit: contain; }
.dd-route { display: flex; align-items: center; gap: 10px; padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid #e6ebf2; }
.dd-route-node { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 1px solid #e0e6ef; border-radius: 10px; background: #f8fafc; padding: 8px; }
.dd-route-node strong { color: #5f6e82; font-size: 14px; font-weight: 500; white-space: nowrap; }
.dd-route-node .service img { width: 24px; height: 24px; }
.dd-document-symbol { font-size: 25px; color: #7b8ca4; line-height: 1; }
.dd-route-node.is-active { border-color: #4285f4; background: #f3f7ff; box-shadow: 0 0 0 3px #edf3fe; }
.dd-route-node.is-active strong { color: #1a73e8; }
.dd-route-node.is-done { border-color: #b4d9bf; background: #f4faf6; }
.dd-route-node.is-done strong { color: #2a6040; }
.dd-route-check { display: none; position: absolute; top: -7px; right: -5px; align-items: center; justify-content: center; width: 18px; height: 18px; border: 2px solid #fff; border-radius: 50%; background: #188038; color: #fff; font-size: 11px; font-weight: 700; }
.dd-route-node.is-done .dd-route-check { display: flex; }
.dd-route-arrow { flex-shrink: 0; color: #99a8ba; font-size: 18px; }
.dd-route-branch { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 1.8; }
.dd-route-branch::before { content: ''; position: absolute; top: 50%; left: -8px; right: -8px; height: 1px; background: #dce3ed; }
.dd-route-branch .dd-route-node { z-index: 1; }
.dd-main { display: grid; grid-template-columns: minmax(160px, .63fr) minmax(250px, 1fr) minmax(340px, 1.35fr); align-items: start; gap: 20px; }
.dd-column-label { margin: 3px 0 16px; }
.dd-column-label > span { font-size: 12px; letter-spacing: .1em; color: #7d8a9c; }
.dd-column-label h3 { margin: 5px 0 0; font-size: 16px; }
.dd-document { position: relative; width: 100%; max-width: 242px; margin: 0; overflow: hidden; border: 1px solid #e0e6ed; border-radius: 8px; box-shadow: 0 8px 20px #202b430a; }
.dd-document > img { display: block; width: 100%; height: auto; }
.dd-scan { display: none; position: absolute; top: 8%; left: 0; right: 0; height: 2px; background: #4285f4; box-shadow: 0 -16px 28px 12px #4285f433, 0 0 5px #4285f4; }
.dd-shell[data-phase="analyzing"] .dd-scan { display: block; animation: dd-scan 2s linear both; }
.dd-highlight { display: none; position: absolute; border: 1px solid #4285f4; border-radius: 3px; background: #4285f41c; }
.dd-highlight-company { top: 36.5%; left: 6%; width: 76%; height: 5.8%; }
.dd-highlight-amount { top: 73%; right: 7%; width: 43%; height: 8%; }
.dd-shell[data-phase="analyzing"] .dd-highlight { display: block; animation: dd-highlight 1.2s .7s both; }
.dd-shell[data-phase="analyzing"] .dd-highlight-amount { animation-delay: 1.7s; }
.dd-shell.has-data .dd-highlight { display: block; border-color: #34a853; background: #34a85312; }
.dd-source-caption { margin: 12px 0 0; color: #7a8799; font-size: 12px; overflow-wrap: anywhere; line-height: 1.7; }
.dd-source-caption > span { display: block; color: #536782; }
.dd-source-note { color: #53647b; font-size: 14px; line-height: 1.8; margin: 18px 0 0; }
.dd-card { position: relative; min-width: 0; border: 1px solid #e0e6ef; border-radius: 13px; overflow: hidden; background: #fff; transition: border-color .2s, box-shadow .2s; }
.dd-card.is-active { border-color: #4285f4; box-shadow: 0 0 0 3px #edf3fe; }
.dd-card.is-done { border-color: #bfdcc8; }
.dd-card > header { display: flex; align-items: center; gap: 10px; padding: 15px 16px 12px; }
.dd-card > header > div { flex: 1; min-width: 0; }
.dd-card > header small { display: block; margin-bottom: 5px; color: #7a8799; font-size: 12px; line-height: 1.4; }
.dd-card h3 { margin: 0; color: #293a53; font-size: 16px; line-height: 1.5; }
.dd-badge { display: inline-block; flex-shrink: 0; color: #7a8799; font-size: 12px; white-space: nowrap; line-height: 1.6; }
.dd-card.is-active .dd-badge { color: #1a73e8; font-weight: 600; }
.dd-card.is-done .dd-badge { color: #188038; }
.dd-fields { display: grid; grid-template-columns: .8fr 1.2fr; gap: 12px 16px; margin: 5px 16px 14px; }
.dd-fields > div { min-width: 0; }
.dd-fields .dd-field-wide { grid-column: 1 / -1; }
.dd-fields dt { margin-bottom: 5px; color: #7a8799; font-size: 12px; }
.dd-fields dd { min-height: 24px; margin: 0; color: #29446b; font-size: 14px; font-weight: 600; line-height: 1.65; overflow-wrap: anywhere; }
.dd-fields [data-dd-field="amountLabel"] { color: #1a73e8; font-size: 18px; font-variant-numeric: tabular-nums; }
.dd-card-note { margin: 0; padding: 10px 16px; border-top: 1px solid #edf0f5; background: #fafbfd; font-size: 12px; color: #758197; line-height: 1.7; }
.dd-between { position: relative; height: 26px; display: flex; align-items: center; justify-content: center; color: #a5b4c8; font-size: 18px; }
.dd-data-dot { display: none; position: absolute; top: 0; width: 7px; height: 7px; background: #4285f4; border-radius: 50%; }
.dd-shell[data-phase="registering"] .dd-data-dot { display: block; animation: dd-transfer .65s linear both; }
.dd-table-wrap { padding: 0 10px 12px; }
.dd-table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; font-size: 12px; }
.dd-table th { background: #edf6f0; color: #497556; font-weight: 500; }
.dd-table th, .dd-table td { padding: 9px 6px; border: 1px solid #e1e8e4; line-height: 1.65; overflow-wrap: anywhere; }
.dd-table th:first-child { width: 17%; }
.dd-table th:nth-child(2) { width: 32%; }
.dd-table th:nth-child(3) { width: 30%; }
.dd-table th:last-child { width: 21%; }
.dd-table td { color: #3d6850; background: #f7fbf8; font-variant-numeric: tabular-nums; }
.dd-table .dd-empty-row td { height: 58px; text-align: center; color: #8390a3; background: #fcfdfc; font-size: 12px; }
.dd-table .dd-added-row { animation: dd-row-in .35s ease both; }
.dd-tasks { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 12px; padding: 6px 16px 18px; margin: 0; list-style: none; }
.dd-tasks li { display: flex; align-items: flex-start; gap: 7px; color: #6b788b; font-size: 14px; line-height: 1.55; }
.dd-task-check { flex-shrink: 0; margin-top: 2px; display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid #d8e0ea; border-radius: 50%; font-size: 12px; }
.dd-tasks li.is-current { color: #1a73e8; }
.dd-tasks li.is-current .dd-task-check { border: 2px solid #d5e4fc; border-top-color: #4285f4; animation: dd-spin .8s linear infinite; }
.dd-tasks li.is-done { color: #35684a; }
.dd-tasks li.is-done .dd-task-check { border-color: #d5eadc; background: #e6f4ea; color: #188038; }
.dd-output-fork { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: 32px; align-items: end; text-align: center; color: #a5b4c8; font-size: 17px; }
.dd-output-fork > span { position: absolute; top: 10px; left: 25%; right: 25%; height: 10px; border: 1px solid #cfd9e7; border-bottom: 0; border-radius: 5px 5px 0 0; }
.dd-output-fork::before { position: absolute; top: 0; left: 50%; height: 10px; border-left: 1px solid #cfd9e7; content: ''; }
.dd-output-fork i { font-style: normal; }
.dd-shell[data-phase="delivering"] .dd-output-fork { color: #4285f4; }
.dd-shell[data-phase="delivering"] .dd-output-fork > span { border-color: #4285f4; }
.dd-outputs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dd-outputs .dd-card { display: flex; flex-direction: column; min-height: 265px; }
.dd-outputs .dd-card > header { padding: 14px 13px 12px; gap: 8px; border-bottom: 1px solid #edf0f5; }
.dd-outputs .dd-card > header small { font-size: 12px; }
.dd-outputs .dd-card h3 { font-size: 15px; }
.dd-outputs .dd-card > .dd-badge { margin: auto 13px 12px; }
.dd-output-placeholder { margin: 24px 15px; color: #8390a3; font-size: 14px; line-height: 1.8; }
.dd-saved-document, .dd-sent-mail { padding: 13px; animation: dd-row-in .35s ease both; }
.dd-folder-path, .dd-mail-to { margin: 0 0 13px; color: #738198; font-size: 12px; line-height: 1.6; }
.dd-file { display: flex; align-items: flex-start; gap: 9px; }
.dd-pdf-icon { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 39px; border: 1px solid #f2d4d0; border-radius: 5px; color: #c64034; background: #fff5f4; font-size: 10px; font-weight: 700; }
.dd-file strong { min-width: 0; font-size: 14px; font-weight: 500; line-height: 1.8; overflow-wrap: anywhere; }
.dd-mail-subject { display: block; color: #34445c; font-size: 14px; line-height: 1.7; }
.dd-mail-body { margin: 10px 0; color: #65758d; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.dd-delivery-ok { margin: 16px 0 0; color: #188038; font-size: 12px; line-height: 1.7; }
.dd-controls { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding: 20px 0 14px; background: #fff; border-top: 1px solid #e0e6ef; }
.dd-status { display: flex; align-items: center; gap: 12px; }
.dd-status-mark { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; color: #1a73e8; background: #edf3fe; font-size: 13px; }
#dd-status-text { margin: 0; color: #29446b; font-size: 16px; font-weight: 600; line-height: 1.6; }
#dd-status-detail { margin: 4px 0 0; color: #78859a; font-size: 12px; line-height: 1.7; }
.dd-shell[data-phase="complete"] .dd-status-mark { color: #188038; background: #e6f4ea; }
.dd-shell[data-phase="complete"] #dd-status-text { color: #188038; }
.dd-buttons { display: flex; gap: 10px; flex-shrink: 0; }
.dd-primary { min-height: 46px; padding: 12px 22px; border: 1px solid #1a73e8; border-radius: 9px; background: #1a73e8; color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.dd-primary:hover { background: #155fbd; }
.dd-shell button:disabled { opacity: .45; cursor: default; }
.dd-footer-note { margin: 2px 0 0; font-size: 12px; color: #7b8799; line-height: 1.8; }
.dd-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; padding: 0; margin: -1px; clip-path: inset(50%); white-space: nowrap; border: 0; }
.dd-dialog { width: min(1380px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; color: var(--ink); border: 1px solid #dce3ed; border-radius: 20px; background: #fff; overflow: auto; }
.dd-dialog::backdrop { background: #162641b8; }
.dd-dialog-header { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 24px; border-bottom: 1px solid #e6ebf2; background: #fff; }
.dd-dialog-header > div { display: flex; align-items: center; gap: 12px; }
.dd-dialog-header h2 { margin: 0; font-size: 18px; line-height: 1.6; }
.dd-dialog .dd-shell { border: 0; border-radius: 0; box-shadow: none; }
.is-document-demo-open { overflow: hidden; }
.dd-slide-launch { padding: 10px 14px; border: 1px solid #aecbf4; border-radius: 8px; background: #fff; color: #1a73e8; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.dd-slide-launch:hover { background: #e8f0fe; }
.gemini-center:has(.dd-slide-launch) { gap: 12px; }

/* The enlarged view keeps the entire working surface readable on a laptop. */
.dd-dialog-header { padding: 10px 20px; }
.dd-dialog .dd-shell { padding: 18px 20px; }
.dd-dialog .dd-simulation-label { margin-bottom: 12px; }
.dd-dialog .dd-route { margin-bottom: 16px; padding-bottom: 14px; }
.dd-dialog .dd-card > header { padding-top: 10px; padding-bottom: 10px; }
.dd-dialog .dd-card > header small { display: none; }
.dd-dialog .dd-card-note, .dd-dialog .dd-source-note, .dd-dialog .dd-column-label > span { display: none; }
.dd-dialog .dd-column-label { margin: 0 0 12px; }
.dd-dialog .dd-document { max-width: 205px; }
.dd-dialog .dd-fields { gap: 8px 12px; }
.dd-dialog .dd-fields dt { margin-bottom: 3px; }
.dd-dialog .dd-fields dd { line-height: 1.5; }
.dd-dialog .dd-outputs .dd-card { min-height: 220px; }
.dd-dialog .dd-outputs .dd-card.is-done > .dd-badge { display: none; }
.dd-dialog .dd-controls { margin-top: 16px; padding: 12px 0; }

@media (min-width: 601px) {
  .dd-route-branch { grid-template-columns: 1fr; gap: 6px; padding-left: 13px; flex: 1; }
  .dd-route-branch .dd-route-node { min-height: 30px; flex-direction: row; padding: 3px 8px; }
  .dd-route-branch .service img { width: 21px; height: 21px; }
  .dd-route-branch::before { top: 16px; bottom: 16px; left: 0; right: auto; width: 13px; height: auto; background: none; border: 1px solid #cfd9e7; border-right: 0; }
  .dd-route-branch .dd-route-check { width: 16px; height: 16px; top: -4px; right: -4px; font-size: 10px; }
}

@keyframes dd-scan { from { top: 8%; } to { top: 91%; } }
@keyframes dd-highlight { 0% { opacity: 0; } 35%, 100% { opacity: 1; } }
@keyframes dd-transfer { from { top: 0; opacity: 0; } 25% { opacity: 1; } to { top: 24px; opacity: 1; } }
@keyframes dd-row-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dd-spin { to { transform: rotate(360deg); } }

@media (min-width: 901px) and (max-width: 1200px) {
  .dd-shell { padding: 20px; }
  .dd-main { grid-template-columns: minmax(150px, .56fr) minmax(245px, 1fr) minmax(310px, 1.25fr); gap: 15px; }
  .dd-card > header { padding: 12px; gap: 7px; flex-wrap: wrap; }
  .dd-card > header > .dd-badge { margin-left: auto; }
  .dd-card h3 { font-size: 14px; }
  .dd-fields { margin: 5px 12px 12px; gap: 10px; }
  .dd-tasks { padding: 6px 12px 15px; grid-template-columns: 1fr; gap: 8px; }
  .dd-outputs { gap: 10px; }
  .dd-route { gap: 7px; }
  .dd-route-node { gap: 5px; padding: 7px; }
  .dd-route-node strong { font-size: 12px; }
  .dd-route-branch { gap: 9px; }
  .dd-outputs .dd-card > header { align-items: flex-start; flex-wrap: wrap; }
  .dd-outputs .dd-card h3 { font-size: 14px; }
}

@media (max-width: 900px) {
  .dd-main { grid-template-columns: minmax(180px, .7fr) minmax(0, 1fr); gap: 24px; }
  .dd-automation { grid-column: 1 / -1; }
  .dd-outputs .dd-card { min-height: 240px; }
  .dd-route-node { flex-direction: column; gap: 6px; padding: 8px 5px; }
  .dd-route-node strong { font-size: 12px; }
  .dd-route { gap: 8px; }
  .dd-route-branch { gap: 8px; }
  .dd-source .dd-document { margin: 0 auto; }
  .dd-section-heading { align-items: flex-end; }
  .dd-controls { gap: 14px; }
  .dd-status-mark { display: none; }
  .dd-dialog-header { padding: 12px 20px; }
}

@media (max-width: 600px) {
  .dd-section { padding-top: 48px; padding-bottom: 48px; }
  .dd-section-heading { display: block; }
  .dd-section-heading h2 { font-size: 28px; }
  .dd-section-heading > div > p:last-child { font-size: 14px; line-height: 1.8; }
  .dd-expand { margin-top: 18px; }
  .dd-mobile-break { display: initial; }
  .dd-shell { padding: 18px; border-radius: 15px; }
  .dd-simulation-label { gap: 8px; align-items: flex-start; }
  .dd-main { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .dd-document { max-width: 240px; }
  .dd-source-note { display: none; }
  .dd-source-caption { text-align: center; }
  .dd-outputs { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .dd-outputs .dd-card { min-height: 225px; }
  .dd-card > header { padding: 13px; }
  .dd-card h3 { font-size: 14px; }
  .dd-tasks { grid-template-columns: 1fr; }
  .dd-route { display: grid; grid-template-columns: 1fr; gap: 3px; }
  .dd-route-node { flex-direction: row; justify-content: flex-start; padding: 8px 14px; gap: 10px; min-height: 38px; }
  .dd-route-node strong { font-size: 14px; }
  .dd-route-arrow { justify-self: center; transform: rotate(90deg); line-height: 1; }
  .dd-route-branch { grid-template-columns: 1fr 1fr; }
  .dd-route-branch::before { display: none; }
  .dd-route-branch::after { content: ''; position: absolute; top: -6px; right: 25%; left: 25%; height: 6px; border: 1px solid #dce3ed; border-bottom: none; }
  .dd-controls { flex-direction: column; align-items: stretch; padding-top: 14px; gap: 12px; }
  #dd-status-text { font-size: 14px; }
  #dd-status-detail { font-size: 12px; }
  .dd-buttons > button:first-child { flex: 1; }
  .dd-buttons button { min-height: 46px; padding: 11px 13px; }
  .dd-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 13px; }
  .dd-dialog-header { padding: 10px 14px; gap: 8px; }
  .dd-dialog-header h2 { font-size: 14px; }
  .dd-dialog-header > div > span { display: none; }
  .dd-dialog-header button { padding: 10px 12px; }
  .dd-dialog .dd-shell { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .dd-shell *, .dd-shell *::before, .dd-shell *::after { animation: none !important; transition: none !important; }
  .dd-shell .dd-scan, .dd-shell .dd-data-dot { display: none !important; }
  .dd-shell .dd-highlight { opacity: 1; }
}

@media print {
  .dd-section, .dd-dialog, .dd-slide-launch { display: none !important; }
}
