*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	background-color: #1e2a42;
	color: #f0e8dc;
	font-family: 'DM Sans', sans-serif;
	font-size: 15px;
	line-height: 1.6;
	min-height: 100vh;
	display: flex;
	justify-content: center;
	padding: 48px 16px 64px;
}

.page {
	width: 100%;
	max-width: 520px;
}

/* ── Header ── */
.header {
	margin-bottom: 36px;
}

.logo {
	font-family: 'DM Mono', monospace;
	font-size: 28px;
	font-weight: 500;
	color: #e8b84b;
	letter-spacing: -0.5px;
}

.logo span {
	color: #f0e8dc;
	opacity: 0.4;
}

.tagline {
	font-size: 13px;
	color: #8a9bb8;
	margin-top: 4px;
	font-family: 'DM Mono', monospace;
}

/* ── Message ── */
.message {
	margin-bottom: 16px;
	font-size: 14px;
	color: #e8b84b;
	min-height: 0;
}

/* ── Cards ── */
.form-card,
.result-card {
	background: #253352;
	border: 1px solid #354669;
	border-radius: 12px;
	padding: 24px;
}

.result-card {
	display: flex;
	gap: 24px;
	align-items: flex-start;
}

/* ── Result / QR ── */
.qr-wrap {
	flex-shrink: 0;
}

.qr-wrap img {
	width: 100px;
	height: 100px;
	border-radius: 8px;
	display: block;
	background: #fff;
	padding: 4px;
}

.result-info {
	flex: 1;
	min-width: 0;
}

.short-url {
	font-family: 'DM Mono', monospace;
	font-size: 22px;
	font-weight: 500;
	color: #e8b84b;
	word-break: break-all;
}

.short-url a {
	color: inherit;
	text-decoration: none;
}

.short-url a:hover {
	color: #f0c85c;
}

.inspect-link {
	display: inline-block;
	margin-top: 6px;
	font-size: 12px;
	font-family: 'DM Mono', monospace;
	color: #6a7d96;
	text-decoration: none;
}

.inspect-link:hover {
	color: #8a9bb8;
}

.inspect-note {
	font-size: 12px;
	color: #4a5a73;
	margin-top: 6px;
	line-height: 1.5;
}

/* ── Nav row (result page) ── */
.nav-row {
	display: flex;
	justify-content: space-between;
	margin-top: 16px;
}

.nav-row a {
	font-family: 'DM Mono', monospace;
	font-size: 13px;
	color: #8a9bb8;
	text-decoration: none;
}

.nav-row a:hover {
	color: #e8b84b;
}

/* ── Form fields ──
   Two layout variants via modifier classes:
   Default (.field)          — stacked: label above, input below (create form)
   Inline  (.field--inline)  — side-by-side: label left, input right (modify form)
*/
.field {
	margin-bottom: 14px;
}

.field label {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #8a9bb8;
	margin-bottom: 6px;
	font-family: 'DM Mono', monospace;
}

.field--inline {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.field--inline label {
	display: block;
	margin-bottom: 0;
	width: 90px;
	flex-shrink: 0;
	text-align: right;
}

/* ── Field prefix (e.g. "rou.to/" before tag input) ── */
.field-prefix {
	display: flex;
	align-items: center;
	flex: 1;
}

.field-prefix-label {
	font-family: 'DM Mono', monospace;
	font-size: 14px;
	color: #4a5a73;
	white-space: nowrap;
	padding-right: 4px;
}

/* ── Inputs & selects ── */
select,
input[type="text"],
input[type="number"] {
	background: #1e2a42;
	border: 1px solid #354669;
	border-radius: 7px;
	color: #f0e8dc;
	font-family: 'DM Mono', monospace;
	font-size: 15px;
	padding: 9px 12px;
	transition: border-color 0.15s;
	outline: none;
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
}

select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a9bb8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 32px;
	cursor: pointer;
}

select:focus,
input[type="text"]:focus,
input[type="number"]:focus {
	border-color: #e8b84b;
}

input[type="text"]::placeholder,
input[type="number"]::placeholder {
	color: #4a5a73;
	font-size: 13px;
}

/* Inside .field--inline, inputs fill remaining space */
.field--inline select,
.field--inline input[type="text"],
.field--inline input[type="number"],
.field-prefix input[type="text"] {
	flex: 1;
	width: auto;
}

/* ── Duration row (create form) ── */
.duration-row {
	display: flex;
	gap: 8px;
	align-items: center;
}

.duration-row select:first-child { flex: 1.4; }
.duration-row input[type="number"] { flex: 0.7; width: auto; }
.duration-row select:last-child { flex: 1; }

/* ── Checkboxes ──
   Two variants mirroring the field layout:
   Default (.checkbox-field)         — label is a <small> beside the box (create form)
   Inline  (.checkbox-field--inline) — label is a right-aligned mono tag (modify form)
*/
.checkbox-field {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin-bottom: 16px;
}

.checkbox-field small {
	font-size: 12px;
	color: #8a9bb8;
	line-height: 1.5;
}

.checkbox-field--inline {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.checkbox-field--inline label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #8a9bb8;
	font-family: 'DM Mono', monospace;
	width: 90px;
	flex-shrink: 0;
	text-align: right;
}

