/* dir.im: an index of addresses. Every listing is a web address, set in mono with its extension in that extension's
   own hue (--h, computed per extension, the same everywhere). Link blue is the only accent: this is a directory of
   links. Screenshots sit in a slim browser frame whose address bar shows the domain. */

:root {
	--ground: #fafaf9; --surface: #ffffff; --ink: #15171c; --muted: #5b626e; --rule: #e3e4e6; --accent: #1f3fff;
	--accent-ink: #ffffff; --soft: #f1f2f4;
	--sans: 'Schibsted Grotesk', 'Helvetica Neue', Arial, system-ui, sans-serif;
	--mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
	--ext-bg-l: 93%; --ext-fg-l: 30%; --ext-name-l: 38%; --ext-sat: 70%;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--ground: #0e1014; --surface: #161920; --ink: #eceef3; --muted: #9aa2af; --rule: #272c35; --accent: #8a9bff;
		--accent-ink: #0e1014; --soft: #1c2028; --ext-bg-l: 20%; --ext-fg-l: 82%; --ext-name-l: 72%; --ext-sat: 55%;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--ground: #0e1014; --surface: #161920; --ink: #eceef3; --muted: #9aa2af; --rule: #272c35; --accent: #8a9bff;
	--accent-ink: #0e1014; --soft: #1c2028; --ext-bg-l: 20%; --ext-fg-l: 82%; --ext-name-l: 72%; --ext-sat: 55%;
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.12; text-wrap: balance; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.65rem); }
p { margin: 0 0 1em; }
.wrap { width: min(1220px, 100% - 32px); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; left: 16px; top: 8px; width: auto; height: auto; clip: auto; background: var(--surface); padding: 8px 12px; z-index: 20; }
.label { font: 600 .75rem/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .8rem; }

