/* Free product description generator (/product-description-generator/).
   Linked only from that page; builds on the tokens in main.css. */

/* ---------- hero ---------- */
.page-hero.dg-hero{padding-top:28px}
.page-hero.dg-hero h1{font-size:48px;line-height:1.1;letter-spacing:-.015em;max-width:1000px}
.dg-hero .sub{font-size:18px;line-height:1.5;max-width:700px;margin-top:12px;text-wrap:pretty}
.dg-crumbs{order:-2;font-size:15px;line-height:1.4;color:var(--muted);margin:0 0 12px}
.dg-crumbs a{border-bottom:1px solid #cfcfcf}
.dg-crumbs a:hover{border-color:var(--ink)}
.dg-crumbs span[aria-hidden]{margin:0 6px}

/* ---------- tool layout ---------- */
.dg-tool{display:grid;grid-template-columns:minmax(0,440px) minmax(0,1fr);gap:24px;align-items:start;max-width:1240px;margin:28px auto 0}
.dg-tool [hidden]{display:none!important}
.dg-form{background:#fff;border:1px solid #E4E4E4;border-radius:20px;padding:24px;box-shadow:0 14px 36px rgba(21,21,21,.06)}
.dg-output{background:var(--card);border-radius:20px;padding:24px;min-height:100%;scroll-margin-top:140px}
body.no-banner .dg-output{scroll-margin-top:100px}

/* ---------- form ---------- */
.dg-group+.dg-group{margin-top:16px}
.dg-legend,.dg-label-top{display:block;font-size:15px;font-weight:600;line-height:1.3;margin:0 0 8px}
.dg-legend .opt,.dg-label-top .opt{font-weight:400;color:var(--muted)}
fieldset.dg-group{border:0;padding:0;min-width:0}

.dg-file{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.dg-drop{display:flex;align-items:center;gap:14px;border:1.5px dashed #C9C9C9;border-radius:14px;padding:16px 18px;cursor:pointer;transition:border-color .2s ease,background-color .2s ease}
.dg-drop:hover,.dg-drop.is-over{border-color:var(--green-dark);background:rgba(115,255,104,.08)}
.dg-file:focus-visible+.dg-drop{outline:3px solid var(--green);outline-offset:2px}
.dg-drop-icon{flex:0 0 auto;width:44px;height:44px;border-radius:50%;background:var(--green);display:flex;align-items:center;justify-content:center}
.dg-drop-icon svg{width:22px;height:22px;stroke:var(--ink);stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round}
.dg-drop-main{display:block;font-size:16px;font-weight:600;line-height:1.3}
.dg-drop-sub{display:block;font-size:14px;line-height:1.4;color:var(--muted);margin-top:2px}
.dg-photo{display:flex;align-items:center;gap:14px;border:1px solid #E4E4E4;border-radius:14px;padding:10px 12px}
.dg-photo img{width:64px;height:64px;object-fit:cover;border-radius:10px;background:var(--card-alt)}
.dg-photo-name{flex:1 1 auto;min-width:0;font-size:14px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dg-link-btn{font-size:14px;font-weight:500;color:var(--ink);text-decoration:underline;text-underline-offset:3px;padding:6px 4px}

.dg-textarea,.dg-input,.dg-select{width:100%;font-family:inherit;font-size:16px;color:var(--ink);background:#fff;border:1px solid #D6D6D6;border-radius:12px;transition:border-color .2s ease,box-shadow .2s ease}
.dg-textarea{min-height:84px;padding:12px 14px;line-height:1.5;resize:vertical}
.dg-input{height:46px;padding:0 14px}
.dg-select{height:46px;padding:0 34px 0 12px;appearance:none;-webkit-appearance:none;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23151515' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 10px center/16px no-repeat}
.dg-textarea:focus,.dg-input:focus,.dg-select:focus{outline:0;border-color:var(--green-dark);box-shadow:0 0 0 3px rgba(115,255,104,.35)}
.dg-textarea::placeholder,.dg-input::placeholder{color:#9A9A9A}
.dg-hint{display:flex;justify-content:space-between;gap:12px;font-size:13px;line-height:1.4;color:var(--muted);margin-top:6px}
.dg-hint span:last-child{flex:0 0 auto;font-variant-numeric:tabular-nums}

.dg-seg{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;background:var(--card-alt);border-radius:14px;padding:4px}
.dg-seg input{position:absolute;opacity:0;pointer-events:none}
.dg-seg label{display:flex;align-items:center;justify-content:center;height:40px;border-radius:10px;font-size:15px;font-weight:500;cursor:pointer;transition:background-color .2s ease,color .2s ease}
.dg-seg label:hover{background:rgba(21,21,21,.06)}
.dg-seg input:checked+label{background:var(--ink);color:#fff}
.dg-seg input:focus-visible+label{outline:3px solid var(--green);outline-offset:1px}

.dg-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 10px}
.dg-options label{display:block;font-size:13px;font-weight:500;color:var(--muted);margin:0 0 6px}
.dg-more{margin-top:12px}
.dg-more summary{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:500;line-height:1.4;padding:4px 0;cursor:pointer;list-style:none}
.dg-more summary::-webkit-details-marker{display:none}
.dg-more summary::after{content:"";width:7px;height:7px;border-right:1.6px solid var(--ink);border-bottom:1.6px solid var(--ink);transform:translateY(-2px) rotate(45deg);transition:transform .2s ease}
.dg-more[open] summary::after{transform:translateY(1px) rotate(-135deg)}
.dg-more summary:focus-visible{outline:3px solid var(--green);outline-offset:2px;border-radius:4px}
.dg-more .dg-options{margin-top:8px}

.dg-submit{width:100%;justify-content:center;height:54px;font-size:17px;margin-top:22px}
.dg-submit:disabled{cursor:progress;opacity:.85;transform:none}
.dg-submit.is-busy::before{content:"";width:18px;height:18px;border-radius:50%;border:2px solid rgba(21,21,21,.25);border-top-color:var(--ink);animation:dg-spin .8s linear infinite}
.dg-note{font-size:13px;line-height:1.4;color:var(--muted);text-align:center;margin-top:10px}
.dg-form-error{font-size:14px;line-height:1.4;color:#B3261E;margin-top:12px}
.dg-turnstile{margin-top:14px}
.dg-ts-hint{font-size:14px;line-height:1.4;color:var(--ink);margin-top:8px}

/* ---------- output ---------- */
.dg-example-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.dg-pill{display:inline-block;font-size:12px;font-weight:600;line-height:1;padding:6px 10px;border-radius:999px;background:#fff;border:1px solid #DADADA}
.dg-example-caption{font-size:14px;line-height:1.45;color:var(--muted)}
.dg-example-notes{font-size:14.5px;line-height:1.5;margin:10px 0 14px;padding-left:12px;border-left:3px solid var(--green)}
.dg-example-more{font-size:14px;line-height:1.5;color:var(--muted);margin:14px 0 0}
.dg-read{font-size:15px;line-height:1.45;color:var(--muted);margin:0}
.dg-read strong{color:var(--ink);font-weight:600}
.dg-read:focus{outline:0}

.dg-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}
.dg-bar .dg-copy-all{margin-left:auto}
.dg-tabs{display:inline-flex;gap:4px;background:#E9E9E9;border-radius:999px;padding:4px;max-width:100%;overflow-x:auto}
.dg-tab{height:36px;padding:0 16px;border-radius:999px;font-size:14px;font-weight:500;white-space:nowrap;color:var(--ink)}
.dg-tab[aria-selected="true"]{background:#fff;box-shadow:0 1px 4px rgba(21,21,21,.12);font-weight:600}
.dg-tab:focus-visible{outline:3px solid var(--green);outline-offset:1px}

.dg-field{background:#fff;border-radius:14px;padding:14px 16px;margin-top:12px}
.dg-field-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.dg-label{font-size:14px;font-weight:600}
.dg-count{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.dg-count.is-over{color:#B3261E;font-weight:600}
.dg-field-head .dg-copy{margin-left:auto}
.dg-copy{height:30px;padding:0 12px;border-radius:999px;border:1px solid #D6D6D6;background:#fff;font-size:13px;font-weight:500;color:var(--ink);white-space:nowrap;transition:background-color .2s ease,border-color .2s ease}
.dg-copy:hover{border-color:var(--ink)}
.dg-copy.is-done{background:var(--green);border-color:var(--green)}
.dg-copy-all{height:34px;padding:0 14px;font-weight:600}
.dg-text{font-size:15.5px;line-height:1.55;margin:0;overflow-wrap:anywhere}
.dg-title{font-size:18px;font-weight:600;line-height:1.35}
.dg-desc p{font-size:15.5px;line-height:1.6;margin:0}
.dg-desc p+p{margin-top:10px}
.dg-bullets{margin:0;padding:0;list-style:none}
.dg-bullets li{position:relative;display:flex;align-items:flex-start;gap:10px;padding:6px 0 6px 18px;font-size:15.5px;line-height:1.5}
.dg-bullets li+li{border-top:1px solid #F0F0F0}
.dg-bullets li::before{content:"";position:absolute;left:2px;top:15px;width:7px;height:7px;border-radius:50%;background:var(--green-dark)}
.dg-bullets li>span{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
.dg-copy-one{flex:0 0 auto;height:26px;padding:0 10px;border-radius:999px;border:1px solid #E0E0E0;font-size:12px;font-weight:500;color:var(--muted);background:#fff}
.dg-copy-one:hover{color:var(--ink);border-color:var(--ink)}
.dg-copy-one.is-done{background:var(--green);border-color:var(--green);color:var(--ink)}
@media (hover:hover){
  .dg-bullets .dg-copy-one{opacity:0;transition:opacity .15s ease}
  .dg-bullets li:hover .dg-copy-one,.dg-bullets .dg-copy-one:focus-visible,.dg-bullets .dg-copy-one.is-done{opacity:1}
}
.dg-tags{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none}
.dg-tags li{font-size:13.5px;line-height:1;padding:7px 10px;border-radius:999px;background:var(--card-alt)}

.dg-missing{margin-top:16px}
.dg-missing-title{font-size:14px;font-weight:600;margin:0}
.dg-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.dg-chip{height:32px;padding:0 12px;border-radius:999px;border:1.5px dashed #BDBDBD;background:transparent;font-size:14px;color:var(--ink)}
.dg-chip:hover{border-color:var(--green-dark);background:rgba(115,255,104,.12)}
.dg-chip:disabled{opacity:.45;cursor:default}
.dg-missing-note{font-size:13px;color:var(--muted);margin:8px 0 0}

.dg-upsell{display:flex;gap:16px;align-items:flex-start;background:#fff;border-left:4px solid var(--green);border-radius:14px;padding:18px 20px;margin-top:18px}
.dg-upsell-img{flex:0 0 auto;width:96px;height:96px;object-fit:cover;border-radius:12px;background:var(--card-alt)}
.dg-upsell-title{font-size:17px;font-weight:600;line-height:1.3;margin:0}
.dg-upsell-text{font-size:14.5px;line-height:1.5;margin:6px 0 0}
.dg-upsell-btn{height:46px;margin-top:14px}
.dg-upsell-btn[aria-busy="true"]{opacity:.6;pointer-events:none}
.dg-upsell-note{font-size:13px;color:var(--muted);margin:8px 0 0}

.dg-status{display:flex;align-items:center;gap:12px;font-size:15px;line-height:1.45;border-radius:14px;padding:16px 18px}
.dg-status.is-loading{background:#fff}
.dg-status.is-loading::before{content:"";flex:0 0 auto;width:22px;height:22px;border-radius:50%;border:2.5px solid #E2E2E2;border-top-color:var(--green-dark);animation:dg-spin .8s linear infinite}
.dg-status.is-error{background:#FDECEA;color:#8C1D18;margin-bottom:14px}
.dg-status.has-cta{flex-direction:column;align-items:flex-start}
.dg-limit-btn{height:46px}
.dg-output.is-loading .dg-skeleton{display:block}
.dg-skeleton{display:none;margin-top:12px}
.dg-skeleton span{display:block;height:14px;border-radius:7px;margin-top:12px;background:linear-gradient(90deg,#ECECEC 0%,#F6F6F6 50%,#ECECEC 100%);background-size:200% 100%;animation:dg-shimmer 1.4s ease-in-out infinite}
.dg-skeleton span:nth-child(1){width:70%;height:20px}
.dg-skeleton span:nth-child(2){width:95%}
.dg-skeleton span:nth-child(3){width:88%}
.dg-skeleton span:nth-child(4){width:92%}
.dg-skeleton span:nth-child(5){width:60%}
@keyframes dg-spin{to{transform:rotate(360deg)}}
@keyframes dg-shimmer{0%{background-position:100% 0}100%{background-position:-100% 0}}
@media (prefers-reduced-motion:reduce){
  .dg-skeleton span,.dg-status.is-loading::before,.dg-submit.is-busy::before{animation:none}
}

/* ---------- below the tool ---------- */
.dg-how .icon-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.dg-how .icon-card h3{font-size:19px;font-weight:600;line-height:1.3}
.dg-table-wrap{max-width:1040px;margin:40px auto 0;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid #E4E4E4;border-radius:14px}
.dg-table{width:100%;border-collapse:collapse;font-size:15.5px;line-height:1.5}
.dg-table th,.dg-table td{padding:14px 16px;text-align:left;vertical-align:top;border-bottom:1px solid #ECECEC;min-width:150px}
.dg-table thead th{background:var(--card-alt);font-weight:600}
.dg-table tbody th{font-weight:600;min-width:96px}
.dg-table tbody tr:last-child>*{border-bottom:0}
.dg-sources{max-width:1040px;margin:14px auto 0;font-size:14px;line-height:1.55;color:var(--muted)}
.dg-sources a{text-decoration:underline;text-underline-offset:3px}

.dg-cta{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:48px;align-items:center;max-width:1100px;margin:0 auto;background:var(--card);border-radius:24px;padding:48px}
.dg-cta h2{font-size:40px;line-height:1.15}
.dg-cta p{font-size:17px;line-height:1.6;margin-top:16px}
.dg-cta .btn-row{justify-content:flex-start;margin-top:28px}
.dg-cta .note{font-size:14px;color:var(--muted);margin-top:12px}
.dg-cta img{width:100%;height:auto;border-radius:16px}
.dg-related{max-width:1100px;margin:28px auto 0;font-size:16px;line-height:1.6;text-align:center}
.dg-related a{text-decoration:underline;text-underline-offset:3px}

/* ---------- responsive ---------- */
@media (min-width:1600px){
  .page-hero.dg-hero h1{font-size:56px}
}
@media (max-width:1199px){
  .page-hero.dg-hero h1{font-size:44px}
  .dg-cta{grid-template-columns:1fr;gap:28px;padding:40px}
  .dg-cta h2{font-size:34px}
}
@media (max-width:999px){
  .dg-tool{grid-template-columns:minmax(0,1fr)}
  .dg-output{min-height:0}
}
@media (max-width:809px){
  .page-hero.dg-hero{padding-top:20px}
  .page-hero.dg-hero h1{font-size:32px;line-height:1.15}
  .dg-hero .sub{font-size:16px;margin-top:12px}
  .dg-crumbs{font-size:14px}
  .dg-tool{margin-top:24px;gap:16px}
  .dg-form,.dg-output{padding:18px;border-radius:16px}
  .dg-more .dg-options{grid-template-columns:minmax(0,1fr)}
  .dg-seg label{font-size:14px}
  .dg-field{padding:12px 14px}
  .dg-upsell{flex-direction:column}
  .dg-how .icon-grid{grid-template-columns:1fr}
  .dg-table{font-size:14px}
  .dg-table th,.dg-table td{padding:10px 12px;min-width:140px}
  .dg-cta{padding:24px 20px;border-radius:18px}
  .dg-cta h2{font-size:28px}
  .dg-cta p{font-size:16px}
  .dg-cta .btn-row{justify-content:center}
}
