/* Dupe Detector — tool styles. Uses the shared Playhead tokens (tokens.css).
   Defines the shared components this page needs that live per-tool (buttons, faq,
   tool-content, guide modal) plus the tool-specific result UI. */

.dd-main { max-width: 1080px; margin: 0 auto; padding: 0 24px 80px; position: relative; z-index: 11; }

/* shared-ish buttons (per-tool in this repo) */
.text-button { background: transparent; border: 0; cursor: pointer; color: var(--muted); font: inherit; font-size: var(--text-body); font-weight: 700; }
.primary-button, .secondary-button { border-radius: var(--r-md); padding: 12px 16px; font: inherit; font-size: var(--text-small); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; cursor: pointer; transition: .2s; display: inline-flex; align-items: center; gap: 7px; }
.primary-button { border: 1px solid var(--ink); background: var(--solid); color: var(--solid-ink); box-shadow: 0 8px 18px rgba(0,0,0,.13); }
.primary-button:hover { transform: translateY(-2px); }
.secondary-button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.secondary-button:hover { border-color: var(--accent); }
.arrow { transition: transform .2s; }

/* hero */
.dd-hero { text-align: center; padding: 48px 0 12px; animation: rise .6s ease both; }
.dd-hero .eyebrow { justify-content: center; }
.dd-hero h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.0; margin: 18px 0 14px; letter-spacing: -2px; font-weight: 600; }
.dd-hero h1 em { color: var(--accent); font-style: normal; font-weight: 500; font-size: .58em; display: inline-block; margin-top: 8px; }
.dd-hero .hero-copy { max-width: 600px; margin: 0 auto 14px; color: var(--muted); line-height: 1.7; font-size: var(--text-input); }
.dd-hero .hero-copy strong { color: var(--ink); font-weight: 700; }
.dd-scope { display: block; max-width: 600px; margin: 0 auto 22px; font-size: var(--text-small); color: var(--g-2); line-height: 1.55; }

.how-to-button { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 8px 14px; cursor: pointer; font: inherit; font-size: var(--text-small); font-weight: 700; text-transform: uppercase; letter-spacing: .7px; margin-bottom: 26px; transition: .2s; }
.how-to-button:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.how-to-icon { width: 22px; height: 22px; border-radius: 50%; background: var(--solid); color: var(--accent); display: grid; place-items: center; font: 500 13px "DM Mono"; }
.how-to-button:hover .arrow { transform: translateX(3px); }

/* drop card */
.drop-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 44px 28px 26px; background: var(--card); box-shadow: var(--shadow); cursor: pointer; transition: .3s ease; max-width: 580px; margin: 0 auto; position: relative; overflow: hidden; }
.drop-card::before { content: ""; position: absolute; inset: 10px; border: 1px dashed var(--line-2); border-radius: var(--r-md); pointer-events: none; }
.drop-card:hover, .drop-card.dragover { border-color: var(--accent); transform: translateY(-3px); background: var(--surface-2); }
.drop-orbit { display: grid; place-items: center; margin-bottom: 18px; }
.file-icon { width: 64px; height: 74px; border-radius: 8px 15px 8px 8px; background: var(--solid); color: var(--solid-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; box-shadow: 0 12px 24px rgba(0,0,0,.16); transform: rotate(-3deg); position: relative; }
.file-icon > span { font-family: "DM Mono"; font-size: var(--text-small); color: var(--accent); }
.dupe-bars { display: flex; gap: 3px; align-items: flex-end; height: 12px; }
.dupe-bars i { width: 4px; height: 8px; background: #8b95a3; border-radius: 2px; }
.dupe-bars i:nth-child(2) { background: var(--accent); }
.drop-card h2 { font-size: var(--text-emphasis); margin: 0 0 6px; letter-spacing: -.4px; }
.drop-card p { color: var(--muted); margin: 0 0 16px; font-size: var(--text-input); }
.drop-card p button { background: none; border: 0; border-bottom: 1px solid var(--g-3); color: var(--ink); cursor: pointer; font: inherit; font-weight: 600; }
.drop-meta { display: inline-flex; align-items: center; gap: 12px; font-size: var(--text-small); color: var(--g-2); text-transform: uppercase; letter-spacing: .7px; font-weight: 700; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); width: 100%; justify-content: center; }
.drop-meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--g-3); }
.dd-privacy { display: block; max-width: 560px; margin: 16px auto 0; font-size: var(--text-small); color: var(--g-2); line-height: 1.55; }