/* masthead */
.masthead { border-bottom: 1px solid var(--rule); background: var(--ground); position: relative; z-index: 10; }
.bar { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.wordmark { display: inline-flex; align-items: baseline; gap: 0; text-decoration: none; margin-right: auto; font: 700 1.5rem/1 var(--mono); letter-spacing: -.03em; }
.wm-ext { color: var(--accent); }
.wm-tag { font: 500 .78rem/1 var(--sans); letter-spacing: .02em; color: var(--muted); margin-left: 12px; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.nav > a { text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav > a[aria-current="page"] { color: var(--accent); }
.nav-search { display: none; }
.menu-toggle, .menu-close { display: none; }
@media (max-width: 900px) {
	.wm-tag { display: none; }
	.menu-toggle { display: inline-flex; align-items: center; text-decoration: none; font-weight: 600; border: 1px solid var(--rule); padding: 7px 14px; border-radius: 999px; }
	.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; }
	.nav > a { padding: 12px 0; border-bottom: 1px solid var(--rule); }
	.nav-search { display: block; padding: 12px 0 4px; }
	.nav:target, .nav.open { display: flex; }
	.nav:target .menu-close, .nav.open .menu-close { display: block; color: var(--muted); border-bottom: 0; }
}

/* search */
.search { display: flex; gap: 8px; max-width: 640px; }
.search input { flex: 1; min-width: 0; font: 400 1rem var(--sans); padding: 12px 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); color: var(--ink); }
.search input:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.search button { font: 600 1rem var(--sans); padding: 12px 18px; border: 0; border-radius: 10px; background: var(--ink); color: var(--ground); cursor: pointer; }
.search button:hover { background: var(--accent); color: var(--accent-ink); }

/* home */
main { padding: 36px 0 72px; }
.intro { padding: 20px 0 44px; border-bottom: 1px solid var(--rule); margin-bottom: 40px; }
.intro h1 { max-width: 19ch; }
.intro h1 em { font-style: normal; color: var(--accent); }
.lede { color: var(--muted); font-size: 1.12rem; max-width: 62ch; }
.block { margin: 0 0 56px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.block-head h2 { margin: 0; }
.block-intro { color: var(--muted); margin-top: -6px; }
.more { font-weight: 600; text-decoration: none; white-space: nowrap; color: var(--accent); }
.topic-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); column-gap: 24px; border-top: 1px solid var(--rule); }
@media (max-width: 600px) { .topic-grid { grid-template-columns: 1fr 1fr; } .topic-grid a { padding-right: 4px; font-size: .95rem; } }
.topic-grid li { border-bottom: 1px solid var(--rule); }
.topic-grid a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px 12px 0; text-decoration: none; font-weight: 600; }
.topic-count, .az-count, .ext-count { font: 500 .85rem var(--mono); color: var(--muted); }
.az { columns: 4 200px; column-gap: 32px; list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.az li { break-inside: avoid; padding: 3px 0; }
.az a { text-decoration: none; }
.ext-grid { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 14px; }
.ext-grid li { display: inline-flex; align-items: center; gap: 6px; }

/* extension chip and address */
.ext { display: inline-block; font: 700 .82rem/1 var(--mono); padding: 5px 8px; border-radius: 6px; text-decoration: none;
	background: hsl(var(--h) var(--ext-sat) var(--ext-bg-l)); color: hsl(var(--h) var(--ext-sat) var(--ext-fg-l)); }
a.ext:hover { outline: 2px solid hsl(var(--h) var(--ext-sat) var(--ext-name-l)); color: hsl(var(--h) var(--ext-sat) var(--ext-fg-l)); }
.ext-row { display: flex; flex-wrap: wrap; gap: 8px; }
.addr { font-family: var(--mono); font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.addr-ext { color: hsl(var(--h) var(--ext-sat) var(--ext-name-l)); }

/* cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; transition: border-color .15s; }
.card:hover { border-color: var(--accent); }
.card-link { display: flex; flex-direction: column; flex: 1; text-decoration: none; color: inherit; }
.card-link:hover { color: inherit; }
.card-shot { display: block; aspect-ratio: 16 / 10; background: var(--soft); border-bottom: 1px solid var(--rule); overflow: hidden; }
.card-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 6px; }
.card-body .addr { font-size: 1.02rem; }
.card-title { font-weight: 600; line-height: 1.35; }
.card-desc { color: var(--muted); font-size: .95rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-topics { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px 16px; margin-top: auto; }
.card-topics a, .chips a { font-size: .8rem; font-weight: 600; text-decoration: none; padding: 3px 9px; border-radius: 999px; background: var(--soft); border: 1px solid var(--rule); }
.card-topics a:hover, .chips a:hover { border-color: var(--accent); color: var(--accent); }

/* lists */
.list-head { margin: 4px 0 30px; }
.list-head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.list-head h1 .ext { font-size: .7em; padding: 8px 12px; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: inherit; }
.empty { border: 1px dashed var(--rule); padding: 20px; color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.pager .page-numbers { padding: 6px 12px; border: 1px solid var(--rule); border-radius: 8px; text-decoration: none; font-weight: 600; }
.pager .current { background: var(--ink); color: var(--ground); border-color: var(--ink); }

/* one listing */
.listing { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: start; margin-bottom: 56px; }
@media (max-width: 900px) { .listing { grid-template-columns: 1fr; gap: 24px; } .listing-main { order: -1; } }
.browser { margin: 0; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--surface); }
.browser-bar { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--rule); background: var(--soft); }
.dots { width: 46px; height: 10px; flex: none; background:
	radial-gradient(circle at 5px 5px, #ff5f57 4.5px, transparent 5px),
	radial-gradient(circle at 23px 5px, #febc2e 4.5px, transparent 5px),
	radial-gradient(circle at 41px 5px, #28c840 4.5px, transparent 5px); }
.browser-url { flex: 1; font: 500 .82rem/1 var(--mono); color: var(--muted); background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 6px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser img { width: 100%; height: auto; }
.browser-empty { display: block; padding: 60px 20px; text-align: center; color: var(--muted); }
.listing-address { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: .3em; }
.listing-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 18px; }
.own-words { margin: 0 0 24px; padding: 0 0 0 16px; border-left: 3px solid var(--accent); }
.own-words p { margin: 0 0 6px; font-size: 1.08rem; }
.own-words footer { color: var(--muted); font-size: .85rem; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; padding: 13px 20px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); }
.btn:hover { background: var(--ink); color: var(--ground); }
.visit { margin-bottom: 26px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; }
.facts dt { font: 600 .75rem/1.9 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* footer */
.foot { border-top: 1px solid var(--rule); padding: 40px 0 28px; color: var(--muted); font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr; } }
.wordmark-small { font-size: 1.2rem; color: var(--ink); margin-bottom: 10px; }
.foot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-list a { text-decoration: none; }
.foot-base { border-top: 1px solid var(--rule); margin-top: 28px; padding-top: 16px; font-size: .85rem; }
.foot-base p { margin: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* submit a tool */
.nav > a.nav-submit { color: var(--accent); }
.intro-submit { margin: 14px 0 0; color: var(--muted); }
.submit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
@media (max-width: 900px) { .submit-grid { grid-template-columns: 1fr; gap: 12px; } }
.steps { margin: 0 0 18px; padding-left: 1.2em; display: grid; gap: 8px; }
.small { font-size: .9rem; color: var(--muted); }
.submit-box { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 24px; }
.submit-wrap { scroll-margin-top: 40px; }  /* the redirect's #form: show the box's top edge and the message */
.submit-form .field { display: grid; gap: 6px; margin: 0 0 18px; }
.submit-form label { font-weight: 600; }
.submit-form .req { font: 500 .75rem var(--sans); color: var(--muted); margin-left: 6px; letter-spacing: .04em; text-transform: uppercase; }
.submit-form input, .submit-form textarea, .submit-form select { font: 400 1rem var(--sans); padding: 11px 13px; border: 1px solid var(--rule); border-radius: 10px; background: var(--ground); color: var(--ink); width: 100%; }
.submit-form input:focus, .submit-form textarea:focus, .submit-form select:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.submit-form .btn { border: 0; cursor: pointer; font-size: 1rem; }
.cf-turnstile { margin: 4px 0 18px; min-height: 65px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: 10px; padding: 12px 16px; margin: 0 0 18px; background: var(--ground); }
.notice p { margin: 0; }
.notice-ok { border-left-color: #1a9a5a; }
.notice-error { border-left-color: #d4402b; }
