/*
   default-links.css

   Copyleft 🄯 2021 Taiji Yamada <taiji@aihara.co.jp>

   description:

   First, make sure you also have a separate style file called
   default-link.css.

   It controls the decoration of characters by the characteristics of
   the a[href] tag, and this default-links.css also adds symbols as
   icons by pseudo-elements.

   First, the link has the following features:

   1) Links outside the domain (http://〜, https://〜 etc.)

   2) Links to the same domain (.〜, /〜 etc.)

   3) Links to the same page (#〜, ?〜)

   a) Links open in a separate tab or window with target='_blank'

   b) Links without target='_blank'

   The author considers the degree of caution to be in the order of
   1), 3), 2) and a), b).

   Viewers can rest assured that they can click on a page link if they
   look good with these distinct links. Viewers are unknowingly alert
   when tabs are unintentionally opened or jumped out of the
   domain. WikiPedia is a good example of building such accessible
   pages. Due to the difference in the purpose and purpose of the
   pages, the styles cannot be the same, but we think that WikiPedia
   should be used as a reference.

   From this point of view, the style file here decorates the above
   link. However, elaborate decoration can cause troubles, so
   default-link.css is limited to passive alms.

   まず、default-link.css なる別ファイルのスタイルファイルもあることを
   確認してください。

   これは a[href] タグの特徴によって、文字の装飾を制御したり、この
   default-links.css はさらに擬似要素によって、アイコンとしての記号を
   付加します。

   まず、リンクには以下の特徴があります。

   1) ドメイン外へのリンク (http://〜, https://〜 etc.)

   2) ドメイン内へのリンク (.〜, /〜 etc.)

   3) 同ページ内へのリンク (#〜, ?〜)

   a) target='_blank' により別タブや別ウィンドウでオープンするリンク

   b) target='_blank' なしのリンク

   作者は注意度としては、1), 3), 2) と a), b) の順だと考えます。

   閲覧者はこれらが区別されたリンクの見栄えがあれば、安心してページの
   リンクをクリックできます。意図せずタブが開いたり、ドメイン外に飛ば
   されたりすると、閲覧者は無意識ながら警戒をするものです。こうしたア
   クセシビリティに優れた頁を構築されている好例として WikiPedia があげ
   られます。頁の目的や趣旨の違いから、スタイルを同一には出来かねます
   が、WikiPedia を大いに参考にすべきと考えます。

   こうした見地から、ここでのスタイルファイルは上記のリンクに装飾を施
   しています。但し、凝った装飾はトラブルの一因にもなりかねますので、
   default-link.css の方は消極的な施しに制限しています。
*/
/*
   1) links outside domain:		external link	^https:// etc.
   2) links to the same domain:		local link	^/
   3) links to the same document tree:	relative link	^. etc.
   4) links to the same page:		self link	^#, ^?
*/
@supports (max-inline-size) { /* not for SeaMonkey */
a[href] { text-underline-position: auto; text-underline-offset: 25%; }
}
a[href]:link, a[href]:visited { text-decoration: none; }
a[href]:hover, a[href]:active { text-decoration: underline solid; }
@supports (max-inline-size) { /* not for SeaMonkey */
a[href^='#']:hover, a[href^='#']:active,
a[href^='?']:hover, a[href^='?']:active,
a[href^='.']:hover, a[href^='.']:active,
a[href^='/']:hover, a[href^='/']:active {
  text-decoration: underline dotted CanvasText;
}
a:not([href*='://']):hover, a:not([href*='://']):active {
  text-decoration: underline dotted CanvasText;
}
}
@supports not (max-inline-size) { /* for SeaMonkey */
a[href^='#']:hover, a[href^='#']:active,
a[href^='?']:hover, a[href^='?']:active,
a[href^='.']:hover, a[href^='.']:active,
a[href^='/']:hover, a[href^='/']:active {
  text-decoration: underline dotted #777;
}
a:not([href*='://']):hover, a:not([href*='://']):active {
  text-decoration: underline dotted #777;
}
}
a::before, a::after {
  display: inline-block;
  text-decoration: none;
  vertical-align: top;
  font-size: smaller;
}
:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) > a[href^='#']:not(:first-child)::before { content: '⥯ '; }
/*a[href^='#']::before { content: '⥯ '; }*/
a[href^='?']::before { content: '⤺ '; }
a[href^='.']::before { content: '⥪ '; }
a[href^='/']::before { content: '⇱ '; }
a[href^='mailto:']::before {
  content: '🡔 ';
}
a[href^='http:']::before,
a[href^='ftp:']::before {
  content: '⌁ ';
}
a[href^='http:']::after,
a[href^='https:']::after,
a[href^='ftp:']::after {
  content: ' 🡒';
}
a[href][target='_blank']::after {
  content: ' 🡕';
}
a[href^='#']::before,
a[href^='?']::before {
  color: mediumblue;
}
a[href^='mailto:']::before,
a[href][target='_blank']::after {
  color: dodgerblue;
}
a[href^='http:']::before,
a[href^='ftp:']::before,
a[href][rel*='nofollow']::after,
a[href][rel*='sponsored']::after {
  color: orange;
}
@supports (max-inline-size) { /* not for SeaMonkey */
a[href][rel*='noreferrer']::after,
a[href][rel*='noopener']::after {
  color: LinkText;
}
}
@supports not (max-inline-size) { /* for SeaMonkey */
a[href][rel*='noreferrer']::after,
a[href][rel*='noopener']::after {
  color: #777;
}
}
@media (prefers-color-scheme: light) {
a[href]:hover, a[href]:active {
  text-decoration-color: var(--foreground-color, #222);
}
a[href][rel*='noreferrer']::after,
a[href][rel*='noopener']::after {
  color: var(--foreground-color, #222);
}
}
@media (prefers-color-scheme: dark) {
a[href]:hover, a[href]:active {
  text-decoration-color: var(--foreground-color, #ddd);
}
a[href][rel*='noreferrer']::after,
a[href][rel*='noopener']::after {
  color: var(--foreground-color, #ddd);
}
}
/*
   These are treated the same as internal links as follows.

   これらは以下のように内部リンクであるかのように扱われます。
*/
summary {
  cursor: pointer;
}
@supports (max-inline-size) { /* not for SeaMonkey */
summary > span:first-child:not(.default) { text-underline-position: auto; text-underline-offset: 25%; }
}
@supports (max-inline-size) { /* not for SeaMonkey */
summary:hover	> span:first-child:not(.default),
summary:active	> span:first-child:not(.default) {
  text-decoration: underline dotted CanvasText;
}
}
@supports not (max-inline-size) { /* for SeaMonkey */
summary:hover	> span:first-child:not(.default),
summary:active	> span:first-child:not(.default) {
  text-decoration: underline dotted #777;
}
}
@media (prefers-color-scheme: light) {
summary:hover	> span:first-child:not(.default),
summary:active	> span:first-child:not(.default) {
  text-decoration-color: var(--foreground-color, #222);
}
}
@media (prefers-color-scheme: dark) {
summary:hover	> span:first-child:not(.default),
summary:active	> span:first-child:not(.default) {
  text-decoration-color: var(--foreground-color, #ddd);
}
}