/* processing */
.dd-processing { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.dd-processing .scanner { width: 110px; height: 110px; margin: 0 auto 24px; border-radius: 30px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; position: relative; overflow: hidden; }
.dd-processing .scanner span { color: var(--accent); font: var(--text-small) "DM Mono"; }
.dd-processing .scan-line { position: absolute; left: 10px; right: 10px; height: 1px; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: ddscan 1.5s ease-in-out infinite; }
@keyframes ddscan { 0%,100% { transform: translateY(-40px); opacity: .3; } 50% { transform: translateY(40px); opacity: 1; } }
.dd-processing h2 { font-size: var(--text-emphasis); margin: 8px 0; letter-spacing: -.4px; }
.dd-processing .kicker { color: var(--g-2); font-size: var(--text-small); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; }

/* results header */
.dd-results-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; margin: 40px 0 20px; animation: rise .5s ease both; }
.dd-results-head .eyebrow { justify-content: flex-start; }
.dd-results-head h1 { font-size: clamp(32px, 4.5vw, 56px); margin: 8px 0 0; letter-spacing: -1.5px; font-weight: 600; }
.dd-results-head h1 em { color: var(--accent); font-style: normal; }
.dd-actions-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* summary */
.dd-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 18px; }
.dd-summary article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; box-shadow: 0 8px 30px rgba(22,25,28,.035); }
.dd-summary .num { font-size: 2rem; font-weight: 700; line-height: 1; font-family: "DM Mono"; }
.dd-summary .num.v { color: #5aa9e6; } .dd-summary .num.a { color: var(--success); }
.dd-summary .lbl { display: block; font-size: var(--text-small); color: var(--g-2); margin-top: 8px; }
.dd-summary .seq { grid-column: 1 / -1; }
.dd-summary .seq strong { font: 500 20px "DM Mono"; letter-spacing: -.5px; }
.dd-summary .seq small { display: block; color: var(--muted); margin-top: 6px; font-size: var(--text-small); }

/* controls */
.dd-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0 0 14px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.dd-controls .ctl-label { font-size: var(--text-small); color: var(--g-2); text-transform: uppercase; letter-spacing: .8px; font-weight: 700; }
.dd-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.dd-seg button { background: transparent; border: none; color: var(--muted); padding: 7px 14px; cursor: pointer; font: inherit; font-size: var(--text-small); font-weight: 600; }
.dd-seg button.active { background: var(--accent); color: var(--accent-ink); }
.dd-check { display: inline-flex; align-items: center; gap: 7px; font-size: var(--text-small); color: var(--muted); cursor: pointer; }
.dd-check input { accent-color: var(--accent); }

.dd-reuse-note { font-size: var(--text-small); color: var(--g-2); line-height: 1.55; margin: 0 0 16px; padding-left: 12px; border-left: 2px solid var(--line-2); }

.dd-intended-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: var(--text-small); color: var(--g-2); margin: 0 0 12px; }
.dd-intended-row button { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 5px 12px; cursor: pointer; font: inherit; font-size: var(--text-small); }
.dd-intended-row button:hover { border-color: var(--accent); }