input[type="checkbox"] {
	accent-color: #e8b84b;
	width: 15px;
	height: 15px;
	flex-shrink: 0;
	margin-top: 2px;
	cursor: pointer;
}

.checkbox-field--inline input[type="checkbox"] {
	margin-top: 0;
}

/* ── Turnstile ── */
.turnstile-wrap {
	margin: 16px 0;
}

/* ── Submit button ── */
.submit-btn {
	width: 100%;
	background: #e8b84b;
	color: #1e2a42;
	border: none;
	border-radius: 7px;
	font-family: 'DM Mono', monospace;
	font-size: 15px;
	font-weight: 500;
	padding: 11px;
	cursor: pointer;
	letter-spacing: 0.03em;
	transition: background 0.15s, transform 0.1s;
	margin-top: 4px;
}

.submit-btn:hover {
	background: #f0c85c;
}

.submit-btn:active {
	transform: scale(0.99);
}

/* ── Divider ── */
.divider {
	border: none;
	border-top: 1px solid #354669;
	margin: 32px 0 20px;
}

/* ── Section title ── */
.section-title {
	font-family: 'DM Mono', monospace;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #8a9bb8;
	margin-bottom: 12px;
}

/* ── Disclaimer ── */
.disclaimer ul {
	list-style: none;
	padding: 0;
}

.disclaimer li {
	font-size: 13px;
	color: #6a7d96;
	padding: 5px 0 5px 16px;
	position: relative;
	line-height: 1.5;
}

.disclaimer li::before {
	content: '—';
	position: absolute;
	left: 0;
	color: #354669;
}

details summary {
	font-size: 12px;
	color: #8a9bb8;
	cursor: pointer;
	list-style: none;
	margin-top: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: 'DM Mono', monospace;
}

details summary::before {
	content: '▶';
	font-size: 8px;
	transition: transform 0.2s;
}

details[open] summary::before {
	transform: rotate(90deg);
}

details summary::-webkit-details-marker {
	display: none;
}

details ul {
	margin-top: 10px;
}

/* ── Links ── */
a:link, a:visited {
	color: #e8b84b;
	text-decoration: none;
}

a:hover {
	color: #f0c85c;
	text-decoration: underline;
}

strong {
	color: #b09060;
	font-weight: 500;
}

/* ── Inspect page: info table ── */
.info-card {
	background: #253352;
	border: 1px solid #354669;
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 20px;
}

.info-card-title {
	font-family: 'DM Mono', monospace;
	font-size: 20px;
	font-weight: 500;
	color: #e8b84b;
	padding: 20px 24px 16px;
	border-bottom: 1px solid #354669;
	word-break: break-all;
}

.info-table {
	width: 100%;
	border-collapse: collapse;
}

.info-table tr + tr {
	border-top: 1px solid #354669;
}

.info-table th {
	font-family: 'DM Mono', monospace;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #8a9bb8;
	font-weight: 400;
	text-align: right;
	padding: 14px 16px 14px 24px;
	white-space: nowrap;
	width: 1%;
	vertical-align: top;
}

.info-table td {
	font-family: 'DM Mono', monospace;
	font-size: 14px;
	color: #f0e8dc;
	padding: 14px 24px 14px 12px;
	word-break: break-all;
}

.info-table td.status-active {
	color: #6dbf8a;
}

.info-table td.status-inactive {
	color: #c0736a;
}

.info-table thead tr {
	border-bottom: 1px solid #354669;
}

.info-table thead th {
	font-family: 'DM Mono', monospace;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #8a9bb8;
	font-weight: 400;
	text-align: left;
	padding: 12px 16px;
	white-space: nowrap;
	width: auto;
	vertical-align: bottom;
}

.info-table thead th:first-child {
	padding-left: 24px;
}

.info-table tbody td {
	padding: 14px 16px;
	vertical-align: top;
}

.info-table tbody td:first-child {
	padding-left: 24px;
}

.info-table td.check-ok {
	color: #6dbf8a;
}

.info-table td.check-unsafe {
	color: #c0736a;
}

/* ── Inspect page: safety note ── */
.safety-note {
	font-size: 12px;
	color: #4a5a73;
	line-height: 1.6;
	margin-bottom: 24px;
}

/* ── CTA button (inspect continue) ── */
.cta-btn {
	display: block;
	width: 100%;
	background: transparent;
	color: #e8b84b;
	border: 1px solid #e8b84b;
	border-radius: 7px;
	font-family: 'DM Mono', monospace;
	font-size: 15px;
	font-weight: 500;
	padding: 11px;
	cursor: pointer;
	letter-spacing: 0.03em;
	text-align: center;
	text-decoration: none;
	transition: background 0.15s, color 0.15s, transform 0.1s;
}

.cta-btn:hover {
	background: #e8b84b;
	color: #1e2a42;
	text-decoration: none;
}

.cta-btn:active {
	transform: scale(0.99);
}

/* ── Footer ── */
.footer {
	margin-top: 32px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 16px;
	border-top: 1px solid #2d3d55;
}

.footer a {
	font-family: 'DM Mono', monospace;
	font-size: 12px;
	color: #4a5a73;
	text-decoration: none;
}

.footer a:hover {
	color: #e8b84b;
}