/* set list */
.dd-set { border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 10px; background: var(--surface); overflow: hidden; }
.dd-set.is-intended { opacity: .5; }
.dd-set > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px 16px; flex-wrap: wrap; }
.dd-set > summary::-webkit-details-marker { display: none; }
.dd-set > summary:hover { background: var(--surface-2); }
.dd-kind { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; letter-spacing: .04em; }
.dd-kind-v { background: rgba(90,169,230,.16); color: #5aa9e6; } .dd-kind-a { background: var(--success-soft); color: var(--success); }
.dd-tag { font-size: 11px; padding: 3px 8px; border-radius: 6px; font-weight: 600; }
.tag-exact { background: var(--danger-soft); color: var(--danger); }
.tag-overlap { background: rgba(224,186,69,.16); color: #c79318; }
.tag-adjacent { background: rgba(70,184,200,.16); color: #2f97a6; }
.dd-id { flex: 1 1 200px; min-width: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dd-name { font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; font-size: var(--text-body); }
.dd-meta { font-size: var(--text-small); color: var(--g-2); }
.dd-mob { font-family: "DM Mono"; font-size: 11px; color: var(--g-3); }
.dd-count { font-weight: 700; white-space: nowrap; font-family: "DM Mono"; } .dd-count em { font-style: normal; font-weight: 400; font-size: var(--text-small); color: var(--g-2); font-family: "Manrope"; }
.dd-body { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.dd-facts { display: flex; flex-wrap: wrap; gap: 18px; margin: 12px 0; font-size: var(--text-small); color: var(--muted); }
.dd-facts b { color: var(--g-2); font-weight: 600; }
.dd-spots-h { font-size: var(--text-micro); text-transform: uppercase; letter-spacing: .8px; color: var(--g-2); margin-bottom: 6px; font-weight: 700; }
.dd-spots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px; }
.dd-spots li { display: flex; gap: 10px; align-items: baseline; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 10px; }
.occ-tc { font-family: "DM Mono"; font-size: var(--text-small); color: var(--ink); }
.occ-track { font-size: var(--text-micro); color: #5aa9e6; }
.occ-dur { font-size: var(--text-micro); color: var(--g-2); margin-left: auto; font-family: "DM Mono"; }
.dd-actions { margin-top: 12px; }
.dd-intend { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 14px; cursor: pointer; font: inherit; font-size: var(--text-small); }
.dd-intend:hover { border-color: var(--accent); color: var(--ink); }

.dd-empty { text-align: center; padding: 50px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.dd-empty h3 { font-size: var(--text-emphasis); margin: 0 0 8px; color: var(--success); }
.dd-empty p { color: var(--g-2); max-width: 460px; margin: 0 auto; line-height: 1.55; }

/* long-form content */
.tool-content { max-width: 760px; margin: 64px auto 0; }
.tool-content h2 { font-size: 22px; letter-spacing: -.6px; margin: 36px 0 12px; }
.tool-content p { color: var(--muted); line-height: 1.75; font-size: var(--text-input); margin: 0 0 12px; }
.tool-steps { color: var(--muted); line-height: 1.7; font-size: var(--text-input); padding-left: 22px; }
.tool-steps li { margin-bottom: 8px; }
.faq { margin-top: 8px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 18px; margin-bottom: 8px; background: var(--surface); }
.faq summary { cursor: pointer; font-weight: 700; font-size: var(--text-input); }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary { margin-bottom: 8px; }
.faq p { color: var(--muted); line-height: 1.65; margin: 0; font-size: var(--text-body); }
.panel-kicker { color: var(--g-2); text-transform: uppercase; letter-spacing: 1px; font-size: var(--text-micro); font-weight: 700; }

/* guide modal */
.guide-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; }
.guide-backdrop { position: absolute; inset: 0; background: rgba(16,18,21,.56); backdrop-filter: blur(10px); }
.guide-dialog { position: relative; width: min(940px, 100%); max-height: min(760px, calc(100vh - 48px)); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 30px 100px rgba(0,0,0,.25); animation: rise .25s ease both; }
.guide-head { min-height: 80px; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.guide-head h2 { margin: 6px 0 0; font-size: 20px; letter-spacing: -.6px; }
.guide-close { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); cursor: pointer; font-size: 19px; color: var(--ink); }
.guide-tabs { display: flex; gap: 4px; padding: 10px 24px; border-bottom: 1px solid var(--line); }
.guide-tabs button { padding: 8px 12px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--g-2); cursor: pointer; font: inherit; font-size: var(--text-small); font-weight: 700; }
.guide-tabs button.active { background: var(--solid); color: var(--solid-ink); }
.guide-content { max-height: calc(100vh - 210px); overflow: auto; }
.guide-pane { padding: 24px; display: grid; grid-template-columns: minmax(250px,.8fr) minmax(300px,1.2fr); gap: 26px; align-items: start; }
.guide-app { font-size: var(--text-body); font-weight: 700; }
.guide-copy ol { margin: 22px 0; padding-left: 20px; color: var(--ink); font-size: var(--text-body); line-height: 1.7; }
.guide-copy li { padding-left: 5px; margin-bottom: 10px; }
.guide-copy p { padding: 12px 14px; border-radius: var(--r-sm); background: var(--success-soft); color: var(--success); font-size: var(--text-small); line-height: 1.55; font-weight: 700; }
.guide-image-frame { height: 460px; position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--solid); box-shadow: 0 12px 30px rgba(0,0,0,.13); }
.guide-pane img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  .dd-results-head { flex-direction: column; align-items: stretch; }
  .dd-actions-row button { flex: 1; }
  .guide-pane { grid-template-columns: 1fr; }
  .guide-image-frame { height: min(420px, 60vh); }
}
